;==============================================================
; Intel Asm
;==============================================================
         .486
         .model flat, stdcall
         option casemap :none
         include \masm32\include\windows.inc
         include \masm32\include\masm32.inc
         include \masm32\include\kernel32.inc
         include \masm32\macros\macros.asm

         includelib \masm32\lib\masm32.lib
         includelib \masm32\lib\kernel32.lib

;==============================================================
         .data
Txt db ?, 0

;==============================================================
; Entry point:
         .code
start:
         FINIT
         PUSH  EBP
         MOV   EBP,  ESP
         SUB   ESP,  164
         ; Let Ti2_70 = 
         ; Integer 10
         MOV   EAX,  10
         MOV   [EBP-4],  EAX
         ; Let Ti3_71 = 
         ; Integer 1
         MOV   EAX,  1
         MOV   [EBP-8],  EAX
         ; Let z_30 = 
         ; Apply direct min_caml_create_array
         PUSH  dword ptr [EBP-8]
         PUSH  dword ptr [EBP-4]
         CALL  min_caml_create_array
         ADD   ESP,  8
         MOV   [EBP-12],  EAX
         ; Let Tu4_69 = 
         ; Unit
         ; Let x_31 = 
         ; Apply direct f_26
         CALL  f_26
         ADD   ESP,  0
         MOV   [EBP-16],  EAX
         ; Let y_32 = 
         ; Integer 67890
         MOV   EAX,  67890
         MOV   [EBP-20],  EAX
         ; Let Ti5_68 = 
         ; Integer 0
         MOV   EAX,  0
         MOV   [EBP-24],  EAX
         ; Let z0_33 = 
         ; Array z_30[Ti5_68]
         MOV   EBX,  [EBP-24]
         SHL   EBX,  2
         ADD   EBX,  [EBP-12]
         MOV   EAX,  [EBX]
         MOV   [EBP-28],  EAX
         ; Let z1_34 = 
         ; Add z0_33 + z0_33
         MOV   EAX,  [EBP-28]
         ADD   EAX,  [EBP-28]
         MOV   [EBP-32],  EAX
         ; Let z2_35 = 
         ; Add z1_34 + z1_34
         MOV   EAX,  [EBP-32]
         ADD   EAX,  [EBP-32]
         MOV   [EBP-36],  EAX
         ; Let z3_36 = 
         ; Add z2_35 + z2_35
         MOV   EAX,  [EBP-36]
         ADD   EAX,  [EBP-36]
         MOV   [EBP-40],  EAX
         ; Let z4_37 = 
         ; Add z3_36 + z3_36
         MOV   EAX,  [EBP-40]
         ADD   EAX,  [EBP-40]
         MOV   [EBP-44],  EAX
         ; Let z5_38 = 
         ; Add z4_37 + z4_37
         MOV   EAX,  [EBP-44]
         ADD   EAX,  [EBP-44]
         MOV   [EBP-48],  EAX
         ; Let z6_39 = 
         ; Add z5_38 + z5_38
         MOV   EAX,  [EBP-48]
         ADD   EAX,  [EBP-48]
         MOV   [EBP-52],  EAX
         ; Let z7_40 = 
         ; Add z6_39 + z6_39
         MOV   EAX,  [EBP-52]
         ADD   EAX,  [EBP-52]
         MOV   [EBP-56],  EAX
         ; Let z8_41 = 
         ; Add z7_40 + z7_40
         MOV   EAX,  [EBP-56]
         ADD   EAX,  [EBP-56]
         MOV   [EBP-60],  EAX
         ; Let z9_42 = 
         ; Add z8_41 + z8_41
         MOV   EAX,  [EBP-60]
         ADD   EAX,  [EBP-60]
         MOV   [EBP-64],  EAX
         ; Let z10_43 = 
         ; Add z9_42 + z9_42
         MOV   EAX,  [EBP-64]
         ADD   EAX,  [EBP-64]
         MOV   [EBP-68],  EAX
         ; Let z11_44 = 
         ; Add z10_43 + z10_43
         MOV   EAX,  [EBP-68]
         ADD   EAX,  [EBP-68]
         MOV   [EBP-72],  EAX
         ; Let z12_45 = 
         ; Add z11_44 + z11_44
         MOV   EAX,  [EBP-72]
         ADD   EAX,  [EBP-72]
         MOV   [EBP-76],  EAX
         ; Let z13_46 = 
         ; Add z12_45 + z12_45
         MOV   EAX,  [EBP-76]
         ADD   EAX,  [EBP-76]
         MOV   [EBP-80],  EAX
         ; Let z14_47 = 
         ; Add z13_46 + z13_46
         MOV   EAX,  [EBP-80]
         ADD   EAX,  [EBP-80]
         MOV   [EBP-84],  EAX
         ; Let z15_48 = 
         ; Add z14_47 + z14_47
         MOV   EAX,  [EBP-84]
         ADD   EAX,  [EBP-84]
         MOV   [EBP-88],  EAX
         ; Let Ti6_67 = 
         ; Integer 1
         MOV   EAX,  1
         MOV   [EBP-92],  EAX
         ; Let Ti7_50 = 
         ; Array z_30[Ti6_67]
         MOV   EBX,  [EBP-92]
         SHL   EBX,  2
         ADD   EBX,  [EBP-12]
         MOV   EAX,  [EBX]
         MOV   [EBP-96],  EAX
         ; Let Ti8_51 = 
         ; Integer 0
         MOV   EAX,  0
         MOV   [EBP-100],  EAX
         ; Let Ti24_49 = 
         ; If Ti7_50 == Ti8_51
         MOV   EAX,  [EBP-96]
         CMP   EAX,  [EBP-100]
         JNE   else_73
         ; Apply direct g_28
         PUSH  dword ptr [EBP-20]
         CALL  g_28
         ADD   ESP,  4
         MOV   [EBP-104],  EAX
         JMP   cont_74
else_73:
         ; Let Ti9_66 = 
         ; Add z0_33 + z1_34
         MOV   EAX,  [EBP-28]
         ADD   EAX,  [EBP-32]
         MOV   [EBP-108],  EAX
         ; Let Ti10_65 = 
         ; Add Ti9_66 + z2_35
         MOV   EAX,  [EBP-108]
         ADD   EAX,  [EBP-36]
         MOV   [EBP-112],  EAX
         ; Let Ti11_64 = 
         ; Add Ti10_65 + z3_36
         MOV   EAX,  [EBP-112]
         ADD   EAX,  [EBP-40]
         MOV   [EBP-116],  EAX
         ; Let Ti12_63 = 
         ; Add Ti11_64 + z4_37
         MOV   EAX,  [EBP-116]
         ADD   EAX,  [EBP-44]
         MOV   [EBP-120],  EAX
         ; Let Ti13_62 = 
         ; Add Ti12_63 + z5_38
         MOV   EAX,  [EBP-120]
         ADD   EAX,  [EBP-48]
         MOV   [EBP-124],  EAX
         ; Let Ti14_61 = 
         ; Add Ti13_62 + z6_39
         MOV   EAX,  [EBP-124]
         ADD   EAX,  [EBP-52]
         MOV   [EBP-128],  EAX
         ; Let Ti15_60 = 
         ; Add Ti14_61 + z7_40
         MOV   EAX,  [EBP-128]
         ADD   EAX,  [EBP-56]
         MOV   [EBP-132],  EAX
         ; Let Ti16_59 = 
         ; Add Ti15_60 + z8_41
         MOV   EAX,  [EBP-132]
         ADD   EAX,  [EBP-60]
         MOV   [EBP-136],  EAX
         ; Let Ti17_58 = 
         ; Add Ti16_59 + z9_42
         MOV   EAX,  [EBP-136]
         ADD   EAX,  [EBP-64]
         MOV   [EBP-140],  EAX
         ; Let Ti18_57 = 
         ; Add Ti17_58 + z10_43
         MOV   EAX,  [EBP-140]
         ADD   EAX,  [EBP-68]
         MOV   [EBP-144],  EAX
         ; Let Ti19_56 = 
         ; Add Ti18_57 + z11_44
         MOV   EAX,  [EBP-144]
         ADD   EAX,  [EBP-72]
         MOV   [EBP-148],  EAX
         ; Let Ti20_55 = 
         ; Add Ti19_56 + z12_45
         MOV   EAX,  [EBP-148]
         ADD   EAX,  [EBP-76]
         MOV   [EBP-152],  EAX
         ; Let Ti21_54 = 
         ; Add Ti20_55 + z13_46
         MOV   EAX,  [EBP-152]
         ADD   EAX,  [EBP-80]
         MOV   [EBP-156],  EAX
         ; Let Ti22_53 = 
         ; Add Ti21_54 + z14_47
         MOV   EAX,  [EBP-156]
         ADD   EAX,  [EBP-84]
         MOV   [EBP-160],  EAX
         ; Let Ti23_52 = 
         ; Add Ti22_53 + z15_48
         MOV   EAX,  [EBP-160]
         ADD   EAX,  [EBP-88]
         MOV   [EBP-164],  EAX
         ; Add Ti23_52 + x_31
         MOV   EAX,  [EBP-164]
         ADD   EAX,  [EBP-16]
         MOV   [EBP-104],  EAX
cont_74:
         ; Apply direct min_caml_print_int
         PUSH  dword ptr [EBP-104]
         CALL  min_caml_print_int
         ADD   ESP,  4
         MOV   ESP,  EBP
         POP   EBP
         PUSH  0
         CALL  ExitProcess

;==============================================================
; Function f_26:

f_26 proc
         PUSH  EBP
         MOV   EBP,  ESP
         SUB   ESP,  0
         ; Integer 12345
         MOV   EAX,  12345
         MOV   ESP,  EBP
         POP   EBP
         RET
f_26 endp

;==============================================================
; Function g_28:

g_28 proc
         PUSH  EBP
         MOV   EBP,  ESP
         SUB   ESP,  4
         ; Let Ti25_72 = 
         ; Integer 1
         MOV   EAX,  1
         MOV   [EBP-4],  EAX
         ; Add y_29 + Ti25_72
         MOV   EAX,  [EBP+8]
         ADD   EAX,  [EBP-4]
         MOV   ESP,  EBP
         POP   EBP
         RET
g_28 endp

;==============================================================
; need to copy min_caml_intel.asm from min-caml directory to output directoty
include min_caml_intel.asm

END start

;==============================================================

