	.file	"547651.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"./input.txt"
.LC2:
	.string	"Santa is at floor %d."
	.align 8
.LC3:
	.string	"\nSanta reaches the basement at character %ld."
	.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
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	mov	BYTE PTR -25[rbp], 97
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -20[rbp], 1
	jmp	.L2
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -25[rbp], al
	cmp	BYTE PTR -25[rbp], 40
	jne	.L3
	add	DWORD PTR -24[rbp], 1
	jmp	.L4
.L3:
	cmp	BYTE PTR -25[rbp], 41
	jne	.L4
	sub	DWORD PTR -24[rbp], 1
.L4:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L5
	cmp	DWORD PTR -24[rbp], -1
	jne	.L5
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	QWORD PTR -16[rbp], rax
.L5:
	add	DWORD PTR -20[rbp], 1
.L2:
	cmp	BYTE PTR -25[rbp], -1
	jne	.L6
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	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	"547651.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"./input.txt\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #97
	strb	r3, [fp, #-21]
	ldr	r1, .L6
	ldr	r0, .L6+4
	bl	fopen
	str	r0, [fp, #-8]
	mov	r3, #1
	str	r3, [fp, #-16]
.L5:
	ldr	r0, [fp, #-8]
	bl	fgetc
	mov	r3, r0
	strb	r3, [fp, #-21]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #40
	bne	.L2
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L3
.L2:
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #41
	bne	.L3
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
.L3:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L4
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
.L4:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L5
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
