





	.file	"x86cpuid.s"
.text
.globl	OPENSSL_ia32_cpuid
.type	OPENSSL_ia32_cpuid,@function
.align	16
OPENSSL_ia32_cpuid:
	pushl	%ebp
	pushl	%ebx
	pushl	%esi
	pushl	%edi

	xorl	%edx,		%edx
	pushfl
	popl	%eax
	movl	%eax,		%ecx
	xorl	$2097152,	%eax
	pushl	%eax
	popfl
	pushfl
	popl	%eax
	xorl	%eax,		%ecx
	btl	$21,		%ecx
	jnc	.L000nocpuid
	movl	$1,		%eax
	.byte	0x0f,0xa2
.L000nocpuid:
	movl	%edx,		%eax
	movl	%ecx,		%edx
	popl	%edi
	popl	%esi
	popl	%ebx
	popl	%ebp
	ret
.L_OPENSSL_ia32_cpuid_end:
.size	OPENSSL_ia32_cpuid,.L_OPENSSL_ia32_cpuid_end-OPENSSL_ia32_cpuid
.ident	"OPENSSL_ia32_cpuid"
.text
.globl	OPENSSL_rdtsc
.type	OPENSSL_rdtsc,@function
.align	16
OPENSSL_rdtsc:
	xorl	%eax,		%eax
	xorl	%edx,		%edx
	call	.L001PIC_me_up
.L001PIC_me_up:
	popl	%ecx
	addl	$_GLOBAL_OFFSET_TABLE_+[.-.L001PIC_me_up],%ecx
	movl	OPENSSL_ia32cap_P@GOT(%ecx),%ecx
	btl	$4,		(%ecx)
	jnc	.L002notsc
	.byte	0x0f,0x31
.L002notsc:
	ret
.L_OPENSSL_rdtsc_end:
.size	OPENSSL_rdtsc,.L_OPENSSL_rdtsc_end-OPENSSL_rdtsc
.ident	"OPENSSL_rdtsc"
.text
.globl	OPENSSL_instrument_halt
.type	OPENSSL_instrument_halt,@function
.align	16
OPENSSL_instrument_halt:
	call	.L003PIC_me_up
.L003PIC_me_up:
	popl	%ecx
	addl	$_GLOBAL_OFFSET_TABLE_+[.-.L003PIC_me_up],%ecx
	movl	OPENSSL_ia32cap_P@GOT(%ecx),%ecx
	btl	$4,		(%ecx)
	jnc	.L004nohalt
	.long	2421723150
	andl	$3,		%eax
	jnz	.L004nohalt
	pushfl
	popl	%eax
	btl	$9,		%eax
	jnc	.L004nohalt
	.byte	0x0f,0x31
	pushl	%edx
	pushl	%eax
	hlt
	.byte	0x0f,0x31
	subl	(%esp),		%eax
	sbbl	4(%esp),	%edx
	addl	$8,		%esp
	ret
.L004nohalt:
	xorl	%eax,		%eax
	xorl	%edx,		%edx
	ret
.L_OPENSSL_instrument_halt_end:
.size	OPENSSL_instrument_halt,.L_OPENSSL_instrument_halt_end-OPENSSL_instrument_halt
.ident	"OPENSSL_instrument_halt"
.text
.globl	OPENSSL_far_spin
.type	OPENSSL_far_spin,@function
.align	16
OPENSSL_far_spin:
	pushfl
	popl	%eax
	btl	$9,		%eax
	jnc	.L005nospin
	movl	4(%esp),	%eax
	movl	8(%esp),	%ecx
	.long	2430111262
	xorl	%eax,		%eax
	movl	(%ecx),		%edx
	jmp	.L006spin
.align	16
.L006spin:
	incl	%eax
	cmpl	(%ecx),		%edx
	je	.L006spin
	.long	529567888
	ret
.L005nospin:
	xorl	%eax,		%eax
	xorl	%edx,		%edx
	ret
.L_OPENSSL_far_spin_end:
.size	OPENSSL_far_spin,.L_OPENSSL_far_spin_end-OPENSSL_far_spin
.ident	"OPENSSL_far_spin"
.text
.globl	OPENSSL_wipe_cpu
.type	OPENSSL_wipe_cpu,@function
.align	16
OPENSSL_wipe_cpu:
	xorl	%eax,		%eax
	xorl	%edx,		%edx
	call	.L007PIC_me_up
.L007PIC_me_up:
	popl	%ecx
	addl	$_GLOBAL_OFFSET_TABLE_+[.-.L007PIC_me_up],%ecx
	movl	OPENSSL_ia32cap_P@GOT(%ecx),%ecx
	movl	(%ecx),		%ecx
	btl	$1,		(%ecx)
	jnc	.L008no_x87
	btl	$26,		(%ecx)
	jnc	.L009no_sse2
	pxor	%xmm0,		%xmm0
	pxor	%xmm1,		%xmm1
	pxor	%xmm2,		%xmm2
	pxor	%xmm3,		%xmm3
	pxor	%xmm4,		%xmm4
	pxor	%xmm5,		%xmm5
	pxor	%xmm6,		%xmm6
	pxor	%xmm7,		%xmm7
.L009no_sse2:
	.long	4007259865,4007259865,4007259865,4007259865,2430851995
.L008no_x87:
	leal	4(%esp),	%eax
	ret
.L_OPENSSL_wipe_cpu_end:
.size	OPENSSL_wipe_cpu,.L_OPENSSL_wipe_cpu_end-OPENSSL_wipe_cpu
.ident	"OPENSSL_wipe_cpu"
.text
.globl	OPENSSL_atomic_add
.type	OPENSSL_atomic_add,@function
.align	16
OPENSSL_atomic_add:
	movl	4(%esp),	%edx
	movl	8(%esp),	%ecx
	pushl	%ebx
	nop
	movl	(%edx),		%eax
.L010spin:
	leal	(%eax,%ecx),	%ebx
	nop
	.long	447811568
	jne	.L010spin
	movl	%ebx,		%eax
	popl	%ebx
	ret
.L_OPENSSL_atomic_add_end:
.size	OPENSSL_atomic_add,.L_OPENSSL_atomic_add_end-OPENSSL_atomic_add
.ident	"OPENSSL_atomic_add"
.text
.globl	OPENSSL_indirect_call
.type	OPENSSL_indirect_call,@function
.align	16
OPENSSL_indirect_call:
	pushl	%ebp
	movl	%esp,		%ebp
	subl	$28,		%esp
	movl	12(%ebp),	%ecx
	movl	%ecx,		(%esp)
	movl	16(%ebp),	%edx
	movl	%edx,		4(%esp)
	movl	20(%ebp),	%eax
	movl	%eax,		8(%esp)
	movl	24(%ebp),	%eax
	movl	%eax,		12(%esp)
	movl	28(%ebp),	%eax
	movl	%eax,		16(%esp)
	movl	32(%ebp),	%eax
	movl	%eax,		20(%esp)
	movl	36(%ebp),	%eax
	movl	%eax,		24(%esp)
	call	*8(%ebp)
	movl	%ebp,		%esp
	popl	%ebp
	ret
.L_OPENSSL_indirect_call_end:
.size	OPENSSL_indirect_call,.L_OPENSSL_indirect_call_end-OPENSSL_indirect_call
.ident	"OPENSSL_indirect_call"
.section	.init
#ifdef OPENSSL_PIC
	pushl	%ebx
	call    .pic_point0
.pic_point0:
	popl    %ebx
	addl    $_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
	call	OPENSSL_cpuid_setup@PLT
	popl	%ebx
#else
	call	OPENSSL_cpuid_setup
#endif
	jmp	.Linitalign
.align	16
.Linitalign:

.section	.bss
.comm	OPENSSL_ia32cap_P,4,4
.section	.init
	call	.L011PIC_me_up
.L011PIC_me_up:
	popl	%edx
	addl	$_GLOBAL_OFFSET_TABLE_+[.-.L011PIC_me_up],%edx
	movl	OPENSSL_ia32cap_P@GOT(%edx),%edx
		cmpl	$0,(%edx)
		jne	1f
		movl	$1<<10,(%edx)
		pushf
		popl	%eax
		movl	%eax,%ecx
		xorl	$1<<21,%eax
		pushl	%eax
		popf
		pushf
		popl	%eax
		xorl	%ecx,%eax
		btl	$21,%eax
		jnc	1f
		pushl	%edi
		pushl	%ebx
		movl	%edx,%edi
		movl	$1,%eax
		.byte	0x0f,0xa2
		orl	$1<<10,%edx
		movl	%edx,0(%edi)
		popl	%ebx
		popl	%edi
		jmp	1f
	.align	16
	1:
