	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_lockvgac                  ## -- Begin function nvkm_lockvgac
	.p2align	4, 0x90
_nvkm_lockvgac:                         ## @nvkm_lockvgac
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%esi, %esi
	movl	$31, %edx
	callq	_nvkm_rdvgac
	testl	%r14d, %r14d
	movl	$87, %ecx
	movl	$153, %r14d
	cmovel	%ecx, %r14d
	movq	(%rbx), %rcx
	movq	_NV_50@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	cmpq	(%rsi), %rcx
	movl	%eax, %r15d
	setge	%dl
	shll	$5, %edx
	orl	$31, %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%r14d, %ecx
	callq	_nvkm_wrvgac
	cmpl	$17, 8(%rbx)
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	movl	$4228, %esi                     ## imm = 0x1084
	callq	_nvkm_rd32
	testl	$268435456, %eax                ## imm = 0x10000000
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$31, %edx
	movl	%r14d, %ecx
	callq	_nvkm_wrvgac
LBB0_3:
	xorl	%eax, %eax
	testl	%r15d, %r15d
	sete	%al
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_50,8,3                      ## @NV_50
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_lockvgac                  ; -- Begin function nvkm_lockvgac
	.p2align	2
_nvkm_lockvgac:                         ; @nvkm_lockvgac
	.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	x21, x1
	mov	x19, x0
	mov	w22, #31
	mov	w1, #0
	mov	w2, #31
	bl	_nvkm_rdvgac
	mov	x20, x0
	mov	w8, #153
	mov	w9, #87
	cmp	w21, #0
	csel	w21, w9, w8, eq
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _NV_50@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NV_50@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #63
	csel	w2, w22, w8, lt
	mov	x0, x19
	mov	w1, #0
	mov	x3, x21
	bl	_nvkm_wrvgac
	ldr	w8, [x19, #8]
	cmp	w8, #17
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #4228
	bl	_nvkm_rd32
	tbnz	w0, #28, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #31
	mov	x3, x21
	bl	_nvkm_wrvgac
LBB0_3:
	cmp	w20, #0
	cset	w0, eq
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_50,8,3                      ; @NV_50
.subsections_via_symbols
