
.text
.global main                            /* program entry point */

procedure:
	movl	4(%esp), %eax		# 1st input arg:   %eax = a
	movl	8(%esp), %ebx		# 2nd input arg:   %ebx = b

	cmpl    %eax, %ebx
	jng	EXIT			# use 'jnl' to get minimum
					# use 'jng' to get maximum
	movl	%ebx, %eax

EXIT:
	ret				# return arg in %eax


main:
	pushl	%ebp
	movl	%esp, %ebp

	pushl	b			# try other combinations of
        pushl   c			#   variables a, b, and c here
        call    procedure

	pushl	%eax
	pushl	$string
	call	printf

	leave
	ret

.section	.rodata
    string:
	.string	"result is %d\n"

.section .data
    a:
	.long	24
    b:
	.long	19
    c:
	.long	37

