         Edinburgh IMP77 Compiler - Version 8.4
    1 %systemintegerfn stoi(%string(255) S)
		.Ltext0:
				.section	.rodata
		.LC1:
				.string	"\n\nArguments:\n\n"
		.LC2:
				.string	"S = \"%.*s\"\n"
		.LC3:
				.string	"\nLocal Variables:\n\n"
		.LC4:
				.string	"I"
		.LC5:
				.string	"%s = <UNASSIGNED INTEGER>\n"
		.LC6:
				.string	"%s = %lld\n"
		.LC7:
				.string	"K"
		.LC8:
				.string	"SIGN"
		.LC9:
				.string	"VAL"
		STOI_backtrace.6164:
		.LFB192:
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%edi
				pushl	%esi
				pushl	%ebx
				subl	$1132, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%gs:20, %eax
				movl	%eax, -28(%ebp)
				xorl	%eax, %eax
				leal	8(%ebp), %edx
				leal	8(%ebp), %eax
				movl	%edx, -1056(%ebp)
				movl	%eax, -1072(%ebp)
				leal	-1088(%ebp), %eax
				addl	$20, %eax
				leal	-1088(%ebp), %edx
				movb	$-71, (%eax)
				movl	%edx, 1(%eax)
				movb	$-23, 5(%eax)
				leal	STOI_backtrace.6164@GOTOFF(%ebx), %ecx
				leal	10(%eax), %edx
				subl	%edx, %ecx
				movl	%ecx, %edx
				movl	%edx, 6(%eax)
		.L16:
				leal	.LC10@GOTOFF(%ebx), %eax
				movl	%eax, -1104(%ebp)
				leal	-1088(%ebp), %eax
				addl	$20, %eax
				movl	%eax, -1100(%ebp)
				leal	.L16@GOTOFF(%ebx), %eax
				movl	%eax, -1096(%ebp)
				movl	_imp_current_frame@GOT(%ebx), %eax
				movl	(%eax), %eax
				movl	%eax, -1092(%ebp)
				movl	_imp_current_frame@GOT(%ebx), %eax
				leal	-1104(%ebp), %edx
				movl	%edx, (%eax)
    2 %integer i,k
				movl	$-16843010, %eax
				movl	%eax, -1076(%ebp)
				movl	$-16843010, %eax
				movl	%eax, -1080(%ebp)
    3 %integer sign=0, val=0
				movl	$-16843010, %eax
				movl	%eax, -1084(%ebp)
				movl	$0, %eax
				movl	%eax, -1084(%ebp)
				movl	$-16843010, %eax
				movl	%eax, -1088(%ebp)
				movl	$0, %eax
				movl	%eax, -1088(%ebp)
    4   i = 0
				movl	$0, %eax
				movl	%eax, -1076(%ebp)
		.L17:
				leal	8(%ebp), %eax
				movl	%eax, -1116(%ebp)
		.LBB8:
		.LBB9:
				movl	-1116(%ebp), %eax
		.LBE9:
		.LBE8:
    5   %while i < length(s) %cycle
				movzbl	(%eax), %eax
				movzbl	%al, %edx
				movl	-1076(%ebp), %eax
				cmpl	%eax, %edx
				jle	.L46
				nop
		.L20:
    6     i = i+1;  k = charno(s,i)
				movl	-1076(%ebp), %eax
				addl	$1, %eax
				movl	%eax, -1076(%ebp)
				movl	-1076(%ebp), %eax
				leal	8(%ebp), %esi
				movl	%esi, -1112(%ebp)
				movl	%eax, -1108(%ebp)
		.LBB10:
		.LBB11:
				movl	-1112(%ebp), %edx
				movl	-1108(%ebp), %eax
				addl	%edx, %eax
		.LBE11:
		.LBE10:
				movzbl	(%eax), %eax
				movzbl	%al, %eax
				movl	%eax, -1080(%ebp)
    7     %continue %if k <= ' '
				movl	-1080(%ebp), %eax
				cmpl	$32, %eax
				jle	.L47
				nop
		.L23:
				nop
		.L34:
    8     %if k = '-' %start
				movl	-1080(%ebp), %eax
				cmpl	$45, %eax
				jne	.L48
				nop
		.L26:
		.LBB12:
    9       sign = 1
				movl	$1, %eax
				movl	%eax, -1084(%ebp)
   10     %else %if '0' <= k <= '9'
				jmp	.L34
		.L48:
				movl	-1080(%ebp), %eax
				movl	%eax, -1120(%ebp)
				cmpl	$47, -1120(%ebp)
				jle	.L49
				cmpl	$57, -1120(%ebp)
				jg	.L50
		.LBE12:
				nop
				jmp	.L28
		.L50:
				nop
		.L28:
		.LBE13:
   11       val = val<<3+val+val+k-'0'
				movl	-1088(%ebp), %eax
				leal	0(,%eax,8), %edx
				movl	-1088(%ebp), %eax
				addl	%eax, %edx
				movl	-1088(%ebp), %eax
				addl	%eax, %edx
				movl	-1080(%ebp), %eax
				addl	%edx, %eax
				subl	$48, %eax
				movl	%eax, -1088(%ebp)
   12     %else
				jmp	.L34
		.L49:
		.LBB13:
   13       %signal 4, 1, k{, "Non-numeric character"}
				movl	-1080(%ebp), %eax
				movl	%eax, -1136(%ebp)
				leal	-540(%ebp), %eax
				subl	$8, %esp
				leal	.LC11@GOTOFF(%ebx), %edx
				pushl	%edx
				pushl	%eax
				call	_imp_c2istr@PLT
				addl	$12, %esp
				movl	_imp_current_line@GOT(%ebx), %eax
				movl	(%eax), %eax
				testl	%eax, %eax
				je	.L30
				movl	_imp_current_line@GOT(%ebx), %eax
				movl	(%eax), %eax
				movl	%eax, -1132(%ebp)
				jmp	.L31
		.L30:
				movl	$13, -1132(%ebp)
		.L31:
				movl	_imp_current_file@GOT(%ebx), %eax
				movl	(%eax), %eax
				testl	%eax, %eax
				je	.L32
				movl	_imp_current_file@GOT(%ebx), %eax
				movl	(%eax), %edx
				leal	-284(%ebp), %eax
				subl	$8, %esp
				pushl	%edx
				pushl	%eax
				call	_imp_c2istr@PLT
				addl	$12, %esp
				jmp	.L33
		.L32:
		.LBB14:
				leal	-1052(%ebp), %eax
				leal	.LC0@GOTOFF(%ebx), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				leal	-796(%ebp), %eax
				leal	-1052(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
		.LBE14:
				leal	-284(%ebp), %eax
				leal	-796(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
		.L33:
				pushl	-1136(%ebp)
				pushl	$1
				pushl	$4
				subl	$256, %esp
				movl	%esp, %eax
				movl	%eax, %edi
				leal	-540(%ebp), %eax
				movl	$64, %edx
				movl	%eax, %esi
				movl	%edx, %ecx
				rep movsl
				pushl	-1132(%ebp)
				subl	$256, %esp
				movl	%esp, %eax
				movl	%eax, %edi
				leal	-284(%ebp), %eax
				movl	$64, %edx
				movl	%eax, %esi
				movl	%edx, %ecx
				rep movsl
				call	_signal_event@PLT
				addl	$528, %esp
				jmp	.L17
		.L24:
		.L47:
   14     %finish
   15   %repeat
				jmp	.L17
		.L46:
   16   %result = val %if sign = 0
				movl	-1084(%ebp), %eax
				testl	%eax, %eax
				jne	.L51
				movl	-1092(%ebp), %edx
				movl	_imp_current_frame@GOT(%ebx), %eax
				movl	%edx, (%eax)
				movl	-1088(%ebp), %eax
				movl	$0, %edx
				jmp	.L37
		.L51:
				nop
		.L36:
   17   %result = -val
				movl	-1092(%ebp), %edx
				movl	_imp_current_frame@GOT(%ebx), %eax
				movl	%edx, (%eax)
				movl	-1088(%ebp), %eax
				negl	%eax
				movl	$0, %edx
		.L37:
				cmpl	$1, %edx
				jne	.L15
		.L15:
				movl	-28(%ebp), %edi
				xorl	%gs:20, %edi
				je	.L40
				call	__stack_chk_fail_local
		.L40:
				leal	-12(%ebp), %esp
				popl	%ebx
				popl	%esi
				popl	%edi
				popl	%ebp
				ret
		.LFE191:
				.section	.text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
				.globl	__x86.get_pc_thunk.bx
				.hidden	__x86.get_pc_thunk.bx
		__x86.get_pc_thunk.bx:
		.LFB193:
				movl	(%esp), %ebx
				ret
		.LFE193:
		.Letext0:
   18 %end
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%esi
				pushl	%ebx
				subl	$32, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%ecx, %esi
				movl	%ecx, -28(%ebp)
				movl	%gs:20, %eax
				movl	%eax, -12(%ebp)
				xorl	%eax, %eax
				subl	$12, %esp
				leal	.LC1@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				movl	16(%esi), %eax
				movzbl	(%eax), %eax
				movzbl	%al, %eax
				movl	16(%esi), %edx
				addl	$1, %edx
				subl	$4, %esp
				pushl	%edx
				pushl	%eax
				leal	.LC2@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				subl	$12, %esp
				leal	.LC3@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				leal	12(%esi), %eax
				movzbl	(%eax), %eax
				cmpb	$-128, %al
				je	.L2
				leal	12(%esi), %eax
				movzbl	(%eax), %eax
				cmpb	$-2, %al
				jne	.L3
		.L2:
				leal	12(%esi), %eax
				leal	1(%eax), %edx
				leal	12(%esi), %eax
				subl	$4, %esp
				pushl	$3
				pushl	%edx
				pushl	%eax
				call	memcmp@PLT
				addl	$16, %esp
				testl	%eax, %eax
				jne	.L3
				subl	$8, %esp
				leal	.LC4@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC5@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				jmp	.L4
		.L3:
				movl	12(%esi), %eax
				cltd
				pushl	%edx
				pushl	%eax
				leal	.LC4@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC6@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
		.L4:
				leal	8(%esi), %eax
				movzbl	(%eax), %eax
				cmpb	$-128, %al
				je	.L5
				leal	8(%esi), %eax
				movzbl	(%eax), %eax
				cmpb	$-2, %al
				jne	.L6
		.L5:
				leal	8(%esi), %eax
				leal	1(%eax), %edx
				leal	8(%esi), %eax
				subl	$4, %esp
				pushl	$3
				pushl	%edx
				pushl	%eax
				call	memcmp@PLT
				addl	$16, %esp
				testl	%eax, %eax
				jne	.L6
				subl	$8, %esp
				leal	.LC7@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC5@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				jmp	.L7
		.L6:
				movl	8(%esi), %eax
				cltd
				pushl	%edx
				pushl	%eax
				leal	.LC7@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC6@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
		.L7:
				leal	4(%esi), %eax
				movzbl	(%eax), %eax
				cmpb	$-128, %al
				je	.L8
				leal	4(%esi), %eax
				movzbl	(%eax), %eax
				cmpb	$-2, %al
				jne	.L9
		.L8:
				leal	4(%esi), %eax
				leal	1(%eax), %edx
				leal	4(%esi), %eax
				subl	$4, %esp
				pushl	$3
				pushl	%edx
				pushl	%eax
				call	memcmp@PLT
				addl	$16, %esp
				testl	%eax, %eax
				jne	.L9
				subl	$8, %esp
				leal	.LC8@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC5@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				jmp	.L10
		.L9:
				movl	4(%esi), %eax
				cltd
				pushl	%edx
				pushl	%eax
				leal	.LC8@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC6@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
		.L10:
				movl	%esi, %eax
				movzbl	(%eax), %eax
				cmpb	$-128, %al
				je	.L11
				movl	%esi, %eax
				movzbl	(%eax), %eax
				cmpb	$-2, %al
				jne	.L12
		.L11:
				movl	%esi, %eax
				addl	$1, %eax
				movl	%esi, %edx
				subl	$4, %esp
				pushl	$3
				pushl	%eax
				pushl	%edx
				call	memcmp@PLT
				addl	$16, %esp
				testl	%eax, %eax
				jne	.L12
				subl	$8, %esp
				leal	.LC9@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC5@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				jmp	.L13
		.L12:
				movl	(%esi), %eax
				cltd
				pushl	%edx
				pushl	%eax
				leal	.LC9@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC6@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
		.L13:
				nop
				movl	-12(%ebp), %eax
				xorl	%gs:20, %eax
				je	.L14
				call	__stack_chk_fail_local
		.L14:
				leal	-8(%ebp), %esp
				popl	%ebx
				popl	%esi
				popl	%ebp
				ret
		.LFE192:
				.section	.rodata
		.LC10:
				.string	"STOI"
		.LC11:
				.string	""
				.align 32
		.LC0:
				.byte	16
				.string	"test-in/stoi.imp"
				.zero	238
				.globl	STOI
		STOI:
		.LFB191:
   19
   20 %endoffile
   20 Statements compiled
