	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_csr_fw_dmc
_parse_csr_fw_dmc:                      ## @parse_csr_fw_dmc
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	24(%rdi), %rdi
	callq	_ARRAY_SIZE
	movq	_DMC_V3_MAX_MMIO_COUNT@GOTPCREL(%rip), %rbx
	movl	$1, %edi
	cmpq	(%rbx), %rax
	jl	LBB0_2
## %bb.1:
	movq	24(%r13), %rdi
	callq	_ARRAY_SIZE
	movq	_DMC_V1_MAX_MMIO_COUNT@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
LBB0_2:
	callq	_BUILD_BUG_ON
	cmpq	$12, %r15
	jae	LBB0_3
LBB0_28:
	leaq	L_.str.6(%rip), %rdi
LBB0_29:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_30
LBB0_3:
	movl	(%r14), %esi
	cmpl	$1, %esi
	je	LBB0_7
## %bb.4:
	cmpl	$3, %esi
	jne	LBB0_11
## %bb.5:
	cmpq	$24, %r15
	jb	LBB0_28
## %bb.6:
	movl	4(%r14), %esi
	shll	$2, %esi
	cmpl	$24, %esi
	je	LBB0_14
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_12
LBB0_7:
	cmpq	$24, %r15
	jb	LBB0_28
## %bb.8:
	movl	4(%r14), %esi
	movq	_DMC_V1_MAX_MMIO_COUNT@GOTPCREL(%rip), %rbx
	cmpl	$24, %esi
	jne	LBB0_10
LBB0_14:
	movl	16(%r14), %esi
	cmpl	(%rbx), %esi
	jbe	LBB0_15
## %bb.31:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str(%rip), %rdi
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_30:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	8(%r14), %rdx
	testl	%esi, %esi
	je	LBB0_22
## %bb.16:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx,4), %eax
	movq	_CSR_MMIO_START_RANGE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jb	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	_CSR_MMIO_END_RANGE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	ja	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	%eax, %edi
	movq	%rdx, %r12
	movq	%r14, %r15
	movq	%rsi, %r14
	callq	__MMIO
	movq	%r12, %rdx
	movq	24(%r13), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movl	(%r12,%rbx,4), %eax
	movq	(%r13), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movq	%r14, %rsi
	movq	%r15, %r14
	incq	%rbx
	cmpq	%rbx, %rsi
	jne	LBB0_17
## %bb.21:
	movl	8(%r14), %edx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_22:
	movl	%esi, 8(%r13)
	addq	$-24, %r15
	leal	(,%rdx,4), %r12d
	cmpq	%r12, %r15
	jb	LBB0_28
## %bb.23:
	cmpl	12(%r13), %r12d
	jbe	LBB0_25
## %bb.24:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
	jmp	LBB0_13
LBB0_19:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	jmp	LBB0_13
LBB0_25:
	movl	%edx, 16(%r13)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_kmalloc
	movl	%eax, 20(%r13)
	testl	%eax, %eax
	je	LBB0_26
## %bb.27:
	addq	$96, %r14
	movl	%eax, %edi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	addl	$24, %r12d
	movl	%r12d, %ebx
	jmp	LBB0_30
LBB0_26:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_DMC_V3_MAX_MMIO_COUNT,8,3      ## @DMC_V3_MAX_MMIO_COUNT
	.comm	_DMC_V1_MAX_MMIO_COUNT,8,3      ## @DMC_V1_MAX_MMIO_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown DMC fw header version: %u\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"DMC firmware has wrong mmio count %u\n"

	.comm	_CSR_MMIO_START_RANGE,4,2       ## @CSR_MMIO_START_RANGE
	.comm	_CSR_MMIO_END_RANGE,4,2         ## @CSR_MMIO_END_RANGE
L_.str.3:                               ## @.str.3
	.asciz	"DMC firmware has wrong mmio address 0x%x\n"

L_.str.4:                               ## @.str.4
	.asciz	"DMC FW too big (%u bytes)\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.5:                               ## @.str.5
	.asciz	"Memory allocation failed for dmc payload\n"

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

	.no_dead_strip	_parse_csr_fw_dmc
.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_dmc
_parse_csr_fw_dmc:                      ; @parse_csr_fw_dmc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x0, #24]
	bl	_ARRAY_SIZE
Lloh0:
	adrp	x8, _DMC_V3_MAX_MMIO_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMC_V3_MAX_MMIO_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	ldr	x0, [x20, #24]
	bl	_ARRAY_SIZE
Lloh3:
	adrp	x8, _DMC_V1_MAX_MMIO_COUNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMC_V1_MAX_MMIO_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, lt
LBB0_3:
	bl	_BUILD_BUG_ON
	cmp	x21, #12
	b.hs	LBB0_7
LBB0_4:
Lloh6:
	adrp	x0, l_.str.6@PAGE
Lloh7:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_5:
	bl	_DRM_ERROR
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	ldr	w8, [x19]
	cmp	w8, #1
	b.eq	LBB0_12
; %bb.8:
	cmp	w8, #3
	b.ne	LBB0_16
; %bb.9:
	cmp	x21, #24
	b.lo	LBB0_4
; %bb.10:
	ldr	w8, [x19, #4]
	lsl	w8, w8, #2
Lloh8:
	adrp	x9, _DMC_V3_MAX_MMIO_COUNT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DMC_V3_MAX_MMIO_COUNT@GOTPAGEOFF]
	cmp	w8, #24
	b.eq	LBB0_14
LBB0_11:
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_12:
	cmp	x21, #24
	b.lo	LBB0_4
; %bb.13:
	ldr	w8, [x19, #4]
Lloh12:
	adrp	x9, _DMC_V1_MAX_MMIO_COUNT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DMC_V1_MAX_MMIO_COUNT@GOTPAGEOFF]
	cmp	w8, #24
	b.ne	LBB0_11
LBB0_14:
	ldr	w23, [x19, #16]
	ldr	w8, [x9]
	cmp	w23, w8
	b.ls	LBB0_17
; %bb.15:
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	str	x23, [sp]
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_16:
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_17:
	ldr	x22, [x19, #8]
	cbz	w23, LBB0_22
; %bb.18:
	mov	x24, #0
	ldr	x25, [x19]
	lsl	x26, x23, #2
Lloh18:
	adrp	x27, _CSR_MMIO_START_RANGE@GOTPAGE
Lloh19:
	ldr	x27, [x27, _CSR_MMIO_START_RANGE@GOTPAGEOFF]
Lloh20:
	adrp	x28, _CSR_MMIO_END_RANGE@GOTPAGE
Lloh21:
	ldr	x28, [x28, _CSR_MMIO_END_RANGE@GOTPAGEOFF]
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25, x24]
	ldr	w8, [x27]
	ldr	w9, [x28]
	cmp	w0, w8
	ccmp	w0, w9, #2, hs
	b.hi	LBB0_25
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	__MMIO
	ldr	x8, [x20, #24]
	str	w0, [x8, x24]
	ldr	w8, [x22, x24]
	ldr	x9, [x20]
	str	w8, [x9, x24]
	add	x24, x24, #4
	cmp	x26, x24
	b.ne	LBB0_19
; %bb.21:
	ldr	w22, [x19, #8]
LBB0_22:
	str	w23, [x20, #8]
	sub	x8, x21, #24
	lsl	w21, w22, #2
	cmp	x8, x21
	b.lo	LBB0_4
; %bb.23:
	ldr	w8, [x20, #12]
	cmp	w21, w8
	b.ls	LBB0_26
; %bb.24:
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_25:
	str	x0, [sp]
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_26:
	str	w22, [x20, #16]
Lloh26:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kmalloc
	str	w0, [x20, #20]
	cbz	w0, LBB0_28
; %bb.27:
	add	x1, x19, #96
	mov	x2, x21
	bl	_memcpy
	add	w0, w21, #24
	b	LBB0_6
LBB0_28:
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_DMC_V3_MAX_MMIO_COUNT,8,3      ; @DMC_V3_MAX_MMIO_COUNT
	.comm	_DMC_V1_MAX_MMIO_COUNT,8,3      ; @DMC_V1_MAX_MMIO_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown DMC fw header version: %u\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"DMC firmware has wrong mmio count %u\n"

	.comm	_CSR_MMIO_START_RANGE,4,2       ; @CSR_MMIO_START_RANGE
	.comm	_CSR_MMIO_END_RANGE,4,2         ; @CSR_MMIO_END_RANGE
l_.str.3:                               ; @.str.3
	.asciz	"DMC firmware has wrong mmio address 0x%x\n"

l_.str.4:                               ; @.str.4
	.asciz	"DMC FW too big (%u bytes)\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.5:                               ; @.str.5
	.asciz	"Memory allocation failed for dmc payload\n"

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

	.no_dead_strip	_parse_csr_fw_dmc
.subsections_via_symbols
