	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prepare_singleton_class
_prepare_singleton_class:               ## @prepare_singleton_class
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	8(%rsi), %rax
	movq	_MRB_TT_SCLASS@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	cmpq	%rsi, (%rax)
	jne	LBB0_1
## %bb.11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r14
	movq	(%rdi), %rdx
	callq	_mrb_obj_alloc
	movq	%rax, %r13
	movq	_MRB_FL_CLASS_IS_INHERITED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 36(%r13)
	movq	_mt@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_kh_init
	movl	%eax, 32(%r13)
	movq	$0, 24(%r13)
	movq	(%r15), %rax
	movq	_MRB_TT_CLASS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	movq	8(%r15), %rax
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	movq	(%r14), %rax
	movq	%rax, 8(%r13)
	jmp	LBB0_10
LBB0_4:
	cmpq	(%r12), %rax
	jne	LBB0_9
## %bb.5:
	movq	_MRB_TT_ICLASS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r15, %rsi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsi, %rbx
	movq	8(%rsi), %rsi
	cmpq	%rax, (%rsi)
	je	LBB0_6
## %bb.7:
	movq	%r14, %rdi
	callq	_make_metaclass
	movq	8(%rbx), %rax
LBB0_8:
	movq	16(%rax), %rax
	movq	%rax, 8(%r13)
	jmp	LBB0_10
LBB0_9:
	movq	8(%r15), %rax
	movq	%rax, 8(%r13)
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_prepare_singleton_class
LBB0_10:
	movq	%r13, 8(%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_mrb_field_write_barrier
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_mrb_field_write_barrier
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_mrb_intern_lit
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_mrb_obj_value
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mrb_obj_iv_set                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MRB_TT_SCLASS,8,3              ## @MRB_TT_SCLASS
	.comm	_MRB_FL_CLASS_IS_INHERITED,4,2  ## @MRB_FL_CLASS_IS_INHERITED
	.comm	_mt,4,2                         ## @mt
	.comm	_MRB_TT_CLASS,8,3               ## @MRB_TT_CLASS
	.comm	_MRB_TT_ICLASS,8,3              ## @MRB_TT_ICLASS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"__attached__"

	.no_dead_strip	_prepare_singleton_class
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prepare_singleton_class
_prepare_singleton_class:               ; @prepare_singleton_class
	.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	x20, x1
	ldr	x8, [x1, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x22, _MRB_TT_SCLASS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MRB_TT_SCLASS@GOTPAGEOFF]
	ldr	x1, [x22]
	cmp	x8, x1
	b.ne	LBB0_2
; %bb.1:
	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
LBB0_2:
	mov	x19, x0
	ldr	x2, [x0]
	bl	_mrb_obj_alloc
	mov	x21, x0
Lloh2:
	adrp	x8, _MRB_FL_CLASS_IS_INHERITED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MRB_FL_CLASS_IS_INHERITED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x0, #36]
	orr	w8, w9, w8
	str	w8, [x0, #36]
Lloh5:
	adrp	x8, _mt@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mt@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_kh_init
	str	w0, [x21, #32]
	str	xzr, [x21, #24]
	ldr	x8, [x20]
Lloh8:
	adrp	x9, _MRB_TT_CLASS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MRB_TT_CLASS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_9
; %bb.4:
	ldr	x8, [x19]
	str	x8, [x21, #8]
	b	LBB0_11
LBB0_5:
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.6:
Lloh11:
	adrp	x8, _MRB_TT_ICLASS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MRB_TT_ICLASS@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	mov	x1, x20
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, x1
	ldr	x1, [x1, #8]
	ldr	x9, [x1]
	cmp	x9, x8
	b.eq	LBB0_7
; %bb.8:
	mov	x0, x19
	bl	_make_metaclass
	ldr	x8, [x22, #8]
LBB0_9:
	ldr	x8, [x8, #16]
	str	x8, [x21, #8]
	b	LBB0_11
LBB0_10:
	ldr	x8, [x20, #8]
	str	x8, [x21, #8]
	mov	x0, x19
	mov	x1, x21
	bl	_prepare_singleton_class
LBB0_11:
	str	x21, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_mrb_field_write_barrier
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_mrb_field_write_barrier
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mrb_intern_lit
	mov	x22, x0
	mov	x0, x20
	bl	_mrb_obj_value
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	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_obj_iv_set
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MRB_TT_SCLASS,8,3              ; @MRB_TT_SCLASS
	.comm	_MRB_FL_CLASS_IS_INHERITED,4,2  ; @MRB_FL_CLASS_IS_INHERITED
	.comm	_mt,4,2                         ; @mt
	.comm	_MRB_TT_CLASS,8,3               ; @MRB_TT_CLASS
	.comm	_MRB_TT_ICLASS,8,3              ; @MRB_TT_ICLASS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"__attached__"

	.no_dead_strip	_prepare_singleton_class
.subsections_via_symbols
