	.file	"373151.c"
	.intel_syntax noprefix
	.text
	.globl	house
	.type	house, @function
house:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -8[rbp], 1
	jmp	.L2
.L4:
	mov	rax, QWORD PTR -24[rbp]
	cqo
	idiv	QWORD PTR -8[rbp]
	cmp	rax, 50
	jg	.L3
	mov	rax, QWORD PTR -24[rbp]
	cqo
	idiv	QWORD PTR -8[rbp]
	mov	rax, rdx
	test	rax, rax
	jne	.L3
	mov	rax, QWORD PTR -8[rbp]
	add	QWORD PTR -16[rbp], rax
.L3:
	add	QWORD PTR -8[rbp], 1
.L2:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, rax
	shr	rdx, 63
	add	rax, rdx
	sar	rax
	cmp	QWORD PTR -8[rbp], rax
	jle	.L4
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	house, .-house
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"resources/day20.txt"
.LC2:
	.string	"%ld"
.LC3:
	.string	"Looking for %ld...\n"
.LC4:
	.string	"%ld: %ld\n"
.LC5:
	.string	"\nPart 2: %ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	lea	rdx, -32[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L8:
	add	QWORD PTR -24[rbp], 1
	mov	rcx, QWORD PTR -24[rbp]
	movabs	rdx, 3777893186295716171
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 11
	mov	rdx, rcx
	sar	rdx, 63
	sub	rax, rdx
	imul	rdx, rax, 10000
	mov	rax, rcx
	sub	rax, rdx
	test	rax, rax
	jne	.L7
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	house
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	house
	mov	rdx, QWORD PTR -32[rbp]
	cmp	rax, rdx
	jl	.L8
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"373151.c"
	.text
	.global	__aeabi_idiv
	.global	__aeabi_idivmod
	.align	2
	.global	house
	.syntax unified
	.arm
	.fpu softvfp
	.type	house, %function
house:
	@ 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, #-16]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L2
.L4:
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	__aeabi_idiv
	mov	r3, r0
	cmp	r3, #50
	bgt	.L3
	ldr	r3, [fp, #-16]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L3
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-12]
.L3:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-16]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	ble	.L4
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	house, .-house
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"resources/day20.txt\000"
	.align	2
.LC2:
	.ascii	"%ld\000"
	.align	2
.LC3:
	.ascii	"Looking for %ld...\012\000"
	.align	2
.LC4:
	.ascii	"%ld: %ld\012\000"
	.align	2
.LC5:
	.ascii	"\012Part 2: %ld\012\000"
	.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 = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L11+4
	ldr	r0, .L11+8
	bl	fopen
	str	r0, [fp, #-12]
	sub	r3, fp, #20
	mov	r2, r3
	ldr	r1, .L11+12
	ldr	r0, [fp, #-12]
	bl	__isoc99_fscanf
	ldr	r0, [fp, #-12]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	mov	r1, r3
	ldr	r0, .L11+16
	bl	printf
	b	.L7
.L8:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r3, .L11+20
	smull	r2, r3, r1, r3
	asr	r2, r3, #12
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L7
	ldr	r0, [fp, #-16]
	bl	house
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, .L11+24
	bl	printf
.L7:
	ldr	r0, [fp, #-16]
	bl	house
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L8
	ldr	r1, [fp, #-16]
	ldr	r0, .L11+28
	bl	printf
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	1759218605
	.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
