	.file	"111624.c"
	.intel_syntax noprefix
	.text
	.globl	line
	.bss
	.align 32
	.type	line, @object
	.size	line, 100
line:
	.zero	100
	.globl	total
	.align 4
	.type	total, @object
	.size	total, 4
total:
	.zero	4
	.globl	item
	.align 4
	.type	item, @object
	.size	item, 4
item:
	.zero	4
	.globl	minus_items
	.align 4
	.type	minus_items, @object
	.size	minus_items, 4
minus_items:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Enter # to add"
.LC1:
	.string	"  or 0 to stop:"
.LC2:
	.string	"%d"
.LC3:
	.string	"Total: %d\n"
.LC4:
	.string	"Final total %d\n"
	.align 8
.LC5:
	.string	"with %d negative items omitted\n"
	.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
	mov	DWORD PTR total[rip], 0
	mov	DWORD PTR minus_items[rip], 0
.L6:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, rax
	mov	esi, 100
	lea	rdi, line[rip]
	call	fgets@PLT
	lea	rdx, item[rip]
	lea	rsi, .LC2[rip]
	lea	rdi, line[rip]
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR item[rip]
	test	eax, eax
	je	.L9
	mov	eax, DWORD PTR item[rip]
	test	eax, eax
	jns	.L4
	mov	eax, DWORD PTR minus_items[rip]
	add	eax, 1
	mov	DWORD PTR minus_items[rip], eax
	jmp	.L5
.L4:
	mov	edx, DWORD PTR total[rip]
	mov	eax, DWORD PTR item[rip]
	add	eax, edx
	mov	DWORD PTR total[rip], eax
	mov	eax, DWORD PTR total[rip]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L5:
	jmp	.L6
.L9:
	nop
	mov	eax, DWORD PTR total[rip]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR minus_items[rip]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"111624.c"
	.text
	.comm	line,100,4
	.comm	total,4,4
	.comm	item,4,4
	.comm	minus_items,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter # to add\000"
	.align	2
.LC1:
	.ascii	"  or 0 to stop:\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"Total: %d\012\000"
	.align	2
.LC4:
	.ascii	"Final total %d\012\000"
	.align	2
.LC5:
	.ascii	"with %d negative items omitted\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
	str	r2, [r3]
	ldr	r3, .L10+4
	mov	r2, #0
	str	r2, [r3]
.L6:
	ldr	r0, .L10+8
	bl	puts
	ldr	r0, .L10+12
	bl	printf
	ldr	r3, .L10+16
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, #100
	ldr	r0, .L10+20
	bl	fgets
	ldr	r2, .L10+24
	ldr	r1, .L10+28
	ldr	r0, .L10+20
	bl	__isoc99_sscanf
	ldr	r3, .L10+24
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L10+24
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L4
	ldr	r3, .L10+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L10+4
	str	r3, [r2]
	b	.L5
.L4:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, .L10+24
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L10
	str	r3, [r2]
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L10+32
	bl	printf
.L5:
	b	.L6
.L9:
	nop
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L10+36
	bl	printf
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L10+40
	bl	printf
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	total
	.word	minus_items
	.word	.LC0
	.word	.LC1
	.word	stdin
	.word	line
	.word	item
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
