	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function change_gen_gc_mode
_change_gen_gc_mode:                    ## @change_gen_gc_mode
	.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, %r15
	cmpq	$0, 40(%rsi)
	jne	LBB0_10
## %bb.1:
	movq	%rsi, %rbx
	cmpq	$0, 32(%rsi)
	je	LBB0_2
LBB0_10:
	movq	_E_RUNTIME_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mrb_raise                      ## TAILCALL
LBB0_2:
	movq	%rdx, %r14
	movq	%rbx, %rdi
	callq	_is_generational
	testq	%r14, %r14
	jne	LBB0_5
## %bb.3:
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_clear_all_old
	movq	(%rbx), %rax
	movq	_MRB_GC_STATE_ROOT@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_mrb_assert
	jmp	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	callq	_is_generational
	testq	%r14, %r14
	je	LBB0_9
## %bb.6:
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movq	_MRB_GC_STATE_ROOT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_incremental_gc_until
	movslq	12(%rbx), %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	movq	_MAJOR_GC_INC_RATIO@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	%eax, 8(%rbx)
LBB0_8:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
LBB0_9:
	movq	%r14, 16(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E_RUNTIME_ERROR,4,2            ## @E_RUNTIME_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"generational mode changed when GC disabled"

	.comm	_MRB_GC_STATE_ROOT,8,3          ## @MRB_GC_STATE_ROOT
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_MAJOR_GC_INC_RATIO,4,2         ## @MAJOR_GC_INC_RATIO
	.no_dead_strip	_change_gen_gc_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function change_gen_gc_mode
_change_gen_gc_mode:                    ; @change_gen_gc_mode
	.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
	mov	x21, x0
	ldr	x8, [x1, #40]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x20, x1
	ldr	x8, [x1, #32]
	cbz	x8, LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _E_RUNTIME_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E_RUNTIME_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	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	_mrb_raise
LBB0_3:
	mov	x19, x2
	mov	x0, x20
	bl	_is_generational
	cbnz	x19, LBB0_6
; %bb.4:
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x21
	mov	x1, x20
	bl	_clear_all_old
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _MRB_GC_STATE_ROOT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MRB_GC_STATE_ROOT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_mrb_assert
	b	LBB0_9
LBB0_6:
	mov	x0, x20
	bl	_is_generational
	cbz	x19, LBB0_10
; %bb.7:
	cbnz	x0, LBB0_10
; %bb.8:
Lloh8:
	adrp	x8, _MRB_GC_STATE_ROOT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MRB_GC_STATE_ROOT@GOTPAGEOFF]
Lloh10:
	ldr	x2, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_incremental_gc_until
	ldrsw	x8, [x20, #12]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
Lloh11:
	adrp	x9, _MAJOR_GC_INC_RATIO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MAJOR_GC_INC_RATIO@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	mul	w8, w8, w9
	str	w8, [x20, #8]
LBB0_9:
Lloh14:
	adrp	x8, _FALSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	x8, [x20, #24]
LBB0_10:
	str	x19, [x20, #16]
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_E_RUNTIME_ERROR,4,2            ; @E_RUNTIME_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"generational mode changed when GC disabled"

	.comm	_MRB_GC_STATE_ROOT,8,3          ; @MRB_GC_STATE_ROOT
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_MAJOR_GC_INC_RATIO,4,2         ; @MAJOR_GC_INC_RATIO
	.no_dead_strip	_change_gen_gc_mode
.subsections_via_symbols
