	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_expanduser                     ## -- Begin function expanduser
	.p2align	4, 0x90
_expanduser:                            ## @expanduser
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpb	$126, (%rdi)
	jne	LBB0_15
## %bb.1:
	movq	%rdi, %rbx
	incq	%rdi
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	1(%rbx,%r14), %eax
	testb	%al, %al
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$47, %al
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	jmp	LBB0_2
LBB0_5:
	testq	%r14, %r14
	je	LBB0_6
## %bb.12:
	movl	%r14d, %esi
	callq	_strndup
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_getpwnam
	testq	%rax, %rax
	je	LBB0_14
## %bb.16:
	movq	(%rax), %r15
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_17
LBB0_6:
	xorl	%eax, %eax
	callq	_issetugid
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_17
LBB0_8:
	xorl	%eax, %eax
	callq	_getlogin
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, %rdi
	callq	_getpwnam
	testq	%rax, %rax
	jne	LBB0_11
LBB0_10:
	xorl	%eax, %eax
	callq	_getuid
	movl	%eax, %edi
	callq	_getpwuid
	testq	%rax, %rax
	je	LBB0_15
LBB0_11:
	movq	(%rax), %r15
LBB0_17:
	addq	%r14, %rbx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$47, 1(%rbx)
	leaq	1(%rbx), %rbx
	je	LBB0_18
## %bb.19:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_join                           ## TAILCALL
LBB0_14:
	movq	%r12, %rdi
	callq	_free
LBB0_15:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HOME"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_expanduser                     ; -- Begin function expanduser
	.p2align	2
_expanduser:                            ; @expanduser
	.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
	ldrb	w9, [x0]
	cmp	w9, #126
	b.ne	LBB0_18
; %bb.1:
	mov	x8, x0
	mov	x1, #0
	add	x0, x0, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x19, x8, x1
	ldrb	w9, [x19, #1]
	cbz	w9, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w9, #47
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, x1, #1
	b	LBB0_2
LBB0_5:
	cbz	x1, LBB0_9
; %bb.6:
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_strndup
	cbz	x0, LBB0_18
; %bb.7:
	mov	x21, x0
	bl	_getpwnam
	cbz	x0, LBB0_17
; %bb.8:
	ldr	x20, [x0]
	mov	x0, x21
	bl	_free
	b	LBB0_15
LBB0_9:
	bl	_issetugid
	cbnz	x0, LBB0_11
; %bb.10:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	mov	x20, x0
	cbnz	x0, LBB0_15
LBB0_11:
	bl	_getlogin
	cbz	x0, LBB0_13
; %bb.12:
	bl	_getpwnam
	cbnz	x0, LBB0_14
LBB0_13:
	bl	_getuid
	bl	_getpwuid
	cbz	x0, LBB0_18
LBB0_14:
	ldr	x20, [x0]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x19, #1]!
	cmp	w8, #47
	b.eq	LBB0_15
; %bb.16:
	mov	x0, x20
	mov	x1, 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
	b	_join
LBB0_17:
	mov	x0, x21
	bl	_free
LBB0_18:
	mov	x0, #0
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HOME"

.subsections_via_symbols
