	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cs2ChangeCDCore                ## -- Begin function Cs2ChangeCDCore
	.p2align	4, 0x90
_Cs2ChangeCDCore:                       ## @Cs2ChangeCDCore
	.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	%rsi, %r14
	movl	%edi, %ebx
	movq	_Cs2Area@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	*24(%rcx)
LBB0_2:
	movq	_CDCORE_DEFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	%ebx, (%rcx)
	cmovnel	%ebx, %eax
	movq	_CDCoreList@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.3:
	addq	$8, %rcx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, (%rdx)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rcx), %rdx
	addq	$8, %rcx
	testq	%rdx, %rdx
	jne	LBB0_5
	jmp	LBB0_7
LBB0_6:
	movq	(%r15), %rax
	movq	%rdx, 8(%rax)
LBB0_7:
	movq	(%r15), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.9:
	movq	%r14, %rdi
	callq	*8(%rcx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	_YAB_ERR_CANNOTINIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rax
	movq	8(%rax), %rax
	movq	16(%rax), %rsi
	callq	_YabSetError
	movq	(%r15), %rax
	movq	_DummyCD@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	jmp	LBB0_12
LBB0_8:
	movq	_DummyCD@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	movl	$-1, %ebx
	jmp	LBB0_13
LBB0_10:
	movq	(%r15), %rax
LBB0_12:
	movl	$1, (%rax)
	movq	_CDB_STAT_PAUSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_SmpcRecheckRegion
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Cs2Area,8,3                    ## @Cs2Area
	.comm	_CDCORE_DEFAULT,4,2             ## @CDCORE_DEFAULT
	.comm	_CDCoreList,8,3                 ## @CDCoreList
	.comm	_DummyCD,32,3                   ## @DummyCD
	.comm	_YAB_ERR_CANNOTINIT,4,2         ## @YAB_ERR_CANNOTINIT
	.comm	_CDB_STAT_PAUSE,4,2             ## @CDB_STAT_PAUSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cs2ChangeCDCore                ; -- Begin function Cs2ChangeCDCore
	.p2align	2
_Cs2ChangeCDCore:                       ; @Cs2ChangeCDCore
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _Cs2Area@GOTPAGE
Lloh1:
	ldr	x21, [x21, _Cs2Area@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x8, #24]
	blr	x8
LBB0_2:
Lloh2:
	adrp	x8, _CDCORE_DEFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CDCORE_DEFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w20
	csel	w8, wzr, w20, eq
Lloh5:
	adrp	x9, _CDCoreList@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CDCoreList@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x9]
	ldr	x9, [x10]
	cbz	x9, LBB0_7
; %bb.3:
	add	x10, x10, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9]
	cmp	w11, w8
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x10], #8
	cbnz	x9, LBB0_4
	b	LBB0_7
LBB0_6:
	ldr	x8, [x21]
	str	x9, [x8, #8]
LBB0_7:
	ldr	x8, [x21]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_10
; %bb.8:
	ldr	x8, [x9, #8]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_11
; %bb.9:
Lloh8:
	adrp	x8, _YAB_ERR_CANNOTINIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _YAB_ERR_CANNOTINIT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	ldr	x1, [x8, #16]
	bl	_YabSetError
	ldr	x8, [x21]
Lloh11:
	adrp	x9, _DummyCD@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DummyCD@GOTPAGEOFF]
	str	x9, [x8, #8]
	b	LBB0_12
LBB0_10:
Lloh13:
	adrp	x9, _DummyCD@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DummyCD@GOTPAGEOFF]
	str	x9, [x8, #8]
	mov	w0, #-1
	b	LBB0_13
LBB0_11:
	ldr	x8, [x21]
LBB0_12:
	mov	w9, #1
	str	w9, [x8]
Lloh15:
	adrp	x9, _CDB_STAT_PAUSE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CDB_STAT_PAUSE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	str	w9, [x8, #4]
	bl	_SmpcRecheckRegion
	mov	w0, #0
LBB0_13:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_Cs2Area,8,3                    ; @Cs2Area
	.comm	_CDCORE_DEFAULT,4,2             ; @CDCORE_DEFAULT
	.comm	_CDCoreList,8,3                 ; @CDCoreList
	.comm	_DummyCD,32,3                   ; @DummyCD
	.comm	_YAB_ERR_CANNOTINIT,4,2         ; @YAB_ERR_CANNOTINIT
	.comm	_CDB_STAT_PAUSE,4,2             ; @CDB_STAT_PAUSE
.subsections_via_symbols
