	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen11_lock_sfc
_gen11_lock_sfc:                        ## @gen11_lock_sfc
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movl	8(%rdi), %edi
	callq	_RUNTIME_INFO
	movl	(%rbx), %ecx
	cmpl	$128, %ecx
	je	LBB0_4
## %bb.1:
	xorl	%r12d, %r12d
	cmpl	$129, %ecx
	jne	LBB0_8
## %bb.2:
	movl	(%rax), %r15d
	movl	4(%rbx), %edi
	callq	_BIT
	testl	%r15d, %eax
	je	LBB0_8
## %bb.3:
	movq	%rbx, %rdi
	callq	_GEN11_VCS_SFC_FORCED_LOCK
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_GEN11_VCS_SFC_FORCED_LOCK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%rbx, %rdi
	callq	_GEN11_VCS_SFC_LOCK_STATUS
	movl	%eax, %r13d
	movq	_GEN11_VCS_SFC_LOCK_ACK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_GEN11_VCS_SFC_LOCK_STATUS
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_GEN11_VCS_SFC_USAGE_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %edi
	callq	_GEN11_VCS_SFC_RESET_BIT
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_GEN11_VECS_SFC_FORCED_LOCK
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_GEN11_VECS_SFC_FORCED_LOCK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%rbx, %rdi
	callq	_GEN11_VECS_SFC_LOCK_ACK
	movl	%eax, %r13d
	movq	_GEN11_VECS_SFC_LOCK_ACK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_GEN11_VECS_SFC_USAGE
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_GEN11_VECS_SFC_USAGE_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %edi
	callq	_GEN11_VECS_SFC_RESET_BIT
LBB0_5:
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_rmw_set_fw
	movq	$0, (%rsp)
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	movl	%r15d, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	xorl	%r9d, %r9d
	callq	___intel_wait_for_register_fw
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	jmp	LBB0_8
LBB0_7:
	movq	%r14, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_intel_uncore_read_fw
	andl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	cmovel	%eax, %ebx
	movl	%ebx, %r12d
LBB0_8:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GEN11_VCS_SFC_FORCED_LOCK_BIT,4,2 ## @GEN11_VCS_SFC_FORCED_LOCK_BIT
	.comm	_GEN11_VCS_SFC_LOCK_ACK_BIT,4,2 ## @GEN11_VCS_SFC_LOCK_ACK_BIT
	.comm	_GEN11_VCS_SFC_USAGE_BIT,4,2    ## @GEN11_VCS_SFC_USAGE_BIT
	.comm	_GEN11_VECS_SFC_FORCED_LOCK_BIT,4,2 ## @GEN11_VECS_SFC_FORCED_LOCK_BIT
	.comm	_GEN11_VECS_SFC_LOCK_ACK_BIT,4,2 ## @GEN11_VECS_SFC_LOCK_ACK_BIT
	.comm	_GEN11_VECS_SFC_USAGE_BIT,4,2   ## @GEN11_VECS_SFC_USAGE_BIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wait for SFC forced lock ack failed\n"

	.no_dead_strip	_gen11_lock_sfc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen11_lock_sfc
_gen11_lock_sfc:                        ; @gen11_lock_sfc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x0
	ldr	x19, [x0, #16]
	ldr	w0, [x0, #8]
	bl	_RUNTIME_INFO
	ldr	w8, [x21]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.2:
	ldr	w20, [x0]
	ldr	w0, [x21, #4]
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_7
; %bb.3:
	mov	x0, x21
	bl	_GEN11_VCS_SFC_FORCED_LOCK
	mov	x20, x0
Lloh0:
	adrp	x8, _GEN11_VCS_SFC_FORCED_LOCK_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GEN11_VCS_SFC_FORCED_LOCK_BIT@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_GEN11_VCS_SFC_LOCK_STATUS
	mov	x23, x0
Lloh3:
	adrp	x8, _GEN11_VCS_SFC_LOCK_ACK_BIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GEN11_VCS_SFC_LOCK_ACK_BIT@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	mov	x0, x21
	bl	_GEN11_VCS_SFC_LOCK_STATUS
	mov	x25, x0
Lloh6:
	adrp	x8, _GEN11_VCS_SFC_USAGE_BIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GEN11_VCS_SFC_USAGE_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w26, [x8]
	ldr	w0, [x21, #4]
	bl	_GEN11_VCS_SFC_RESET_BIT
	b	LBB0_5
LBB0_4:
	mov	x0, x21
	bl	_GEN11_VECS_SFC_FORCED_LOCK
	mov	x20, x0
Lloh9:
	adrp	x8, _GEN11_VECS_SFC_FORCED_LOCK_BIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GEN11_VECS_SFC_FORCED_LOCK_BIT@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_GEN11_VECS_SFC_LOCK_ACK
	mov	x23, x0
Lloh12:
	adrp	x8, _GEN11_VECS_SFC_LOCK_ACK_BIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GEN11_VECS_SFC_LOCK_ACK_BIT@GOTPAGEOFF]
Lloh14:
	ldr	w24, [x8]
	mov	x0, x21
	bl	_GEN11_VECS_SFC_USAGE
	mov	x25, x0
Lloh15:
	adrp	x8, _GEN11_VECS_SFC_USAGE_BIT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GEN11_VECS_SFC_USAGE_BIT@GOTPAGEOFF]
Lloh17:
	ldr	w26, [x8]
	ldr	w0, [x21, #4]
	bl	_GEN11_VECS_SFC_RESET_BIT
LBB0_5:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_rmw_set_fw
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	mov	x3, x24
	mov	w4, #1000
	mov	w5, #0
	mov	x6, #0
	bl	___intel_wait_for_register_fw
	cbz	x0, LBB0_9
; %bb.6:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x19
	mov	x1, x25
	bl	_intel_uncore_read_fw
	tst	w0, w26
	csel	w0, wzr, w21, eq
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GEN11_VCS_SFC_FORCED_LOCK_BIT,4,2 ; @GEN11_VCS_SFC_FORCED_LOCK_BIT
	.comm	_GEN11_VCS_SFC_LOCK_ACK_BIT,4,2 ; @GEN11_VCS_SFC_LOCK_ACK_BIT
	.comm	_GEN11_VCS_SFC_USAGE_BIT,4,2    ; @GEN11_VCS_SFC_USAGE_BIT
	.comm	_GEN11_VECS_SFC_FORCED_LOCK_BIT,4,2 ; @GEN11_VECS_SFC_FORCED_LOCK_BIT
	.comm	_GEN11_VECS_SFC_LOCK_ACK_BIT,4,2 ; @GEN11_VECS_SFC_LOCK_ACK_BIT
	.comm	_GEN11_VECS_SFC_USAGE_BIT,4,2   ; @GEN11_VECS_SFC_USAGE_BIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wait for SFC forced lock ack failed\n"

	.no_dead_strip	_gen11_lock_sfc
.subsections_via_symbols
