	.file	"7782.c"
	.intel_syntax noprefix
	.text
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.text
	.globl	foo
	.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	DWORD PTR -36[rbp], edi
	mov	eax, DWORD PTR b[rip]
	test	eax, eax
	jne	.L2
	mov	DWORD PTR -28[rbp], 0
	lea	rax, b[rip]
	mov	QWORD PTR -8[rbp], rax
	lea	rax, b[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L3
.L2:
	mov	DWORD PTR -28[rbp], 1
	mov	DWORD PTR -24[rbp], 0
	jmp	.L4
.L5:
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	mov	DWORD PTR -28[rbp], eax
	add	DWORD PTR -24[rbp], 1
.L4:
	cmp	DWORD PTR -24[rbp], 8
	jle	.L5
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	mov	QWORD PTR -8[rbp], rax
	lea	rax, -36[rbp]
	mov	QWORD PTR -16[rbp], rax
.L3:
	cmp	DWORD PTR -28[rbp], 2
	setle	al
	movzx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR a[rip]
	test	eax, eax
	je	.L7
	mov	eax, DWORD PTR a[rip]
	jmp	.L8
.L7:
	mov	eax, 1
.L8:
	mov	edx, DWORD PTR b[rip]
	add	eax, edx
	mov	DWORD PTR b[rip], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L9
	mov	eax, DWORD PTR -36[rbp]
	test	eax, eax
	je	.L10
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], 0
.L10:
	mov	eax, DWORD PTR b[rip]
	test	eax, eax
	js	.L6
	cmp	DWORD PTR -20[rbp], 0
	je	.L11
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -20[rbp], eax
.L11:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cdq
	idiv	DWORD PTR -20[rbp]
	test	eax, eax
	je	.L6
.L12:
	jmp	.L12
.L6:
	mov	eax, DWORD PTR a[rip]
	test	eax, eax
	je	.L13
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L13
	mov	edx, 1
	jmp	.L14
.L13:
	mov	edx, 0
.L14:
	mov	eax, DWORD PTR b[rip]
	imul	eax, edx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	foo, .-foo
	.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	"7782.c"
	.text
	.comm	a,4,4
	.comm	b,4,4
	.global	__aeabi_idiv
	.align	2
	.global	foo
	.syntax unified
	.arm
	.fpu softvfp
	.type	foo, %function
foo:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, .L16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, .L16
	str	r3, [fp, #-16]
	ldr	r3, .L16
	str	r3, [fp, #-20]
	b	.L3
.L2:
	mov	r3, #1
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L4
.L5:
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L4:
	ldr	r3, [fp, #-12]
	cmp	r3, #8
	ble	.L5
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	sub	r3, fp, #32
	str	r3, [fp, #-20]
.L3:
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	movle	r3, #1
	movgt	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L16+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L16+4
	ldr	r3, [r3]
	b	.L8
.L7:
	mov	r3, #1
.L8:
	ldr	r2, .L16
	ldr	r2, [r2]
	add	r3, r3, r2
	ldr	r2, .L16
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L9
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L10
.L9:
	ldr	r3, [fp, #-20]
	mov	r2, #0
	str	r2, [r3]
.L10:
	ldr	r3, .L16
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L6
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-8]
.L11:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
.L12:
	b	.L12
.L6:
	ldr	r3, .L16+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L13
	mov	r3, #1
	b	.L14
.L13:
	mov	r3, #0
.L14:
	ldr	r2, .L16
	ldr	r2, [r2]
	mul	r3, r2, r3
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	b
	.word	a
	.size	foo, .-foo
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
