	.file	"836921.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"-h"
.LC1:
	.string	"usage: %s path\n"
	.align 8
.LC2:
	.string	"pathconf(%s, _PC_PATH_MAX) returned %d with error %d (%s)\n"
	.align 8
.LC3:
	.string	"pathconf(%s, _PC_PATH_MAX) returned %d without changing errno; PATH_MAX is unlimited.\n"
.LC4:
	.string	"readlink(%s) failed: %d (%s)\n"
	.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	cmp	DWORD PTR -52[rbp], 2
	jne	.L2
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L3
.L2:
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L4
.L3:
	mov	DWORD PTR -36[rbp], 0
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 4
	mov	rdi, rax
	call	pathconf@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jns	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L6
	mov	DWORD PTR -32[rbp], 0
	mov	eax, DWORD PTR -32[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edi, eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, DWORD PTR -32[rbp]
	mov	r9, rcx
	mov	r8d, esi
	mov	ecx, edi
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L7:
	mov	QWORD PTR -24[rbp], 10000
.L5:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	mov	rdx, rax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	readlink@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jns	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -28[rbp]
	mov	r8, rsi
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -36[rbp], 1
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	puts@PLT
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -36[rbp]
.L4:
	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	"836921.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"-h\000"
	.align	2
.LC1:
	.ascii	"usage: %s path\012\000"
	.align	2
.LC2:
	.ascii	"pathconf(%s, _PC_PATH_MAX) returned %d with error %"
	.ascii	"d (%s)\012\000"
	.align	2
.LC3:
	.ascii	"pathconf(%s, _PC_PATH_MAX) returned %d without chan"
	.ascii	"ging errno; PATH_MAX is unlimited.\012\000"
	.align	2
.LC4:
	.ascii	"readlink(%s) failed: %d (%s)\012\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	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, [fp, #-40]
	cmp	r3, #2
	bne	.L2
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L10
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
.L2:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L10+4
	bl	printf
	mov	r3, #1
	b	.L4
.L3:
	mov	r3, #0
	str	r3, [fp, #-36]
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #4
	mov	r0, r3
	bl	pathconf
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L5
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L6
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r3, .L10+8
	ldr	r4, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r5, [r3]
	ldr	r0, [fp, #-28]
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-28]
	str	r3, [sp]
	ldr	r3, [fp, #-32]
	mov	r2, r5
	ldr	r1, .L10+12
	mov	r0, r4
	bl	fprintf
	b	.L7
.L6:
	ldr	r3, .L10+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r1, .L10+16
	bl	fprintf
.L7:
	ldr	r3, .L10+20
	str	r3, [fp, #-32]
.L5:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	memset
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r0, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-24]
	bl	readlink
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L8
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, .L10+8
	ldr	r4, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r5, [r3]
	ldr	r0, [fp, #-16]
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, [fp, #-16]
	mov	r2, r5
	ldr	r1, .L10+24
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L9
.L8:
	ldr	r0, [fp, #-24]
	bl	puts
.L9:
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r3, [fp, #-36]
.L4:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	.LC1
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	10000
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
