	.file	"583150.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"realpath"
.LC1:
	.string	"%s"
.LC2:
	.string	"LP"
.LC3:
	.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
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	DWORD PTR -4132[rbp], edi
	mov	QWORD PTR -4144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	getprogname@PLT
	cdqe
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L2
	cmp	DWORD PTR -4132[rbp], 2
	je	.L3
	call	usage
.L3:
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realpath@PLT
	mov	QWORD PTR -4120[rbp], rax
	cmp	QWORD PTR -4120[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L4:
	mov	rax, QWORD PTR -4120[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	mov	DWORD PTR -4128[rbp], 1
	jmp	.L5
.L9:
	cmp	DWORD PTR -4124[rbp], 76
	je	.L6
	cmp	DWORD PTR -4124[rbp], 80
	je	.L7
	jmp	.L15
.L6:
	mov	DWORD PTR -4128[rbp], 0
	jmp	.L5
.L7:
	mov	DWORD PTR -4128[rbp], 1
	jmp	.L5
.L15:
	call	usage
.L5:
	mov	rcx, QWORD PTR -4144[rbp]
	mov	eax, DWORD PTR -4132[rbp]
	lea	rdx, .LC2[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -4124[rbp], eax
	cmp	DWORD PTR -4124[rbp], -1
	jne	.L9
	mov	eax, DWORD PTR optind[rip]
	sub	DWORD PTR -4132[rbp], eax
	mov	eax, DWORD PTR optind[rip]
	cdqe
	sal	rax, 3
	add	QWORD PTR -4144[rbp], rax
	cmp	DWORD PTR -4132[rbp], 0
	je	.L10
	call	usage
.L10:
	cmp	DWORD PTR -4128[rbp], 0
	jne	.L11
	call	getcwd_logical
	mov	QWORD PTR -4120[rbp], rax
	cmp	QWORD PTR -4120[rbp], 0
	jne	.L12
.L11:
	mov	esi, 0
	mov	edi, 0
	call	getcwd@PLT
	mov	QWORD PTR -4120[rbp], rax
	cmp	QWORD PTR -4120[rbp], 0
	je	.L13
.L12:
	mov	rax, QWORD PTR -4120[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L13:
	lea	rsi, .LC3[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC4:
	.string	"usage: realpath [path]\n"
.LC5:
	.string	"usage: pwd [-LP]\n"
	.text
	.type	usage, @function
usage:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	getprogname@PLT
	cdqe
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L17
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	jmp	.L18
.L17:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 17
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
.L18:
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	usage, .-usage
	.section	.rodata
.LC6:
	.string	"PWD"
	.text
	.type	getcwd_logical, @function
getcwd_logical:
.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, 320
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC6[rip]
	call	getenv@PLT
	mov	QWORD PTR -312[rbp], rax
	cmp	QWORD PTR -312[rbp], 0
	je	.L20
	mov	rax, QWORD PTR -312[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	jne	.L20
	lea	rdx, -304[rbp]
	mov	rax, QWORD PTR -312[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	cmp	eax, -1
	je	.L21
	lea	rax, -160[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	call	stat@PLT
	cmp	eax, -1
	jne	.L22
.L21:
	mov	eax, 0
	jmp	.L24
.L22:
	mov	rdx, QWORD PTR -304[rbp]
	mov	rax, QWORD PTR -160[rbp]
	cmp	rdx, rax
	jne	.L20
	mov	rdx, QWORD PTR -296[rbp]
	mov	rax, QWORD PTR -152[rbp]
	cmp	rdx, rax
	jne	.L20
	mov	rax, QWORD PTR -312[rbp]
	jmp	.L24
.L20:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 2
	mov	eax, 0
.L24:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	getcwd_logical, .-getcwd_logical
	.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	"583150.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"realpath\000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"LP\000"
	.align	2
.LC3:
	.ascii	".\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 = 4120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-24]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	bl	getprogname
	mov	r3, r0
	ldr	r1, .L16+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmp	r3, #2
	beq	.L3
	bl	usage
.L3:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	realpath
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bne	.L4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L16+8
	mov	r0, #1
	bl	err
.L4:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	puts
	mov	r0, #0
	bl	exit
.L2:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-16]
	b	.L5
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #76
	beq	.L6
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #80
	beq	.L7
	b	.L15
.L6:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-16]
	b	.L5
.L7:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-16]
	b	.L5
.L15:
	bl	usage
.L5:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, .L16+12
	ldr	r1, [r1, #-24]
	ldr	r0, [r3, #-20]
	bl	getopt
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmn	r3, #1
	bne	.L9
	ldr	r3, .L16+16
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-20]
	sub	r3, r2, r3
	str	r3, [r1, #-20]
	ldr	r3, .L16+16
	ldr	r3, [r3]
	lsl	r3, r3, #2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-24]
	add	r3, r2, r3
	str	r3, [r1, #-24]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	beq	.L10
	bl	usage
.L10:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	bne	.L11
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	bl	getcwd_logical
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bne	.L12
.L11:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	mov	r1, #0
	mov	r0, #0
	bl	getcwd
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	beq	.L13
.L12:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	puts
	mov	r0, #0
	bl	exit
.L13:
	ldr	r1, .L16+20
	mov	r0, #1
	bl	err
.L17:
	.align	2
.L16:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	optind
	.word	.LC3
	.size	main, .-main
	.section	.rodata
	.align	2
.LC5:
	.ascii	"usage: realpath [path]\012\000"
	.align	2
.LC6:
	.ascii	"usage: pwd [-LP]\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	getprogname
	mov	r3, r0
	ldr	r1, .L21
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L21+8
	bl	fwrite
	b	.L20
.L19:
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r2, #17
	mov	r1, #1
	ldr	r0, .L21+12
	bl	fwrite
.L20:
	mov	r0, #1
	bl	exit
.L22:
	.align	2
.L21:
	.word	.LC0
	.word	stderr
	.word	.LC5
	.word	.LC6
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC7:
	.ascii	"PWD\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getcwd_logical, %function
getcwd_logical:
	@ args = 0, pretend = 0, frame = 192
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #192
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L30+4
	bl	getenv
	str	r0, [fp, #-192]
	ldr	r3, [fp, #-192]
	cmp	r3, #0
	beq	.L24
	ldr	r3, [fp, #-192]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L24
	sub	r3, fp, #188
	mov	r1, r3
	ldr	r0, [fp, #-192]
	bl	stat
	mov	r3, r0
	cmn	r3, #1
	beq	.L25
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, .L30+8
	bl	stat
	mov	r3, r0
	cmn	r3, #1
	bne	.L26
.L25:
	mov	r3, #0
	b	.L28
.L26:
	sub	r1, fp, #188
	ldmia	r1, {r0-r1}
	sub	r3, fp, #100
	ldmia	r3, {r2-r3}
	cmp	r1, r3
	cmpeq	r0, r2
	bne	.L24
	ldr	r2, [fp, #-176]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bne	.L24
	ldr	r3, [fp, #-192]
	b	.L28
.L24:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #2
	str	r2, [r3]
	mov	r3, #0
.L28:
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC8
	.word	.LC7
	.word	.LC3
	.size	getcwd_logical, .-getcwd_logical
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
