	.file	"232425.c"
	.intel_syntax noprefix
	.text
	.local	mem
	.comm	mem,40,32
	.local	fewest_demerits
	.comm	fewest_demerits,4,4
	.local	best_bet
	.comm	best_bet,2,2
	.data
	.align 2
	.type	best_line, @object
	.size	best_line, 2
best_line:
	.value	-1
	.text
	.type	foo, @function
foo:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	WORD PTR -4[rbp], ax
.L3:
	movzx	eax, WORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, mem[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 2
	je	.L2
	movzx	eax, WORD PTR -4[rbp]
	add	eax, 2
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, mem[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, eax
	mov	eax, DWORD PTR fewest_demerits[rip]
	cmp	edx, eax
	jnb	.L2
	movzx	eax, WORD PTR -4[rbp]
	mov	WORD PTR best_bet[rip], ax
.L2:
	movzx	eax, WORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, mem[rip+2]
	movzx	eax, WORD PTR [rdx+rax]
	mov	WORD PTR -4[rbp], ax
	cmp	WORD PTR -4[rbp], -42
	jne	.L3
	movzx	eax, WORD PTR best_bet[rip]
	movzx	eax, ax
	add	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, mem[rip]
	movzx	eax, WORD PTR [rdx+rax]
	mov	WORD PTR best_line[rip], ax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	foo, .-foo
	.section	.rodata
.LC0:
	.string	"Test passed"
.LC1:
	.string	"Test failed, best_line = %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	BYTE PTR mem[rip], 0
	mov	WORD PTR mem[rip+2], -42
	mov	WORD PTR mem[rip+4], 456
	mov	DWORD PTR mem[rip+8], 30
	mov	edi, 0
	call	foo
	movzx	eax, WORD PTR best_line[rip]
	cmp	ax, 456
	jne	.L5
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L7
.L5:
	movzx	eax, WORD PTR best_line[rip]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
.L7:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"232425.c"
	.text
	.local	mem
	.comm	mem,40,4
	.local	fewest_demerits
	.comm	fewest_demerits,4,4
	.local	best_bet
	.comm	best_bet,2,2
	.data
	.align	1
	.type	best_line, %object
	.size	best_line, 2
best_line:
	.short	-1
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	foo, %function
foo:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, r0
	strh	r3, [fp, #-6]	@ movhi
.L3:
	ldrh	r3, [fp, #-6]
	ldr	r2, .L4
	ldrb	r3, [r2, r3, lsl #2]	@ zero_extendqisi2
	cmp	r3, #2
	beq	.L2
	ldrh	r3, [fp, #-6]
	add	r3, r3, #2
	ldr	r2, .L4
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r3, .L4+4
	ldr	r3, [r3]
	cmp	r2, r3
	bcs	.L2
	ldr	r2, .L4+8
	ldrh	r3, [fp, #-6]	@ movhi
	strh	r3, [r2]	@ movhi
.L2:
	ldrh	r3, [fp, #-6]
	ldr	r2, .L4
	lsl	r3, r3, #2
	add	r3, r2, r3
	add	r3, r3, #2
	ldrh	r3, [r3]	@ movhi
	strh	r3, [fp, #-6]	@ movhi
	ldrh	r3, [fp, #-6]
	ldr	r2, .L4+12
	cmp	r3, r2
	bne	.L3
	ldr	r3, .L4+8
	ldrh	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrh	r3, [r3]
	ldr	r2, .L4+16
	strh	r3, [r2]	@ movhi
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L5:
	.align	2
.L4:
	.word	mem
	.word	fewest_demerits
	.word	best_bet
	.word	65494
	.word	best_line
	.size	foo, .-foo
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Test passed\000"
	.align	2
.LC1:
	.ascii	"Test failed, best_line = %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L10
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L10
	mvn	r2, #41
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, .L10
	mov	r2, #456
	strh	r2, [r3, #4]	@ movhi
	ldr	r3, .L10
	mov	r2, #30
	str	r2, [r3, #8]
	mov	r0, #0
	bl	foo
	ldr	r3, .L10+4
	ldrh	r3, [r3]
	cmp	r3, #456
	bne	.L7
	ldr	r0, .L10+8
	bl	puts
	mov	r3, #0
	b	.L9
.L7:
	ldr	r3, .L10+4
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L10+12
	bl	printf
	mov	r3, #1
.L9:
	mov	r0, r3
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	mem
	.word	best_line
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
