	.file	"973305.c"
	.intel_syntax noprefix
	.text
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d\n"
	.align 8
.LC1:
	.string	"Enter a positive integer (0 to quit): "
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	esi, ebx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L6:
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
	mov	ebx, DWORD PTR -28[rbp]
	jmp	.L3
.L4:
	mov	edi, ebx
	call	accumulate@PLT
	sub	ebx, 1
.L3:
	test	ebx, ebx
	jns	.L4
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L2:
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 1
	jne	.L5
	mov	eax, DWORD PTR -28[rbp]
	test	eax, eax
	jg	.L6
.L5:
	mov	eax, 0
	call	report_count
	mov	eax, 0
	mov	rdx, QWORD PTR -24[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC3:
	.string	"Loop excuted %d times\n"
	.text
	.globl	report_count
	.type	report_count, @function
report_count:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR count[rip]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	report_count, .-report_count
	.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	"973305.c"
	.text
	.global	count
	.bss
	.align	2
	.type	count, %object
	.size	count, 4
count:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\012\000"
	.align	2
.LC1:
	.ascii	"Enter a positive integer (0 to quit): \000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r1, r4
	ldr	r0, .L9+4
	bl	printf
	ldr	r0, .L9+8
	bl	printf
	b	.L2
.L6:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9+12
	str	r3, [r2]
	ldr	r4, [fp, #-20]
	b	.L3
.L4:
	mov	r0, r4
	bl	accumulate
	sub	r4, r4, #1
.L3:
	cmp	r4, #0
	bge	.L4
	ldr	r0, .L9+8
	bl	printf
.L2:
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L9+16
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L5
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bgt	.L6
.L5:
	bl	report_count
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	count
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Loop excuted %d times\012\000"
	.text
	.align	2
	.global	report_count
	.syntax unified
	.arm
	.fpu softvfp
	.type	report_count, %function
report_count:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L12
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12+4
	bl	printf
	nop
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	count
	.word	.LC4
	.size	report_count, .-report_count
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
