	.file	"523674.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Enter unpaid balance> $"
.LC1:
	.string	"%lf"
	.align 8
.LC2:
	.string	"Enter previous meter reading> "
.LC3:
	.string	"%d"
.LC4:
	.string	"Enter current meter reading> "
	.align 8
.LC5:
	.string	"Enter water usage for the previous year "
	.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
	sub	rsp, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	instruct_water
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -52[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -44[rbp]
	mov	ecx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	comp_use_charge
	movq	rax, xmm0
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	movq	xmm0, rax
	call	comp_late_charge
	movq	rax, xmm0
	mov	QWORD PTR -24[rbp], rax
	movsd	xmm1, QWORD PTR -32[rbp]
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR -40[rbp]
	addsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR -24[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -16[rbp], xmm0
	movsd	xmm1, QWORD PTR -40[rbp]
	movsd	xmm0, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	movapd	xmm2, xmm1
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	display_bill
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC7:
	.string	"This program figures a water bill "
.LC8:
	.string	"based on the demand charge"
.LC10:
	.string	"($%.2f) and a $%.2f per 1000 "
.LC11:
	.string	"gallons use charge.\n"
	.align 8
.LC13:
	.string	"A $%.2f surcharge is added to "
	.align 8
.LC14:
	.string	"accounts with an unpaid balance."
.LC15:
	.string	"and current meter readings"
	.align 8
.LC16:
	.string	"on separate lines after the prompts."
	.align 8
.LC17:
	.string	"However the program enforces a water conservation requirement "
	.align 8
.LC18:
	.string	"where a user is levied twice normal rate of use when they exceed "
	.align 8
.LC19:
	.string	" %d percent from the previous usage.\n"
	.align 8
.LC20:
	.string	"Press <return> or <enter> after "
.LC21:
	.string	"typing each number.\n"
	.text
	.globl	instruct_water
	.type	instruct_water, @function
instruct_water:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	movsd	xmm0, QWORD PTR .LC9[rip]
	mov	rax, QWORD PTR .LC6[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	lea	rdi, .LC10[rip]
	mov	eax, 2
	call	printf@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	rax, QWORD PTR .LC12[rip]
	movq	xmm0, rax
	lea	rdi, .LC13[rip]
	mov	eax, 1
	call	printf@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	lea	rdi, .LC16[rip]
	call	puts@PLT
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 95
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC21[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	instruct_water, .-instruct_water
	.section	.rodata
.LC22:
	.string	"Use charge is at %.2f times "
.LC23:
	.string	"normal rate since use of"
.LC24:
	.string	"%d units exceeds %d percent "
.LC25:
	.string	"of last year's %d-unit use.\n"
	.text
	.globl	comp_use_charge
	.type	comp_use_charge, @function
comp_use_charge:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jg	.L6
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, DWORD PTR -12[rbp]
	movsd	xmm0, QWORD PTR .LC9[rip]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	jmp	.L7
.L6:
	mov	rax, QWORD PTR .LC12[rip]
	movq	xmm0, rax
	lea	rdi, .LC22[rip]
	mov	eax, 1
	call	printf@PLT
	lea	rdi, .LC23[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 95
	mov	esi, eax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -12[rbp]
	movapd	xmm1, xmm0
	addsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR .LC9[rip]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
.L7:
	movsd	xmm0, QWORD PTR -8[rbp]
	movq	rax, xmm0
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	comp_use_charge, .-comp_use_charge
	.globl	comp_late_charge
	.type	comp_late_charge, @function
comp_late_charge:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movsd	QWORD PTR -24[rbp], xmm0
	movsd	xmm0, QWORD PTR -24[rbp]
	pxor	xmm1, xmm1
	comisd	xmm0, xmm1
	jbe	.L15
	movsd	xmm0, QWORD PTR .LC12[rip]
	movsd	QWORD PTR -8[rbp], xmm0
	jmp	.L12
.L15:
	pxor	xmm0, xmm0
	movsd	QWORD PTR -8[rbp], xmm0
.L12:
	movsd	xmm0, QWORD PTR -8[rbp]
	movq	rax, xmm0
	movq	xmm0, rax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	comp_late_charge, .-comp_late_charge
	.section	.rodata
	.align 8
.LC27:
	.string	"\nBill includes $%.2f late charge"
.LC28:
	.string	" on unpaid balance of $%.2f\n"
.LC29:
	.string	"\nTotal due = $%.2f\n"
	.text
	.globl	display_bill
	.type	display_bill, @function
display_bill:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	movsd	QWORD PTR -8[rbp], xmm0
	movsd	QWORD PTR -16[rbp], xmm1
	movsd	QWORD PTR -24[rbp], xmm2
	movsd	xmm0, QWORD PTR -8[rbp]
	pxor	xmm1, xmm1
	comisd	xmm0, xmm1
	jbe	.L17
	mov	rax, QWORD PTR -8[rbp]
	movq	xmm0, rax
	lea	rdi, .LC27[rip]
	mov	eax, 1
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	movq	xmm0, rax
	lea	rdi, .LC28[rip]
	mov	eax, 1
	call	printf@PLT
.L17:
	mov	rax, QWORD PTR -16[rbp]
	movq	xmm0, rax
	lea	rdi, .LC29[rip]
	mov	eax, 1
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	display_bill, .-display_bill
	.section	.rodata
	.align 8
.LC6:
	.long	0
	.long	1078034432
	.align 8
.LC9:
	.long	-1717986918
	.long	1072798105
	.align 8
.LC12:
	.long	0
	.long	1073741824
	.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	"523674.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter unpaid balance> $\000"
	.align	2
.LC1:
	.ascii	"%lf\000"
	.align	2
.LC2:
	.ascii	"Enter previous meter reading> \000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"Enter current meter reading> \000"
	.align	2
.LC5:
	.ascii	"Enter water usage for the previous year \000"
	.global	__aeabi_dadd
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	instruct_water
	ldr	r0, .L4+4
	bl	printf
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L4+8
	bl	__isoc99_scanf
	ldr	r0, .L4+12
	bl	printf
	sub	r3, fp, #56
	mov	r1, r3
	ldr	r0, .L4+16
	bl	__isoc99_scanf
	ldr	r0, .L4+20
	bl	printf
	sub	r3, fp, #52
	mov	r1, r3
	ldr	r0, .L4+16
	bl	__isoc99_scanf
	ldr	r0, .L4+24
	bl	printf
	sub	r3, fp, #48
	mov	r1, r3
	ldr	r0, .L4+16
	bl	__isoc99_scanf
	ldr	r3, [fp, #-56]
	ldr	r1, [fp, #-52]
	ldr	r2, [fp, #-48]
	mov	r0, r3
	bl	comp_use_charge
	str	r0, [fp, #-36]
	str	r1, [fp, #-32]
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	comp_late_charge
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	mov	r2, #0
	ldr	r3, .L4+28
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	display_bill
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	1078034432
	.size	main, .-main
	.section	.rodata
	.align	2
.LC7:
	.ascii	"This program figures a water bill \000"
	.align	2
.LC8:
	.ascii	"based on the demand charge\000"
	.align	2
.LC9:
	.ascii	"($%.2f) and a $%.2f per 1000 \000"
	.align	2
.LC10:
	.ascii	"gallons use charge.\012\000"
	.align	2
.LC11:
	.ascii	"A $%.2f surcharge is added to \000"
	.align	2
.LC12:
	.ascii	"accounts with an unpaid balance.\000"
	.align	2
.LC13:
	.ascii	"and current meter readings\000"
	.align	2
.LC14:
	.ascii	"on separate lines after the prompts.\000"
	.align	2
.LC15:
	.ascii	"However the program enforces a water conservation r"
	.ascii	"equirement \000"
	.align	2
.LC16:
	.ascii	"where a user is levied twice normal rate of use whe"
	.ascii	"n they exceed \000"
	.align	2
.LC17:
	.ascii	" %d percent from the previous usage.\012\000"
	.align	2
.LC18:
	.ascii	"Press <return> or <enter> after \000"
	.align	2
.LC19:
	.ascii	"typing each number.\012\000"
	.text
	.align	2
	.global	instruct_water
	.syntax unified
	.arm
	.fpu softvfp
	.type	instruct_water, %function
instruct_water:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L7
	bl	printf
	ldr	r0, .L7+4
	bl	puts
	ldr	r2, .L7+8
	ldr	r3, .L7+12
	stm	sp, {r2-r3}
	mov	r2, #0
	ldr	r3, .L7+16
	ldr	r0, .L7+20
	bl	printf
	ldr	r0, .L7+24
	bl	puts
	mov	r2, #0
	mov	r3, #1073741824
	ldr	r0, .L7+28
	bl	printf
	ldr	r0, .L7+32
	bl	puts
	ldr	r0, .L7+36
	bl	puts
	ldr	r0, .L7+40
	bl	puts
	ldr	r0, .L7+44
	bl	printf
	ldr	r0, .L7+48
	bl	printf
	mov	r1, #95
	ldr	r0, .L7+52
	bl	printf
	ldr	r0, .L7+56
	bl	printf
	ldr	r0, .L7+60
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC7
	.word	.LC8
	.word	-1717986918
	.word	1072798105
	.word	1078034432
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	instruct_water, .-instruct_water
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.section	.rodata
	.align	2
.LC20:
	.ascii	"Use charge is at %.2f times \000"
	.align	2
.LC21:
	.ascii	"normal rate since use of\000"
	.align	2
.LC22:
	.ascii	"%d units exceeds %d percent \000"
	.align	2
.LC23:
	.ascii	"of last year's %d-unit use.\012\000"
	.text
	.align	2
	.global	comp_use_charge
	.syntax unified
	.arm
	.fpu softvfp
	.type	comp_use_charge, %function
comp_use_charge:
	@ 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, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bgt	.L10
	ldr	r0, [fp, #-16]
	bl	__aeabi_i2d
	ldr	r2, .L13
	ldr	r3, .L13+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	b	.L11
.L10:
	mov	r2, #0
	mov	r3, #1073741824
	ldr	r0, .L13+8
	bl	printf
	ldr	r0, .L13+12
	bl	puts
	mov	r2, #95
	ldr	r1, [fp, #-16]
	ldr	r0, .L13+16
	bl	printf
	ldr	r1, [fp, #-32]
	ldr	r0, .L13+20
	bl	printf
	ldr	r0, [fp, #-16]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r2, .L13
	ldr	r3, .L13+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
.L11:
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	-1717986918
	.word	1072798105
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.size	comp_use_charge, .-comp_use_charge
	.global	__aeabi_dcmpgt
	.align	2
	.global	comp_late_charge
	.syntax unified
	.arm
	.fpu softvfp
	.type	comp_late_charge, %function
comp_late_charge:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	mov	r2, #0
	mov	r3, #0
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
	mov	r2, #0
	mov	r3, #1073741824
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	b	.L18
.L21:
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
.L18:
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	comp_late_charge, .-comp_late_charge
	.section	.rodata
	.align	2
.LC24:
	.ascii	"\012Bill includes $%.2f late charge\000"
	.align	2
.LC25:
	.ascii	" on unpaid balance of $%.2f\012\000"
	.align	2
.LC26:
	.ascii	"\012Total due = $%.2f\012\000"
	.text
	.align	2
	.global	display_bill
	.syntax unified
	.arm
	.fpu softvfp
	.type	display_bill, %function
display_bill:
	@ args = 8, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-12]
	str	r1, [fp, #-8]
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r2, #0
	mov	r3, #0
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r0, .L26
	bl	printf
	ldmib	fp, {r2-r3}
	ldr	r0, .L26+4
	bl	printf
.L23:
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	ldr	r0, .L26+8
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.size	display_bill, .-display_bill
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
