         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
		.Ltext0:
				.globl	main
		main:
		.LFB189:
				leal	4(%esp), %ecx
				andl	$-16, %esp
				pushl	-4(%ecx)
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%ebx
				pushl	%ecx
				subl	$16, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%ecx, %eax
				subl	$8, %esp
				pushl	4(%eax)
				pushl	(%eax)
				call	_imp_initialise@PLT
				addl	$16, %esp
    2   ! This is a particularly nasty test as the i2c output depends on the --tidy flag.
    3   ! - MONOP precedences are not compared properly against BINOP precedences.
    4   ! Note: imp2026 gets it right.
    5
    6   %integer i
    7
    8   i = -1 >> 1            ;! This imp construct actually should evaluate as: -(1>>1) which is 0!  Yes, it's documented.
				movl	$0, -16(%ebp)
    9
   10   write(i, 3) ; newline
				subl	$8, %esp
				pushl	$3
				pushl	-16(%ebp)
				call	_imp_writeint@PLT
				addl	$16, %esp
		.LBB8:
		.LBB9:
				call	_imp_newline@PLT
		.LBE9:
		.LBE8:
   11
   12   i = (-1) >> 1          ;! unsigned shift should pull in 0's at the top, returning MAX INT.
				movl	$2147483647, -16(%ebp)
   13
   14   write(i, 3) ; newline
				subl	$8, %esp
				pushl	$3
				pushl	-16(%ebp)
				call	_imp_writeint@PLT
				addl	$16, %esp
		.LBB10:
		.LBB11:
				call	_imp_newline@PLT
				movl	$0, -12(%ebp)
		.LBE11:
		.LBE10:
		.LBB12:
		.LBB13:
				subl	$12, %esp
				pushl	-12(%ebp)
				call	exit@PLT
		.LBE13:
		.LBE12:
		.LFE189:
				.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:
		.LFB190:
				movl	(%esp), %ebx
				ret
		.LFE190:
		.Letext0:
   15
   16 %endofprogram
    9 Statements compiled
