	.file	"961899.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"\nAdvent Of Code 2017 Day 2 Part 2\n"
.LC1:
	.string	"Input file: %s\n"
.LC2:
	.string	"r"
.LC3:
	.string	" \t"
.LC4:
	.string	"Could not open file %s"
.LC5:
	.string	"\nThe sum is: %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
	lea	r11, -36864[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 3312
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	movabs	rax, 8391737100188070256
	mov	QWORD PTR -125[rbp], rax
	mov	DWORD PTR -117[rbp], 1954051118
	mov	BYTE PTR -113[rbp], 0
	lea	rax, -125[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -40164[rbp], 0
	jmp	.L2
.L5:
	mov	DWORD PTR -40160[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -40160[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -40164[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	DWORD PTR -40128[rbp+rax*4], -2147483648
	add	DWORD PTR -40160[rbp], 1
.L3:
	cmp	DWORD PTR -40160[rbp], 99
	jle	.L4
	add	DWORD PTR -40164[rbp], 1
.L2:
	cmp	DWORD PTR -40164[rbp], 99
	jle	.L5
	lea	rax, -125[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -40136[rbp], rax
	cmp	QWORD PTR -40136[rbp], 0
	je	.L6
	mov	DWORD PTR -40156[rbp], 0
	jmp	.L7
.L10:
	lea	rax, -112[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -40144[rbp], rax
	mov	DWORD PTR -40152[rbp], 0
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -40144[rbp]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	strtol@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -40152[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -40156[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	add	rax, rcx
	sal	rax, 2
	add	rax, rsi
	mov	DWORD PTR -40128[rbp+rax*4], edx
	lea	rsi, .LC3[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -40144[rbp], rax
	add	DWORD PTR -40152[rbp], 1
.L8:
	cmp	QWORD PTR -40144[rbp], 0
	jne	.L9
	add	DWORD PTR -40156[rbp], 1
.L7:
	mov	rdx, QWORD PTR -40136[rbp]
	lea	rax, -112[rbp]
	mov	esi, 100
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L10
	jmp	.L15
.L6:
	lea	rax, -125[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L13
.L15:
	mov	rax, QWORD PTR -40136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -40148[rbp], 0
	lea	rax, -40128[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	get_sum@PLT
	mov	DWORD PTR -40148[rbp], eax
	mov	eax, DWORD PTR -40148[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L13:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.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	"961899.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Advent Of Code 2017 Day 2 Part 2\012\000"
	.align	2
.LC2:
	.ascii	"Input file: %s\012\000"
	.align	2
.LC3:
	.ascii	"r\000"
	.align	2
.LC4:
	.ascii	" \011\000"
	.align	2
.LC5:
	.ascii	"Could not open file %s\000"
	.align	2
.LC6:
	.ascii	"\012The sum is: %d\000"
	.align	2
.LC1:
	.ascii	"p1-input.txt\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #39936
	sub	sp, sp, #220
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L16+4
	bl	puts
	ldr	r3, .L16+8
	sub	ip, fp, #132
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strb	r3, [ip]
	sub	r3, fp, #132
	mov	r1, r3
	ldr	r0, .L16+12
	bl	printf
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-3284]
	b	.L2
.L5:
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-3280]
	b	.L3
.L4:
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r2, [r3, #-3284]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #36864
	sub	r2, r2, #12
	ldr	r2, [r2, #-3280]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #-2147483648
	str	r2, [r3, #-3256]
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r3, [r3, #-3280]
	add	r3, r3, #1
	str	r3, [r2, #-3280]
.L3:
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r3, [r3, #-3280]
	cmp	r3, #99
	ble	.L4
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r3, [r3, #-3284]
	add	r3, r3, #1
	str	r3, [r2, #-3284]
.L2:
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r3, [r3, #-3284]
	cmp	r3, #99
	ble	.L5
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #132
	ldr	r1, .L16+16
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-3264]
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r3, [r3, #-3264]
	cmp	r3, #0
	beq	.L6
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-3276]
	b	.L7
.L10:
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #116
	ldr	r1, .L16+20
	mov	r0, r3
	bl	strtok
	str	r0, [r4, #-3272]
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-3268]
	b	.L8
.L9:
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, #10
	mov	r1, #0
	ldr	r0, [r3, #-3272]
	bl	strtol
	mov	r1, r0
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r0, r3
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r2, [r3, #-3276]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #36864
	sub	r2, r2, #12
	ldr	r2, [r2, #-3268]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3, #-3256]
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L16+20
	mov	r0, #0
	bl	strtok
	str	r0, [r4, #-3272]
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r3, [r3, #-3268]
	add	r3, r3, #1
	str	r3, [r2, #-3268]
.L8:
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r3, [r3, #-3272]
	cmp	r3, #0
	bne	.L9
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r3, [r3, #-3276]
	add	r3, r3, #1
	str	r3, [r2, #-3276]
.L7:
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #116
	ldr	r2, [r2, #-3264]
	mov	r1, #100
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	b	.L15
.L6:
	sub	r3, fp, #132
	mov	r1, r3
	ldr	r0, .L16+24
	bl	printf
	mov	r3, #1
	b	.L13
.L15:
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r0, [r3, #-3264]
	bl	fclose
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-3260]
	sub	r3, fp, #36864
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #39936
	sub	r3, r3, #12
	sub	r3, r3, #184
	mov	r0, r3
	bl	get_sum
	str	r0, [r4, #-3260]
	sub	r3, fp, #36864
	sub	r3, r3, #12
	ldr	r1, [r3, #-3260]
	ldr	r0, .L16+28
	bl	printf
	mov	r3, #0
.L13:
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
