	.file	"960131.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/proc/self/fd/%d"
	.text
	.globl	realpath
	.type	realpath, @function
realpath:
.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, 368
	mov	QWORD PTR -360[rbp], rdi
	mov	QWORD PTR -368[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -352[rbp], 0
	cmp	QWORD PTR -360[rbp], 0
	jne	.L2
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 22
	mov	eax, 0
	jmp	.L12
.L2:
	mov	rax, QWORD PTR -360[rbp]
	mov	esi, 526336
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -348[rbp], eax
	cmp	DWORD PTR -348[rbp], 0
	jns	.L4
	mov	eax, 0
	jmp	.L12
.L4:
	mov	edx, DWORD PTR -348[rbp]
	lea	rax, -48[rbp]
	mov	ecx, edx
	lea	rdx, .LC0[rip]
	mov	esi, 27
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	cmp	QWORD PTR -368[rbp], 0
	jne	.L5
	mov	DWORD PTR -352[rbp], 1
	mov	edi, 4096
	call	malloc@PLT
	mov	QWORD PTR -368[rbp], rax
	cmp	QWORD PTR -368[rbp], 0
	jne	.L5
	mov	eax, 0
	jmp	.L12
.L5:
	mov	rcx, QWORD PTR -368[rbp]
	lea	rax, -48[rbp]
	mov	edx, 4095
	mov	rsi, rcx
	mov	rdi, rax
	call	readlink@PLT
	mov	QWORD PTR -344[rbp], rax
	cmp	QWORD PTR -344[rbp], 0
	js	.L14
	mov	rdx, QWORD PTR -344[rbp]
	mov	rax, QWORD PTR -368[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rdx, -336[rbp]
	mov	eax, DWORD PTR -348[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	lea	rdx, -192[rbp]
	mov	rax, QWORD PTR -368[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	cdqe
	mov	QWORD PTR -344[rbp], rax
	cmp	QWORD PTR -344[rbp], 0
	js	.L8
	mov	rdx, QWORD PTR -336[rbp]
	mov	rax, QWORD PTR -192[rbp]
	cmp	rdx, rax
	jne	.L8
	mov	rdx, QWORD PTR -328[rbp]
	mov	rax, QWORD PTR -184[rbp]
	cmp	rdx, rax
	je	.L9
.L8:
	cmp	QWORD PTR -344[rbp], 0
	jne	.L15
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 40
	jmp	.L15
.L9:
	mov	eax, DWORD PTR -348[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -368[rbp]
	jmp	.L12
.L14:
	nop
	jmp	.L7
.L15:
	nop
.L7:
	cmp	DWORD PTR -352[rbp], 0
	je	.L11
	mov	rax, QWORD PTR -368[rbp]
	mov	rdi, rax
	call	free@PLT
.L11:
	mov	eax, DWORD PTR -348[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	realpath, .-realpath
	.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	"960131.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/proc/self/fd/%d\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	realpath
	.syntax unified
	.arm
	.fpu softvfp
	.type	realpath, %function
realpath:
	@ args = 0, pretend = 0, frame = 232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #232
	str	r0, [fp, #-232]
	str	r1, [fp, #-236]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-224]
	ldr	r3, [fp, #-232]
	cmp	r3, #0
	bne	.L2
	bl	__errno_location
	mov	r3, r0
	mov	r2, #22
	str	r2, [r3]
	mov	r3, #0
	b	.L12
.L2:
	ldr	r1, .L16+4
	ldr	r0, [fp, #-232]
	bl	open
	str	r0, [fp, #-220]
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	bge	.L4
	mov	r3, #0
	b	.L12
.L4:
	sub	r0, fp, #36
	ldr	r3, [fp, #-220]
	ldr	r2, .L16+8
	mov	r1, #27
	bl	snprintf
	ldr	r3, [fp, #-236]
	cmp	r3, #0
	bne	.L5
	mov	r3, #1
	str	r3, [fp, #-224]
	mov	r0, #4096
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-236]
	ldr	r3, [fp, #-236]
	cmp	r3, #0
	bne	.L5
	mov	r3, #0
	b	.L12
.L5:
	sub	r3, fp, #36
	ldr	r2, .L16+12
	ldr	r1, [fp, #-236]
	mov	r0, r3
	bl	readlink
	str	r0, [fp, #-216]
	ldr	r3, [fp, #-216]
	cmp	r3, #0
	blt	.L14
	ldr	r3, [fp, #-216]
	ldr	r2, [fp, #-236]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #212
	mov	r1, r3
	ldr	r0, [fp, #-220]
	bl	fstat
	sub	r3, fp, #124
	mov	r1, r3
	ldr	r0, [fp, #-236]
	bl	stat
	str	r0, [fp, #-216]
	ldr	r3, [fp, #-216]
	cmp	r3, #0
	blt	.L8
	sub	r1, fp, #212
	ldmia	r1, {r0-r1}
	sub	r3, fp, #124
	ldmia	r3, {r2-r3}
	cmp	r1, r3
	cmpeq	r0, r2
	bne	.L8
	ldr	r2, [fp, #-200]
	ldr	r3, [fp, #-112]
	cmp	r2, r3
	beq	.L9
.L8:
	ldr	r3, [fp, #-216]
	cmp	r3, #0
	bne	.L15
	bl	__errno_location
	mov	r3, r0
	mov	r2, #40
	str	r2, [r3]
	b	.L15
.L9:
	ldr	r0, [fp, #-220]
	bl	close
	ldr	r3, [fp, #-236]
	b	.L12
.L14:
	nop
	b	.L7
.L15:
	nop
.L7:
	ldr	r3, [fp, #-224]
	cmp	r3, #0
	beq	.L11
	ldr	r0, [fp, #-236]
	bl	free
.L11:
	ldr	r0, [fp, #-220]
	bl	close
	mov	r3, #0
.L12:
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC1
	.word	526336
	.word	.LC0
	.word	4095
	.size	realpath, .-realpath
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
