	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_sbi_write
_intel_sbi_write:                       ## @intel_sbi_write
	.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
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %ebx
	callq	_mutex_is_locked
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	_SBI_CTL_STAT@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_I915_READ
	movq	_SBI_BUSY@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	andl	(%r12), %eax
	sete	%dil
	movl	$100, %esi
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_4
LBB0_2:
	movq	_SBI_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$16, %ebx
	movl	%ebx, %esi
	callq	_I915_WRITE
	movq	_SBI_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_I915_WRITE
	movq	_SBI_ICLK@GOTPCREL(%rip), %rax
	movq	_SBI_CTL_DEST_ICLK@GOTPCREL(%rip), %rcx
	movq	_SBI_CTL_DEST_MPHY@GOTPCREL(%rip), %rdx
	movq	_SBI_CTL_OP_CRWR@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	movq	_SBI_CTL_OP_IOWR@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rcx), %edi
	orl	(%rdx), %esi
	cmpl	%r14d, (%rax)
	cmovel	%edi, %esi
	movl	(%r13), %edi
	orl	(%r12), %esi
	callq	_I915_WRITE
	movl	(%r13), %edi
	callq	_I915_READ
	movq	_SBI_RESPONSE_FAIL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%r12), %ecx
	xorl	%edi, %edi
	testl	%eax, %ecx
	sete	%dil
	movl	$100, %esi
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SBI_CTL_STAT,4,2               ## @SBI_CTL_STAT
	.comm	_SBI_BUSY,4,2                   ## @SBI_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for SBI to become ready\n"

	.comm	_SBI_ADDR,4,2                   ## @SBI_ADDR
	.comm	_SBI_DATA,4,2                   ## @SBI_DATA
	.comm	_SBI_ICLK,4,2                   ## @SBI_ICLK
	.comm	_SBI_CTL_DEST_ICLK,4,2          ## @SBI_CTL_DEST_ICLK
	.comm	_SBI_CTL_OP_CRWR,4,2            ## @SBI_CTL_OP_CRWR
	.comm	_SBI_CTL_DEST_MPHY,4,2          ## @SBI_CTL_DEST_MPHY
	.comm	_SBI_CTL_OP_IOWR,4,2            ## @SBI_CTL_OP_IOWR
	.comm	_SBI_RESPONSE_FAIL,4,2          ## @SBI_RESPONSE_FAIL
L_.str.1:                               ## @.str.1
	.asciz	"timeout waiting for SBI to complete write transaction\n"

	.no_dead_strip	_intel_sbi_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_sbi_write
_intel_sbi_write:                       ; @intel_sbi_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	bl	_mutex_is_locked
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
Lloh0:
	adrp	x22, _SBI_CTL_STAT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SBI_CTL_STAT@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
Lloh2:
	adrp	x23, _SBI_BUSY@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SBI_BUSY@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	cset	w0, eq
	mov	w1, #100
	bl	_wait_for
	cbz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _SBI_ADDR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SBI_ADDR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	lsl	w1, w21, #16
	bl	_I915_WRITE
Lloh9:
	adrp	x8, _SBI_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SBI_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_I915_WRITE
Lloh12:
	adrp	x8, _SBI_ICLK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SBI_ICLK@GOTPAGEOFF]
Lloh14:
	adrp	x9, _SBI_CTL_DEST_ICLK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SBI_CTL_DEST_ICLK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _SBI_CTL_DEST_MPHY@GOTPAGE
Lloh19:
	ldr	x10, [x10, _SBI_CTL_DEST_MPHY@GOTPAGEOFF]
Lloh20:
	adrp	x11, _SBI_CTL_OP_CRWR@GOTPAGE
Lloh21:
	ldr	x11, [x11, _SBI_CTL_OP_CRWR@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
Lloh23:
	ldr	w11, [x11]
Lloh24:
	adrp	x12, _SBI_CTL_OP_IOWR@GOTPAGE
Lloh25:
	ldr	x12, [x12, _SBI_CTL_OP_IOWR@GOTPAGEOFF]
Lloh26:
	ldr	w12, [x12]
	orr	w9, w11, w9
	orr	w10, w12, w10
	cmp	w8, w19
	csel	w8, w9, w10, eq
	ldr	w0, [x22]
	ldr	w9, [x23]
	orr	w1, w9, w8
	bl	_I915_WRITE
	ldr	w0, [x22]
	bl	_I915_READ
	ldr	w8, [x23]
Lloh27:
	adrp	x9, _SBI_RESPONSE_FAIL@GOTPAGE
Lloh28:
	ldr	x9, [x9, _SBI_RESPONSE_FAIL@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w0
	cset	w0, eq
	mov	w1, #100
	bl	_wait_for
	cbz	x0, LBB0_5
; %bb.3:
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_DRM_ERROR
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_SBI_CTL_STAT,4,2               ; @SBI_CTL_STAT
	.comm	_SBI_BUSY,4,2                   ; @SBI_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for SBI to become ready\n"

	.comm	_SBI_ADDR,4,2                   ; @SBI_ADDR
	.comm	_SBI_DATA,4,2                   ; @SBI_DATA
	.comm	_SBI_ICLK,4,2                   ; @SBI_ICLK
	.comm	_SBI_CTL_DEST_ICLK,4,2          ; @SBI_CTL_DEST_ICLK
	.comm	_SBI_CTL_OP_CRWR,4,2            ; @SBI_CTL_OP_CRWR
	.comm	_SBI_CTL_DEST_MPHY,4,2          ; @SBI_CTL_DEST_MPHY
	.comm	_SBI_CTL_OP_IOWR,4,2            ; @SBI_CTL_OP_IOWR
	.comm	_SBI_RESPONSE_FAIL,4,2          ; @SBI_RESPONSE_FAIL
l_.str.1:                               ; @.str.1
	.asciz	"timeout waiting for SBI to complete write transaction\n"

	.no_dead_strip	_intel_sbi_write
.subsections_via_symbols
