	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv_rdvgaowner                  ## -- Begin function nv_rdvgaowner
	.p2align	4, 0x90
_nv_rdvgaowner:                         ## @nv_rdvgaowner
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_nv_device
	movq	(%rax), %rax
	movq	_NV_50@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	callq	_nv_device
	cmpl	$17, 8(%rax)
	jne	LBB0_8
## %bb.2:
	movq	%rbx, %rdi
	movl	$4228, %esi                     ## imm = 0x1084
	callq	_nv_rd32
	movl	$4, %r14d
	testl	$268435456, %eax                ## imm = 0x10000000
	jne	LBB0_10
## %bb.3:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_nv_rdvgac
	movl	%eax, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$51, %edx
	callq	_nv_rdvgac
	movl	%eax, %r13d
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$40, %edx
	callq	_nv_rdvgac
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$51, %edx
	callq	_nv_rdvgac
	testb	$-128, %r15b
	je	LBB0_5
## %bb.4:
	andl	$1, %r13d
	je	LBB0_10
LBB0_5:
	testb	$-128, %r12b
	je	LBB0_7
## %bb.6:
	movl	$3, %r14d
	andl	$1, %eax
	je	LBB0_10
LBB0_7:
	movsbl	%r12b, %eax
	shrl	$7, %eax
	andl	$3, %eax
	xorl	%r14d, %r14d
	testb	$-128, %r15b
	cmovel	%eax, %r14d
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_nv_error
	xorl	%r14d, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$68, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nv_rdvgac                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_50,8,3                      ## @NV_50
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rdvgaowner after nv4x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv_rdvgaowner                  ; -- Begin function nv_rdvgaowner
	.p2align	2
_nv_rdvgaowner:                         ; @nv_rdvgaowner
	.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, x0
	bl	_nv_device
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _NV_50@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NV_50@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_nv_device
	ldr	w8, [x0, #8]
	cmp	w8, #17
	b.ne	LBB0_9
; %bb.2:
	mov	x0, x19
	mov	w1, #4228
	bl	_nv_rd32
	tbnz	w0, #28, LBB0_10
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #40
	bl	_nv_rdvgac
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #51
	bl	_nv_rdvgac
	mov	x22, x0
	mov	x0, x19
	mov	w1, #1
	mov	w2, #40
	bl	_nv_rdvgac
	mov	x21, x0
	mov	x0, x19
	mov	w1, #1
	mov	w2, #51
	bl	_nv_rdvgac
	mov	x8, x0
	tbz	w20, #7, LBB0_5
; %bb.4:
	mov	w0, #0
	tbz	w22, #0, LBB0_12
LBB0_5:
	tbz	w21, #7, LBB0_11
; %bb.6:
	tbnz	w8, #0, LBB0_11
; %bb.7:
	mov	w0, #3
	b	LBB0_12
LBB0_8:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nv_error
	mov	w0, #0
	b	LBB0_12
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #68
	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	_nv_rdvgac
LBB0_10:
	mov	w0, #4
	b	LBB0_12
LBB0_11:
	sbfx	w8, w21, #7, #1
	and	w8, w8, #0x3
	tst	w20, #0x80
	csel	w0, w8, wzr, eq
LBB0_12:
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_50,8,3                      ; @NV_50
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rdvgaowner after nv4x\n"

.subsections_via_symbols
