	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cs2AuthenticateDevice          ## -- Begin function Cs2AuthenticateDevice
	.p2align	4, 0x90
_Cs2AuthenticateDevice:                 ## @Cs2AuthenticateDevice
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_Cs2Area@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movzbl	16(%rax), %ecx
	movl	(%rax), %edi
	movl	%edi, %edx
	andl	$15, %edx
	movq	_CDB_STAT_NODISC@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	je	LBB0_6
## %bb.1:
	movq	_CDB_STAT_OPEN@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	je	LBB0_6
## %bb.2:
	movq	_CDB_STAT_BUSY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, (%rax)
	shll	$8, %edx
	orl	$255, %edx
	movl	%edx, 20(%rax)
	movl	$65535, 16(%rax)                ## imm = 0xFFFF
	movabsq	$281470681808895, %rdx          ## imm = 0xFFFF0000FFFF
	movq	%rdx, 24(%rax)
	cmpl	$1, %ecx
	jne	LBB0_4
## %bb.3:
	movq	_CDB_HIRQ_MPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 32(%rax)
	movl	$2, 4(%rax)
	jmp	LBB0_5
LBB0_6:
	cmpl	$1, %ecx
	jne	LBB0_8
## %bb.7:
	movq	_CDB_HIRQ_MPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 32(%rax)
	movl	$2, 4(%rax)
	jmp	LBB0_9
LBB0_4:
	movl	$1, 8(%rax)
	movq	_CDB_HIRQ_EFLS@GOTPCREL(%rip), %rcx
	movq	_CDB_HIRQ_CSCT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	orl	%edx, 32(%rax)
	movl	$4, 12(%rax)
LBB0_5:
	movq	_CDB_STAT_PAUSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%edi, (%rax)
	jmp	LBB0_9
LBB0_8:
	movq	_CDB_HIRQ_EFLS@GOTPCREL(%rip), %rcx
	movq	_CDB_HIRQ_CSCT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	orl	%edx, 32(%rax)
LBB0_9:
	callq	_doCDReport
	movq	_CDB_HIRQ_CMOK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rcx
	orl	%eax, 32(%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Cs2Area,8,3                    ## @Cs2Area
	.comm	_CDB_STAT_NODISC,4,2            ## @CDB_STAT_NODISC
	.comm	_CDB_STAT_OPEN,4,2              ## @CDB_STAT_OPEN
	.comm	_CDB_STAT_BUSY,4,2              ## @CDB_STAT_BUSY
	.comm	_CDB_HIRQ_MPED,4,2              ## @CDB_HIRQ_MPED
	.comm	_CDB_HIRQ_EFLS,4,2              ## @CDB_HIRQ_EFLS
	.comm	_CDB_HIRQ_CSCT,4,2              ## @CDB_HIRQ_CSCT
	.comm	_CDB_STAT_PAUSE,4,2             ## @CDB_STAT_PAUSE
	.comm	_CDB_HIRQ_CMOK,4,2              ## @CDB_HIRQ_CMOK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function Cs2AuthenticateDevice
lCPI0_0:
	.long	1                               ; 0x1
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_Cs2AuthenticateDevice
	.p2align	2
_Cs2AuthenticateDevice:                 ; @Cs2AuthenticateDevice
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _Cs2Area@GOTPAGE
Lloh1:
	ldr	x19, [x19, _Cs2Area@GOTPAGEOFF]
	ldr	x8, [x19]
	ldrb	w9, [x8, #16]
	ldr	w0, [x8]
	and	w10, w0, #0xf
Lloh2:
	adrp	x11, _CDB_STAT_NODISC@GOTPAGE
Lloh3:
	ldr	x11, [x11, _CDB_STAT_NODISC@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x11]
Lloh5:
	adrp	x12, _CDB_STAT_OPEN@GOTPAGE
Lloh6:
	ldr	x12, [x12, _CDB_STAT_OPEN@GOTPAGEOFF]
Lloh7:
	ldr	w12, [x12]
	cmp	w10, w11
	ccmp	w10, w12, #4, ne
	b.ne	LBB0_3
; %bb.1:
	cmp	w9, #1
	b.ne	LBB0_5
; %bb.2:
Lloh8:
	adrp	x9, _CDB_HIRQ_MPED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CDB_HIRQ_MPED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	ldr	w10, [x8, #32]
	orr	w9, w10, w9
	str	w9, [x8, #32]
	mov	w9, #2
	str	w9, [x8, #4]
	b	LBB0_8
LBB0_3:
Lloh11:
	adrp	x10, _CDB_STAT_BUSY@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CDB_STAT_BUSY@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	str	w10, [x8]
	mov	w11, #255
	bfi	w11, w10, #8, #24
	mov	w10, #65535
	stp	w10, w11, [x8, #16]
	movi	d0, #0x00ffff0000ffff
	str	d0, [x8, #24]
	cmp	w9, #1
	b.ne	LBB0_6
; %bb.4:
Lloh14:
	adrp	x9, _CDB_HIRQ_MPED@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CDB_HIRQ_MPED@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	ldr	w10, [x8, #32]
	orr	w9, w10, w9
	str	w9, [x8, #32]
	mov	w9, #2
	str	w9, [x8, #4]
	b	LBB0_7
LBB0_5:
Lloh17:
	adrp	x9, _CDB_HIRQ_EFLS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CDB_HIRQ_EFLS@GOTPAGEOFF]
Lloh19:
	adrp	x10, _CDB_HIRQ_CSCT@GOTPAGE
Lloh20:
	ldr	x10, [x10, _CDB_HIRQ_CSCT@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	w10, [x8, #32]
	orr	w9, w9, w10
	str	w9, [x8, #32]
	b	LBB0_8
LBB0_6:
Lloh23:
	adrp	x9, _CDB_HIRQ_EFLS@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CDB_HIRQ_EFLS@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
Lloh26:
	adrp	x10, _CDB_HIRQ_CSCT@GOTPAGE
Lloh27:
	ldr	x10, [x10, _CDB_HIRQ_CSCT@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	w10, [x8, #32]
	orr	w9, w9, w10
	str	w9, [x8, #32]
Lloh29:
	adrp	x9, lCPI0_0@PAGE
Lloh30:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x8, #8]
LBB0_7:
Lloh31:
	adrp	x9, _CDB_STAT_PAUSE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _CDB_STAT_PAUSE@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x9]
	str	w0, [x8]
LBB0_8:
	bl	_doCDReport
Lloh34:
	adrp	x8, _CDB_HIRQ_CMOK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CDB_HIRQ_CMOK@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	ldr	x9, [x19]
	ldr	w10, [x9, #32]
	orr	w8, w10, w8
	str	w8, [x9, #32]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdr	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_Cs2Area,8,3                    ; @Cs2Area
	.comm	_CDB_STAT_NODISC,4,2            ; @CDB_STAT_NODISC
	.comm	_CDB_STAT_OPEN,4,2              ; @CDB_STAT_OPEN
	.comm	_CDB_STAT_BUSY,4,2              ; @CDB_STAT_BUSY
	.comm	_CDB_HIRQ_MPED,4,2              ; @CDB_HIRQ_MPED
	.comm	_CDB_HIRQ_EFLS,4,2              ; @CDB_HIRQ_EFLS
	.comm	_CDB_HIRQ_CSCT,4,2              ; @CDB_HIRQ_CSCT
	.comm	_CDB_STAT_PAUSE,4,2             ; @CDB_STAT_PAUSE
	.comm	_CDB_HIRQ_CMOK,4,2              ; @CDB_HIRQ_CMOK
.subsections_via_symbols
