Skip to content

Instantly share code, notes, and snippets.

@Const-me Const-me/powf.asm
Created Dec 18, 2019

Embed
What would you like to do?
From disassembly of ucrtbase.dll
; =============== S U B R O U T I N E =======================================
; float __cdecl powf(float X, float Y)
public powf
powf proc near ; CODE XREF: cpowf+47p
; DATA XREF: _o_powf+3o ...
var_48 = xmmword ptr -48h
var_38 = xmmword ptr -38h
var_28 = dword ptr -28h
var_18 = dword ptr -18h
sub rsp, 68h
movdqa [rsp+68h+var_48], xmm6
movdqa [rsp+68h+var_38], xmm7
cmp cs:__use_fma3_lib, 0
jnz loc_18002A176
punpckldq xmm1, xmm0
pxor xmm5, xmm5
movd eax, xmm1
movd ecx, xmm0
mov r9d, ecx
btr eax, 1Fh
btr ecx, 1Fh
cmp eax, 7F800000h ; Infinity
jnb loc_180029E20
cmp eax, 3F800000h ; 1.0f
jle loc_180029ED0
loc_180029A5E: ; CODE XREF: powf+4CFj
cmp ecx, 7F800000h ; Infinity
jnb loc_180029D60
cvtps2pd xmm0, xmm1
cmp r9d, 3F880000h ; 1.0625f
jl loc_180029BC0
loc_180029A7A: ; CODE XREF: powf+223j
pshufd xmm2, xmm0, 0EEh
pand xmm2, cs:xmmword_1800BF6F0
movq rcx, xmm2
shr rcx, 2Ch
adc ecx, 0
mov eax, ecx
or ecx, 3FE00h
shl rcx, 2Ch
movq xmm1, rcx
por xmm2, cs:xmmword_1800BF6D0
pshufd xmm3, xmm2, 0EEh
psrlq xmm3, 34h
psubq xmm3, cs:xmmword_1800BF6E0
cvtdq2pd xmm3, xmm3
lea rcx, __log_F_inv_qword
subsd xmm1, xmm2
mulsd xmm1, qword ptr [rcx+rax*8]
movapd xmm2, xmm1
movsd xmm4, cs:qword_1800BF634
mulsd xmm4, xmm1
mulsd xmm1, xmm2
addsd xmm4, qword ptr cs:xmmword_1800BF6D0
mulsd xmm1, xmm4
addsd xmm1, xmm2
mulsd xmm3, cs:qword_1800BF63C
lea rcx, unk_1800BF700
addsd xmm3, qword ptr [rcx+rax*8]
subsd xmm3, xmm1
loc_180029B0E: ; CODE XREF: powf+28Fj powf+9E9j
mulsd xmm0, xmm3
ucomisd xmm0, cs:qword_1800BF644
ja loc_18002A120
ucomisd xmm0, cs:qword_1800BF64C
jbe loc_18002A0F0
movapd xmm3, xmm0
mulpd xmm3, cs:xmmword_1800BF6C0
cvtpd2dq xmm4, xmm3
cvtdq2pd xmm2, xmm4
mulsd xmm2, cs:qword_1800BF654
movd ecx, xmm4
subsd xmm0, xmm2
movapd xmm1, xmm0
movsd xmm3, cs:qword_1800BF65C
mulsd xmm3, xmm0
mulsd xmm0, xmm1
addsd xmm3, qword ptr cs:xmmword_1800BF6D0
mulsd xmm0, xmm3
addsd xmm0, xmm1
mov rax, 3Fh
and eax, ecx
lea rcx, __two_to_jby64_table
mulsd xmm0, qword ptr [rcx+rax*8]
addsd xmm0, qword ptr [rcx+rax*8]
psrad xmm4, 6
psllq xmm4, 34h
paddq xmm4, xmm0
cvtsd2ss xmm0, xmm4
orps xmm0, xmm5
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_180029BC0: ; CODE XREF: powf+64j
cmp r9d, 0
jg short loc_180029C15
cmp ecx, 0
jz loc_180029CB0
and eax, 7F800000h
cmp eax, 4B000000h
jg short loc_180029C15
stmxcsr [rsp+68h+var_28]
mov edx, [rsp+68h+var_28]
or edx, 1F80h
mov [rsp+68h+var_18], edx
ldmxcsr [rsp+68h+var_18]
cvtss2si edx, xmm1
cvtsi2ss xmm2, edx
ldmxcsr [rsp+68h+var_28]
ucomiss xmm2, xmm1
jnz loc_18002A150
rcr edx, 1
jnb short loc_180029C15
movss xmm5, cs:dword_1800BF67C
loc_180029C15: ; CODE XREF: powf+1B4j powf+1C9j ...
pshufd xmm3, xmm0, 0EEh
subsd xmm3, cs:qword_1800BF66C
movq rdx, xmm3
btr rdx, 3Fh
cmp rdx, cs:qword_1800BF664
jnb loc_180029A7A
movapd xmm7, cs:xmmword_1800BF690
movapd xmm1, xmm3
movapd xmm6, xmm3
addsd xmm1, cs:qword_1800BF674
divsd xmm6, xmm1
movapd xmm2, xmm6
mulsd xmm6, xmm3
addsd xmm2, xmm2
movapd xmm1, xmm2
mulsd xmm1, xmm2
pshufd xmm4, xmm1, 44h
mulpd xmm4, xmm7
mulsd xmm2, xmm1
addpd xmm4, cs:xmmword_1800BF6A0
mulsd xmm1, xmm1
mulsd xmm1, xmm2
unpcklpd xmm2, xmm1
mulpd xmm2, xmm4
pshufd xmm1, xmm2, 0EEh
addsd xmm2, xmm1
subsd xmm2, xmm6
addsd xmm3, xmm2
jmp loc_180029B0E
; ---------------------------------------------------------------------------
align 10h
loc_180029CB0: ; CODE XREF: powf+1B9j
mov r8d, eax
movd edx, xmm1
mov eax, 0
mov r10d, 0
mov ecx, 7F800000h
cmp edx, 0
cmovl edx, ecx
cmovl r10d, ecx
cmovg edx, eax
mov ecx, 80000000h
and r8d, 7F800000h
cmp r8d, 4B000000h
cmovg ecx, eax
jg short loc_180029D2F
stmxcsr [rsp+68h+var_28]
mov r8d, [rsp+68h+var_28]
or r8d, 1F80h
mov [rsp+68h+var_18], r8d
ldmxcsr [rsp+68h+var_18]
cvtss2si r8d, xmm1
cvtsi2ss xmm2, r8d
ldmxcsr [rsp+68h+var_28]
ucomiss xmm2, xmm1
cmovnz ecx, eax
jnz short loc_180029D2F
rcr r8d, 1
cmovnb ecx, eax
jnb short loc_180029D2F
mov ecx, r9d
and ecx, 80000000h
loc_180029D2F: ; CODE XREF: powf+2DAj powf+30Cj ...
or ecx, edx
movd xmm0, ecx
cmp r10d, 0
jz short loc_180029D4B
mov r9d, cs:dword_1800BF614
movdqa xmm2, xmm0
call _powf_special
loc_180029D4B: ; CODE XREF: powf+329j powf+A7Cj
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_180029D60: ; CODE XREF: powf+54j
cmp eax, 0
jz loc_180029FB0
movd ecx, xmm0
movd edx, xmm1
cmp ecx, 7F800000h
jz short loc_180029D90
cmp ecx, 0FF800000h
jz short loc_180029DA0
jmp loc_18002A030
; ---------------------------------------------------------------------------
align 10h
loc_180029D90: ; CODE XREF: powf+367j
cmp edx, 0
jl loc_180029FF0
jmp loc_18002A010
; ---------------------------------------------------------------------------
align 20h
loc_180029DA0: ; CODE XREF: powf+36Fj
mov r8d, eax
mov eax, 0
mov ecx, 7F800000h
cmp edx, 0
cmovl edx, eax
cmovg edx, ecx
mov ecx, 80000000h
and r8d, 7F800000h
cmp r8d, 4B000000h
cmovg ecx, eax
jg short loc_180029E06
stmxcsr [rsp+68h+var_28]
mov r8d, [rsp+68h+var_28]
or r8d, 1F80h
mov [rsp+68h+var_18], r8d
ldmxcsr [rsp+68h+var_18]
cvtss2si r8d, xmm1
cvtsi2ss xmm2, r8d
ldmxcsr [rsp+68h+var_28]
ucomiss xmm2, xmm1
cmovnz ecx, eax
jnz short loc_180029E06
rcr r8d, 1
cmovnb ecx, eax
loc_180029E06: ; CODE XREF: powf+3BCj powf+3EEj
or ecx, edx
movd xmm0, ecx
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_180029E20: ; CODE XREF: powf+3Dj
ja loc_180029EB0
cmp ecx, 7F800000h
ja loc_18002A030
cmp ecx, 3F800000h
jz loc_180029FD0
movd eax, xmm1
bt eax, 1Fh
jb short loc_180029E60
cmp ecx, 3F800000h
jb loc_180029FF0
jmp loc_18002A010
; ---------------------------------------------------------------------------
align 20h
loc_180029E60: ; CODE XREF: powf+436j
mov edx, 1
mov eax, 0
mov r8d, 7F800000h
cmp ecx, 0
jz loc_18002A010
cmovnz edx, eax
cmp ecx, 3F800000h
cmovb eax, r8d
movd xmm0, eax
cmp edx, 0
jz short loc_180029E9F
movdqa xmm2, xmm0
mov r9d, cs:dword_1800BF614
call _powf_special
loc_180029E9F: ; CODE XREF: powf+47Dj
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
loc_180029EB0: ; CODE XREF: powf:loc_180029E20j
cmp ecx, 7F800000h
ja loc_18002A090
cmp r9d, 3F800000h
jz loc_180029F80
jmp loc_18002A060
; ---------------------------------------------------------------------------
align 10h
loc_180029ED0: ; CODE XREF: powf+48j
cmp eax, 0
jz short loc_180029F40
movd edx, xmm1
cmp edx, 3F800000h
jnz loc_180029A5E
movd r9d, xmm0
and r9d, 7FFFFFFFh
cmp r9d, 7F800000h
ja short loc_180029F0B
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
loc_180029F0B: ; CODE XREF: powf+4E8j
movd edx, xmm0
or edx, 400000h
movd xmm2, edx
mov r9d, cs:dword_1800BF618
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_180029F40: ; CODE XREF: powf+4C3j
cmp ecx, 7F800000h
jbe short loc_180029FB0
cmp ecx, 7FC00000h
jnb short loc_180029FB0
mov edx, ecx
or edx, 400000h
movd xmm2, edx
mov r9d, cs:dword_1800BF618
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_180029F80: ; CODE XREF: powf+4B3j
cmp eax, 7FC00000h
jnb short loc_180029FB0
mov edx, 3F800000h
movd xmm2, edx
mov r9d, cs:dword_1800BF61C
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_180029FB0: ; CODE XREF: powf+353j powf+536j ...
mov edx, 3F800000h
movd xmm0, edx
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_180029FD0: ; CODE XREF: powf+428j
mov edx, 3F800000h
movd xmm0, edx
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_180029FF0: ; CODE XREF: powf+383j powf+43Ej
pxor xmm0, xmm0
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A010: ; CODE XREF: powf+389j powf+444j ...
mov edx, 7F800000h
movd xmm0, edx
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A030: ; CODE XREF: powf+371j powf+41Cj
movd ecx, xmm0
or ecx, 400000h
movd xmm2, ecx
mov r9d, cs:dword_1800BF618
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_18002A060: ; CODE XREF: powf+4B9j
movd eax, xmm1
or eax, 400000h
movd xmm2, eax
mov r9d, cs:dword_1800BF61C
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A090: ; CODE XREF: powf+4A6j
cmp r9d, 0FFC00000h
jz short loc_18002A0C4
movd ecx, xmm0
or ecx, 400000h
movd xmm2, ecx
mov r9d, cs:dword_1800BF620
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
loc_18002A0C4: ; CODE XREF: powf+687j
movd eax, xmm1
or eax, 400000h
movd xmm2, eax
mov r9d, cs:dword_1800BF620
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A0F0: ; CODE XREF: powf+118j
pxor xmm2, xmm2
orps xmm2, xmm5
mov r9d, cs:dword_1800BF628
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_18002A120: ; CODE XREF: powf+10Aj
mov edx, 7F800000h
movd xmm2, edx
orps xmm2, xmm5
mov r9d, cs:dword_1800BF630
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A150: ; CODE XREF: powf+1F3j
mov edx, 0FFC00000h
movd xmm2, edx
mov r9d, cs:dword_1800BF624
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
loc_18002A176: ; CODE XREF: powf+17j
vpunpckldq xmm1, xmm1, xmm0
vpxor xmm5, xmm5, xmm5
vmovd eax, xmm1
vmovd ecx, xmm0
mov r9d, ecx
and eax, 7FFFFFFFh
and ecx, 7FFFFFFFh
cmp eax, 7F800000h
jnb loc_18002A580
cmp eax, 3F800000h
jle loc_18002A620
loc_18002A1AA: ; CODE XREF: powf+C1Fj
cmp ecx, 7F800000h
jnb loc_18002A4C0
vcvtps2pd xmm0, xmm1
cmp r9d, 3F880000h
jl loc_18002A310
loc_18002A1C7: ; CODE XREF: powf+977j
vpshufd xmm2, xmm0, 0EEh
vpand xmm2, xmm2, cs:xmmword_1800BF6F0
vmovq rcx, xmm2
shr rcx, 2Ch
adc ecx, 0
mov eax, ecx
or ecx, 3FE00h
shl rcx, 2Ch
vmovq xmm1, rcx
vpor xmm2, xmm2, cs:xmmword_1800BF6D0
vpshufd xmm3, xmm2, 0EEh
vpsrlq xmm3, xmm3, 34h
vpsubq xmm3, xmm3, cs:xmmword_1800BF6E0
vcvtdq2pd xmm3, xmm3
lea rcx, __log_F_inv_qword
vsubsd xmm1, xmm1, xmm2
vmulsd xmm1, xmm1, qword ptr [rcx+rax*8]
vmovapd xmm2, xmm1
vmovsd xmm4, cs:qword_1800BF634
vfmadd213sd xmm4, xmm1, qword ptr cs:xmmword_1800BF6D0
vfmadd213sd xmm4, xmm1, cs:qword_1800BF66C
vmulsd xmm1, xmm1, xmm4
vmulsd xmm3, xmm3, cs:qword_1800BF63C
lea rcx, unk_1800BF700
vaddsd xmm3, xmm3, qword ptr [rcx+rax*8]
vsubsd xmm3, xmm3, xmm1
vmulsd xmm0, xmm0, xmm3
vucomisd xmm0, cs:qword_1800BF644
ja loc_18002A880
vucomisd xmm0, cs:qword_1800BF64C
jbe loc_18002A850
vmulpd xmm3, xmm0, cs:xmmword_1800BF6C0
vcvtpd2dq xmm4, xmm3
vcvtdq2pd xmm2, xmm4
vmovd ecx, xmm4
vfnmadd231sd xmm0, xmm2, cs:qword_1800BF654
vmovapd xmm1, xmm0
vmovsd xmm3, cs:qword_1800BF65C
vfmadd213sd xmm3, xmm0, qword ptr cs:xmmword_1800BF6D0
vfmadd213sd xmm3, xmm0, cs:qword_1800BF66C
vmulsd xmm0, xmm0, xmm3
mov rax, 3Fh
and eax, ecx
lea rcx, __two_to_jby64_table
vmovsd xmm3, qword ptr [rcx+rax*8]
vfmadd213sd xmm0, xmm3, xmm3
db 66h, 66h, 66h, 66h, 66h, 66h
nop word ptr [rax+rax+00000000h]
vpsrad xmm4, xmm4, 6
vpsllq xmm4, xmm4, 34h
vpaddq xmm4, xmm4, xmm0
vcvtsd2ss xmm0, xmm0, xmm4
vorps xmm0, xmm0, xmm5
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A310: ; CODE XREF: powf+7B1j
cmp r9d, 0
jg short loc_18002A369
cmp ecx, 0
jz loc_18002A400
and eax, 7F800000h
cmp eax, 4B000000h
jg short loc_18002A369
vstmxcsr [rsp+68h+var_28]
mov edx, [rsp+68h+var_28]
or edx, 1F80h
mov [rsp+68h+var_18], edx
vldmxcsr [rsp+68h+var_18]
vcvtss2si edx, xmm1
vcvtsi2ss xmm2, xmm2, edx
vldmxcsr [rsp+68h+var_28]
vucomiss xmm2, xmm1
jnz loc_18002A8B0
rcr edx, 1
jnb short loc_18002A369
vmovss xmm5, cs:dword_1800BF67C
loc_18002A369: ; CODE XREF: powf+904j powf+919j ...
vpshufd xmm3, xmm0, 0EEh
vsubsd xmm3, xmm3, cs:qword_1800BF66C
vmovq rdx, xmm3
btr rdx, 3Fh
cmp rdx, cs:qword_1800BF664
jnb loc_18002A1C7
vpshufd xmm5, xmm5, 44h
vmovapd xmm1, xmm3
vmovsd xmm5, xmm5, xmm3
vaddsd xmm1, xmm1, cs:qword_1800BF674
vdivsd xmm5, xmm5, xmm1
vmovapd xmm2, xmm5
vmulsd xmm5, xmm5, xmm3
vaddsd xmm2, xmm2, xmm2
vmovapd xmm1, xmm2
vmulsd xmm1, xmm1, xmm2
vpshufd xmm4, xmm1, 44h
vmulpd xmm4, xmm4, cs:xmmword_1800BF690
vmulsd xmm2, xmm2, xmm1
vaddpd xmm4, xmm4, cs:xmmword_1800BF6A0
vmulsd xmm1, xmm1, xmm1
vmulsd xmm1, xmm1, xmm2
vunpcklpd xmm2, xmm2, xmm1
vmulpd xmm2, xmm2, xmm4
vpshufd xmm1, xmm2, 0EEh
vaddsd xmm2, xmm1, xmm2
vsubsd xmm2, xmm2, xmm5
vpshufd xmm5, xmm5, 0EEh
vaddsd xmm3, xmm3, xmm2
jmp loc_180029B0E
; ---------------------------------------------------------------------------
align 20h
loc_18002A400: ; CODE XREF: powf+909j
mov r8d, eax
vmovd edx, xmm1
mov eax, 0
mov r10d, 0
mov ecx, 7F800000h
cmp edx, 0
cmovl edx, ecx
cmovl r10d, ecx
cmovg edx, eax
mov ecx, 80000000h
and r8d, 7F800000h
cmp r8d, 4B000000h
cmovg ecx, eax
jg short loc_18002A482
vstmxcsr [rsp+68h+var_28]
mov r8d, [rsp+68h+var_28]
or r8d, 1F80h
mov [rsp+68h+var_18], r8d
vldmxcsr [rsp+68h+var_18]
vcvtss2si r8d, xmm1
vcvtsi2ss xmm2, xmm2, r8d
vldmxcsr [rsp+68h+var_28]
vucomiss xmm2, xmm1
cmovnz ecx, eax
jnz short loc_18002A482
rcr r8d, 1
cmovnb ecx, eax
jnb short loc_18002A482
mov ecx, r9d
and ecx, 80000000h
loc_18002A482: ; CODE XREF: powf+A2Aj powf+A5Fj ...
or ecx, edx
vmovd xmm0, ecx
cmp r10d, 0
jz loc_180029D4B
mov r9d, cs:dword_1800BF614
vmovdqa xmm2, xmm0
call _powf_special
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_18002A4C0: ; CODE XREF: powf+7A0j
cmp eax, 0
jz loc_18002A6F0
vmovd ecx, xmm0
vmovd edx, xmm1
cmp ecx, 7F800000h
jz short loc_18002A4F0
cmp ecx, 0FF800000h
jz short loc_18002A500
jmp loc_18002A790
; ---------------------------------------------------------------------------
align 10h
loc_18002A4F0: ; CODE XREF: powf+AC7j
cmp edx, 0
jl loc_18002A730
jmp loc_18002A750
; ---------------------------------------------------------------------------
align 20h
loc_18002A500: ; CODE XREF: powf+ACFj
mov r8d, eax
mov eax, 0
mov ecx, 7F800000h
cmp edx, 0
cmovl edx, eax
cmovg edx, ecx
mov ecx, 80000000h
and r8d, 7F800000h
cmp r8d, 4B000000h
cmovg ecx, eax
jg short loc_18002A569
vstmxcsr [rsp+68h+var_28]
mov r8d, [rsp+68h+var_28]
or r8d, 1F80h
mov [rsp+68h+var_18], r8d
vldmxcsr [rsp+68h+var_18]
vcvtss2si r8d, xmm1
vcvtsi2ss xmm2, xmm2, r8d
vldmxcsr [rsp+68h+var_28]
vucomiss xmm2, xmm1
cmovnz ecx, eax
jnz short loc_18002A569
rcr r8d, 1
cmovnb ecx, eax
loc_18002A569: ; CODE XREF: powf+B1Cj powf+B51j
or ecx, edx
vmovd xmm0, ecx
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
loc_18002A580: ; CODE XREF: powf+789j
ja short loc_18002A5F0
cmp ecx, 7F800000h
ja loc_18002A790
cmp ecx, 3F800000h
jz loc_18002A710
vmovd eax, xmm1
bt eax, 1Fh
jb short loc_18002A5C0
cmp ecx, 3F800000h
jb loc_18002A730
jmp loc_18002A750
; ---------------------------------------------------------------------------
align 20h
loc_18002A5C0: ; CODE XREF: powf+B92j
mov eax, 0
mov r8d, 7F800000h
cmp ecx, 3F800000h
cmovb eax, r8d
vmovd xmm0, eax
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A5F0: ; CODE XREF: powf:loc_18002A580j
cmp ecx, 7F800000h
ja loc_18002A7F0
cmp r9d, 3F800000h
jz loc_18002A6C0
vmovdqa xmm0, xmm1
jmp loc_18002A7C0
; ---------------------------------------------------------------------------
align 20h
loc_18002A620: ; CODE XREF: powf+794j
cmp eax, 0
jz short loc_18002A680
vmovd edx, xmm1
cmp edx, 3F800000h
jnz loc_18002A1AA
cmp ecx, 7F800000h
ja short loc_18002A64E
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
loc_18002A64E: ; CODE XREF: powf+C2Bj
vmovd edx, xmm0
or edx, 400000h
vmovd xmm2, edx
mov r9d, cs:dword_1800BF618
call _powf_special
movdqa xmm7, [rsp+68h+var_38]
movdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_18002A680: ; CODE XREF: powf+C13j
cmp ecx, 7F800000h
jbe short loc_18002A6F0
cmp ecx, 7FC00000h
jnb short loc_18002A6F0
mov edx, ecx
or edx, 400000h
vmovd xmm2, edx
mov r9d, cs:dword_1800BF618
call _powf_special
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_18002A6C0: ; CODE XREF: powf+BF3j
cmp eax, 7FC00000h
jnb short loc_18002A6F0
mov edx, 3F800000h
vmovd xmm2, edx
mov r9d, cs:dword_1800BF61C
call _powf_special
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A6F0: ; CODE XREF: powf+AB3j powf+C76j ...
mov edx, 3F800000h
vmovd xmm0, edx
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A710: ; CODE XREF: powf+B84j
mov edx, 3F800000h
vmovd xmm0, edx
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A730: ; CODE XREF: powf+AE3j powf+B9Aj
vpxor xmm0, xmm0, xmm0
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A750: ; CODE XREF: powf+AE9j powf+BA0j
mov edx, 7F800000h
vmovd xmm0, edx
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
vaddss xmm0, xmm0, xmm0
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A790: ; CODE XREF: powf+AD1j powf+B78j
vmovd ecx, xmm0
or ecx, 400000h
vmovd xmm2, ecx
mov r9d, cs:dword_1800BF618
call _powf_special
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_18002A7C0: ; CODE XREF: powf+BFDj
vmovd eax, xmm1
or eax, 400000h
vmovd xmm2, eax
mov r9d, cs:dword_1800BF61C
call _powf_special
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A7F0: ; CODE XREF: powf+BE6j
cmp r9d, 0FFC00000h
jz short loc_18002A824
vmovd ecx, xmm0
or ecx, 400000h
vmovd xmm2, ecx
mov r9d, cs:dword_1800BF620
call _powf_special
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
loc_18002A824: ; CODE XREF: powf+DE7j
vmovd eax, xmm1
or eax, 400000h
vmovd xmm2, eax
mov r9d, cs:dword_1800BF620
call _powf_special
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A850: ; CODE XREF: powf+863j
vpxor xmm2, xmm2, xmm2
vorps xmm2, xmm2, xmm5
mov r9d, cs:dword_1800BF628
call _powf_special
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 20h
loc_18002A880: ; CODE XREF: powf+855j
mov edx, 7F800000h
vmovd xmm2, edx
vorps xmm2, xmm2, xmm5
mov r9d, cs:dword_1800BF630
call _powf_special
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
; ---------------------------------------------------------------------------
align 10h
loc_18002A8B0: ; CODE XREF: powf+947j
mov edx, 0FFC00000h
vmovd xmm2, edx
mov r9d, cs:dword_1800BF624
call _powf_special
vmovdqa xmm7, [rsp+68h+var_38]
vmovdqa xmm6, [rsp+68h+var_48]
add rsp, 68h
retn
powf endp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.