	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_home_dir
_find_home_dir:                         ## @find_home_dir
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_find_home_dir.home_dir(%rip), %rbx
	testl	%edi, %edi
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_free
	xorl	%ebx, %ebx
LBB0_11:
	movq	%rbx, _find_home_dir.home_dir(%rip)
	jmp	LBB0_12
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_3
LBB0_12:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	callq	_getuid
	movl	%eax, %edi
	callq	_getpwuid
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%rax), %rdi
	movq	%rdi, _find_home_dir.home_dir(%rip)
	testq	%rdi, %rdi
	jne	LBB0_9
	jmp	LBB0_7
LBB0_5:
	movq	_find_home_dir.home_dir(%rip), %rdi
	testq	%rdi, %rdi
	jne	LBB0_9
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	movq	%rax, %rdi
	movq	%rax, _find_home_dir.home_dir(%rip)
	testq	%rax, %rax
	je	LBB0_8
LBB0_9:
	callq	_strlen30
	movl	%eax, %r14d
	incl	%r14d
	movl	%r14d, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_find_home_dir.home_dir(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	jmp	LBB0_11
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_find_home_dir.home_dir,8,3 ## @find_home_dir.home_dir
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HOME"

	.no_dead_strip	_find_home_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_home_dir
_find_home_dir:                         ; @find_home_dir
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	adrp	x21, _find_home_dir.home_dir@PAGE
	ldr	x19, [x21, _find_home_dir.home_dir@PAGEOFF]
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_2:
	str	x19, [x21, _find_home_dir.home_dir@PAGEOFF]
	b	LBB0_4
LBB0_3:
	cbz	x19, LBB0_5
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	_getuid
	bl	_getpwuid
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x0, [x0]
	str	x0, [x21, _find_home_dir.home_dir@PAGEOFF]
	cbnz	x0, LBB0_9
	b	LBB0_8
LBB0_7:
	ldr	x0, [x21, _find_home_dir.home_dir@PAGEOFF]
	cbnz	x0, LBB0_9
LBB0_8:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	str	x0, [x21, _find_home_dir.home_dir@PAGEOFF]
	cbz	x0, LBB0_11
LBB0_9:
	bl	_strlen30
	add	w20, w0, #1
	mov	x0, x20
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_2
; %bb.10:
	ldr	x1, [x21, _find_home_dir.home_dir@PAGEOFF]
	mov	x0, x19
	mov	x2, x20
	bl	_memcpy
	b	LBB0_2
LBB0_11:
	mov	x19, #0
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_find_home_dir.home_dir,8,3 ; @find_home_dir.home_dir
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HOME"

	.no_dead_strip	_find_home_dir
.subsections_via_symbols
