IN G
IN H
MOV E G
MOV G 1
SUB H G
IN F
IN A
CMP F G
JZ 37
IN B
MOV D A
IN A
MOV B 1
MOV C D
DIV C B
MOV F C
ADD G G
DIV F G
MUL F G
DIV G G
SUB C F
MOV F 0
CMP C F
JZ 29
ADD G G
MUL B G
DIV G G
JNZ 14
LOAD D C
ADD C A
STORE D C
ADD D B
CMP D E
JNZ 13
JZ 97
;
MOV D A
MOV A 0
SUB D G
LOAD D F
SUB A F
;
MOV B 1
MOV C D
DIV C B
MOV F C
ADD G G
DIV F G
MUL F G
DIV G G
SUB C F
MOV F 0
CMP C F
JZ 60
ADD G G
MUL B G
DIV G G
JNZ 44
;
LOAD D C
SUB A C
SUB D B
MOV C 0
CMP D C
JZ 43
;
IN A
MOV D A
LOAD D F
ADD A F
ADD D G
;
MOV B 1
MOV C D
DIV C B
MOV F C
ADD G G
DIV F G
MUL F G
DIV G G
SUB C F
MOV F 0
CMP C F
JZ 90
ADD G G
MUL B G
DIV G G
JNZ 74
;
LOAD D C
ADD A C
SUB D B
MOV C 0
CMP D C
JZ 73
OUT A
MOV A 0
CMP H A
JZ 5
RETURN
