	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_sbi_read
_intel_sbi_read:                        ## @intel_sbi_read
	.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
	movl	%edx, %r14d
	movl	%esi, %ebx
	callq	_mutex_is_locked
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	_SBI_CTL_STAT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_I915_READ
	movq	_SBI_BUSY@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	andl	(%r15), %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_ICLK@GOTPCREL(%rip), %rax
	movq	_SBI_CTL_DEST_ICLK@GOTPCREL(%rip), %rcx
	movq	_SBI_CTL_DEST_MPHY@GOTPCREL(%rip), %rdx
	movq	_SBI_CTL_OP_CRRD@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	movq	_SBI_CTL_OP_IORD@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rcx), %edi
	orl	(%rdx), %esi
	cmpl	%r14d, (%rax)
	cmovel	%edi, %esi
	movl	(%r12), %edi
	orl	(%r15), %esi
	callq	_I915_WRITE
	movl	(%r12), %edi
	callq	_I915_READ
	movq	_SBI_RESPONSE_FAIL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%r15), %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:
	callq	_DRM_ERROR
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_SBI_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_READ                      ## TAILCALL
	.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_ICLK,4,2                   ## @SBI_ICLK
	.comm	_SBI_CTL_DEST_ICLK,4,2          ## @SBI_CTL_DEST_ICLK
	.comm	_SBI_CTL_OP_CRRD,4,2            ## @SBI_CTL_OP_CRRD
	.comm	_SBI_CTL_DEST_MPHY,4,2          ## @SBI_CTL_DEST_MPHY
	.comm	_SBI_CTL_OP_IORD,4,2            ## @SBI_CTL_OP_IORD
	.comm	_SBI_RESPONSE_FAIL,4,2          ## @SBI_RESPONSE_FAIL
L_.str.1:                               ## @.str.1
	.asciz	"timeout waiting for SBI to complete read transaction\n"

	.comm	_SBI_DATA,4,2                   ## @SBI_DATA
	.no_dead_strip	_intel_sbi_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_sbi_read
_intel_sbi_read:                        ; @intel_sbi_read
	.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, x2
	mov	x20, x1
	bl	_mutex_is_locked
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
Lloh0:
	adrp	x21, _SBI_CTL_STAT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SBI_CTL_STAT@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_I915_READ
Lloh2:
	adrp	x22, _SBI_BUSY@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SBI_BUSY@GOTPAGEOFF]
	ldr	w8, [x22]
	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, w20, #16
	bl	_I915_WRITE
Lloh9:
	adrp	x8, _SBI_ICLK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SBI_ICLK@GOTPAGEOFF]
Lloh11:
	adrp	x9, _SBI_CTL_DEST_ICLK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SBI_CTL_DEST_ICLK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _SBI_CTL_DEST_MPHY@GOTPAGE
Lloh16:
	ldr	x10, [x10, _SBI_CTL_DEST_MPHY@GOTPAGEOFF]
Lloh17:
	adrp	x11, _SBI_CTL_OP_CRRD@GOTPAGE
Lloh18:
	ldr	x11, [x11, _SBI_CTL_OP_CRRD@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
Lloh20:
	ldr	w11, [x11]
Lloh21:
	adrp	x12, _SBI_CTL_OP_IORD@GOTPAGE
Lloh22:
	ldr	x12, [x12, _SBI_CTL_OP_IORD@GOTPAGEOFF]
Lloh23:
	ldr	w12, [x12]
	orr	w9, w11, w9
	orr	w10, w12, w10
	cmp	w8, w19
	csel	w8, w9, w10, eq
	ldr	w0, [x21]
	ldr	w9, [x22]
	orr	w1, w9, w8
	bl	_I915_WRITE
	ldr	w0, [x21]
	bl	_I915_READ
	ldr	w8, [x22]
Lloh24:
	adrp	x9, _SBI_RESPONSE_FAIL@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SBI_RESPONSE_FAIL@GOTPAGEOFF]
Lloh26:
	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:
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_DRM_ERROR
	mov	w0, #0
	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
	ret
LBB0_5:
Lloh29:
	adrp	x8, _SBI_DATA@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SBI_DATA@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	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	_I915_READ
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, 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_ICLK,4,2                   ; @SBI_ICLK
	.comm	_SBI_CTL_DEST_ICLK,4,2          ; @SBI_CTL_DEST_ICLK
	.comm	_SBI_CTL_OP_CRRD,4,2            ; @SBI_CTL_OP_CRRD
	.comm	_SBI_CTL_DEST_MPHY,4,2          ; @SBI_CTL_DEST_MPHY
	.comm	_SBI_CTL_OP_IORD,4,2            ; @SBI_CTL_OP_IORD
	.comm	_SBI_RESPONSE_FAIL,4,2          ; @SBI_RESPONSE_FAIL
l_.str.1:                               ; @.str.1
	.asciz	"timeout waiting for SBI to complete read transaction\n"

	.comm	_SBI_DATA,4,2                   ; @SBI_DATA
	.no_dead_strip	_intel_sbi_read
.subsections_via_symbols
