	.file	"29843.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"."
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	call	get_inode
	mov	rdi, rax
	call	print_path_to
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	".."
.LC2:
	.string	"here"
.LC3:
	.string	"/%s"
	.text
	.globl	print_path_to
	.type	print_path_to, @function
print_path_to:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	QWORD PTR -8232[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC1[rip]
	call	get_inode
	cmp	QWORD PTR -8232[rbp], rax
	je	.L6
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	chdir@PLT
	lea	rcx, -8208[rbp]
	mov	rax, QWORD PTR -8232[rbp]
	mov	edx, 8192
	mov	rsi, rcx
	mov	rdi, rax
	call	inum_to_name
	lea	rdi, .LC0[rip]
	call	get_inode
	mov	QWORD PTR -8216[rbp], rax
	mov	rax, QWORD PTR -8216[rbp]
	mov	rdi, rax
	call	print_path_to
	lea	rax, -8208[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L6:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print_path_to, .-print_path_to
	.section	.rodata
.LC4:
	.string	"error looking for inum %lu\n"
	.text
	.globl	inum_to_name
	.type	inum_to_name, @function
inum_to_name:
.LFB8:
	.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	lea	rdi, .LC0[rip]
	call	opendir@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L9
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -24[rbp], rax
	jne	.L9
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, 19[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	closedir@PLT
	jmp	.L12
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	inum_to_name, .-inum_to_name
	.section	.rodata
.LC5:
	.string	"Cannot stat"
	.text
	.globl	get_inode
	.type	get_inode, @function
get_inode:
.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 -168[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	cmp	eax, -1
	jne	.L14
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 11
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	rax, QWORD PTR -152[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	get_inode, .-get_inode
	.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	"29843.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	".\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L3
	bl	get_inode
	mov	r3, r0
	mov	r0, r3
	bl	print_path_to
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC1:
	.ascii	"..\000"
	.align	2
.LC2:
	.ascii	"here\000"
	.align	2
.LC3:
	.ascii	"/%s\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	print_path_to
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_path_to, %function
print_path_to:
	@ args = 0, pretend = 0, frame = 8208
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #8192
	sub	sp, sp, #20
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-12]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L9+4
	bl	get_inode
	mov	r2, r0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, r2
	beq	.L8
	ldr	r0, .L9+8
	bl	puts
	ldr	r0, .L9+4
	bl	chdir
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #8192
	mov	r1, r3
	ldr	r0, [r0, #-12]
	bl	inum_to_name
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r0, .L9+12
	bl	get_inode
	str	r0, [r4, #-8]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-8]
	bl	print_path_to
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L9+16
	bl	printf
.L8:
	nop
	ldr	r3, .L9
	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}
.L10:
	.align	2
.L9:
	.word	.LC4
	.word	.LC1
	.word	.LC2
	.word	.LC0
	.word	.LC3
	.size	print_path_to, .-print_path_to
	.section	.rodata
	.align	2
.LC5:
	.ascii	"error looking for inum %lu\012\000"
	.text
	.align	2
	.global	inum_to_name
	.syntax unified
	.arm
	.fpu softvfp
	.type	inum_to_name, %function
inum_to_name:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r0, .L17
	bl	opendir
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L13
	ldr	r0, .L17
	bl	perror
	mov	r0, #1
	bl	exit
.L15:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L13
	ldr	r3, [fp, #-8]
	add	r3, r3, #11
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	strncpy
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, [fp, #-12]
	bl	closedir
	b	.L16
.L13:
	ldr	r0, [fp, #-12]
	bl	readdir
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L15
	ldr	r3, .L17+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L17+8
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L16:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	stderr
	.word	.LC5
	.size	inum_to_name, .-inum_to_name
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Cannot stat\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_inode
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_inode, %function
get_inode:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-104]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	stat
	mov	r3, r0
	cmn	r3, #1
	bne	.L20
	ldr	r3, .L23+4
	ldr	r3, [r3]
	mov	r2, #11
	mov	r1, #1
	ldr	r0, .L23+8
	bl	fwrite
	ldr	r0, [fp, #-104]
	bl	perror
	mov	r0, #1
	bl	exit
.L20:
	ldr	r3, [fp, #-88]
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC7
	.word	stderr
	.word	.LC6
	.size	get_inode, .-get_inode
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
