	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mrb_file_realpath
_mrb_file_realpath:                     ## @mrb_file_realpath
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rcx
	callq	_mrb_get_args
	cmpl	$2, %eax
	jne	LBB0_1
## %bb.2:
	movl	-32(%rbp), %esi
	movq	%r14, %rdi
	callq	_mrb_str_dup
	movl	%eax, %ebx
	movq	_FILE_SEPARATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mrb_str_new_cstr
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mrb_str_append
	movl	-28(%rbp), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mrb_str_append
	movl	%eax, %esi
	movl	%eax, -28(%rbp)
	jmp	LBB0_3
LBB0_1:
	movl	-28(%rbp), %esi
LBB0_3:
	movq	%r14, %rdi
	callq	_mrb_str_to_cstr
	movl	%eax, %edi
	movl	$-1, %esi
	callq	_mrb_locale_from_utf8
	movq	%rax, %r15
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mrb_str_buf_new
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_RSTRING_PTR
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_realpath
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_mrb_locale_free
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mrb_sys_fail
LBB0_5:
	movq	%r15, %rdi
	callq	_mrb_locale_free
	movl	%ebx, %edi
	callq	_RSTRING_PTR
	movl	%eax, %edi
	callq	_strlen
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mrb_str_resize
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"S|S"

	.comm	_FILE_SEPARATOR,4,2             ## @FILE_SEPARATOR
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.no_dead_strip	_mrb_file_realpath
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mrb_file_realpath
_mrb_file_realpath:                     ; @mrb_file_realpath
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	add	x3, sp, #8
	bl	_mrb_get_args
	cmp	w0, #2
	b.ne	LBB0_2
; %bb.1:
	ldr	w1, [sp, #8]
	mov	x0, x19
	bl	_mrb_str_dup
	mov	x20, x0
Lloh2:
	adrp	x8, _FILE_SEPARATOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FILE_SEPARATOR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mrb_str_new_cstr
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mrb_str_append
	mov	x1, x0
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_mrb_str_append
	mov	x1, x0
	str	w0, [sp, #12]
	b	LBB0_3
LBB0_2:
	ldr	w1, [sp, #12]
LBB0_3:
	mov	x0, x19
	bl	_mrb_str_to_cstr
	mov	w1, #-1
	bl	_mrb_locale_from_utf8
	mov	x21, x0
Lloh5:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mrb_str_buf_new
	mov	x20, x0
	bl	_RSTRING_PTR
	mov	x1, x0
	mov	x0, x21
	bl	_realpath
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_mrb_locale_free
	mov	x0, x19
	mov	x1, x21
	bl	_mrb_sys_fail
LBB0_5:
	mov	x0, x21
	bl	_mrb_locale_free
	mov	x0, x20
	bl	_RSTRING_PTR
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mrb_str_resize
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"S|S"

	.comm	_FILE_SEPARATOR,4,2             ; @FILE_SEPARATOR
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.no_dead_strip	_mrb_file_realpath
.subsections_via_symbols
