	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cs2ResetSelector               ## -- Begin function Cs2ResetSelector
	.p2align	4, 0x90
_Cs2ResetSelector:                      ## @Cs2ResetSelector
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_Cs2Area@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movzbl	16(%rax), %edx
	testl	%edx, %edx
	je	LBB0_1
## %bb.11:
	testb	$-128, %dl
	je	LBB0_20
## %bb.12:
	movq	_MAX_SELECTORS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.13:
	movq	64(%rax), %rsi
	leaq	-1(%rdi), %rcx
	movl	%edi, %r8d
	andl	$3, %r8d
	cmpq	$3, %rcx
	jae	LBB0_15
## %bb.14:
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_1:
	movl	20(%rax), %ecx
	sarl	$8, %ecx
	movslq	%ecx, %r14
	movq	_MAX_SELECTORS@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	jbe	LBB0_6
## %bb.2:
	movq	48(%rax), %rcx
	movq	%r14, %r12
	shlq	$5, %r12
	cmpq	$0, (%rcx,%r12)
	je	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rcx,%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_Cs2FreeBlock
	movq	(%r15), %rax
	movq	48(%rax), %rax
	movq	24(%rax,%r12), %rax
	movq	$0, (%rax,%rbx,8)
	movq	(%r15), %rax
	movq	48(%rax), %rcx
	movq	8(%rcx,%r12), %rdx
	movl	$255, (%rdx,%rbx,4)
	incq	%rbx
	cmpq	(%rcx,%r12), %rbx
	jb	LBB0_4
LBB0_5:
	leaq	(%rcx,%r12), %rdx
	movl	$-1, 16(%rcx,%r12)
	movq	$0, (%rdx)
LBB0_6:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.7:
	movq	$0, 56(%rax)
	cmpl	$200, %ecx
	je	LBB0_38
LBB0_8:
	cmpq	%r14, 8(%rax)
	je	LBB0_9
	jmp	LBB0_10
LBB0_15:
	andq	$-4, %rdi
	xorl	%ebx, %ebx
	movq	%rsi, %rcx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	$255, (%rcx)
	movl	$255, 80(%rcx)
	movl	$255, 160(%rcx)
	movl	$255, 240(%rcx)
	addq	$4, %rbx
	addq	$320, %rcx                      ## imm = 0x140
	cmpq	%rbx, %rdi
	jne	LBB0_16
LBB0_17:
	testq	%r8, %r8
	je	LBB0_20
## %bb.18:
	leaq	(%rbx,%rbx,4), %rcx
	shlq	$4, %rcx
	addq	%rcx, %rsi
	shlq	$4, %r8
	leaq	(%r8,%r8,4), %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	$255, (%rsi,%rdi)
	addq	$80, %rdi
	cmpq	%rdi, %rcx
	jne	LBB0_19
LBB0_20:
	movq	_MAX_SELECTORS@GOTPCREL(%rip), %r9
	movq	(%r9), %rcx
	testb	$64, %dl
	je	LBB0_24
## %bb.21:
	testq	%rcx, %rcx
	je	LBB0_24
## %bb.22:
	movq	64(%rax), %rsi
	addq	$72, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdi, (%rsi)
	incq	%rdi
	movq	(%r9), %rcx
	addq	$80, %rsi
	cmpq	%rcx, %rdi
	jb	LBB0_23
LBB0_24:
	testb	$16, %dl
	je	LBB0_28
## %bb.25:
	testq	%rcx, %rcx
	je	LBB0_28
## %bb.26:
	movq	64(%rax), %rsi
	addq	$4, %rsi
	xorl	%edi, %edi
	xorps	%xmm0, %xmm0
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movl	$-1, (%rsi)
	incq	%rdi
	movups	%xmm0, 4(%rsi)
	movups	%xmm0, 52(%rsi)
	movups	%xmm0, 20(%rsi)
	movups	%xmm0, 36(%rsi)
	movq	(%r9), %rcx
	addq	$80, %rsi
	cmpq	%rcx, %rdi
	jb	LBB0_27
LBB0_28:
	testb	$4, %dl
	je	LBB0_10
## %bb.29:
	movq	$0, 56(%rax)
	testq	%rcx, %rcx
	je	LBB0_34
## %bb.30:
	xorl	%r11d, %r11d
	movq	_MAX_BLOCKS@GOTPCREL(%rip), %r8
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_43:                                ##   in Loop: Header=BB0_31 Depth=1
	incq	%r11
	cmpq	(%r9), %r11
	jae	LBB0_35
LBB0_31:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_40 Depth 2
	movq	48(%rax), %rcx
	movq	%r11, %rdx
	shlq	$5, %rdx
	movl	$-1, 16(%rcx,%rdx)
	movq	$0, (%rcx,%rdx)
	movq	(%r8), %r10
	testq	%r10, %r10
	je	LBB0_43
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=1
	cmpq	$1, %r10
	jne	LBB0_39
## %bb.33:                              ##   in Loop: Header=BB0_31 Depth=1
                                        ## implicit-def: $rax
	xorl	%ebx, %ebx
	jmp	LBB0_41
	.p2align	4, 0x90
LBB0_39:                                ##   in Loop: Header=BB0_31 Depth=1
	movq	%r10, %rdi
	andq	$-2, %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_40:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	24(%rcx,%rdx), %rax
	movq	$0, (%rax,%rbx,8)
	movq	(%r15), %rax
	movq	48(%rax), %rax
	movq	8(%rax,%rdx), %rcx
	movl	$255, (%rcx,%rbx,4)
	movq	24(%rax,%rdx), %rax
	movq	$0, 8(%rax,%rbx,8)
	movq	(%r15), %rax
	movq	48(%rax), %rcx
	movq	8(%rcx,%rdx), %rsi
	movl	$255, 4(%rsi,%rbx,4)
	addq	$2, %rbx
	cmpq	%rbx, %rdi
	jne	LBB0_40
LBB0_41:                                ##   in Loop: Header=BB0_31 Depth=1
	testb	$1, %r10b
	je	LBB0_43
## %bb.42:                              ##   in Loop: Header=BB0_31 Depth=1
	movq	24(%rcx,%rdx), %rax
	movq	$0, (%rax,%rbx,8)
	movq	(%r15), %rax
	movq	48(%rax), %rcx
	movq	8(%rcx,%rdx), %rcx
	movl	$255, (%rcx,%rbx,4)
	jmp	LBB0_43
LBB0_34:
	movq	_MAX_BLOCKS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r10
LBB0_35:
	testq	%r10, %r10
	je	LBB0_38
## %bb.36:
	xorl	%ebx, %ebx
	movq	_MAX_BLOCKS@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%rax), %rax
	movl	$-1, (%rax,%rbx,8)
	movl	4(%rax,%rbx,8), %edi
	xorl	%esi, %esi
	movl	$2352, %edx                     ## imm = 0x930
	callq	_memset
	incq	%rbx
	movq	(%r15), %rax
	cmpq	(%r14), %rbx
	jb	LBB0_37
LBB0_38:
	movq	$0, 32(%rax)
LBB0_9:
	movl	$-1, 4(%rax)
LBB0_10:
	movl	28(%rax), %edi
	callq	_doCDReport
	movq	_CDB_HIRQ_CMOK@GOTPCREL(%rip), %rax
	movq	_CDB_HIRQ_ESEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	(%r15), %rax
	orl	%ecx, 24(%rax)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Cs2Area,8,3                    ## @Cs2Area
	.comm	_MAX_SELECTORS,8,3              ## @MAX_SELECTORS
	.comm	_CDB_HIRQ_CMOK,4,2              ## @CDB_HIRQ_CMOK
	.comm	_CDB_HIRQ_ESEL,4,2              ## @CDB_HIRQ_ESEL
	.comm	_MAX_BLOCKS,8,3                 ## @MAX_BLOCKS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cs2ResetSelector               ; -- Begin function Cs2ResetSelector
	.p2align	2
_Cs2ResetSelector:                      ; @Cs2ResetSelector
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x19, _Cs2Area@GOTPAGE
Lloh1:
	ldr	x19, [x19, _Cs2Area@GOTPAGEOFF]
	ldr	x8, [x19]
	ldrb	w10, [x8, #16]
	cbz	w10, LBB0_5
; %bb.1:
Lloh2:
	adrp	x9, _MAX_SELECTORS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_SELECTORS@GOTPAGEOFF]
	tbz	w10, #7, LBB0_18
; %bb.2:
	ldr	x11, [x9]
	cbz	x11, LBB0_18
; %bb.3:
	ldr	x12, [x8, #64]
	cmp	x11, #4
	b.hs	LBB0_13
; %bb.4:
	mov	x13, #0
	b	LBB0_16
LBB0_5:
	ldr	w9, [x8, #20]
	sbfx	x20, x9, #8, #24
Lloh4:
	adrp	x9, _MAX_SELECTORS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MAX_SELECTORS@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x9, x20
	b.ls	LBB0_10
; %bb.6:
	ldr	x9, [x8, #48]
	add	x10, x9, x20, lsl #5
	ldr	x11, [x10]
	cbz	x11, LBB0_9
; %bb.7:
	mov	x21, #0
	lsl	x22, x20, #5
	mov	w23, #255
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x9, x22
	ldr	x8, [x8, #24]
	lsl	x24, x21, #3
	ldr	x0, [x8, x24]
	bl	_Cs2FreeBlock
	ldr	x8, [x19]
	ldr	x8, [x8, #48]
	add	x8, x8, x22
	ldr	x8, [x8, #24]
	str	xzr, [x8, x24]
	ldr	x8, [x19]
	ldr	x9, [x8, #48]
	add	x10, x9, x22
	ldp	x12, x11, [x10]
	str	w23, [x11, x21, lsl #2]
	add	x21, x21, #1
	cmp	x21, x12
	b.lo	LBB0_8
LBB0_9:
	add	x9, x9, x20, lsl #5
	mov	w11, #-1
	str	w11, [x9, #16]
	str	xzr, [x10]
LBB0_10:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.11:
	str	xzr, [x8, #56]
	cmp	w9, #200
	b.eq	LBB0_37
LBB0_12:
	ldr	x9, [x8, #8]
	cmp	x9, x20
	b.eq	LBB0_38
	b	LBB0_39
LBB0_13:
	and	x13, x11, #0xfffffffffffffffc
	add	x14, x12, #160
	mov	w15, #255
	mov	x16, x13
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	stur	w15, [x14, #-160]
	stur	w15, [x14, #-80]
	str	w15, [x14]
	str	w15, [x14, #80]
	add	x14, x14, #320
	subs	x16, x16, #4
	b.ne	LBB0_14
; %bb.15:
	cmp	x11, x13
	b.eq	LBB0_18
LBB0_16:
	sub	x11, x11, x13
	mov	w14, #80
	madd	x12, x13, x14, x12
	mov	w13, #255
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	str	w13, [x12], #80
	subs	x11, x11, #1
	b.ne	LBB0_17
LBB0_18:
	ldr	x11, [x9]
	tbz	w10, #6, LBB0_22
; %bb.19:
	cbz	x11, LBB0_22
; %bb.20:
	mov	x12, #0
	ldr	x11, [x8, #64]
	add	x13, x11, #72
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	str	x12, [x13], #80
	add	x12, x12, #1
	ldr	x11, [x9]
	cmp	x12, x11
	b.lo	LBB0_21
LBB0_22:
	tbz	w10, #4, LBB0_26
; %bb.23:
	cbz	x11, LBB0_26
; %bb.24:
	mov	x12, #0
	ldr	x11, [x8, #64]
	add	x13, x11, #64
	mov	w14, #-1
	movi.2d	v0, #0000000000000000
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	stur	w14, [x13, #-60]
	add	x12, x12, #1
	stp	xzr, xzr, [x13, #-8]
	stur	q0, [x13, #-56]
	stur	q0, [x13, #-40]
	stur	q0, [x13, #-24]
	ldr	x11, [x9]
	add	x13, x13, #80
	cmp	x12, x11
	b.lo	LBB0_25
LBB0_26:
	tbz	w10, #2, LBB0_39
; %bb.27:
	str	xzr, [x8, #56]
Lloh7:
	adrp	x20, _MAX_BLOCKS@GOTPAGE
Lloh8:
	ldr	x20, [x20, _MAX_BLOCKS@GOTPAGEOFF]
	cbz	x11, LBB0_33
; %bb.28:
	mov	x10, #0
	mov	w11, #-1
	mov	w12, #255
	b	LBB0_30
LBB0_29:                                ;   in Loop: Header=BB0_30 Depth=1
	add	x10, x10, #1
	ldr	x14, [x9]
	cmp	x10, x14
	b.hs	LBB0_34
LBB0_30:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_32 Depth 2
	ldr	x14, [x8, #48]
	add	x13, x14, x10, lsl #5
	str	w11, [x13, #16]
	str	xzr, [x13]
	ldr	x13, [x20]
	cbz	x13, LBB0_29
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	mov	x15, #0
LBB0_32:                                ;   Parent Loop BB0_30 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x16, x10, #5
	add	x8, x14, x16
	ldr	x8, [x8, #24]
	str	xzr, [x8, x15, lsl #3]
	ldr	x8, [x19]
	ldr	x14, [x8, #48]
	add	x16, x14, x16
	ldr	x16, [x16, #8]
	str	w12, [x16, x15, lsl #2]
	add	x15, x15, #1
	cmp	x13, x15
	b.ne	LBB0_32
	b	LBB0_29
LBB0_33:
	ldr	x13, [x20]
LBB0_34:
	cbz	x13, LBB0_37
; %bb.35:
	mov	x21, #0
	mov	x22, #0
	mov	w23, #-1
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #40]
	add	x8, x8, x21
	str	w23, [x8]
	ldr	w0, [x8, #4]
	mov	w1, #0
	mov	w2, #2352
	bl	_memset
	add	x22, x22, #1
	ldr	x9, [x20]
	ldr	x8, [x19]
	add	x21, x21, #8
	cmp	x22, x9
	b.lo	LBB0_36
LBB0_37:
	str	xzr, [x8, #32]
LBB0_38:
	mov	w9, #-1
	str	w9, [x8, #4]
LBB0_39:
	ldr	w0, [x8, #28]
	bl	_doCDReport
Lloh9:
	adrp	x8, _CDB_HIRQ_CMOK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CDB_HIRQ_CMOK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _CDB_HIRQ_ESEL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CDB_HIRQ_ESEL@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	x9, [x19]
	ldr	w10, [x9, #24]
	orr	w8, w8, w10
	str	w8, [x9, #24]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_Cs2Area,8,3                    ; @Cs2Area
	.comm	_MAX_SELECTORS,8,3              ; @MAX_SELECTORS
	.comm	_CDB_HIRQ_CMOK,4,2              ; @CDB_HIRQ_CMOK
	.comm	_CDB_HIRQ_ESEL,4,2              ; @CDB_HIRQ_ESEL
	.comm	_MAX_BLOCKS,8,3                 ; @MAX_BLOCKS
.subsections_via_symbols
