	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __sandybridge_pcode_rw
___sandybridge_pcode_rw:                ## @__sandybridge_pcode_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	%esi, -44(%rbp)
	leaq	4(%rdi), %r13
	callq	_lockdep_assert_held
	movq	_GEN6_PCODE_MAILBOX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_intel_uncore_read_fw
	movq	_GEN6_PCODE_READY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_2:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movq	_GEN6_PCODE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	(%r12), %edx
	movq	%r13, %rdi
	callq	_intel_uncore_write_fw
	movq	_GEN6_PCODE_DATA1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testq	%rbx, %rbx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %edx
	jmp	LBB0_5
LBB0_3:
	xorl	%edx, %edx
LBB0_5:
	movl	%r15d, %r12d
	movq	%r13, %rdi
	callq	_intel_uncore_write_fw
	movq	_GEN6_PCODE_MAILBOX@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_GEN6_PCODE_READY@GOTPCREL(%rip), %rbx
	orl	(%rbx), %r14d
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_intel_uncore_write_fw
	movl	(%r15), %esi
	movl	(%rbx), %edx
	leaq	-44(%rbp), %rax
	movq	%rax, (%rsp)
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	%r12d, %r9d
	callq	___intel_wait_for_register_fw
	testq	%rax, %rax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_7
## %bb.6:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_7:
	cmpl	$0, 16(%rbp)
	je	LBB0_10
## %bb.8:
	movq	_GEN6_PCODE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_intel_uncore_read_fw
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_10
## %bb.9:
	movq	_GEN6_PCODE_DATA1@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:
	movq	%r14, %rdi
	callq	_INTEL_GEN
	movl	-44(%rbp), %edi
	cmpl	$7, %eax
	jl	LBB0_12
## %bb.11:
	callq	_gen7_check_mailbox_status
	jmp	LBB0_13
LBB0_12:
	callq	_gen6_check_mailbox_status
LBB0_13:
	movl	%eax, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GEN6_PCODE_MAILBOX,4,2         ## @GEN6_PCODE_MAILBOX
	.comm	_GEN6_PCODE_READY,4,2           ## @GEN6_PCODE_READY
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_GEN6_PCODE_DATA,4,2            ## @GEN6_PCODE_DATA
	.comm	_GEN6_PCODE_DATA1,4,2           ## @GEN6_PCODE_DATA1
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	___sandybridge_pcode_rw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __sandybridge_pcode_rw
___sandybridge_pcode_rw:                ; @__sandybridge_pcode_rw
	.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	x23, x6
	mov	x24, x5
	mov	x25, x4
	mov	x20, x3
	mov	x22, x2
	mov	x26, x1
	mov	x19, x0
	str	w1, [sp, #12]
	add	x21, x0, #4
	bl	_lockdep_assert_held
Lloh0:
	adrp	x27, _GEN6_PCODE_MAILBOX@GOTPAGE
Lloh1:
	ldr	x27, [x27, _GEN6_PCODE_MAILBOX@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x21
	bl	_intel_uncore_read_fw
Lloh2:
	adrp	x28, _GEN6_PCODE_READY@GOTPAGE
Lloh3:
	ldr	x28, [x28, _GEN6_PCODE_READY@GOTPAGEOFF]
	ldr	w8, [x28]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
Lloh6:
	adrp	x8, _GEN6_PCODE_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GEN6_PCODE_DATA@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x21
	bl	_intel_uncore_write_fw
Lloh9:
	adrp	x8, _GEN6_PCODE_DATA1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GEN6_PCODE_DATA1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	cbz	x20, LBB0_4
; %bb.3:
	ldr	w2, [x20]
	b	LBB0_5
LBB0_4:
	mov	w2, #0
LBB0_5:
	mov	x0, x21
	bl	_intel_uncore_write_fw
	ldr	w1, [x27]
	ldr	w8, [x28]
	orr	w2, w8, w26
	mov	x0, x21
	bl	_intel_uncore_write_fw
	ldr	w1, [x27]
	ldr	w2, [x28]
	add	x6, sp, #12
	mov	x0, x21
	mov	w3, #0
	mov	x4, x25
	mov	x5, x24
	bl	___intel_wait_for_register_fw
	cbz	x0, LBB0_9
; %bb.6:
Lloh12:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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_9:
	cbz	w23, LBB0_12
; %bb.10:
Lloh14:
	adrp	x8, _GEN6_PCODE_DATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GEN6_PCODE_DATA@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_intel_uncore_read_fw
	str	w0, [x22]
	cbz	x20, LBB0_12
; %bb.11:
Lloh17:
	adrp	x8, _GEN6_PCODE_DATA1@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GEN6_PCODE_DATA1@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_intel_uncore_read_fw
	str	w0, [x20]
LBB0_12:
	mov	x0, x19
	bl	_INTEL_GEN
	mov	x8, x0
	ldr	w0, [sp, #12]
	cmp	w8, #7
	b.lt	LBB0_14
; %bb.13:
	bl	_gen7_check_mailbox_status
	b	LBB0_8
LBB0_14:
	bl	_gen6_check_mailbox_status
	b	LBB0_8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GEN6_PCODE_MAILBOX,4,2         ; @GEN6_PCODE_MAILBOX
	.comm	_GEN6_PCODE_READY,4,2           ; @GEN6_PCODE_READY
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_GEN6_PCODE_DATA,4,2            ; @GEN6_PCODE_DATA
	.comm	_GEN6_PCODE_DATA1,4,2           ; @GEN6_PCODE_DATA1
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	___sandybridge_pcode_rw
.subsections_via_symbols
