	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vlv_sideband_rw
_vlv_sideband_rw:                       ## @vlv_sideband_rw
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	leaq	4(%rdi), %r13
	movq	_SB_MRD_NP@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	sete	%r14b
	movq	_SB_CRRDDA_NP@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	sete	%r12b
	callq	_lockdep_assert_held
	movq	_IOSF_PORT_PUNIT@GOTPCREL(%rip), %rax
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	cmpl	%ebx, (%rax)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_iosf_mbi_assert_punit_acquired
LBB0_2:
	orb	%r12b, %r14b
	movq	_VLV_IOSF_DOORBELL_REQ@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_IOSF_SB_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	movl	$5, %r8d
	callq	_intel_wait_for_register
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	testb	%r14b, %r14b
	cmovneq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_11
LBB0_4:
	xorl	%eax, %eax
	callq	_preempt_disable
	movq	_VLV_IOSF_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_intel_uncore_write_fw
	movq	_VLV_IOSF_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testb	%r14b, %r14b
	jne	LBB0_6
## %bb.5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r12d
LBB0_6:
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_intel_uncore_write_fw
	movq	_IOSF_DEVFN_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	shll	%cl, %edx
	movq	_IOSF_OPCODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	movq	_IOSF_PORT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	shll	%cl, %edi
	movl	(%rbx), %esi
	orl	%edx, %r15d
	movq	_IOSF_BYTE_ENABLES_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$15, %edx
	shll	%cl, %edx
	orl	%edi, %edx
	orl	%r15d, %edx
	movq	_IOSF_SB_BUSY@GOTPCREL(%rip), %r15
	orl	(%r15), %edx
	movq	%r13, %rdi
	callq	_intel_uncore_write_fw
	movl	(%rbx), %esi
	movl	(%r15), %edx
	movq	$0, (%rsp)
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	movl	$10000, %r8d                    ## imm = 0x2710
	xorl	%r9d, %r9d
	callq	___intel_wait_for_register_fw
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	testb	%r14b, %r14b
	cmovneq	%rax, %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_10
LBB0_7:
	testb	%r14b, %r14b
	je	LBB0_10
## %bb.8:
	movq	_VLV_IOSF_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_intel_uncore_read_fw
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_10:
	xorl	%eax, %eax
	callq	_preempt_enable
LBB0_11:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SB_MRD_NP,4,2                  ## @SB_MRD_NP
	.comm	_SB_CRRDDA_NP,4,2               ## @SB_CRRDDA_NP
	.comm	_IOSF_PORT_PUNIT,4,2            ## @IOSF_PORT_PUNIT
	.comm	_VLV_IOSF_DOORBELL_REQ,4,2      ## @VLV_IOSF_DOORBELL_REQ
	.comm	_IOSF_SB_BUSY,4,2               ## @IOSF_SB_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IOSF sideband idle wait (%s) timed out\n"

L_.str.1:                               ## @.str.1
	.asciz	"read"

L_.str.2:                               ## @.str.2
	.asciz	"write"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_VLV_IOSF_ADDR,4,2              ## @VLV_IOSF_ADDR
	.comm	_VLV_IOSF_DATA,4,2              ## @VLV_IOSF_DATA
	.comm	_IOSF_DEVFN_SHIFT,4,2           ## @IOSF_DEVFN_SHIFT
	.comm	_IOSF_OPCODE_SHIFT,4,2          ## @IOSF_OPCODE_SHIFT
	.comm	_IOSF_PORT_SHIFT,4,2            ## @IOSF_PORT_SHIFT
	.comm	_IOSF_BYTE_ENABLES_SHIFT,4,2    ## @IOSF_BYTE_ENABLES_SHIFT
	.comm	_IOSF_BAR_SHIFT,4,2             ## @IOSF_BAR_SHIFT
L_.str.3:                               ## @.str.3
	.asciz	"IOSF sideband finish wait (%s) timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_vlv_sideband_rw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vlv_sideband_rw
_vlv_sideband_rw:                       ; @vlv_sideband_rw
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x5
	mov	x24, x4
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	add	x20, x0, #4
Lloh0:
	adrp	x8, _SB_MRD_NP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SB_MRD_NP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w3
Lloh3:
	adrp	x8, _SB_CRRDDA_NP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SB_CRRDDA_NP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ccmp	w8, w3, #4, ne
	cset	w25, eq
	bl	_lockdep_assert_held
Lloh6:
	adrp	x8, _IOSF_PORT_PUNIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IOSF_PORT_PUNIT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
	bl	_iosf_mbi_assert_punit_acquired
LBB0_2:
Lloh9:
	adrp	x26, _VLV_IOSF_DOORBELL_REQ@GOTPAGE
Lloh10:
	ldr	x26, [x26, _VLV_IOSF_DOORBELL_REQ@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh11:
	adrp	x27, _IOSF_SB_BUSY@GOTPAGE
Lloh12:
	ldr	x27, [x27, _IOSF_SB_BUSY@GOTPAGEOFF]
	ldr	w2, [x27]
	mov	x0, x20
	mov	w3, #0
	mov	w4, #5
	bl	_intel_wait_for_register
	cbz	x0, LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, l_.str.2@PAGE
Lloh14:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh15:
	adrp	x9, l_.str.1@PAGE
Lloh16:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w25, #0
	csel	x1, x9, x8, ne
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
Lloh19:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_4:
	bl	_preempt_disable
Lloh22:
	adrp	x8, _VLV_IOSF_ADDR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _VLV_IOSF_ADDR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x24
	bl	_intel_uncore_write_fw
Lloh25:
	adrp	x24, _VLV_IOSF_DATA@GOTPAGE
Lloh26:
	ldr	x24, [x24, _VLV_IOSF_DATA@GOTPAGEOFF]
	ldr	w1, [x24]
	tbz	w25, #0, LBB0_6
; %bb.5:
	mov	w2, #0
	b	LBB0_7
LBB0_6:
	ldr	w2, [x19]
LBB0_7:
	mov	x0, x20
	bl	_intel_uncore_write_fw
	ldr	w1, [x26]
Lloh27:
	adrp	x8, _IOSF_DEVFN_SHIFT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IOSF_DEVFN_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	lsl	w8, w23, w8
Lloh30:
	adrp	x9, _IOSF_OPCODE_SHIFT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IOSF_OPCODE_SHIFT@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	lsl	w9, w22, w9
Lloh33:
	adrp	x10, _IOSF_PORT_SHIFT@GOTPAGE
Lloh34:
	ldr	x10, [x10, _IOSF_PORT_SHIFT@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh35:
	ldr	w9, [x10]
	lsl	w9, w21, w9
	orr	w8, w8, w9
Lloh36:
	adrp	x9, _IOSF_BYTE_ENABLES_SHIFT@GOTPAGE
Lloh37:
	ldr	x9, [x9, _IOSF_BYTE_ENABLES_SHIFT@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	mov	w10, #15
	lsl	w9, w10, w9
	orr	w8, w8, w9
	ldr	w9, [x27]
	orr	w2, w8, w9
	mov	x0, x20
	bl	_intel_uncore_write_fw
	ldr	w1, [x26]
	ldr	w2, [x27]
	mov	x0, x20
	mov	w3, #0
	mov	w4, #10000
	mov	w5, #0
	mov	x6, #0
	bl	___intel_wait_for_register_fw
	cbz	x0, LBB0_9
; %bb.8:
Lloh39:
	adrp	x8, l_.str.2@PAGE
Lloh40:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh41:
	adrp	x9, l_.str.1@PAGE
Lloh42:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w25, #0
	csel	x1, x9, x8, ne
Lloh43:
	adrp	x0, l_.str.3@PAGE
Lloh44:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
Lloh45:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_9:
	cbz	w25, LBB0_11
; %bb.10:
	ldr	w1, [x24]
	mov	x0, x20
	bl	_intel_uncore_read_fw
	mov	w20, #0
	str	w0, [x19]
	b	LBB0_12
LBB0_11:
	mov	w20, #0
LBB0_12:
	bl	_preempt_enable
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_SB_MRD_NP,4,2                  ; @SB_MRD_NP
	.comm	_SB_CRRDDA_NP,4,2               ; @SB_CRRDDA_NP
	.comm	_IOSF_PORT_PUNIT,4,2            ; @IOSF_PORT_PUNIT
	.comm	_VLV_IOSF_DOORBELL_REQ,4,2      ; @VLV_IOSF_DOORBELL_REQ
	.comm	_IOSF_SB_BUSY,4,2               ; @IOSF_SB_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IOSF sideband idle wait (%s) timed out\n"

l_.str.1:                               ; @.str.1
	.asciz	"read"

l_.str.2:                               ; @.str.2
	.asciz	"write"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_VLV_IOSF_ADDR,4,2              ; @VLV_IOSF_ADDR
	.comm	_VLV_IOSF_DATA,4,2              ; @VLV_IOSF_DATA
	.comm	_IOSF_DEVFN_SHIFT,4,2           ; @IOSF_DEVFN_SHIFT
	.comm	_IOSF_OPCODE_SHIFT,4,2          ; @IOSF_OPCODE_SHIFT
	.comm	_IOSF_PORT_SHIFT,4,2            ; @IOSF_PORT_SHIFT
	.comm	_IOSF_BYTE_ENABLES_SHIFT,4,2    ; @IOSF_BYTE_ENABLES_SHIFT
	.comm	_IOSF_BAR_SHIFT,4,2             ; @IOSF_BAR_SHIFT
l_.str.3:                               ; @.str.3
	.asciz	"IOSF sideband finish wait (%s) timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_vlv_sideband_rw
.subsections_via_symbols
