	.file	"426317.c"
	.intel_syntax noprefix
	.text
	.type	playturn, @function
playturn:
.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	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -32[rbp]
	setbe	al
	movzx	edx, al
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -8[rbp]
	imul	rax, rdx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	playturn, .-playturn
	.section	.rodata
	.align 8
.LC0:
	.string	"Could not allocate the number history\n"
.LC1:
	.string	"Unexpected character: %c\n"
.LC2:
	.string	"%lu"
	.align 8
.LC3:
	.string	"Error occured while parsing puzzle input\n"
.LC4:
	.string	"Number list was empty\n"
.LC5:
	.string	"2020th\t%lu\n"
.LC6:
	.string	"30Mth\t%lu\n"
	.text
	.globl	day15
	.type	day15, @function
day15:
.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, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], -1
	mov	edi, 240000000
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 38
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L18
.L4:
	mov	QWORD PTR -24[rbp], 0
	jmp	.L6
.L7:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], -1
	add	QWORD PTR -24[rbp], 1
.L6:
	cmp	QWORD PTR -24[rbp], 29999999
	jbe	.L7
	jmp	.L8
.L11:
	cmp	QWORD PTR -32[rbp], -1
	je	.L9
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rdx], rax
.L9:
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 44
	je	.L10
	cmp	DWORD PTR -52[rbp], 10
	je	.L10
	cmp	DWORD PTR -52[rbp], -1
	je	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -52[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 1
	jmp	.L18
.L10:
	add	QWORD PTR -40[rbp], 1
.L8:
	lea	rdx, -48[rbp]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, 1
	je	.L11
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L12
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 41
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 1
	jmp	.L18
.L12:
	cmp	QWORD PTR -32[rbp], 30000000
	jbe	.L14
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 1
	jmp	.L18
.L15:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	mov	rdx, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rsi, rax
	mov	rdi, rcx
	call	playturn
	mov	QWORD PTR -32[rbp], rax
.L14:
	cmp	QWORD PTR -40[rbp], 2019
	jbe	.L15
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L16
.L17:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	mov	rdx, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rsi, rax
	mov	rdi, rcx
	call	playturn
	mov	QWORD PTR -32[rbp], rax
.L16:
	cmp	QWORD PTR -40[rbp], 29999999
	jbe	.L17
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L18:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	day15, .-day15
	.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	"426317.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	playturn, %function
playturn:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	movls	r3, #1
	movhi	r3, #0
	and	r3, r3, #255
	mov	r1, r3
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	mul	r3, r1, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	playturn, .-playturn
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Could not allocate the number history\012\000"
	.align	2
.LC1:
	.ascii	"Unexpected character: %c\012\000"
	.align	2
.LC2:
	.ascii	"%u\000"
	.align	2
.LC3:
	.ascii	"Error occured while parsing puzzle input\012\000"
	.align	2
.LC4:
	.ascii	"Number list was empty\012\000"
	.align	2
.LC5:
	.ascii	"2020th\011%u\012\000"
	.align	2
.LC6:
	.ascii	"30Mth\011%u\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	day15
	.syntax unified
	.arm
	.fpu softvfp
	.type	day15, %function
day15:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-28]
	mvn	r3, #0
	str	r3, [fp, #-24]
	ldr	r0, .L20+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L20+8
	ldr	r3, [r3]
	mov	r2, #38
	mov	r1, #1
	ldr	r0, .L20+12
	bl	fwrite
	mov	r3, #1
	b	.L18
.L4:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L6
.L7:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L6:
	ldr	r3, [fp, #-20]
	ldr	r2, .L20+16
	cmp	r3, r2
	bls	.L7
	b	.L8
.L11:
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	beq	.L9
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-28]
	str	r2, [r3]
.L9:
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-40]
	bl	fgetc
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #44
	beq	.L10
	ldr	r3, [fp, #-12]
	cmp	r3, #10
	beq	.L10
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	beq	.L10
	ldr	r3, .L20+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L20+20
	mov	r0, r3
	bl	fprintf
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #1
	b	.L18
.L10:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L8:
	sub	r3, fp, #32
	mov	r2, r3
	ldr	r1, .L20+24
	ldr	r0, [fp, #-40]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmp	r3, #1
	beq	.L11
	ldr	r0, [fp, #-40]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L20+8
	ldr	r3, [r3]
	mov	r2, #41
	mov	r1, #1
	ldr	r0, .L20+28
	bl	fwrite
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #1
	b	.L18
.L12:
	ldr	r3, [fp, #-24]
	ldr	r2, .L20+32
	cmp	r3, r2
	bls	.L14
	ldr	r3, .L20+8
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L20+36
	bl	fwrite
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #1
	b	.L18
.L15:
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	playturn
	str	r0, [fp, #-24]
.L14:
	ldr	r3, [fp, #-28]
	ldr	r2, .L20+40
	cmp	r3, r2
	bls	.L15
	ldr	r1, [fp, #-24]
	ldr	r0, .L20+44
	bl	printf
	b	.L16
.L17:
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	playturn
	str	r0, [fp, #-24]
.L16:
	ldr	r3, [fp, #-28]
	ldr	r2, .L20+16
	cmp	r3, r2
	bls	.L17
	ldr	r1, [fp, #-24]
	ldr	r0, .L20+48
	bl	printf
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
.L18:
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC7
	.word	120000000
	.word	stderr
	.word	.LC0
	.word	29999999
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	30000000
	.word	.LC4
	.word	2019
	.word	.LC5
	.word	.LC6
	.size	day15, .-day15
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
