
eb g _stt 00
._mem 
e8 hl0 58
8b 58 08 8b 70 0c c3
._dat
hl0 hl0 hl0 hl0 
;  
._stt                           ;  ._stt
 55                             ;  push ebp 
 8B EC                          ;  mov ebp,esp 
 53                             ;  push ebx 
 56                             ;  push esi 
 57                             ;  push edi
 68 60 40 00 00                 ;  push 16480 
 FF 53 04                       ;  call [ebx+4] 
 8B F0                          ;  mov esi,eax
 C7 C1 60 40 00 00              ;  mov ecx,16480
 (                              ;  ( 
 C7 00 00 00 00 00              ;  mov [eax],0 
 83 C0 04                       ;  add eax,4 
 83 E9 04                       ;  sub ecx,4 
 7F r                           ;  jg repeat 
 )                              ;  )
 e8 hl0 58 05 gl _dat
89 58  06 89 70 0a ;  
 FF 93 2C 04 00 00              ;  call [ebx+1068]
e8 hl0 58 05 gl collider_action 83 c0 06 ;  
 89 04 25 #p1                   ;  mov [#p1],eax
e8 hl0 58 05 gl finish 83 c0 06 ;  
 89 04 25 #p0                   ;  mov [#p0],eax
                                ;  '===
                                ;  skip  (  TYPE: ball    	x 0 8 1 A0 , double   	y 8 8 1 A0 , doub
                                ;  ;SUB COLLIDER_ACTION
 E9 gf _endp                    ;  jmp fwd _endp
!8                              ;  
.collider_action                ;  .collider_action
.collider_action                ;  .collider_action ' 
 (                              ;  (
 53                             ;  push ebx 
 56                             ;  push esi 
 57                             ;  push edi 
 E8 gl _mem                     ;  call _mem
 55                             ;  push ebp 
 8B EC                          ;  mov ebp,esp 
 6A 00                          ;  push 0 
 6A 00                          ;  push 0
 53                             ;  push ebx
 E8 gf main                     ;  call fwd main
 5B                             ;  pop ebx
 E9 gf end_proc                 ;  jmp fwd end_proc
                                ;  '====
.main                           ;  .main
                                ;  '====
                                ;  ; dword
                                ;  ; dword
                                ;  ; dword
                                ;  ; dword
                                ;  ;-----------------
                                ;  ; limit population
                                ;  ;-----------------
 83 3C 25 00 AE 0B 03 23        ;  cmp [51097088],35 
 (                              ;  (
 7E x                           ;  jle exit
 C7 04 25 00 AE 0B 03 23 00 00 00;  mov [51097088],35 
 )                              ;  )
 8B 04 25 00 AE 0B 03           ;  mov eax,[51097088]
 89 46 08                       ;  mov [esi+8] ,eax
 (                              ;  (
 83 7E 08 01                    ;  cmp [esi+8] ,1
 7F x                           ;  jg exit
 C3                             ;  ret
 )                              ;  )
                                ;  ;------------------
.collider_all_items             ;  .collider_all_items
                                ;  ;------------------
                                ;  ; per frame
 C7 C0 #ball                    ;  mov eax,#ball ' offset Ball
 C7 C1 00 00 00 00              ;  mov ecx,0
                                ;  ; clear the entropy regs
                                ;  ;
                                ;  ;
 C7 46 1C 0A 00 00 00           ;  mov [esi+28] ,10 ' slowdown factor
 d9 ee                          ;  fldz
 DD 5E 14                       ;  fstp qword [esi+20] 
 d9 ee                          ;  fldz
 DD 5E 0C                       ;  fstp qword [esi+12] 
 d9 ee                          ;  fldz
 DD 1C 25 D0 AD 0B 03           ;  fstp qword [51097040]
                                ;  ;
 (                              ;  (
                                ;  ;UPDATE POSITION
                                ;  ;
 DD 40 18                       ;  fld qword [eax+24]
 DC 00                          ;  fadd qword [eax] 
 DD 18                          ;  fstp qword [eax] 
 DD 40 20                       ;  fld qword [eax+32]
 DC 24 25 80 AD 0B 03           ;  fsub qword [51096960]
 DC 40 08                       ;  fadd qword [eax+8] 
 DD 58 08                       ;  fstp qword [eax+8] 
                                ;  ;
 50                             ;  push eax
 51                             ;  push ecx
 8B D0                          ;  mov edx,eax ; pointers to i & j balls
 E8 gl main_collider            ;  call main_collider
 59                             ;  pop ecx
 58                             ;  pop eax
 E8 gl tally_state              ;  call tally_state
 83 C0 3C                       ;  add eax,60
 FF C1                          ;  inc ecx
 3B 4E 08                       ;  cmp ecx,[esi+8] 
 7C r                           ;  jl repeat
 )                              ;  )
                                ;  'call tally_state
                                ;  'call momentum_governor
 C3                             ;  ret
                                ;  ;=============
.main_collider                  ;  .main_collider
                                ;  ;=============
 (                              ;  (
                                ;  ;
                                ;  ;TRAVERSE LIST OF BALLS
                                ;  ;----------------------
                                ;  ;
 FF C1                          ;  inc ecx 
 3B 4E 08                       ;  cmp ecx,[esi+8] 
 7F x                           ;  jg exit
 C6 40 38 00                    ;  mov byte [eax+56] ,0 ; clear the impact flag when none encounter
 83 C2 3C                       ;  add edx,60; next ball(i)
                                ;  ;
                                ;  ;IF NO COLLISION THEN TRY NEXT
                                ;  ;-----------------------------
                                ;  ;
 E8 gl check_for_collision      ;  call check_for_collision
 73 r                           ;  jae repeat
                                ;  ;
                                ;  ;IF ALREADY IMPACTED THEN EXIT
                                ;  ;-----------------------------
                                ;  ;
                                ;  'cmp jball_imp,0 : jnz exit
                                ;  ;
                                ;  ;IF ALREADY IMPACTED THEN EXIT
                                ;  ;-----------------------------
                                ;  ;
                                ;  'cmp iball_imp,0 : jnz repeat
                                ;  ;
                                ;  ;SET IMPACT FLAG
                                ;  ;---------------
                                ;  ;
                                ;  'mov jball_imp,1
                                ;  ;
                                ;  ;PREVENT OBJECTS FROM FUSING TOGETHER
                                ;  ;------------------------------------
                                ;  ;
                                ;  ;position immediately prior to impact
                                ;  ;
 DD 40 18                       ;  fld qword [eax+24]
 DD 00                          ;  fld qword [eax] 
 D9 C9                          ;  fxch
 DE E9                          ;  fsubp st(1),st(0)
 DD 18                          ;  fstp qword [eax] 
 DD 40 20                       ;  fld qword [eax+32]
 DD 40 08                       ;  fld qword [eax+8] 
 D9 C9                          ;  fxch
 DE E9                          ;  fsubp st(1),st(0)
 DD 58 08                       ;  fstp qword [eax+8] 
 DD 42 18                       ;  fld qword [edx+24]
 DD 02                          ;  fld qword [edx] 
 D9 C9                          ;  fxch
 DE E9                          ;  fsubp st(1),st(0)
 DD 1A                          ;  fstp qword [edx] 
 DD 42 20                       ;  fld qword [edx+32]
 DD 42 08                       ;  fld qword [edx+8] 
 D9 C9                          ;  fxch
 DE E9                          ;  fsubp st(1),st(0)
 DD 5A 08                       ;  fstp qword [edx+8] 
                                ;  ;
                                ;  ;WORK OUT COLLISION DYNAMICS
                                ;  ;---------------------------
                                ;  ;
 E8 gl glancing_collision       ;  call glancing_collision
 )                              ;  )
                                ;  ;
                                ;  ;CHECK CONTAINER BOUNDARIES
                                ;  ;--------------------------
                                ;  ;
 E8 gl ball_container           ;  call ball_container
 (                              ;  (
 3B 4E 08                       ;  cmp ecx,[esi+8] 
 7E x                           ;  jle exit
 C6 40 38 00                    ;  mov byte [eax+56] ,0 ; clear the impact flag when none encounter
 )                              ;  )
 C3                             ;  ret ; end main collider
                                ;  ;=================
                                ;  ;=============
                                ;  ;==============
.tally_state                    ;  .tally_state
                                ;  ;==============
 DD 40 28                       ;  fld qword [eax+40]
 DC 46 14                       ;  fadd qword [esi+20] 
 DD 5E 14                       ;  fstp qword [esi+20] 
 DD 40 18                       ;  fld  qword [eax+24] 
 D8 C8                          ;  fmul st(0),st(0)
 DD 40 20                       ;  fld  qword [eax+32] 
 D8 C8                          ;  fmul  st(0),st(0)
 DE C1                          ;  faddp st(1),st(0)
 DC 48 28                       ;  fmul  qword [eax+40] 
 DC 04 25 D0 AD 0B 03           ;  fadd  qword [51097040]
 DD 1C 25 D0 AD 0B 03           ;  fstp  qword [51097040]
                                ;  ;=================
 DD 40 18                       ;  fld qword [eax+24] 
 D8 C8                          ;  fmul st(0),st(0)
 DD 40 20                       ;  fld qword [eax+32] 
 D8 C8                          ;  fmul st(0),st(0)
 DE C1                          ;  faddp st(1),st(0)
 d9 fa                          ;  fsqrt 
 DC 48 28                       ;  fmul qword [eax+40] 
 DC 46 0C                       ;  fadd qword [esi+12] 
 DD 5E 0C                       ;  fstp qword [esi+12] 
 C3                             ;  ret
                                ;  ;-----------------
.momentum_governor              ;  .momentum_governor
                                ;  ;-----------------
 (                              ;  (
                                ;  ; limit entropy
 DD 46 14                       ;  fld qword [esi+20] 
 DA 76 1C                       ;  fidiv dword [esi+28] 
 DC 76 0C                       ;  fdiv qword [esi+12] 
 C7 C1 00 00 00 00              ;  mov ecx,0
 C7 C0 #ball                    ;  mov eax,#Ball
 (                              ;  (
 FF C1                          ;  inc ecx
 3B 4E 08                       ;  cmp ecx,[esi+8] 
 7F x                           ;  jg exit
                                ;  ;=============
 DD 40 18                       ;  fld  qword [eax+24] 
 D8 C9                          ;  fmul st(0),st(1)
 DD 58 18                       ;  fstp qword [eax+24] 
                                ;  ;=============
 DD 40 20                       ;  fld  qword [eax+32] 
 D8 C9                          ;  fmul st(0),st(1)
 DD 58 20                       ;  fstp qword [eax+32] 
 83 C0 3C                       ;  add eax, 60
 e9 rl                          ;  repeat
 )                              ;  )
 D8 D8                          ;  fcomp st(0),st(0) ; flush
 )                              ;  )
                                ;  ;
 C3                             ;  ret
                                ;  ;========
.set_zone                       ;  .set_zone
                                ;  ;========
 DD 00                          ;  fld qword [eax]
                                ;  ;CONVERT FPU TO CPU
 83 EC 04                       ;  sub esp,4 
 DB 1C 24                       ;  fistp dword [esp] 
 58                             ;  pop eax
 89 46 20                       ;  mov [esi+32] ,eax
 8A 4E 20                       ;  mov cl,[esi+32] 
 DD 40 08                       ;  fld qword [eax+8]
                                ;  ;CONVERT FPU TO CPU
 83 EC 04                       ;  sub esp,4 
 DB 1C 24                       ;  fistp dword [esp] 
 58                             ;  pop eax
 89 46 20                       ;  mov [esi+32] ,eax
 8A 6E 20                       ;  mov ch,[esi+32] 
 C0 E9 02                       ;  shr cl,2
 C0 E5 02                       ;  shl ch,2
 02 CD                          ;  add cl,ch
 81 E1 FF 00 00 00              ;  and ecx, 0xff
 89 48 30                       ;  mov [eax+48] ,ecx
 C3                             ;  ret
                                ;  ;===========
.add_to_zone                    ;  .add_to_zone
                                ;  ;===========
 (                              ;  (
 53                             ;  push ebx
 51                             ;  push ecx
 8B 58 30                       ;  mov ebx,[eax+48] 
 C1 E3 02                       ;  shl ebx,2
 81 C3 #zones                   ;  add ebx,#zones
 8B 0B                          ;  mov ecx,[ebx]
 (                              ;  (
 80 F9 00                       ;  cmp cl,0
 75 x                           ;  jnz exit
 8A 48 34                       ;  mov cl,[eax+52] 
 89 0B                          ;  mov [ebx],ecx
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
 C1 C9 08                       ;  ror ecx,8 
 (                              ;  (
 80 F9 00                       ;  cmp cl,0
 75 x                           ;  jnz exit
 8A 48 34                       ;  mov cl,[eax+52] 
 89 0B                          ;  mov [ebx],ecx
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
 C1 C9 08                       ;  ror ecx,8 
 (                              ;  (
 80 F9 00                       ;  cmp cl,0
 75 x                           ;  jnz exit
 8A 48 34                       ;  mov cl,[eax+52] 
 89 0B                          ;  mov [ebx],ecx
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
 C1 C9 08                       ;  ror ecx,8 
 (                              ;  (
 80 F9 00                       ;  cmp cl,0
 75 x                           ;  jnz exit
 8A 48 34                       ;  mov cl,[eax+52] 
 89 0B                          ;  mov [ebx],ecx
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
 C1 C9 08                       ;  ror ecx,8 
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
                                ;  ;----------------
.remove_from_zone               ;  .remove_from_zone
                                ;  ;----------------
 (                              ;  (
 53                             ;  push ebx
 51                             ;  push ecx
 8B 58 30                       ;  mov ebx,[eax+48] 
 C1 E3 02                       ;  shl ebx,2
 81 C3 #zones                   ;  add ebx,#zones
 8B 0B                          ;  mov ecx,[ebx]
 (                              ;  (
 3A 48 34                       ;  cmp cl,[eax+52] 
 75 x                           ;  jnz exit
 C6 C1 00                       ;  mov cl,0
 89 0B                          ;  mov [ebx],ecx
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
 C1 C9 08                       ;  ror ecx,8 
 (                              ;  (
 3A 48 34                       ;  cmp cl,[eax+52] 
 75 x                           ;  jnz exit
 C6 C1 00                       ;  mov cl,0
 89 0B                          ;  mov [ebx],ecx
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
 C1 C9 08                       ;  ror ecx,8 
 (                              ;  (
 3A 48 34                       ;  cmp cl,[eax+52] 
 75 x                           ;  jnz exit
 C6 C1 00                       ;  mov cl,0
 89 0B                          ;  mov [ebx],ecx
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
 C1 C9 08                       ;  ror ecx,8 
 (                              ;  (
 3A 48 34                       ;  cmp cl,[eax+52] 
 75 x                           ;  jnz exit
 C6 C1 00                       ;  mov cl,0
 89 0B                          ;  mov [ebx],ecx
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
 C1 C9 08                       ;  ror ecx,8 
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
                                ;  ;-------------------
.check_zones                    ;  .check_zones
                                ;  ;-------------------
 53                             ;  push ebx
 51                             ;  push ecx
 8B 58 30                       ;  mov ebx,[eax+48] 
 C1 E3 02                       ;  shl ebx,2
 81 C3 #zones                   ;  add ebx,#zones
 (                              ;  (
 E8 gl check_zones_row          ;  call check_zones_row
 74 x                           ;  jz exit
 83 C3 40                       ;  add ebx,64 ; next row
 E8 gl check_zones_row          ;  call check_zones_row
 74 x                           ;  jz exit
 81 EB 80 00 00 00              ;  sub ebx,128 ; next row
 E8 gl check_zones_row          ;  call check_zones_row
 74 x                           ;  jz exit
 83 C1 40                       ;  add ecx,64
 )                              ;  )
 59                             ;  pop ecx
 5B                             ;  pop ebx
 C3                             ;  ret
                                ;  ;-------------------
.check_zones_row                ;  .check_zones_row
                                ;  ;-------------------
 (                              ;  (
 8B 0B                          ;  mov ecx,[ebx]
 E8 gl check_zone               ;  call check_zone
 83 FA 00                       ;  cmp edx,0
 74 x                           ;  jz exit
 83 C3 04                       ;  add ebx,4
 8B 0B                          ;  mov ecx,[ebx]
 E8 gl check_zone               ;  call check_zone
 83 FA 00                       ;  cmp edx,0
 74 x                           ;  jz exit
 83 EB 08                       ;  sub ebx,8
 8B 0B                          ;  mov ecx,[ebx]
 E8 gl check_zone               ;  call check_zone
 83 FA 00                       ;  cmp edx,0
 74 x                           ;  jz exit
 )                              ;  )
 83 C3 04                       ;  add ebx,4
 33 D2                          ;  xor edx,edx
 FF C2                          ;  inc edx ; signal as not resolved
 C3                             ;  ret
                                ;  ;----------
.check_zone                     ;  .check_zone
                                ;  ;----------
 (                              ;  (
 51                             ;  push ecx
 E8 gl check_and_react          ;  call check_and_react
 59                             ;  pop ecx
 83 FA 00                       ;  cmp edx,0
 74 x                           ;  jz exit
 C1 C1 08                       ;  rol ecx,8
 51                             ;  push ecx
 E8 gl check_and_react          ;  call check_and_react
 59                             ;  pop ecx
 83 FA 00                       ;  cmp edx,0
 74 x                           ;  jz exit
 C1 C1 08                       ;  rol ecx,8
 51                             ;  push ecx
 E8 gl check_and_react          ;  call check_and_react
 59                             ;  pop ecx
 83 FA 00                       ;  cmp edx,0
 74 x                           ;  jz exit
 C1 C1 08                       ;  rol ecx,8
 51                             ;  push ecx
 E8 gl check_and_react          ;  call check_and_react
 59                             ;  pop ecx
 )                              ;  )
 C3                             ;  ret
                                ;  ; identify body
                                ;  ;   check backwords
                                ;  ;   get index id
                                ;  ;   check for collisions
                                ;  ;   check up to 9 lists
                                ;  ;
                                ;  ;===============
.check_and_react                ;  .check_and_react
                                ;  ;===============
 (                              ;  (
 80 F9 00                       ;  cmp cl,0
 74 x                           ;  jz exit
 32 48 34                       ;  xor cl,[eax+52] 
 74 x                           ;  jz exit ; self id
                                ;  ; resolve address of ball
 33 D2                          ;  xor edx,edx
 8A D1                          ;  mov dl,cl
 6B D2 3C                       ;  imul edx,edx,60
 81 C2 #ball                    ;  add edx,#Ball
 E8 gl check_for_collision      ;  call check_for_collision
 73 x                           ;  jae exit
 80 78 38 00                    ;  cmp byte [eax+56] ,0
 75 x                           ;  jnz exit                  ; already in impact so terminate
 80 7A 38 00                    ;  cmp byte [edx+56] ,0
 75 x                           ;  jnz exit                ; already in impact so ignore
                                ;  ;mov jball_imp,1          ; set impact flag
 DD 40 18                       ;  fld qword [eax+24]
 DD 00                          ;  fld qword [eax] 
 D9 C9                          ;  fxch
 DE E9                          ;  fsubp st(1),st(0)
 DD 18                          ;  fstp qword [eax] 
 DD 40 20                       ;  fld qword [eax+32]
 DD 40 08                       ;  fld qword [eax+8] 
 D9 C9                          ;  fxch
 DE E9                          ;  fsubp st(1),st(0)
 DD 58 08                       ;  fstp qword [eax+8] 
 E8 gl glancing_collision       ;  call glancing_collision
 C7 C2 00 00 00 00              ;  mov edx,0 ; signal collision done
 )                              ;  )
 C3                             ;  ret
                                ;  ;===================
.check_for_collision            ;  .check_for_collision
                                ;  ;===================
                                ;  ;
 DD 40 10                       ;  fld qword [eax+16] 
 DC 42 10                       ;  fadd qword [edx+16] 
 D8 C8                          ;  fmul st(0),st(0)
                                ;  ;
 DD 00                          ;  fld   qword [eax] 
 DC 22                          ;  fsub  qword [edx] 
 D8 C8                          ;  fmul  st(0),st(0)
 DD 40 08                       ;  fld   qword [eax+8] 
 DC 62 08                       ;  fsub  qword [edx+8] 
 D8 C8                          ;  fmul  st(0),st(0)
 DE C1                          ;  faddp st(1),st(0)
                                ;  ;
 DF F1                          ;  fcomip st(0),st(1)
 D8 D8                          ;  fcomp st(0),st(0)
                                ;  ' IF ((Ball(j).x-Ball(i).x)^2 + (Ball(j).y-Ball(i).y)^2) < (Ball
                                ;  ;
                                ;  ;--------------
                                ;  ;prevent fusion
                                ;  ;--------------
 (                              ;  (
 73 x                           ;  jae exit
                                ;  '...
 )                              ;  )
 C3                             ;  ret
                                ;  ;----------------
                                ;  ;----------------
                                ;  ;-----------------
                                ;  '------------
                                ;  '-------------
                                ;  ;==================
.glancing_collision             ;  .glancing_collision
                                ;  ;==================
                                ;  ;
                                ;  ;
 DD 42 20                       ;  fld  qword [edx+32] 
 DC 60 20                       ;  fsub qword [eax+32] 
 DD 56 44                       ;  fst qword [esi+68] 
 D8 C8                          ;  fmul st(0),st(0) 
 DD 42 18                       ;  fld  qword [edx+24] 
 DC 60 18                       ;  fsub qword [eax+24] 
 DD 56 3C                       ;  fst qword [esi+60] 
 D8 C8                          ;  fmul st(0),st(0) 
 DE C1                          ;  faddp st(1),st(0)
 d9 fa                          ;  fsqrt 
 DD 5E 4C                       ;  fstp qword [esi+76] ;
 DD 40 08                       ;  fld  qword [eax+8] 
 DC 62 08                       ;  fsub qword [edx+8] 
 DD 00                          ;  fld  qword [eax] 
 DC 22                          ;  fsub qword [edx] 
 d9 f3                          ;  fpatan 
 DD 56 2C                       ;  fst qword [esi+44] ; contact angle
 DD 42 20                       ;  fld  qword [edx+32] 
 DC 60 20                       ;  fsub qword [eax+32] 
 DD 42 18                       ;  fld  qword [edx+24] 
 DC 60 18                       ;  fsub qword [eax+24] 
 d9 f3                          ;  fpatan 
 DD 56 24                       ;  fst qword [esi+36] ; movement angle
 DE E9                          ;  fsubp st(1),st(0)                      ; difference in angles
 d9 ff                          ;  fcos 
 d9 e1                          ;  fabs 
 DC 4E 4C                       ;  fmul qword [esi+76] ; radius of velocity vector
 DD 5E 34                       ;  fstp qword [esi+52] ; reducing factor due to off centre impact
                                ;  ;
 DD 46 2C                       ;  fld qword [esi+44] 
 d9 fb                          ;  fsincos            ; split impact into x & y components
 DC 4E 34                       ;  fmul qword [esi+52] 
 DD 5E 3C                       ;  fstp qword [esi+60] ; x
 DC 4E 34                       ;  fmul qword [esi+52] 
 DD 5E 44                       ;  fstp qword [esi+68] ; y
                                ;  ;
                                ;  ;APPORTION DEFLECTIONS TO EACH BODY
                                ;  ;---------------------------------
                                ;  ;
                                ;  ;override with simple deflection
                                ;  'fld iball_vx : fsub jball_vx : fstp qword vx
                                ;  'fld iball_vy : fsub jball_vy : fstp qword vy
                                ;  '#fpu vx=iball.vx=jball.vx
                                ;  '#fpu vy=iball.vy=jball.vy
 DD 42 28                       ;  fld qword [edx+40] 
 DD 40 28                       ;  fld qword [eax+40] 
 D8 C1                          ;  fadd st(0),st(1)   
 DE F9                          ;  fdivp st(1),st(0)  
 D8 C0                          ;  fadd st(0),st(0)    
 D9 C0                          ;  fld st(0),st(0)    
 DC 4E 3C                       ;  fmul qword [esi+60] 
 DC 40 18                       ;  fadd qword [eax+24] 
 DD 58 18                       ;  fstp qword [eax+24] 
 DC 4E 44                       ;  fmul qword [esi+68] 
 DC 40 20                       ;  fadd qword [eax+32] 
 DD 58 20                       ;  fstp qword [eax+32] 
 DD 40 28                       ;  fld qword [eax+40] 
 DD 42 28                       ;  fld qword [edx+40] 
 D8 C1                          ;  fadd st(0),st(1)   
 DE F9                          ;  fdivp st(1),st(0)  
 D8 C0                          ;  fadd st(0),st(0)    
 d9 e0                          ;  fchs
 D9 C0                          ;  fld st(0),st(0)    
 DC 4E 3C                       ;  fmul qword [esi+60] 
 DC 42 18                       ;  fadd qword [edx+24] 
 DD 5A 18                       ;  fstp qword [edx+24] 
 DC 4E 44                       ;  fmul qword [esi+68] 
 DC 42 20                       ;  fadd qword [edx+32] 
 DD 5A 20                       ;  fstp qword [edx+32] 
 C3                             ;  ret
                                ;  ;==============
.limit_velocity                 ;  .limit_velocity
                                ;  ;==============
 C7 46 54 04 00 00 00           ;  mov [esi+84] ,4
                                ;  ;
                                ;  ; Y check
                                ;  ;
 DB 46 54                       ;  fild dword [esi+84] 
 DD 40 20                       ;  fld qword [eax+32] 
 DB F1                          ;  fcomi st(0),st(1)
 (                              ;  (
 76 x                           ;  jbe exit
 D9 C9                          ;  fxch st(0),st(1)
                                ;  ;fldz
 DD 50 20                       ;  fst qword [eax+32] 
 D9 C9                          ;  fxch st(0),st(1)
 )                              ;  )
 D9 C9                          ;  fxch st(0),st(1)
 d9 e0                          ;  fchs
 D9 C9                          ;  fxch st(0),st(1)
 DB F1                          ;  fcomi st(0),st(1)
 (                              ;  (
 73 x                           ;  jae exit
 D9 C9                          ;  fxch st(0),st(1)
                                ;  ;fldz
 DD 50 20                       ;  fst qword [eax+32] 
 D9 C9                          ;  fxch st(0),st(1)
 )                              ;  )
 D8 D8                          ;  fcomp st(0),st(0) ; flush
 D8 D8                          ;  fcomp st(0),st(0) ; flush
                                ;  ;
                                ;  ; X Check
                                ;  ;
 DB 46 54                       ;  fild dword [esi+84] 
 DD 40 18                       ;  fld qword [eax+24] 
 DB F1                          ;  fcomi st(0),st(1)
 (                              ;  (
 76 x                           ;  jbe exit
 D9 C9                          ;  fxch st(0),st(1)
                                ;  ;fldz
 DD 50 18                       ;  fst qword [eax+24] 
 D9 C9                          ;  fxch st(0),st(1)
 )                              ;  )
 D9 C9                          ;  fxch st(0),st(1)
 d9 e0                          ;  fchs
 D9 C9                          ;  fxch st(0),st(1)
 DB F1                          ;  fcomi st(0),st(1)
 (                              ;  (
 73 x                           ;  jae exit
 D9 C9                          ;  fxch st(0),st(1)
                                ;  ;fldz
 DD 50 18                       ;  fst qword [eax+24] 
 D9 C9                          ;  fxch st(0),st(1)
 )                              ;  )
                                ;  ;
 D8 D8                          ;  fcomp st(0),st(0) ; flush
 D8 D8                          ;  fcomp st(0),st(0) ; flush
 C3                             ;  ret
                                ;  ;--------
                                ;  ;==============
.ball_container                 ;  .ball_container
                                ;  ;==============
                                ;  ;
                                ;  ;Collision against the walls                                    
                                ;  ;
 DD 40 08                       ;  fld qword [eax+8] 
 (                              ;  (
 DD 40 10                       ;  fld qword [eax+16] 
 DF F1                          ;  fcomip st(0),st(1) 
 72 x                           ;  jb exit
 DD 40 10                       ;  fld qword [eax+16]
 DD 58 08                       ;  fstp qword [eax+8] 
 d9 ee                          ;  fldz
 DC 60 20                       ;  fsub qword [eax+32]
 DD 58 20                       ;  fstp qword [eax+32] 
 )                              ;  )
 (                              ;  (
 DD 04 25 C0 AD 0B 03           ;  fld qword [51097024] 
 DC 60 10                       ;  fsub qword [eax+16] 
 DB F1                          ;  fcomi st(0),st(1)
 77 x                           ;  ja exit
 DD 50 08                       ;  fst qword [eax+8] 
 d9 ee                          ;  fldz
 DC 60 20                       ;  fsub qword [eax+32]
 DD 58 20                       ;  fstp qword [eax+32] 
 )                              ;  )
 D8 D8                          ;  fcomp st(0),st(0) 
 D8 D8                          ;  fcomp st(0),st(0) 
 DD 00                          ;  fld qword [eax] 
 (                              ;  (
 DD 40 10                       ;  fld qword [eax+16] 
 DF F1                          ;  fcomip st(0),st(1) 
 72 x                           ;  jb exit
 DD 40 10                       ;  fld qword [eax+16]
 DD 18                          ;  fstp qword [eax] 
 d9 ee                          ;  fldz
 DC 60 18                       ;  fsub qword [eax+24]
 DD 58 18                       ;  fstp qword [eax+24] 
 )                              ;  )
 (                              ;  (
 DD 04 25 C0 AD 0B 03           ;  fld qword [51097024] 
 DC 60 10                       ;  fsub qword [eax+16] 
 DB F1                          ;  fcomi st(0),st(1)
 77 x                           ;  ja exit
 DD 10                          ;  fst qword [eax] 
 d9 ee                          ;  fldz
 DC 60 18                       ;  fsub qword [eax+24]
 DD 58 18                       ;  fstp qword [eax+24] 
 )                              ;  )
 D8 D8                          ;  fcomp st(0),st(0) 
 D8 D8                          ;  fcomp st(0),st(0) 
 C3                             ;  ret
.end_proc                       ;  .end_proc
 8B E5                          ;  mov esp,ebp 
 5D                             ;  pop ebp
 5F                             ;  pop edi 
 5E                             ;  pop esi 
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
._endp                          ;  ._endp
                                ;  ; collider_action
                                ;  '=======
                                ;  'CLEANUP
                                ;  '=======
                                ;  '
                                ;  ;SUB FINISH
 E9 gf _endp                    ;  jmp fwd _endp
!8                              ;  
.finish                         ;  .finish
.finish                         ;  .finish ' 
 (                              ;  (
 53                             ;  push ebx 
 56                             ;  push esi 
 57                             ;  push edi 
 E8 gl _mem                     ;  call _mem
 50                             ;  push eax 
 FF 93 C8 04 00 00              ;  call [ebx+1224]
 FF 93 30 04 00 00              ;  call [ebx+1072]
 56                             ;  push esi
 FF 53 08                       ;  call [ebx+8]
 58                             ;  pop eax
.end_proc                       ;  .end_proc
 5F                             ;  pop edi 
 5E                             ;  pop esi 
 5B                             ;  pop ebx
 C3                             ;  ret
 )                              ;  )
._endp                          ;  ._endp
._end_                          ;  ._end_
 5F                             ;  pop edi 
 5E                             ;  pop esi 
 5B                             ;  pop ebx 
 8B E5                          ;  mov esp,ebp 
 5D                             ;  pop ebp 
 C3                             ;  ret
._error_                        ;  ._error_
 51                             ;  push ecx 
 FF 93 00 04 00 00              ;  call [ebx+1024] 
 EB g _end_                     ;  jmp _end_
