         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
		.Ltext0:
				.section	.rodata
		.LC1:
				.string	"\n\nArguments:\n\n"
		.LC2:
				.string	"ARGC = %d\n"
		.LC3:
				.string	"ARGV @[%p]\n"
		.LC4:
				.string	"  ARGV(%d) = \"%s\"\n"
		.LC5:
				.string	"  ARGV(%d) = NULL\n"
		.LC6:
				.string	"\nLocal Variables:\n\n"
		.LC7:
				.string	"S = \"%.*s\"\n"
		.LC8:
				.string	"LEN"
		.LC9:
				.string	"%s = <UNASSIGNED INTEGER>\n"
		.LC10:
				.string	"%s = %lld\n"
		main_backtrace.6165:
		.LFB192:
				leal	4(%esp), %ecx
				andl	$-16, %esp
				pushl	-4(%ecx)
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%edi
				pushl	%esi
				pushl	%ebx
				pushl	%ecx
				subl	$840, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%ecx, %eax
				movl	(%eax), %edx
				movl	4(%eax), %eax
				movl	%gs:20, %esi
				movl	%esi, -28(%ebp)
				xorl	%esi, %esi
				leal	8(%ebp), %ecx
				movl	%ecx, -32(%ebp)
				movl	%edx, -304(%ebp)
				movl	%eax, -308(%ebp)
				leal	-312(%ebp), %eax
				addl	$268, %eax
				leal	-312(%ebp), %edx
				movb	$-71, (%eax)
				movl	%edx, 1(%eax)
				movb	$-23, 5(%eax)
				leal	main_backtrace.6165@GOTOFF(%ebx), %ecx
				leal	10(%eax), %edx
				subl	%edx, %ecx
				movl	%ecx, %edx
				movl	%edx, 6(%eax)
		.L11:
				leal	.LC11@GOTOFF(%ebx), %eax
				movl	%eax, -840(%ebp)
				leal	-312(%ebp), %eax
				addl	$268, %eax
				movl	%eax, -836(%ebp)
				leal	.L11@GOTOFF(%ebx), %eax
				movl	%eax, -832(%ebp)
				movl	_imp_current_frame@GOT(%ebx), %eax
				movl	(%eax), %eax
				movl	%eax, -828(%ebp)
				movl	_imp_current_frame@GOT(%ebx), %eax
				leal	-840(%ebp), %edx
				movl	%edx, (%eax)
				movl	-304(%ebp), %eax
				movl	-308(%ebp), %edx
				subl	$8, %esp
				pushl	%edx
				pushl	%eax
				call	_imp_initialise@PLT
				addl	$16, %esp
		.LBB14:
    2   %string(255) S = "A string"
				leal	-568(%ebp), %eax
				leal	.LC0@GOTOFF(%ebx), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				leal	-824(%ebp), %eax
				leal	-568(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
		.LBE14:
				leal	-568(%ebp), %eax
				leal	-824(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				subl	$4, %esp
				pushl	$255
				leal	-568(%ebp), %eax
				pushl	%eax
				leal	-312(%ebp), %eax
				addl	$12, %eax
				pushl	%eax
				call	_imp_strcpy@PLT
				addl	$16, %esp
    3   %integer len
				movl	$-16843010, %eax
				movl	%eax, -312(%ebp)
				leal	-312(%ebp), %eax
				addl	$12, %eax
				movl	%eax, -848(%ebp)
		.LBB15:
		.LBB16:
				movl	-848(%ebp), %eax
		.LBE16:
		.LBE15:
    4   len = length(S)
				movzbl	(%eax), %eax
				movzbl	%al, %eax
				movl	%eax, -312(%ebp)
    5   ! Write() below outputs the wrong value.  Not sure if the problem is with length or write.
    6   %if len < -128 %start
				movl	-312(%ebp), %eax
				cmpl	$-128, %eax
				jge	.L27
				nop
		.L14:
    7     printstring("len < -128");
				subl	$8, %esp
				leal	.LC12@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC13@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_printf@PLT
				addl	$16, %esp
    8   %finish %else %if len < 0 %start
				jmp	.L15
		.L27:
				movl	-312(%ebp), %eax
				testl	%eax, %eax
				jns	.L28
				nop
		.L17:
    9     printstring("len >= -128 and < 0");
				subl	$8, %esp
				leal	.LC14@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC13@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_printf@PLT
				addl	$16, %esp
   10   %finish %else %if len < 128 %start
				jmp	.L15
		.L28:
				movl	-312(%ebp), %eax
				cmpl	$127, %eax
				jg	.L29
				nop
		.L19:
   11     printstring("len >= 0 and < 128");
				subl	$8, %esp
				leal	.LC15@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC13@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_printf@PLT
				addl	$16, %esp
   12   %finish %else %if len < 256 %start
				jmp	.L15
		.L29:
				movl	-312(%ebp), %eax
				cmpl	$255, %eax
				jg	.L30
				nop
		.L21:
   13     printstring("len >= 128 and < 256");
				subl	$8, %esp
				leal	.LC16@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC13@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_printf@PLT
				addl	$16, %esp
   14   %finish %else %start
				jmp	.L15
		.L30:
   15     printstring("len >= 256");
				subl	$8, %esp
				leal	.LC17@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC13@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_printf@PLT
				addl	$16, %esp
		.L15:
		.LBB17:
		.LBB18:
				call	_imp_newline@PLT
		.LBE18:
		.LBE17:
   16   %finish
   17   newline
   18   write(len,0)
				movl	-312(%ebp), %eax
				subl	$8, %esp
				pushl	$0
				pushl	%eax
				call	_imp_writeint@PLT
				addl	$16, %esp
		.LBB19:
		.LBB20:
				call	_imp_newline@PLT
				movl	$0, -844(%ebp)
		.LBE20:
		.LBE19:
		.LBB21:
		.LBB22:
				subl	$12, %esp
				pushl	-844(%ebp)
				call	exit@PLT
		.LBE22:
		.LBE21:
		.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:
   19   newline
   20 %endofprogram
				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	8(%esi), %eax
				subl	$8, %esp
				pushl	%eax
				leal	.LC2@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				movl	4(%esi), %eax
				subl	$8, %esp
				pushl	%eax
				leal	.LC3@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
		.LBB13:
				movl	$0, -16(%ebp)
				jmp	.L2
		.L3:
				movl	-16(%ebp), %eax
				leal	0(,%eax,4), %edx
				movl	4(%esi), %eax
				addl	%edx, %eax
				movl	(%eax), %eax
				subl	$4, %esp
				pushl	%eax
				pushl	-16(%ebp)
				leal	.LC4@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				addl	$1, -16(%ebp)
		.L2:
				movl	8(%esi), %eax
				cmpl	%eax, -16(%ebp)
				jl	.L3
		.LBE13:
				movl	8(%esi), %eax
				leal	0(,%eax,4), %edx
				movl	4(%esi), %eax
				addl	%edx, %eax
				movl	(%eax), %eax
				testl	%eax, %eax
				jne	.L4
				movl	8(%esi), %eax
				subl	$8, %esp
				pushl	%eax
				leal	.LC5@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				jmp	.L5
		.L4:
				movl	8(%esi), %eax
				leal	0(,%eax,4), %edx
				movl	4(%esi), %eax
				addl	%edx, %eax
				movl	(%eax), %edx
				movl	8(%esi), %eax
				subl	$4, %esp
				pushl	%edx
				pushl	%eax
				leal	.LC4@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
		.L5:
				subl	$12, %esp
				leal	.LC6@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				leal	13(%esi), %edx
				movzbl	12(%esi), %eax
				movzbl	%al, %eax
				subl	$4, %esp
				pushl	%edx
				pushl	%eax
				leal	.LC7@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				movl	%esi, %eax
				movzbl	(%eax), %eax
				cmpb	$-128, %al
				je	.L6
				movl	%esi, %eax
				movzbl	(%eax), %eax
				cmpb	$-2, %al
				jne	.L7
		.L6:
				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	.L7
				subl	$8, %esp
				leal	.LC8@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC9@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				jmp	.L8
		.L7:
				movl	(%esi), %eax
				cltd
				pushl	%edx
				pushl	%eax
				leal	.LC8@GOTOFF(%ebx), %eax
				pushl	%eax
				leal	.LC10@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
		.L8:
				nop
				movl	-12(%ebp), %eax
				xorl	%gs:20, %eax
				je	.L9
				call	__stack_chk_fail_local
		.L9:
				leal	-8(%ebp), %esp
				popl	%ebx
				popl	%esi
				popl	%ebp
				ret
		.LFE192:
				.section	.rodata
		.LC11:
				.string	"main"
		.LC12:
				.string	"len < -128"
		.LC13:
				.string	"%s"
		.LC14:
				.string	"len >= -128 and < 0"
		.LC15:
				.string	"len >= 0 and < 128"
		.LC16:
				.string	"len >= 128 and < 256"
		.LC17:
				.string	"len >= 256"
				.align 32
		.LC0:
				.byte	8
				.string	"A string"
				.zero	246
				.globl	main
		main:
		.LFB191:
   19 Statements compiled
