	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fiber_switch
_fiber_switch:                          ## @fiber_switch
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, %r14
	movq	%rcx, %rbx
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	callq	_fiber_check
	movq	%rax, %r15
	movq	(%r13), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_fiber_check_cfunc
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	(%r15), %r12d
	movq	_MRB_FIBER_TRANSFERRED@GOTPCREL(%rip), %rax
	testq	%r14, %r14
	je	LBB0_3
## %bb.1:
	cmpl	(%rax), %r12d
	jne	LBB0_3
## %bb.2:
	movq	_E_FIBER_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	callq	_mrb_raise
LBB0_3:
	movq	_MRB_FIBER_RUNNING@GOTPCREL(%rip), %rax
	movq	_MRB_FIBER_RESUMED@GOTPCREL(%rip), %r15
	cmpl	(%rax), %r12d
	je	LBB0_5
## %bb.4:
	cmpl	(%r15), %r12d
	jne	LBB0_6
LBB0_5:
	movq	_E_FIBER_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	callq	_mrb_raise
LBB0_6:
	movq	_MRB_FIBER_TERMINATED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_8
## %bb.7:
	movq	_E_FIBER_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	callq	_mrb_raise
LBB0_8:
	testq	%r14, %r14
	jne	LBB0_10
## %bb.9:
	movq	_MRB_FIBER_TRANSFERRED@GOTPCREL(%rip), %r15
LBB0_10:
	movl	(%r15), %eax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, (%r14)
	movq	%r13, %rax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_11
LBB0_13:
	movq	(%rax), %rax
	jmp	LBB0_14
LBB0_11:
	movq	40(%r15), %rax
	testq	%rax, %rax
	je	LBB0_12
LBB0_14:
	movq	%rax, 40(%r15)
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_fiber_switch_context
	movq	_MRB_FIBER_CREATED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_31
## %bb.15:
	movq	8(%r15), %rax
	cmpl	$0, 4(%rax)
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_17
## %bb.16:
	movq	_E_FIBER_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	callq	_mrb_raise
LBB0_17:
	leal	2(%r12), %esi
	movq	%r13, %rdi
	callq	_mrb_stack_extend
	testl	%r12d, %r12d
	jle	LBB0_30
## %bb.18:
	movq	24(%r15), %rsi
	movslq	%r12d, %rax
	leaq	(%rsi,%rax,4), %rax
	addq	$4, %rax
	leaq	8(%rsi), %r10
	cmpq	%r10, %rax
	cmovaq	%rax, %r10
	leaq	4(%rsi), %rcx
	subq	%rsi, %r10
	addq	$-5, %r10
	cmpq	$28, %r10
	jb	LBB0_29
## %bb.19:
	movq	%rsi, %rdx
	subq	%rbx, %rdx
	addq	$4, %rdx
	cmpq	$32, %rdx
	jb	LBB0_29
## %bb.20:
	shrq	$2, %r10
	incq	%r10
	movq	%r10, %r8
	andq	$-8, %r8
	leaq	-8(%r8), %rdx
	movq	%rdx, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r9d
	andl	$3, %r9d
	cmpq	$24, %rdx
	jae	LBB0_22
## %bb.21:
	xorl	%edx, %edx
	jmp	LBB0_24
LBB0_31:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_fiber_result
	movl	%eax, %ebx
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_34
LBB0_33:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	8(%r15), %rax
	movl	-4(%rax), %esi
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_mrb_vm_exec
	movq	%r14, (%r13)
	jmp	LBB0_35
LBB0_12:
	leaq	8(%r13), %rax
	jmp	LBB0_13
LBB0_22:
	andq	$-4, %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rbx,%rdx,4), %xmm0
	movups	16(%rbx,%rdx,4), %xmm1
	movups	%xmm0, 4(%rsi,%rdx,4)
	movups	%xmm1, 20(%rsi,%rdx,4)
	movups	32(%rbx,%rdx,4), %xmm0
	movups	48(%rbx,%rdx,4), %xmm1
	movups	%xmm0, 36(%rsi,%rdx,4)
	movups	%xmm1, 52(%rsi,%rdx,4)
	movups	64(%rbx,%rdx,4), %xmm0
	movups	80(%rbx,%rdx,4), %xmm1
	movups	%xmm0, 68(%rsi,%rdx,4)
	movups	%xmm1, 84(%rsi,%rdx,4)
	movups	96(%rbx,%rdx,4), %xmm0
	movups	112(%rbx,%rdx,4), %xmm1
	movups	%xmm0, 100(%rsi,%rdx,4)
	movups	%xmm1, 116(%rsi,%rdx,4)
	addq	$32, %rdx
	addq	$-4, %rdi
	jne	LBB0_23
LBB0_24:
	testq	%r9, %r9
	je	LBB0_27
## %bb.25:
	leaq	(%rsi,%rdx,4), %rsi
	addq	$20, %rsi
	leaq	(%rbx,%rdx,4), %rdx
	addq	$16, %rdx
	shlq	$5, %r9
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movups	-16(%rdx,%rdi), %xmm0
	movups	(%rdx,%rdi), %xmm1
	movups	%xmm0, -16(%rsi,%rdi)
	movups	%xmm1, (%rsi,%rdi)
	addq	$32, %rdi
	cmpq	%rdi, %r9
	jne	LBB0_26
LBB0_27:
	cmpq	%r8, %r10
	je	LBB0_30
## %bb.28:
	leaq	(%rbx,%r8,4), %rbx
	leaq	(%rcx,%r8,4), %rcx
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	addq	$4, %rbx
	movl	%edx, (%rcx)
	addq	$4, %rcx
	cmpq	%rax, %rcx
	jb	LBB0_29
LBB0_30:
	movq	32(%r15), %rax
	movl	%r12d, (%rax)
	movq	8(%r15), %rax
	movl	4(%rax), %edi
	callq	_MRB_PROC_ENV
	movq	(%rax), %rax
	movl	(%rax), %ebx
	movq	24(%r15), %rax
	movl	%ebx, (%rax)
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_33
LBB0_34:
	movq	%r15, %rdi
	callq	_MARK_CONTEXT_MODIFY
	movl	%ebx, %eax
LBB0_35:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MRB_FIBER_TRANSFERRED,4,2      ## @MRB_FIBER_TRANSFERRED
	.comm	_E_FIBER_ERROR,4,2              ## @E_FIBER_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"resuming transferred fiber"

	.comm	_MRB_FIBER_RUNNING,4,2          ## @MRB_FIBER_RUNNING
	.comm	_MRB_FIBER_RESUMED,4,2          ## @MRB_FIBER_RESUMED
L_.str.1:                               ## @.str.1
	.asciz	"double resume"

	.comm	_MRB_FIBER_TERMINATED,4,2       ## @MRB_FIBER_TERMINATED
L_.str.2:                               ## @.str.2
	.asciz	"resuming dead fiber"

	.comm	_MRB_FIBER_CREATED,4,2          ## @MRB_FIBER_CREATED
L_.str.3:                               ## @.str.3
	.asciz	"double resume (current)"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_fiber_switch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fiber_switch
_fiber_switch:                          ; @fiber_switch
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x5
	mov	x24, x4
	mov	x23, x3
	mov	x22, x2
	mov	x19, x0
	bl	_fiber_check
	mov	x21, x0
	ldr	x25, [x19]
	mov	x0, x19
	mov	x1, x21
	bl	_fiber_check_cfunc
	ldr	w26, [x21]
Lloh0:
	adrp	x27, _MRB_FIBER_TRANSFERRED@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MRB_FIBER_TRANSFERRED@GOTPAGEOFF]
	cbz	x24, LBB0_3
; %bb.1:
	ldr	w8, [x27]
	cmp	w26, w8
	b.ne	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _E_FIBER_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E_FIBER_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mrb_raise
LBB0_3:
Lloh7:
	adrp	x8, _MRB_FIBER_RUNNING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MRB_FIBER_RUNNING@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x28, _MRB_FIBER_RESUMED@GOTPAGE
Lloh11:
	ldr	x28, [x28, _MRB_FIBER_RESUMED@GOTPAGEOFF]
	ldr	w9, [x28]
	cmp	w26, w8
	ccmp	w26, w9, #4, ne
	b.ne	LBB0_5
; %bb.4:
Lloh12:
	adrp	x8, _E_FIBER_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _E_FIBER_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str.1@PAGE
Lloh16:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mrb_raise
LBB0_5:
Lloh17:
	adrp	x8, _MRB_FIBER_TERMINATED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MRB_FIBER_TERMINATED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w26, w8
	b.ne	LBB0_7
; %bb.6:
Lloh20:
	adrp	x8, _E_FIBER_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _E_FIBER_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str.2@PAGE
Lloh24:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_mrb_raise
LBB0_7:
	cmp	x24, #0
	csel	x8, x27, x28, eq
	ldr	w8, [x8]
	str	w8, [x25]
	mov	x8, x19
	cbz	x24, LBB0_9
LBB0_8:
	ldr	x8, [x8]
	b	LBB0_10
LBB0_9:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_24
LBB0_10:
	str	x8, [x21, #40]
	mov	x0, x19
	mov	x1, x21
	bl	_fiber_switch_context
Lloh25:
	adrp	x8, _MRB_FIBER_CREATED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MRB_FIBER_CREATED@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w26, w8
	b.ne	LBB0_21
; %bb.11:
	ldr	x8, [x21, #8]
	ldr	w8, [x8, #4]
	cbnz	w8, LBB0_13
; %bb.12:
Lloh28:
	adrp	x8, _E_FIBER_ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _E_FIBER_ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x2, l_.str.3@PAGE
Lloh32:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_mrb_raise
LBB0_13:
	add	w1, w22, #2
	mov	x0, x19
	bl	_mrb_stack_extend
	cmp	w22, #1
	b.lt	LBB0_19
; %bb.14:
	ldr	x9, [x21, #24]
	sxtw	x10, w22
	add	x8, x9, #4
	add	x10, x9, x10, lsl #2
	add	x10, x10, #4
	add	x11, x9, #8
	cmp	x10, x11
	csel	x10, x10, x11, hi
	sub	x10, x10, x9
	sub	x10, x10, #5
	cmp	x10, #60
	b.lo	LBB0_16
; %bb.15:
	sub	x11, x9, x23
	add	x11, x11, #4
	cmp	x11, #64
	b.hs	LBB0_25
LBB0_16:
	mov	x10, x23
LBB0_17:
	add	x9, x9, w22, sxtw #2
	add	x9, x9, #4
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10], #4
	str	w11, [x8], #4
	cmp	x8, x9
	b.lo	LBB0_18
LBB0_19:
	ldr	x8, [x21, #32]
	str	w22, [x8]
	ldr	x8, [x21, #8]
	ldr	w0, [x8, #4]
	bl	_MRB_PROC_ENV
	ldr	x8, [x0]
	ldr	w22, [x8]
	ldr	x8, [x21, #24]
	str	w22, [x8]
	cbnz	x20, LBB0_22
LBB0_20:
	mov	x0, x21
	bl	_MARK_CONTEXT_MODIFY
	mov	x0, x22
	b	LBB0_23
LBB0_21:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_fiber_result
	mov	x22, x0
	cbz	x20, LBB0_20
LBB0_22:
Lloh33:
	adrp	x8, _TRUE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	str	w8, [x21, #16]
	ldr	x8, [x21, #8]
	ldp	w1, w2, [x8, #-4]
	mov	x0, x19
	bl	_mrb_vm_exec
	str	x25, [x19]
LBB0_23:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_24:
	add	x8, x19, #8
	b	LBB0_8
LBB0_25:
	lsr	x10, x10, #2
	add	x11, x10, #1
	and	x12, x11, #0x7ffffffffffffff0
	lsl	x13, x12, #2
	add	x10, x23, x13
	add	x8, x8, x13
	add	x13, x23, #32
	add	x14, x9, #36
	mov	x15, x12
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x13, #-32]
	ldp	q2, q3, [x13], #64
	stp	q0, q1, [x14, #-32]
	stp	q2, q3, [x14], #64
	subs	x15, x15, #16
	b.ne	LBB0_26
; %bb.27:
	cmp	x11, x12
	b.eq	LBB0_19
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_MRB_FIBER_TRANSFERRED,4,2      ; @MRB_FIBER_TRANSFERRED
	.comm	_E_FIBER_ERROR,4,2              ; @E_FIBER_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"resuming transferred fiber"

	.comm	_MRB_FIBER_RUNNING,4,2          ; @MRB_FIBER_RUNNING
	.comm	_MRB_FIBER_RESUMED,4,2          ; @MRB_FIBER_RESUMED
l_.str.1:                               ; @.str.1
	.asciz	"double resume"

	.comm	_MRB_FIBER_TERMINATED,4,2       ; @MRB_FIBER_TERMINATED
l_.str.2:                               ; @.str.2
	.asciz	"resuming dead fiber"

	.comm	_MRB_FIBER_CREATED,4,2          ; @MRB_FIBER_CREATED
l_.str.3:                               ; @.str.3
	.asciz	"double resume (current)"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_fiber_switch
.subsections_via_symbols
