;==============================================================
; 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,  12
         ; Let Ti1_19 = 
         ; Integer 3
         MOV   EAX,  3
         MOV   [EBP-4],  EAX
         ; Let Ti2_20 = 
         ; Integer 10
         MOV   EAX,  10
         MOV   [EBP-8],  EAX
         ; Let Ti3_18 = 
         ; Apply direct ack_15
         PUSH  dword ptr [EBP-8]
         PUSH  dword ptr [EBP-4]
         CALL  ack_15
         ADD   ESP,  8
         MOV   [EBP-12],  EAX
         ; Apply direct min_caml_print_int
         PUSH  dword ptr [EBP-12]
         CALL  min_caml_print_int
         ADD   ESP,  4
         MOV   ESP,  EBP
         POP   EBP
         PUSH  0
         CALL  ExitProcess

;==============================================================
; Function ack_15:

ack_15 proc
         PUSH  EBP
         MOV   EBP,  ESP
         SUB   ESP,  44
         ; Let Ti4_21 = 
         ; Integer 0
         MOV   EAX,  0
         MOV   [EBP-4],  EAX
         ; If x_16 <= Ti4_21
         MOV   EAX,  [EBP+8]
         CMP   EAX,  [EBP-4]
         JG    else_32
         ; Let Ti5_31 = 
         ; Integer 1
         MOV   EAX,  1
         MOV   [EBP-8],  EAX
         ; Add y_17 + Ti5_31
         MOV   EAX,  [EBP+12]
         ADD   EAX,  [EBP-8]
         MOV   ESP,  EBP
         POP   EBP
         RET
else_32:
         ; Let Ti6_22 = 
         ; Integer 0
         MOV   EAX,  0
         MOV   [EBP-12],  EAX
         ; If y_17 <= Ti6_22
         MOV   EAX,  [EBP+12]
         CMP   EAX,  [EBP-12]
         JG    else_33
         ; Let Ti7_30 = 
         ; Integer 1
         MOV   EAX,  1
         MOV   [EBP-16],  EAX
         ; Let Ti8_28 = 
         ; Sub x_16 - Ti7_30
         MOV   EAX,  [EBP+8]
         SUB   EAX,  [EBP-16]
         MOV   [EBP-20],  EAX
         ; Let Ti9_29 = 
         ; Integer 1
         MOV   EAX,  1
         MOV   [EBP-24],  EAX
         ; Apply direct ack_15
         PUSH  dword ptr [EBP-24]
         PUSH  dword ptr [EBP-20]
         CALL  ack_15
         ADD   ESP,  8
         MOV   ESP,  EBP
         POP   EBP
         RET
else_33:
         ; Let Ti10_27 = 
         ; Integer 1
         MOV   EAX,  1
         MOV   [EBP-28],  EAX
         ; Let Ti11_23 = 
         ; Sub x_16 - Ti10_27
         MOV   EAX,  [EBP+8]
         SUB   EAX,  [EBP-28]
         MOV   [EBP-32],  EAX
         ; Let Ti12_26 = 
         ; Integer 1
         MOV   EAX,  1
         MOV   [EBP-36],  EAX
         ; Let Ti13_25 = 
         ; Sub y_17 - Ti12_26
         MOV   EAX,  [EBP+12]
         SUB   EAX,  [EBP-36]
         MOV   [EBP-40],  EAX
         ; Let Ti14_24 = 
         ; Apply direct ack_15
         PUSH  dword ptr [EBP-40]
         PUSH  dword ptr [EBP+8]
         CALL  ack_15
         ADD   ESP,  8
         MOV   [EBP-44],  EAX
         ; Apply direct ack_15
         PUSH  dword ptr [EBP-44]
         PUSH  dword ptr [EBP-32]
         CALL  ack_15
         ADD   ESP,  8
         MOV   ESP,  EBP
         POP   EBP
         RET
ack_15 endp

;==============================================================
include min_caml_intel.asm

END start

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

