	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_calc_cdu_validation_byte
_qed_calc_cdu_validation_byte:          ## @qed_calc_cdu_validation_byte
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r15d
	movl	%edi, %r14d
	movq	_CDU_VALIDATION_DEFAULT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	cmpb	$0, _qed_calc_cdu_validation_byte.crc8_table_valid(%rip)
	jne	LBB0_2
## %bb.1:
	movq	_cdu_crc8_table@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$7, %esi
	callq	_crc8_populate_msb
	movb	$1, _qed_calc_cdu_validation_byte.crc8_table_valid(%rip)
LBB0_2:
	movq	_CDU_CONTEXT_VALIDATION_CFG_USE_CID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, %ecx
	andl	$-1048576, %ecx                 ## imm = 0xFFF00000
	shll	$8, %ebx
	andl	$1048320, %ebx                  ## imm = 0xFFF00
	orl	%ecx, %ebx
	xorl	%edi, %edi
	btl	%eax, %r12d
	cmovael	%edi, %ebx
	movq	_CDU_CONTEXT_VALIDATION_CFG_USE_REGION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$4, %r15d
	btl	%eax, %r12d
	movzbl	%r15b, %eax
	cmovael	%edi, %eax
	orl	%ebx, %eax
	movq	_CDU_CONTEXT_VALIDATION_CFG_USE_TYPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	$15, %r14d
	btl	%ecx, %r12d
	cmovbl	%r14d, %edi
	orl	%eax, %edi
	callq	_be32_to_cpu
	movl	%eax, -36(%rbp)
	movq	_cdu_crc8_table@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CRC8_INIT_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-36(%rbp), %rsi
	movl	$4, %edx
	callq	_crc8
                                        ## kill: def $eax killed $eax def $rax
	movq	_CDU_CONTEXT_VALIDATION_CFG_USE_ACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_CDU_CONTEXT_VALIDATION_CFG_VALIDATION_TYPE_SHIFT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	btl	%edx, %r12d
	jae	LBB0_4
## %bb.3:
	andl	$7, %eax
	leal	(%rax,%r14,8), %eax
	jmp	LBB0_5
LBB0_4:
	andl	$127, %eax
LBB0_5:
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %r12d
	shll	$7, %r12d
	movzbl	%r12b, %ecx
	orl	%eax, %ecx
	movl	%ecx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDU_VALIDATION_DEFAULT_CFG,4,2 ## @CDU_VALIDATION_DEFAULT_CFG
.zerofill __DATA,__bss,_qed_calc_cdu_validation_byte.crc8_table_valid,1,2 ## @qed_calc_cdu_validation_byte.crc8_table_valid
	.comm	_cdu_crc8_table,4,2             ## @cdu_crc8_table
	.comm	_CDU_CONTEXT_VALIDATION_CFG_USE_CID,4,2 ## @CDU_CONTEXT_VALIDATION_CFG_USE_CID
	.comm	_CDU_CONTEXT_VALIDATION_CFG_USE_REGION,4,2 ## @CDU_CONTEXT_VALIDATION_CFG_USE_REGION
	.comm	_CDU_CONTEXT_VALIDATION_CFG_USE_TYPE,4,2 ## @CDU_CONTEXT_VALIDATION_CFG_USE_TYPE
	.comm	_CRC8_INIT_VALUE,4,2            ## @CRC8_INIT_VALUE
	.comm	_CDU_CONTEXT_VALIDATION_CFG_USE_ACTIVE,4,2 ## @CDU_CONTEXT_VALIDATION_CFG_USE_ACTIVE
	.comm	_CDU_CONTEXT_VALIDATION_CFG_VALIDATION_TYPE_SHIFT,4,2 ## @CDU_CONTEXT_VALIDATION_CFG_VALIDATION_TYPE_SHIFT
	.no_dead_strip	_qed_calc_cdu_validation_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_calc_cdu_validation_byte
_qed_calc_cdu_validation_byte:          ; @qed_calc_cdu_validation_byte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CDU_VALIDATION_DEFAULT_CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDU_VALIDATION_DEFAULT_CFG@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	adrp	x24, _qed_calc_cdu_validation_byte.crc8_table_valid@PAGE
	ldrb	w8, [x24, _qed_calc_cdu_validation_byte.crc8_table_valid@PAGEOFF]
Lloh3:
	adrp	x23, _cdu_crc8_table@GOTPAGE
Lloh4:
	ldr	x23, [x23, _cdu_crc8_table@GOTPAGEOFF]
	tbnz	w8, #0, LBB0_2
; %bb.1:
	ldr	w0, [x23]
	mov	w1, #7
	bl	_crc8_populate_msb
	mov	w8, #1
	strb	w8, [x24, _qed_calc_cdu_validation_byte.crc8_table_valid@PAGEOFF]
LBB0_2:
Lloh5:
	adrp	x8, _CDU_CONTEXT_VALIDATION_CFG_USE_CID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CDU_CONTEXT_VALIDATION_CFG_USE_CID@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w9, w21, #0xfff00000
	bfi	w9, w21, #8, #12
	lsr	w8, w22, w8
	sbfx	w8, w8, #0, #1
	and	w0, w8, w9
Lloh8:
	adrp	x8, _CDU_CONTEXT_VALIDATION_CFG_USE_REGION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CDU_CONTEXT_VALIDATION_CFG_USE_REGION@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	lsr	w8, w22, w8
	sbfx	w8, w8, #0, #1
	and	w8, w8, w20, lsl #4
Lloh11:
	adrp	x9, _CDU_CONTEXT_VALIDATION_CFG_USE_TYPE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CDU_CONTEXT_VALIDATION_CFG_USE_TYPE@GOTPAGEOFF]
	bfxil	w0, w8, #0, #8
Lloh13:
	ldr	w8, [x9]
	lsr	w8, w22, w8
	sbfx	w8, w8, #0, #1
	and	w8, w19, w8
	bfxil	w0, w8, #0, #4
	bl	_be32_to_cpu
	str	w0, [sp, #12]
	ldr	w0, [x23]
Lloh14:
	adrp	x8, _CRC8_INIT_VALUE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CRC8_INIT_VALUE@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	add	x1, sp, #12
	mov	w2, #4
	bl	_crc8
Lloh17:
	adrp	x8, _CDU_CONTEXT_VALIDATION_CFG_USE_ACTIVE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CDU_CONTEXT_VALIDATION_CFG_USE_ACTIVE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _CDU_CONTEXT_VALIDATION_CFG_VALIDATION_TYPE_SHIFT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CDU_CONTEXT_VALIDATION_CFG_VALIDATION_TYPE_SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	lsr	w9, w22, w9
	and	w10, w0, #0x7f
	and	w11, w0, #0x7
	bfi	w11, w19, #3, #4
	tst	w9, #0x1
	csel	w0, w10, w11, eq
	lsr	w8, w22, w8
	bfi	w0, w8, #7, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CDU_VALIDATION_DEFAULT_CFG,4,2 ; @CDU_VALIDATION_DEFAULT_CFG
.zerofill __DATA,__bss,_qed_calc_cdu_validation_byte.crc8_table_valid,1,2 ; @qed_calc_cdu_validation_byte.crc8_table_valid
	.comm	_cdu_crc8_table,4,2             ; @cdu_crc8_table
	.comm	_CDU_CONTEXT_VALIDATION_CFG_USE_CID,4,2 ; @CDU_CONTEXT_VALIDATION_CFG_USE_CID
	.comm	_CDU_CONTEXT_VALIDATION_CFG_USE_REGION,4,2 ; @CDU_CONTEXT_VALIDATION_CFG_USE_REGION
	.comm	_CDU_CONTEXT_VALIDATION_CFG_USE_TYPE,4,2 ; @CDU_CONTEXT_VALIDATION_CFG_USE_TYPE
	.comm	_CRC8_INIT_VALUE,4,2            ; @CRC8_INIT_VALUE
	.comm	_CDU_CONTEXT_VALIDATION_CFG_USE_ACTIVE,4,2 ; @CDU_CONTEXT_VALIDATION_CFG_USE_ACTIVE
	.comm	_CDU_CONTEXT_VALIDATION_CFG_VALIDATION_TYPE_SHIFT,4,2 ; @CDU_CONTEXT_VALIDATION_CFG_VALIDATION_TYPE_SHIFT
	.no_dead_strip	_qed_calc_cdu_validation_byte
.subsections_via_symbols
