	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mrb_file_s_readlink
_mrb_file_s_readlink:                   ## @mrb_file_s_readlink
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_mrb_gc_arena_save
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	callq	_mrb_get_args
	movq	-56(%rbp), %rdi
	movl	$-1, %esi
	callq	_mrb_locale_from_utf8
	movq	%rax, %r12
	movl	$100, %r14d
	movl	$100, %esi
	movq	%r15, %rdi
	callq	_mrb_malloc
	movq	%rax, %r13
	movl	$100, %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_readlink
	cmpl	$100, %eax
	jne	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	addq	%r14, %r14
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_mrb_realloc
	movq	%rax, %r13
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_readlink
	movl	%eax, %ebx
	cmpl	%r14d, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$-1, %ebx
	jne	LBB0_2
	jmp	LBB0_4
LBB0_1:
	movl	%eax, %ebx
LBB0_4:
	movq	%r12, %rdi
	callq	_mrb_locale_free
	cmpl	$-1, %ebx
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_mrb_free
	movq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mrb_sys_fail
LBB0_6:
	movq	%r13, %rdi
	movl	$-1, %esi
	callq	_mrb_utf8_from_locale
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rax, %rsi
	movl	%ebx, %edx
	callq	_mrb_str_new
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mrb_locale_free
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_mrb_free
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mrb_gc_arena_restore
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"z"

	.comm	_E_NOTIMP_ERROR,4,2             ## @E_NOTIMP_ERROR
	.no_dead_strip	_mrb_file_s_readlink
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mrb_file_s_readlink
_mrb_file_s_readlink:                   ; @mrb_file_s_readlink
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_mrb_gc_arena_save
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x0, x19
	bl	_mrb_get_args
	ldr	x0, [sp, #8]
	mov	w1, #-1
	bl	_mrb_locale_from_utf8
	mov	x22, x0
	mov	x0, x19
	mov	w1, #100
	bl	_mrb_malloc
	mov	x21, x0
	mov	x0, x22
	mov	x1, x21
	mov	w2, #100
	bl	_readlink
	cmp	w0, #100
	b.ne	LBB0_3
; %bb.1:
	mov	w24, #100
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x24, x24, #1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x24
	bl	_mrb_realloc
	mov	x21, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x24
	bl	_readlink
	cmp	w0, w24
	ccmn	w0, #1, #4, eq
	b.ne	LBB0_2
LBB0_3:
	mov	x23, x0
	mov	x0, x22
	bl	_mrb_locale_free
	cmn	w23, #1
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	bl	_mrb_free
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_mrb_sys_fail
LBB0_5:
	mov	x0, x21
	mov	w1, #-1
	bl	_mrb_utf8_from_locale
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_mrb_str_new
	mov	x23, x0
	mov	x0, x22
	bl	_mrb_locale_free
	mov	x0, x19
	mov	x1, x21
	bl	_mrb_free
	mov	x0, x19
	mov	x1, x20
	bl	_mrb_gc_arena_restore
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"z"

	.comm	_E_NOTIMP_ERROR,4,2             ; @E_NOTIMP_ERROR
	.no_dead_strip	_mrb_file_s_readlink
.subsections_via_symbols
