	.file	"169902.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
	.text
	.globl	file_ptr
	.type	file_ptr, @function
file_ptr:
.LFB6:
	.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	file_ptr, .-file_ptr
	.globl	count_lines
	.type	count_lines, @function
count_lines:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	file_ptr
	mov	QWORD PTR -8[rbp], rax
	jmp	.L4
.L5:
	cmp	BYTE PTR -17[rbp], 10
	jne	.L4
	add	DWORD PTR -16[rbp], 1
.L4:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	BYTE PTR -17[rbp], al
	cmp	BYTE PTR -17[rbp], -1
	jne	.L5
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	count_lines, .-count_lines
	.globl	init_arr
	.type	init_arr, @function
init_arr:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -28[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, DWORD PTR -36[rbp]
	imul	eax, eax
	cdqe
	mov	ecx, DWORD PTR -28[rbp]
	movsx	rcx, ecx
	lea	rsi, 0[0+rcx*8]
	mov	rcx, QWORD PTR -24[rbp]
	lea	rbx, [rsi+rcx]
	mov	rsi, rdx
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -28[rbp], 1
.L8:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L9
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	init_arr, .-init_arr
	.globl	init_snowy_hill
	.type	init_snowy_hill, @function
init_snowy_hill:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	QWORD PTR -152[rbp], rdi
	mov	QWORD PTR -160[rbp], rsi
	mov	DWORD PTR -164[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	file_ptr
	mov	QWORD PTR -120[rbp], rax
	mov	DWORD PTR -136[rbp], 0
	mov	DWORD PTR -132[rbp], 0
	mov	DWORD PTR -128[rbp], 0
	jmp	.L12
.L16:
	cmp	DWORD PTR -124[rbp], 10
	jne	.L13
	mov	DWORD PTR -128[rbp], 0
	jmp	.L14
.L18:
	mov	eax, DWORD PTR -136[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -136[rbp], edx
	cdqe
	movzx	eax, BYTE PTR -112[rbp+rax]
	mov	edx, DWORD PTR -132[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -152[rbp]
	add	rdx, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -128[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	movsx	eax, al
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -128[rbp], 1
.L14:
	mov	eax, DWORD PTR -164[rbp]
	imul	eax, eax
	cmp	DWORD PTR -128[rbp], eax
	jl	.L18
	lea	rax, -112[rbp]
	mov	edx, 100
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -136[rbp], 0
	add	DWORD PTR -132[rbp], 1
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -136[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -136[rbp], edx
	mov	edx, DWORD PTR -124[rbp]
	cdqe
	mov	BYTE PTR -112[rbp+rax], dl
.L12:
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -124[rbp], eax
	cmp	DWORD PTR -124[rbp], -1
	jne	.L16
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	init_snowy_hill, .-init_snowy_hill
	.globl	ride_snowy_hill
	.type	ride_snowy_hill, @function
ride_snowy_hill:
.LFB10:
	.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L20
.L22:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 35
	jne	.L21
	add	QWORD PTR -8[rbp], 1
.L21:
	mov	eax, DWORD PTR -32[rbp]
	add	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	add	DWORD PTR -16[rbp], eax
.L20:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L22
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	ride_snowy_hill, .-ride_snowy_hill
	.section	.rodata
.LC1:
	.string	"Part 1: %lu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	count_lines
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	init_arr
	mov	QWORD PTR -8[rbp], rax
	mov	edx, DWORD PTR -20[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	init_snowy_hill
	mov	esi, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, 1
	mov	edx, 3
	mov	rdi, rax
	call	ride_snowy_hill
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"169902.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.text
	.align	2
	.global	file_ptr
	.syntax unified
	.arm
	.fpu softvfp
	.type	file_ptr, %function
file_ptr:
	@ 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	r1, .L3
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	file_ptr, .-file_ptr
	.align	2
	.global	count_lines
	.syntax unified
	.arm
	.fpu softvfp
	.type	count_lines, %function
count_lines:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	file_ptr
	str	r0, [fp, #-8]
	b	.L6
.L8:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L6:
	ldr	r0, [fp, #-8]
	bl	getc
	mov	r3, r0
	strb	r3, [fp, #-17]
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L6
	b	.L8
	.size	count_lines, .-count_lines
	.align	2
	.global	init_arr
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_arr, %function
init_arr:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L10
.L11:
	ldr	r3, [fp, #-24]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	mov	r0, r3
	ldr	r3, [fp, #-24]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L10:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L11
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	init_arr, .-init_arr
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_snowy_hill
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_snowy_hill, %function
init_snowy_hill:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	str	r0, [fp, #-136]
	str	r1, [fp, #-140]
	str	r2, [fp, #-144]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-140]
	bl	file_ptr
	str	r0, [fp, #-116]
	mov	r3, #0
	str	r3, [fp, #-128]
	mov	r3, #0
	str	r3, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L14
.L18:
	ldr	r3, [fp, #-112]
	cmp	r3, #10
	bne	.L15
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L16
.L20:
	ldr	r3, [fp, #-128]
	add	r2, r3, #1
	str	r2, [fp, #-128]
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r1, [r3, #-104]	@ zero_extendqisi2
	ldr	r3, [fp, #-124]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-136]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L16:
	ldr	r3, [fp, #-144]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	ldr	r2, [fp, #-120]
	cmp	r2, r3
	blt	.L20
	sub	r3, fp, #108
	mov	r2, #100
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-128]
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
	b	.L14
.L15:
	ldr	r3, [fp, #-128]
	add	r2, r3, #1
	str	r2, [fp, #-128]
	ldr	r2, [fp, #-112]
	and	r2, r2, #255
	sub	r1, fp, #4
	add	r3, r1, r3
	strb	r2, [r3, #-104]
.L14:
	ldr	r0, [fp, #-116]
	bl	fgetc
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmn	r3, #1
	bne	.L18
	ldr	r0, [fp, #-116]
	bl	fclose
	nop
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC1
	.size	init_snowy_hill, .-init_snowy_hill
	.align	2
	.global	ride_snowy_hill
	.syntax unified
	.arm
	.fpu softvfp
	.type	ride_snowy_hill, %function
ride_snowy_hill:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L24
.L26:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #35
	bne	.L25
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L25:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	str	r3, [fp, #-16]
.L24:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L26
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	ride_snowy_hill, .-ride_snowy_hill
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Part 1: %lu\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	count_lines
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	init_arr
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	init_snowy_hill
	mov	r3, #1
	mov	r2, #3
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	ride_snowy_hill
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L30
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
