	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_csr_fw_package
_parse_csr_fw_package:                  ## @parse_csr_fw_package
	.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
	cmpq	$16, %rcx
	jb	LBB0_13
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	(%rsi), %esi
	cmpl	$1, %esi
	je	LBB0_2
## %bb.3:
	cmpl	$2, %esi
	jne	LBB0_8
## %bb.4:
	movq	_PACKAGE_V2_MAX_FW_INFO_ENTRIES@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	_PACKAGE_MAX_FW_INFO_ENTRIES@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %r12
	leaq	16(,%r12,4), %r15
	cmpq	%rcx, %r15
	jbe	LBB0_6
LBB0_13:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_14
LBB0_8:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_9
LBB0_6:
	movslq	4(%rbx), %rax
	shlq	$2, %rax
	cmpq	%rax, %r15
	jne	LBB0_7
## %bb.10:
	movq	8(%rbx), %r13
	xorl	%edi, %edi
	cmpq	%r12, %r13
	seta	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	cmoveq	%r13, %r12
	movl	(%rbx), %ecx
	addq	$64, %rbx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_find_dmc_fw_offset
	movq	_CSR_DEFAULT_FW_OFFSET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
LBB0_9:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_14
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_14
LBB0_12:
	leaq	(%r15,%rax,4), %rbx
LBB0_14:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKAGE_MAX_FW_INFO_ENTRIES,8,3 ## @PACKAGE_MAX_FW_INFO_ENTRIES
	.comm	_PACKAGE_V2_MAX_FW_INFO_ENTRIES,8,3 ## @PACKAGE_V2_MAX_FW_INFO_ENTRIES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMC firmware has unknown header version %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"DMC firmware has wrong package header length (%u bytes)\n"

	.comm	_CSR_DEFAULT_FW_OFFSET,8,3      ## @CSR_DEFAULT_FW_OFFSET
L_.str.2:                               ## @.str.2
	.asciz	"DMC firmware not supported for %c stepping\n"

L_.str.3:                               ## @.str.3
	.asciz	"Truncated DMC firmware, refusing.\n"

	.no_dead_strip	_parse_csr_fw_package
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_csr_fw_package
_parse_csr_fw_package:                  ; @parse_csr_fw_package
	.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
	cmp	x3, #16
	b.lo	LBB0_6
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	ldr	w8, [x1]
	cmp	w8, #1
	b.eq	LBB0_4
; %bb.2:
	cmp	w8, #2
	b.ne	LBB0_9
; %bb.3:
Lloh0:
	adrp	x8, _PACKAGE_V2_MAX_FW_INFO_ENTRIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PACKAGE_V2_MAX_FW_INFO_ENTRIES@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _PACKAGE_MAX_FW_INFO_ENTRIES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PACKAGE_MAX_FW_INFO_ENTRIES@GOTPAGEOFF]
LBB0_5:
	ldr	x22, [x8]
	lsl	x8, x22, #2
	add	x21, x8, #16
	cmp	x21, x3
	b.ls	LBB0_10
LBB0_6:
Lloh4:
	adrp	x0, l_.str.3@PAGE
Lloh5:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_7:
	bl	_DRM_ERROR
	mov	x0, #0
LBB0_8:
	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
LBB0_9:
	str	x8, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_10:
	ldrsw	x8, [x20, #4]
	cmp	x21, x8, lsl #2
	b.ne	LBB0_13
; %bb.11:
	ldr	x23, [x20, #8]
	cmp	x23, x22
	cset	w0, hi
	bl	_WARN_ON
	cmp	x0, #0
	csel	x1, x23, x22, eq
	add	x0, x20, #64
	ldr	w3, [x20]
	mov	x2, x19
	bl	_find_dmc_fw_offset
Lloh8:
	adrp	x8, _CSR_DEFAULT_FW_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CSR_DEFAULT_FW_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.12:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_13:
	str	x21, [sp]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_14:
	add	x0, x21, x0, lsl #2
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKAGE_MAX_FW_INFO_ENTRIES,8,3 ; @PACKAGE_MAX_FW_INFO_ENTRIES
	.comm	_PACKAGE_V2_MAX_FW_INFO_ENTRIES,8,3 ; @PACKAGE_V2_MAX_FW_INFO_ENTRIES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMC firmware has unknown header version %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"DMC firmware has wrong package header length (%u bytes)\n"

	.comm	_CSR_DEFAULT_FW_OFFSET,8,3      ; @CSR_DEFAULT_FW_OFFSET
l_.str.2:                               ; @.str.2
	.asciz	"DMC firmware not supported for %c stepping\n"

l_.str.3:                               ; @.str.3
	.asciz	"Truncated DMC firmware, refusing.\n"

	.no_dead_strip	_parse_csr_fw_package
.subsections_via_symbols
