	.file	"extr_user-util.c_get_home_dir.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"HOME"
.LC1:
	.string	"/root"
.LC2:
	.string	"/"
	.text
	.p2align 4
	.globl	get_home_dir
	.type	get_home_dir, @function
get_home_dir:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	assert@PLT
	lea	rdi, .LC0[rip]
	call	secure_getenv@PLT
	test	rax, rax
	je	.L2
	mov	rdi, rax
	mov	rbp, rax
	call	path_is_valid@PLT
	test	rax, rax
	jne	.L33
.L2:
	xor	eax, eax
	call	getuid@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L34
	xor	eax, eax
	call	synthesize_nobody@PLT
	test	rax, rax
	je	.L7
	cmp	QWORD PTR UID_NOBODY[rip], rbp
	je	.L35
.L7:
	mov	QWORD PTR errno[rip], 0
	mov	rdi, rbp
	call	getpwuid@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L36
	mov	rdi, QWORD PTR [rax]
	call	path_is_valid@PLT
	test	rax, rax
	jne	.L10
.L11:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	strdup@PLT
	test	rax, rax
	je	.L31
.L30:
	mov	QWORD PTR [rbx], rax
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	mov	rdi, rbp
	call	path_is_absolute@PLT
	test	rax, rax
	je	.L2
	mov	rdi, rbp
	call	strdup@PLT
	mov	rdi, rax
	test	rax, rax
	jne	.L12
.L31:
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, QWORD PTR 0[rbp]
	call	path_is_absolute@PLT
	test	rax, rax
	je	.L11
	mov	rdi, QWORD PTR 0[rbp]
	call	strdup@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L31
.L12:
	mov	esi, 1
	call	path_simplify@PLT
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L36:
	mov	edi, DWORD PTR ESRCH[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	errno_or_else@PLT
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	lea	rdi, .LC2[rip]
	call	strdup@PLT
	test	rax, rax
	jne	.L30
	jmp	.L31
	.cfi_endproc
.LFE0:
	.size	get_home_dir, .-get_home_dir
	.comm	errno,8,8
	.comm	UID_NOBODY,8,8
	.comm	ESRCH,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_user-util.c_get_home_dir.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"HOME\000"
	.align	2
.LC1:
	.ascii	"/root\000"
	.align	2
.LC2:
	.ascii	"/\000"
	.text
	.align	2
	.global	get_home_dir
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_home_dir, %function
get_home_dir:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	bl	assert
	ldr	r0, .L37
	bl	secure_getenv
	subs	r4, r0, #0
	beq	.L2
	bl	path_is_valid
	cmp	r0, #0
	bne	.L33
.L2:
	bl	getuid
	subs	r4, r0, #0
	beq	.L34
	bl	synthesize_nobody
	cmp	r0, #0
	beq	.L7
	ldr	r3, .L37+4
	ldr	r3, [r3]
	cmp	r3, r4
	beq	.L35
.L7:
	mov	r6, #0
	ldr	r3, .L37+8
	mov	r0, r4
	str	r6, [r3]
	bl	getpwuid
	subs	r4, r0, #0
	beq	.L36
	ldr	r0, [r4]
	bl	path_is_valid
	cmp	r0, #0
	bne	.L10
.L11:
	ldr	r3, .L37+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L34:
	ldr	r0, .L37+16
	bl	strdup
	cmp	r0, #0
	beq	.L30
.L31:
	str	r0, [r5]
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L33:
	mov	r0, r4
	bl	path_is_absolute
	cmp	r0, #0
	beq	.L2
	mov	r0, r4
	bl	strdup
	cmp	r0, #0
	beq	.L30
	mov	r1, #1
	bl	path_simplify
	mov	r4, #0
	str	r0, [r5]
	b	.L1
.L10:
	ldr	r0, [r4]
	bl	path_is_absolute
	cmp	r0, #0
	beq	.L11
	ldr	r0, [r4]
	bl	strdup
	cmp	r0, #0
	beq	.L30
	mov	r1, #1
	bl	path_simplify
	mov	r4, r6
	b	.L31
.L36:
	ldr	r3, .L37+20
	pop	{r4, r5, r6, lr}
	ldr	r0, [r3]
	b	errno_or_else
.L35:
	ldr	r0, .L37+24
	bl	strdup
	cmp	r0, #0
	movne	r4, #0
	strne	r0, [r5]
	bne	.L1
.L30:
	ldr	r3, .L37+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L38:
	.align	2
.L37:
	.word	.LC0
	.word	UID_NOBODY
	.word	errno
	.word	EINVAL
	.word	.LC1
	.word	ESRCH
	.word	.LC2
	.word	ENOMEM
	.size	get_home_dir, .-get_home_dir
	.comm	errno,4,4
	.comm	UID_NOBODY,4,4
	.comm	ESRCH,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
