	.file	"extr_fs.c_sys_getcwd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"getcwd(%#x, %#x)"
.LC1:
	.string	" \"%.*s\""
	.text
	.p2align 4
	.globl	sys_getcwd
	.type	sys_getcwd, @function
sys_getcwd:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	edx, esi
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	mov	r12d, edi
	push	rbx
	.cfi_offset 3, -48
	mov	ebx, esi
	mov	esi, edi
	lea	rdi, .LC0[rip]
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	call	STRACE@PLT
	mov	rax, QWORD PTR current[rip]
	mov	rdi, QWORD PTR [rax]
	call	lock@PLT
	mov	rax, QWORD PTR current[rip]
	mov	rcx, rsp
	mov	rax, QWORD PTR [rax]
	mov	rdi, QWORD PTR 8[rax]
	mov	eax, DWORD PTR MAX_PATH[rip]
	add	eax, 1
	cdqe
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L17:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L17
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L18
.L4:
	mov	rsi, rsp
	call	generic_getpath@PLT
	mov	r13d, eax
	mov	rax, QWORD PTR current[rip]
	mov	rdi, QWORD PTR [rax]
	call	unlock@PLT
	test	r13d, r13d
	js	.L1
	mov	rdi, rsp
	call	strlen@PLT
	mov	r13d, DWORD PTR _ERANGE[rip]
	cmp	eax, ebx
	jge	.L1
	mov	rdi, rsp
	call	strlen@PLT
	lea	r13d, 1[rax]
	mov	edi, r13d
	call	malloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L19
	mov	rsi, rsp
	mov	rdi, rax
	call	strcpy@PLT
	mov	esi, r13d
	mov	rdx, r14
	xor	eax, eax
	lea	rdi, .LC1[rip]
	call	STRACE@PLT
	mov	edx, r13d
	mov	edi, r12d
	mov	rsi, r14
	call	user_write@PLT
	mov	rdi, r14
	test	rax, rax
	cmovne	r13d, DWORD PTR _EFAULT[rip]
	call	free@PLT
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	lea	rsp, -32[rbp]
	mov	eax, r13d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r13d, DWORD PTR _ENOMEM[rip]
	jmp	.L1
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sys_getcwd, .-sys_getcwd
	.comm	current,8,8
	.comm	_ERANGE,4,4
	.comm	_ENOMEM,4,4
	.comm	_EFAULT,4,4
	.comm	MAX_PATH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_fs.c_sys_getcwd.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"getcwd(%#x, %#x)\000"
	.align	2
.LC1:
	.ascii	" \"%.*s\"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sys_getcwd
	.syntax unified
	.arm
	.fpu softvfp
	.type	sys_getcwd, %function
sys_getcwd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #8
	ldr	r7, .L13
	ldr	r3, .L13+4
	mov	r2, r1
	mov	r5, r0
	mov	r6, r1
	mov	r1, r0
	ldr	r0, .L13+8
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	bl	STRACE
	ldr	r3, [r7]
	ldr	r0, [r3]
	bl	lock
	ldr	r3, .L13+12
	ldr	r2, [r7]
	ldr	r3, [r3]
	ldr	r2, [r2]
	add	r3, r3, #8
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r1, sp
	ldr	r0, [r2, #4]
	bl	generic_getpath
	mov	r4, r0
	ldr	r3, [r7]
	ldr	r0, [r3]
	bl	unlock
	cmp	r4, #0
	blt	.L1
	mov	r0, sp
	bl	strlen
	cmp	r0, r6
	blt	.L3
	ldr	r3, .L13+16
	ldr	r4, [r3]
.L1:
	ldr	r3, .L13+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, r4
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L3:
	add	r4, r0, #1
	mov	r0, r4
	bl	malloc
	subs	r6, r0, #0
	ldreq	r3, .L13+20
	ldreq	r4, [r3]
	beq	.L1
	mov	r1, sp
	bl	strcpy
	mov	r1, r4
	mov	r2, r6
	ldr	r0, .L13+24
	bl	STRACE
	mov	r2, r4
	mov	r1, r6
	mov	r0, r5
	bl	user_write
	cmp	r0, #0
	ldrne	r3, .L13+28
	mov	r0, r6
	ldrne	r4, [r3]
	bl	free
	b	.L1
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	current
	.word	.LC2
	.word	.LC0
	.word	MAX_PATH
	.word	_ERANGE
	.word	_ENOMEM
	.word	.LC1
	.word	_EFAULT
	.size	sys_getcwd, .-sys_getcwd
	.comm	current,4,4
	.comm	_ERANGE,4,4
	.comm	_ENOMEM,4,4
	.comm	_EFAULT,4,4
	.comm	MAX_PATH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
