	.file	"701538.c"
	.intel_syntax noprefix
	.text
	.type	_append_dir, @function
_append_dir:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 47
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	_append_dir, .-_append_dir
	.type	_remove_last, @function
_remove_last:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 47
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L4
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 0
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	_remove_last, .-_remove_last
	.section	.rodata
.LC0:
	.string	"/"
.LC1:
	.string	"."
.LC2:
	.string	".."
	.text
	.globl	_realpath_toaru
	.type	_realpath_toaru, @function
_realpath_toaru:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 80
	mov	QWORD PTR -8264[rbp], rdi
	mov	QWORD PTR -8272[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR -8264[rbp], 0
	jne	.L6
	call	__errno_location@PLT
	mov	DWORD PTR [rax], -22
	mov	eax, 0
	jmp	.L17
.L6:
	cmp	QWORD PTR -8272[rbp], 0
	jne	.L8
	mov	edi, 4097
	call	malloc@PLT
	mov	QWORD PTR -8272[rbp], rax
.L8:
	mov	rax, QWORD PTR -8264[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	rcx, QWORD PTR -8264[rbp]
	lea	rax, -8224[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -8272[rbp]
	mov	BYTE PTR [rax], 0
	movzx	eax, BYTE PTR -8224[rbp]
	cmp	al, 47
	je	.L9
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	getcwd@PLT
	test	rax, rax
	jne	.L10
	call	__errno_location@PLT
	mov	DWORD PTR [rax], -20
	mov	eax, 0
	jmp	.L17
.L10:
	lea	rdx, -8248[rbp]
	lea	rax, -4112[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strtok_r@PLT
	mov	QWORD PTR -8240[rbp], rax
.L11:
	mov	rdx, QWORD PTR -8240[rbp]
	mov	rax, QWORD PTR -8272[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	_append_dir
	lea	rax, -8248[rbp]
	mov	rdx, rax
	lea	rsi, .LC0[rip]
	mov	edi, 0
	call	strtok_r@PLT
	mov	QWORD PTR -8240[rbp], rax
	cmp	QWORD PTR -8240[rbp], 0
	jne	.L11
.L9:
	lea	rdx, -8248[rbp]
	lea	rax, -8224[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strtok_r@PLT
	mov	QWORD PTR -8232[rbp], rax
.L15:
	mov	rax, QWORD PTR -8232[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L19
	mov	rax, QWORD PTR -8232[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L14
	mov	rax, QWORD PTR -8272[rbp]
	mov	rdi, rax
	call	_remove_last
	jmp	.L13
.L14:
	mov	rdx, QWORD PTR -8232[rbp]
	mov	rax, QWORD PTR -8272[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	_append_dir
	jmp	.L13
.L19:
	nop
.L13:
	lea	rax, -8248[rbp]
	mov	rdx, rax
	lea	rsi, .LC0[rip]
	mov	edi, 0
	call	strtok_r@PLT
	mov	QWORD PTR -8232[rbp], rax
	cmp	QWORD PTR -8232[rbp], 0
	jne	.L15
	mov	rax, QWORD PTR -8272[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L16
	mov	rax, QWORD PTR -8272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8272[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 47
.L16:
	mov	rax, QWORD PTR -8272[rbp]
.L17:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	_realpath_toaru, .-_realpath_toaru
	.section	.rodata
.LC3:
	.string	"invalid path, errno=%d\n"
.LC4:
	.string	"%s=%s\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 32
	mov	DWORD PTR -4116[rbp], edi
	mov	QWORD PTR -4128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -4128[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	_realpath_toaru
	test	rax, rax
	jne	.L21
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L23
.L21:
	mov	rax, QWORD PTR -4128[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, -4112[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
.L23:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"701538.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_append_dir, %function
_append_dir:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r2, .L2
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	strcat
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	_append_dir, .-_append_dir
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_remove_last, %function
_remove_last:
	@ 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]
	mov	r1, #47
	ldr	r0, [fp, #-16]
	bl	strrchr
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-8]
	mov	r2, #0
	strb	r2, [r3]
.L6:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	_remove_last, .-_remove_last
	.section	.rodata
	.align	2
.LC1:
	.ascii	".\000"
	.align	2
.LC2:
	.ascii	"..\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	_realpath_toaru
	.syntax unified
	.arm
	.fpu softvfp
	.type	_realpath_toaru, %function
_realpath_toaru:
	@ args = 0, pretend = 0, frame = 8224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #8192
	sub	sp, sp, #36
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-28]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r1, [r3, #-32]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	cmp	r3, #0
	bne	.L8
	bl	__errno_location
	mov	r3, r0
	mvn	r2, #21
	str	r2, [r3]
	mov	r3, #0
	b	.L19
.L8:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	cmp	r3, #0
	bne	.L10
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r0, .L22+4
	bl	malloc
	mov	r3, r0
	str	r3, [r4, #-32]
.L10:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-28]
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #12
	ldr	r1, [r1, #-28]
	mov	r0, r3
	bl	memcpy
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldrb	r3, [r3, #-12]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L11
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r1, #4096
	mov	r0, r3
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	bl	__errno_location
	mov	r3, r0
	mvn	r2, #19
	str	r2, [r3]
	mov	r3, #0
	b	.L19
.L12:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	sub	r2, r2, #24
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	ldr	r1, .L22+8
	mov	r0, r3
	bl	strtok_r
	str	r0, [r4, #-20]
.L13:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r2, #-20]
	ldr	r0, [r3, #-32]
	bl	_append_dir
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #24
	mov	r2, r3
	ldr	r1, .L22+8
	mov	r0, #0
	bl	strtok_r
	str	r0, [r4, #-20]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bne	.L13
.L11:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	sub	r2, r2, #24
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #12
	ldr	r1, .L22+8
	mov	r0, r3
	bl	strtok_r
	str	r0, [r4, #-16]
.L17:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, .L22+12
	ldr	r0, [r3, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, .L22+16
	ldr	r0, [r3, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L16
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-32]
	bl	_remove_last
	b	.L15
.L16:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r2, #-16]
	ldr	r0, [r3, #-32]
	bl	_append_dir
	b	.L15
.L21:
	nop
.L15:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #24
	mov	r2, r3
	ldr	r1, .L22+8
	mov	r0, #0
	bl	strtok_r
	str	r0, [r4, #-16]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	bne	.L17
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L18
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-32]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, r2
	ldr	r2, .L22+8
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
.L18:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
.L19:
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC3
	.word	4097
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	_realpath_toaru, .-_realpath_toaru
	.section	.rodata
	.align	2
.LC4:
	.ascii	"invalid path, errno=%d\012\000"
	.align	2
.LC5:
	.ascii	"%s=%s\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #20
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-16]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r1, r3
	mov	r0, r2
	bl	_realpath_toaru
	mov	r3, r0
	cmp	r3, #0
	bne	.L25
	ldr	r3, .L29+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L29+8
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L27
.L25:
	ldr	r3, .L29+4
	ldr	r0, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	ldr	r1, .L29+12
	bl	fprintf
	mov	r3, #0
.L27:
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC6
	.word	stderr
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
