;# backdash speed
;#007A07EF
;# backdash min speed
;#007A06FE
;# backdash gravity 
;#007A080E = D9 05 A8778600

func yuukaID_FIX
  mov dword ptr [esi+0x34C],0x0000001A
  ;mov dword ptr [esi+0x34C],0x00000026
  cmp word ptr [esi+0x196],0x0000
end
0079FB22 = yuukaID_FIX

func yuukaAIRBACKDASHTURN
  cmp word ptr [esi+0x140],0x10
end
007A0D35 = yuukaAIRBACKDASHTURN

func yuukaWALK
  fld dword ptr [0x867860]
end
0079FE17 = yuukaWALK

func yuukaWALKBACK
  fldz
  fsub dword ptr [0x867860]
end
0079FE40 = yuukaWALKBACK

func yuuka3SCPALM_HITS
  mov byte ptr [esi+0x194],0x01
end
007C766A = yuuka3SCPALM_HITS


func yuukaJ8A_Y
  ;fld dword ptr [0x85B9BC]
  ;fadd qword ptr [0x8677C8]
  ;fadd qword ptr [0x8677C8]
  ;fadd qword ptr [0x8677C8]
  fld dword ptr [0x85B9D4]
end
007A3AD0 = yuukaJ8A_Y

func yuukaBDASH_GRAV
  fld dword ptr [0x85C110]
end
007A080E = yuukaBDASH_GRAV

func yuukaNOP
  nop
end

func yuuka2B_OFFSET
  movzx eax,byte ptr [esi+0x104]
  imul eax,eax,0x60
end
;007A447C = yuuka2B_OFFSET
;007A4483 = yuukaFLDZ

func yuuka5C_OFFSET
  imul edx,edx,0x5A
  fstp dword ptr [esp+0x20]
end
func yuukaJ5C_OFFSET
  imul edx,edx,0x5A
end
;007A51EF = yuuka5C_OFFSET
;007A593F = yuukaJ5C_OFFSET

;# dash spd
func yuukaDASH_SPD
  fld dword ptr [0x86782C]
end
007A0557 = yuukaDASH_SPD
;#007A0544 = 75 E2 66 39 BE 3E 01 00 00 75 F5 D9 05 2C 78 86 00 EB 06
;# j66
func yuukaADASH_SPD
  fld dword ptr [0x85BC44]
end
007A0A11 = yuukaADASH_SPD
;#007A09FD = 75 F0 66 83 BE 3E 01 00 00 01 75 E6 D9 05 44 BC 85 00 EB 06
;# j44
func yuukaABDASH_SPD
  fld dword ptr [0x85C8AC]
end
007A0C71 = yuukaABDASH_SPD
;#007A0C5D = 75 F0 66 83 BE 40 01 00 00 04 75 E6 D9 05 AC C8 85 00 EB 06
;# dash commit frames
func yuukaDASHCOMMIT
  cmp ax,0x0003
  jg 0x7A050B
  jmp 0x7A0505
end
007A04FF = yuukaDASHCOMMIT: 6

;# hj7 x
func yuukaHJ7X
  fld dword ptr [0x85C8AC]
end
007A110E = yuukaHJ7X
;# hj9 x
func yuukaHJ9X
  fld dword ptr [0x85BC44]
end
007A0FF9 = yuukaHJ9X
;# hj8 grav
;#007A0EC9 = 
;# hj79 grav
;#007A1016 = 
;# hj8 y
func yuukaHJ8Y
  fld dword ptr [0x85BC60]
end
007A0EBD = yuukaHJ8Y
;# hj7 y what
;#007A110E = D9 05 30C28500
;# hj9 y
func yuukaHJ9Y
  fld dword ptr [0x85C230]
end
007A100A = yuukaHJ9Y

;#3DD lol
;#007A2322
;#1DD x
func yuuka1DDX
  fld dword ptr [0x85C8AC]
end
007A2437 = yuuka1DDX

func yuuka2DDGRAV
  fld dword ptr [0x85C110]
end
func yuuka1DDGRAV
  fld dword ptr [0x8677A8]
end

;#2DD Y
007A2208 = yuukaHJ8Y
;#2DD Grav
007A2215 = yuuka2DDGRAV
;#1DD Y
007A2333 = yuukaHJ9Y
;#1DD Grav
007A233F = yuuka1DDGRAV

;# f5[A] remove
func yuukaCF5A_REMOVE
  cmp byte ptr [esi+0x7F4],0x01
  jmp 0x7A2F1C
end
007A2EB6 = yuukaCF5A_REMOVE

;# 3A momentum
func yuuka3AX
  fld dword ptr [0x859F00]
end
007A3476 = yuuka3AX
;# 3[A] momentum
func yuukaC3AX
  fld dword ptr [0x85AE94]
end
007A34B1 = yuukaC3AX
;# 3A decel
func yuuka3ADEC
  fsub qword ptr [0x8677C8]
end
007A3378 = yuuka3ADEC
;# 3A movement start
func yuuka3AKEY
  cmp word ptr [esi+0x140],0x02
end
007A341C = yuuka3AKEY

;# 66c x
;#007B6448 = 
;# 66c spin x
func yuuka66CX
  fld dword ptr [0x86782C]
end
007A6096 = yuuka66CX
;# 66c y
func yuuka66CY
  fld dword ptr [0x858830]
end
007A60A2 = yuuka66CY

;# 6b spd
func yuukaFLDZ
  fldz
end
007BAD49 = yuukaFLDZ

;# 5c acc
;#007BB1E1 = DC 05 C9778600 space used for sounds
;# 5c spd stuff 1
func yuuka5CSPD_0
  fcomp qword ptr [0x86812C]
end
007BB1F2 = yuuka5CSPD_0
;# 5c spd stuff 2
func yuuka5CSPD_3
  fld qword ptr [0x86812C]
end
007BB1FF = yuuka5CSPD_3

func yuuka5C_RECAST
  pushf
  pushad
  mov eax,[esi+0x398]
  cmp word ptr [eax+0x13C],0x019A
  je short LABEL1
  cmp word ptr [eax+0x13C],0x019E
  je short LABEL1
  jmp short LABEL2
  LABEL1:
  cmp word ptr [eax+0x13E],0x00
  jne short LABEL2
  cmp word ptr [eax+0x140],0x00
  jne short LABEL2
  cmp word ptr [eax+0x142],0x00
  jne short LABEL2
  cmp word ptr [esi+0x140],0xDC
  jge short LABEL2
  mov word ptr [esi+0x140],0x104
  mov word ptr [esi+0x142],0xFF
  mov byte ptr [esi+0x194],0x00
  LABEL2:
  popad
  popf
  push edi
  push 0x04
  xor edi,edi
end
;007BB1C5 = yuuka5C_RECAST

;# 5[c] remove
func yuukaC5C_REMOVE
  cmp word ptr [esi+0x140],0x25
end
007A5116 = yuukaC5C_REMOVE
;# j5[c] remove
007A585C = yuukaC5C_REMOVE
;# j5c location
007A5925 = yuukaFLDZ

;# 6c height
;#007A53EC

func yuuka6B_XPOS1
  fmul qword ptr [0x85A288]
end
007BAD38 = yuuka6B_XPOS1

func yuuka6B_XPOS2
  imul edx,edx,0x04
  fstp dword ptr [esp+0x20]
end
007A42A0 = yuuka6B_XPOS2

func yuuka6B_HITCOUNT
  mov byte ptr [esi+0x194],0x0A
end
007CF39B = yuuka6B_HITCOUNT
007CF3EB = yuuka6B_HITCOUNT

func yuuka6B_HEIGHT
  fld dword ptr [eax+0xF0]
  fsub dword ptr [0x871540]
  fsub dword ptr [0x871540]
end
007BB035 = yuuka6B_HEIGHT

func yuuka6B_HITRATE1
  movzx eax,word ptr [esi+0x36C]
  cmp ax,0x0004
  jmp 0x7BB00B
end
func yuuka6B_HITRATE2
  movzx eax,word ptr [esi+0x36C]
  cmp ax,0x0004
  jmp 0x7BB0E6
end
007BB000 = yuuka6B_HITRATE1
007BB0DB = yuuka6B_HITRATE2

007BB059 = yuukaNOP
007BB08D = yuukaNOP
007BB09F = yuukaNOP
007BB134 = yuukaNOP
007BB168 = yuukaNOP
007BB17A = yuukaNOP

func yuuka6B_DUR
  cmp dword ptr [esi+0x144],0x00000118
end
007BAD73 = yuuka6B_DUR

;# d236 size
;#007BE50A = D9E8 90 90 90 90 90 90 90 90 90 90 moved down, added audio
;# d236 disappear on hit max frame
func yuukaD236_0

  cmp dword ptr [esi+0x144],0x00
  jne short LABEL1
  mov byte ptr [esi+0x194],0x0A
  
  LABEL1:
  mov eax,[esi+0x190]
  cmp eax,0x00
  je short LABEL2
  cmp eax,0x04
  jne short LABEL3
  mov byte ptr [esi+0x194],0x00
  LABEL3:
  push 0x0F
  mov ecx,esi
  call 0x48CDE0
  cmp dword ptr [esi+0x190],0x06
  jne short LABEL4
  mov byte ptr [esi+0x194],0x00
  LABEL4:
  cmp byte ptr [esi+0x194],0x00
  jle short LABEL5
  cmp word ptr [esi+0x36C],0x0005
  jne short LABEL6
  mov word ptr [esi+0x36C],0x0000
  mov dword ptr [esi+0x190],0x00000000
  LABEL6:
  add word ptr [esi+0x36C],0x01
  LABEL2:
  jmp LABELEND
  LABEL5:
  
  

  LABELEND:
  cmp word ptr [esi+0x140],0x25
end
007BE52A = yuukaD236_0
;# d236 start angle
func yuukaD236_1
  fld dword ptr [0x87153C]
end
007A814E = yuukaD236_1
007A842B = yuukaD236_1
007A877E = yuukaD236_1
007A8AF9 = yuukaD236_1
;# d236 rotation
func yuukaD236_ROT
  pushad
  pushf
  fcom dword ptr [0x857DC8]
  fnstsw ax
  test ah,0x41
  ja short LABEL1
  jmp short LABEL2
  LABEL1:
  fcom dword ptr [0x85AE94]
  fnstsw ax
  test ah,0x41
  jna short LABEL3
  jmp short LABEL2
  LABEL3:
  fsub dword ptr [0x858830]
  LABEL2:
  fsub dword ptr [0x8589F0]
  popf
  popad
end
007BE0BD = yuukaD236_ROT
;# d236 fire freq
func yuukaD236_2
  mov ecx,0x00000002
end
007BE286 = yuukaD236_2

func yuukaD236_LV3
  cmp byte ptr [edx+0x6A5],0x03
end
007BE2CE = yuukaD236_LV3

;# a22b hell wave cannon disable bullet & hold
;#007AA3A7 = BF 05000000
;#007AA6B3 = BF 05000000
;#007AA9D5 = BF 05000000
;#007AADA5 = BF 05000000

;# 22B replace with another effect
func yuukaD22_EFF
  push 0x00000331
end
007AA524 = yuukaD22_EFF
007AA5A0 = yuukaD22_EFF
007AA61C = yuukaD22_EFF
007AA698 = yuukaD22_EFF

;# 22C replace with another effect
007AA834 = yuukaD22_EFF
007AA8B4 = yuukaD22_EFF
007AA930 = yuukaD22_EFF
007AA9AC = yuukaD22_EFF
;#j22B
007AAB88 = yuukaD22_EFF
007AAC04 = yuukaD22_EFF
007AAC80 = yuukaD22_EFF
007AACFA = yuukaD22_EFF
;#j22C
007AAF5C = yuukaD22_EFF
007AAFDC = yuukaD22_EFF
007AB058 = yuukaD22_EFF

func yuukaD236_RECAST
  call 0x48CDE0
  pushf 
  pushad
  mov eax,[esi+0x398]
  cmp word ptr [eax+0x13C],0x0208
  jl short LABEL1
  cmp word ptr [eax+0x13C],0x020B
  jg short LABEL1
  cmp word ptr [eax+0x13E],0x00
  jne short LABEL1
  cmp dword ptr [eax+0x144],0x00
  jne short LABEL1
  mov word ptr [esi+0x140],0x0061
  LABEL1:
  ;# duration
  cmp word ptr [esi+0x140],0x0029
  jle LABELLVNOJUMP
  movzx eax, byte ptr [eax+0x6A5]
  cmp eax,0x00
  je LABELLV0
  cmp eax,0x01
  je LABELLV1
  cmp eax,0x02
  je LABELLV2
  cmp eax,0x03
  je LABELLV3
  cmp eax,0x04
  jmp LABELLV4
  
  LABELLV0:
  cmp word ptr [esi+0x140],0x0036
  jmp LABELLVEND
  LABELLV1:
  cmp word ptr [esi+0x140],0x0040
  jmp LABELLVEND
  LABELLV2:
  cmp word ptr [esi+0x140],0x004A
  jmp LABELLVEND
  LABELLV3:
  cmp word ptr [esi+0x140],0x0054
  jmp LABELLVEND
  LABELLV4:
  jmp LABELLVNOJUMP
  LABELLVEND:
  
  jl LABELLVNOJUMP
  cmp word ptr [esi+0x140],0x005D
  jge LABELLVNOJUMP
  mov word ptr [esi+0x140],0x005D
  mov word ptr [esi+0x142],0x0001
  LABELLVNOJUMP:
  popad
  popf
end

;# labelX1 normals
;# labelX2 normals
;# labelX3 d236
;# labelX4 geyser
;# labelX5 blue rose
;# labelX6 garden
func yuukaCHICKENATTACK
  call BEGIN
  jmp EXIT
  
  BEGIN:
  pushf
  pushad
  
  mov edx,[esi+0x398]
  
  mov ebx,[edx+0x13C]
  cmp ebx,0x00010226
  je short LABEL01
  cmp ebx,0x00010227
  je short LABEL01
  cmp ebx,0x00010228
  je short LABEL01
  cmp ebx,0x00010229
  je short LABEL01
  jmp short LABEL02
  LABEL01:
  mov eax,0x00000000
  mov ebx,[edx+0x144]
  cmp ebx,0x00000000
  
  je short LABEL03
  LABEL02:
  mov eax,0x00000001
  LABEL03:
  movzx ecx,byte ptr [edx+0x6AE]
  
  mov ebx,[esi+0x13C]
  cmp ebx,0x00000322
  je short LABELX1
  cmp ebx,0x00050322
  je LABELX2
  cmp bx,0x0321
  je LABELX2
  cmp bx,0x032F
  je LABELX3
  cmp bx,0x0330
  je LABELX4
  cmp bx,0x0335
  je 0x7D0DD4
  cmp bx,0x035F
  je 0x7D0DD4
  cmp bx,0x0359
  je LABELX6
  jmp 0x7D0DD4
  
  LABELX1:
  cmp eax,0x01
  je short LABELX1END
  add ecx,0x03
  imul ecx,ecx,0x18
  mov ebx,[esi+0x140]
  add ebx,ecx
  movzx ebx,bx
  cmp bx,0x00DC
  jl short LABELX1A
  mov bx,0x00DC
  LABELX1A:
  cmp word ptr [esi+0x140],0x00DC
  jg short LABELX1END
  mov [esi+0x140],ebx
  LABELX1END:
  popad 
  popf 
  
  mov ecx,[esi+0x35C]
  ret 
  
  LABELX2:
  cmp eax,0x01
  je short LABELX2END
  add ecx,0x03
  imul ecx,ecx,0x18
  mov ebx,[esi+0x140]
  add ebx,ecx
  movzx ebx,bx
  cmp bx,0x00DC
  jl short LABELX2A
  mov bx,0x00DC
  LABELX2A:
  cmp word ptr [esi+0x140],0x00DC
  jg short LABELX2END
  mov [esi+0x140],ebx
  LABELX2END:
  popad 
  popf 
  mov eax,[esi+0x39C]
  ret 
  
  LABELX3:
  cmp eax,0x01
  je short LABELX3END
  add ecx,0x03
  imul ecx,ecx,0x03
  mov ebx,[esi+0x140]
  add ebx,ecx
  movzx ebx,bx
  cmp bx,0x0024
  jl short LABELX3A
  mov bx,0x0024
  LABELX3A:
  cmp word ptr [esi+0x140],0x0024
  jg short LABELX3END
  mov [esi+0x140],ebx
  LABELX3END:
  popad 
  popf 
  cmp [esi+0x140],bp
  ret
  
  LABELX4:
  cmp ebx,0x00000330
  je short LABELX4TRUE
  cmp ebx,0x00030330
  je short LABELX5
  jmp short LABELX4END
  
  LABELX4TRUE:
  cmp eax,0x01
  je short LABELX4END
  add ecx,0x03
  imul ecx,ecx,0x03
  mov ebx,[esi+0x140]
  add ebx,ecx
  movzx ebx,bx
  cmp bx,0x0029
  jl short LABELX4A
  mov bx,0x0029
  LABELX4A:
  cmp word ptr [esi+0x140],0x0029
  jg short LABELX4END
  mov [esi+0x140],ebx
  LABELX4END:
  popad 
  popf 
  movzx eax,word ptr [esi+0x13E]
  ret
  
  LABELX5:
  cmp eax,0x01
  je short LABELX5END
  add ecx,0x03
  imul ecx,ecx,0x03
  mov ebx,[esi+0x140]
  add ebx,ecx
  movzx ebx,bx
  cmp bx,0x0023
  jl short LABELX5A
  mov bx,0x0023
  LABELX5A:
  cmp word ptr [esi+0x140],0x0023
  jg short LABELX5END
  mov [esi+0x140],ebx
  LABELX5END:
  popad 
  popf 
  movzx eax,word ptr [esi+0x13E]
  ret 
  
  LABELX6:
  cmp eax,0x01
  je short LABELX6END
  add ecx,0x03
  imul ecx,ecx,0x03
  mov ebx,[esi+0x140]
  add ebx,ecx
  movzx ebx,bx
  cmp bx,0x0024
  jl short LABELX6A
  mov bx,0x0024
  LABELX6A:
  cmp word ptr [esi+0x140],0x0024
  jg short LABELX6END
  mov [esi+0x140],ebx
  LABELX6END:
  popad
  popf
  fld dword ptr [esi+0x11C]
  ret
  
  EXIT:
  nop
end


;# 5c trigger
007BB1D8 = yuukaCHICKENATTACK
007BB6BD = yuukaCHICKENATTACK
;# 6b trigger
007BB020 = yuukaCHICKENATTACK
007BB0FB = yuukaCHICKENATTACK
;# d236 trigger
;#007BE501 = E8 78280000 90 90
;#we go somewhere else first.
007BE501 = yuukaCHICKENATTACK
007BE4FC = yuukaD236_RECAST

;# a236 rose trigger
007BE7E7 = yuukaCHICKENATTACK
;# 5sc trigger
007C6E0D = yuukaCHICKENATTACK

func yuukaD22_LV
  cmp byte ptr [esi+0x6A6],0x00
  je short LV0
  cmp byte ptr [esi+0x6A6],0x01
  je short LV1
  cmp byte ptr [esi+0x6A6],0x02
  je short LV2
  cmp byte ptr [esi+0x6A6],0x03
  je short LV3
  jmp short LV4
  LV0:
  cmp eax,0x00000046
  jmp short END
  LV1:
  cmp eax,0x00000064
  jmp short END
  LV2:
  cmp eax,0x00000082
  jmp short END
  LV3:
  cmp eax,0x000000A0
  jmp short END
  LV4:
  cmp eax,0x000000BE
  jmp short END
  END:
  nop
end
007A9BC3 = yuukaD22_LV
007A9D07 = yuukaD22_LV
007A9E56 = yuukaD22_LV

func yuuka3SCBLADE
  fst dword ptr [esi+0x11C]
end
007C765B = yuuka3SCBLADE

;#garden of sun offset
func yuuka5SCGOS
  movzx eax,byte ptr [esi+0x104]
  push eax
  movsx eax,al
  imul eax,eax,0xFFFFFB00
  sub esp,0x08
  mov [esp+0x28],eax
  mov ecx,esi
  fldz
  jmp 0x7AFBF4
end
007AFBD7 = yuuka5SCGOS
func yuuka5SCGOS1
  jmp 0x7C6FF9
end
;007C7401 = yuuka5SCGOS1
007C7401 = yuukaNOP
007C7412 = yuuka5SCGOS1

;#sounds stuff
;#5c and 6b insert
func yuukaSOUND0
  pushad
  cmp word ptr [esi+0x140],0x00DD
  jne short LABEL1
  push 0x03
  mov ecx,[esi+0x398]
  call 0x464980
  LABEL1:
  popad
  cmp word ptr [esi+0x13C],0x0321
  jne short LABEL2
  fld dword ptr [0x8677A8]
  LABEL2:
  nop
end
;#5c
007BB1E1 = yuukaSOUND0
;#6b
007BB01A = yuukaSOUND0
007BB0F5 = yuukaSOUND0
;#extra 6b sound
func yuukaSOUND6B1
  jmp 0x7BADDC
end
007BADCF = yuukaSOUND6B1

;#d236
func yuukaSOUND1
  fld1
  pushad
  cmp word ptr [esi+0x140],0x0025
  jne short LABEL1
  cmp word ptr [esi+0x142],0x0000
  jne short LABEL1
  push 0x6D
  mov ecx,[esi+0x398]
  call 0x464980
  LABEL1:
  popad 
  cmp word ptr [esi+0x13C],0x0359
  jne short LABEL2
  fadd dword ptr [esi+0x378]
  LABEL2:
  jmp 0x7BE516
end
007BE50A = yuukaSOUND1
;#5sc
func yuukaSOUND2
  pushad
  cmp word ptr [esi+0x140],0x0025
  jne short LABEL1
  cmp word ptr [esi+0x142],0x0000
  jne short LABEL1
  push 0x6D
  mov ecx,[esi+0x398]
  call 0x464980
  LABEL1:
  popad 
  cmp word ptr [esi+0x13C],0x0359
  jne short LABEL2
  fadd dword ptr [esi+0x378]
  LABEL2:
  nop
end
007C6E13 = yuukaSOUND2
func yuukaSOUND3
  mov ecx,[esi+0x398]
  push 0x02
end
007C735D = yuukaSOUND3: 8

;#d214 angle
func yuukaD214_ANGLE
  fld dword ptr [0x85C5BC]
end
007ABD67 = yuukaD214_ANGLE
func yuukaD214_ANGLE1
  fld dword ptr [0x85BB54]
end
007AC150 = yuukaD214_ANGLE1

;#a214 spirits
;#dur
func yuukaA214SP_DUR
  cmp dword ptr [esi+0x144],0x00000E10
end
007C27BC = yuukaA214SP_DUR

;#bulletcount
func yuukaA214SIGN_COUNT
  movsx edx,byte ptr [ecx+0x6AF]
  cmp edx,0x01
  jne short LABEL1
  inc edx
  LABEL1:
  push 0x007C2642
  ret
end
007C263B = yuukaA214SIGN_COUNT
;#angle
func yuukaA214SIGN_ANG
  mov ecx,[ecx+0x170]
  movsx eax,byte ptr [ecx+0x104]
  jmp 0x7C265F
end
007C2658 = yuukaA214SIGN_ANG
007C26BF = yuukaNOP

func yuukaVILESPARK
  mov byte ptr [esi+0x194],0x00
  cmp word ptr [ecx+0x140],0x15
end
007C5DA4 = yuukaVILESPARK

;# flight
func yuukaFLIGHT
  fld dword ptr [0x86782C]
end
007A1497 = yuukaFLIGHT

;#