	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_csr_load_program         ## -- Begin function intel_csr_load_program
	.p2align	4, 0x90
_intel_csr_load_program:                ## @intel_csr_load_program
	.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	%rdi, %r14
	movq	(%rdi), %r15
	callq	_HAS_CSR
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	cmpq	$0, (%r14)
	je	LBB0_4
## %bb.5:
	movq	8(%r14), %r12
	leaq	48(%r14), %rdi
	callq	_assert_rpm_wakelock_held
	xorl	%eax, %eax
	callq	_preempt_disable
	testq	%r12, %r12
	je	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_CSR_PROGRAM
	movq	(%r15,%rbx,8), %rsi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	callq	_preempt_enable
	cmpq	$0, 16(%r14)
	je	LBB0_11
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r14), %rax
	movq	40(%r14), %rcx
	movl	(%rcx,%rbx,4), %edi
	movl	(%rax,%rbx,4), %esi
	callq	_I915_WRITE
	incq	%rbx
	cmpq	16(%r14), %rbx
	jb	LBB0_10
LBB0_11:
	movq	$0, 24(%r14)
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gen9_set_dc_state_debugmask    ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No CSR support available for this platform\n"

L_.str.1:                               ## @.str.1
	.asciz	"Tried to program CSR with empty payload\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_csr_load_program         ; -- Begin function intel_csr_load_program
	.p2align	2
_intel_csr_load_program:                ; @intel_csr_load_program
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x21, [x0]
	bl	_HAS_CSR
	cbz	w0, LBB0_9
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.2:
	ldr	x22, [x19, #8]
	add	x0, x19, #48
	bl	_assert_rpm_wakelock_held
	bl	_preempt_disable
	cbz	x22, LBB0_5
; %bb.3:
	mov	x20, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_CSR_PROGRAM
	ldr	x1, [x21, x20, lsl #3]
	bl	_I915_WRITE_FW
	add	x20, x20, #1
	cmp	x22, x20
	b.ne	LBB0_4
LBB0_5:
	bl	_preempt_enable
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.6:
	mov	x20, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x8, x20, #2
	ldp	x10, x9, [x19, #32]
	ldr	w0, [x9, x8]
	ldr	w1, [x10, x8]
	bl	_I915_WRITE
	add	x20, x20, #1
	ldr	x8, [x19, #16]
	cmp	x20, x8
	b.lo	LBB0_7
LBB0_8:
	str	xzr, [x19, #24]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_gen9_set_dc_state_debugmask
LBB0_9:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_DRM_ERROR
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No CSR support available for this platform\n"

l_.str.1:                               ; @.str.1
	.asciz	"Tried to program CSR with empty payload\n"

.subsections_via_symbols
