	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mrb_file__gethome
_mrb_file__gethome:                     ## @mrb_file__gethome
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	leaq	-20(%rbp), %rdx
	callq	_mrb_get_args
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movl	-20(%rbp), %esi
	movq	%r14, %rdi
	callq	_mrb_str_to_cstr
	movq	%rax, %rdi
	callq	_getpwnam
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_mrb_file_is_absolute_path
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-20(%rbp), %ecx
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	callq	_mrb_raisef
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_mrb_file_is_absolute_path
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	callq	_mrb_raise
LBB0_8:
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_mrb_locale_from_utf8
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_mrb_str_new_cstr
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mrb_locale_free
	jmp	LBB0_9
LBB0_2:
	xorl	%eax, %eax
	callq	_mrb_nil_value
	movl	%eax, %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"|S"

L_.str.1:                               ## @.str.1
	.asciz	"HOME"

	.comm	_E_ARGUMENT_ERROR,4,2           ## @E_ARGUMENT_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"non-absolute home"

L_.str.3:                               ## @.str.3
	.asciz	"non-absolute home of ~%S"

	.no_dead_strip	_mrb_file__gethome
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mrb_file__gethome
_mrb_file__gethome:                     ; @mrb_file__gethome
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	bl	_mrb_get_args
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_mrb_str_to_cstr
	bl	_getpwnam
	cbz	x0, LBB0_8
; %bb.2:
	ldr	x20, [x0]
	mov	x0, x20
	bl	_mrb_file_is_absolute_path
	cbnz	w0, LBB0_7
; %bb.3:
Lloh2:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w3, [sp, #12]
Lloh5:
	adrp	x2, l_.str.3@PAGE
Lloh6:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_mrb_raisef
	b	LBB0_7
LBB0_4:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_8
; %bb.5:
	mov	x20, x0
	bl	_mrb_file_is_absolute_path
	cbnz	w0, LBB0_7
; %bb.6:
Lloh9:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_mrb_raise
LBB0_7:
	mov	x0, x20
	mov	w1, #-1
	bl	_mrb_locale_from_utf8
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mrb_str_new_cstr
	mov	x19, x0
	mov	x0, x20
	bl	_mrb_locale_free
	b	LBB0_9
LBB0_8:
	bl	_mrb_nil_value
	mov	x19, x0
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"|S"

l_.str.1:                               ; @.str.1
	.asciz	"HOME"

	.comm	_E_ARGUMENT_ERROR,4,2           ; @E_ARGUMENT_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"non-absolute home"

l_.str.3:                               ; @.str.3
	.asciz	"non-absolute home of ~%S"

	.no_dead_strip	_mrb_file__gethome
.subsections_via_symbols
