	.file	"232955821.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"input.txt"
	.align 8
.LC2:
	.string	"The instructions take santa to floor %d\n"
	.align 8
.LC3:
	.string	"The position of the character that first takes us to the basement is %d\n"
	.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
	push	rbx
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 1864
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -10052[rbp], 0
	mov	DWORD PTR -10048[rbp], 0
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -10040[rbp], rax
	mov	rdx, QWORD PTR -10040[rbp]
	lea	rax, -10032[rbp]
	mov	esi, 10000
	mov	rdi, rax
	call	fgets@PLT
	mov	DWORD PTR -10044[rbp], 0
	jmp	.L2
.L6:
	mov	eax, DWORD PTR -10044[rbp]
	cdqe
	movzx	eax, BYTE PTR -10032[rbp+rax]
	cmp	al, 40
	jne	.L3
	add	DWORD PTR -10052[rbp], 1
	jmp	.L4
.L3:
	mov	eax, DWORD PTR -10044[rbp]
	cdqe
	movzx	eax, BYTE PTR -10032[rbp+rax]
	cmp	al, 41
	jne	.L4
	sub	DWORD PTR -10052[rbp], 1
.L4:
	cmp	DWORD PTR -10052[rbp], -1
	jne	.L5
	cmp	DWORD PTR -10048[rbp], 0
	jne	.L5
	mov	eax, DWORD PTR -10044[rbp]
	add	eax, 1
	mov	DWORD PTR -10048[rbp], eax
.L5:
	add	DWORD PTR -10044[rbp], 1
.L2:
	mov	eax, DWORD PTR -10044[rbp]
	movsx	rbx, eax
	lea	rax, -10032[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L6
	mov	rax, QWORD PTR -10040[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -10052[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -10048[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	mov	rbx, QWORD PTR -8[rbp]
	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	"232955821.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"input.txt\000"
	.align	2
.LC2:
	.ascii	"The instructions take santa to floor %d\012\000"
	.align	2
.LC3:
	.ascii	"The position of the character that first takes us t"
	.ascii	"o the basement is %d\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 10024
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #9984
	sub	sp, sp, #44
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1828]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1824]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L8+4
	ldr	r0, .L8+8
	bl	fopen
	str	r0, [r4, #-1816]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #9984
	sub	r3, r3, #12
	sub	r3, r3, #20
	ldr	r2, [r2, #-1816]
	ldr	r1, .L8+12
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1820]
	b	.L2
.L6:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1820]
	add	r3, r2, r3
	sub	r3, r3, #1808
	sub	r3, r3, #4
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #40
	bne	.L3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1828]
	add	r3, r3, #1
	str	r3, [r2, #-1828]
	b	.L4
.L3:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1820]
	add	r3, r2, r3
	sub	r3, r3, #1808
	sub	r3, r3, #4
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #41
	bne	.L4
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1828]
	sub	r3, r3, #1
	str	r3, [r2, #-1828]
.L4:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1828]
	cmn	r3, #1
	bne	.L5
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1824]
	cmp	r3, #0
	bne	.L5
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1820]
	add	r3, r3, #1
	str	r3, [r2, #-1824]
.L5:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1820]
	add	r3, r3, #1
	str	r3, [r2, #-1820]
.L2:
	sub	r3, fp, #9984
	sub	r3, r3, #12
	sub	r3, r3, #20
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1820]
	cmp	r2, r3
	bhi	.L6
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-1816]
	bl	fclose
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-1828]
	ldr	r0, .L8+16
	bl	printf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-1824]
	ldr	r0, .L8+20
	bl	printf
	nop
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	10000
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
