	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv04_devinit_preinit           ## -- Begin function nv04_devinit_preinit
	.p2align	4, 0x90
_nv04_devinit_preinit:                  ## @nv04_devinit_preinit
	.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
	callq	_nv04_devinit
	movq	%rax, %r14
	movq	16(%rax), %r15
	movq	%r15, %rdi
	movl	$512, %esi                      ## imm = 0x200
	movl	$1, %edx
	movl	$1, %ecx
	callq	_nvkm_mask
	cmpq	$0, (%r14)
	jns	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_nvkm_rdvgaowner
	movq	%rax, (%r14)
LBB0_2:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_nvkm_wrvgaowner
	cmpl	$0, 8(%r14)
	jne	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$6, %edx
	callq	_nvkm_rdvgac
	movl	%eax, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$7, %edx
	callq	_nvkm_rdvgac
	movl	%eax, %r13d
	andl	$1, %r13d
	shll	$8, %r13d
	orl	%r12d, %r13d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$7, %edx
	callq	_nvkm_rdvgac
	movl	%eax, %r12d
	andl	$32, %r12d
	shll	$4, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$37, %edx
	callq	_nvkm_rdvgac
	movl	%eax, %ebx
	andl	$1, %ebx
	shll	$10, %ebx
	orl	%r12d, %ebx
	orl	%r13d, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$65, %edx
	callq	_nvkm_rdvgac
	andl	$1, %eax
	shll	$11, %eax
	orl	%ebx, %eax
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	addq	$16, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_nvkm_debug
	movl	$1, 8(%r14)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adaptor not initialised\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv04_devinit_preinit           ; -- Begin function nv04_devinit_preinit
	.p2align	2
_nv04_devinit_preinit:                  ; @nv04_devinit_preinit
	.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
	bl	_nv04_devinit
	mov	x19, x0
	mov	x20, x0
	ldr	x21, [x20, #16]!
	mov	x0, x21
	mov	w1, #512
	mov	w2, #1
	mov	w3, #1
	bl	_nvkm_mask
	ldr	x8, [x19]
	tbz	x8, #63, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_nvkm_rdvgaowner
	str	x0, [x19]
LBB0_2:
	mov	x0, x21
	mov	w1, #0
	bl	_nvkm_wrvgaowner
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_5
; %bb.3:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #6
	bl	_nvkm_rdvgac
	mov	x22, x0
	mov	x0, x21
	mov	w1, #0
	mov	w2, #7
	bl	_nvkm_rdvgac
	ubfiz	w8, w0, #8, #1
	orr	w22, w8, w22
	mov	x0, x21
	mov	w1, #0
	mov	w2, #7
	bl	_nvkm_rdvgac
	lsl	w8, w0, #4
	and	w8, w8, #0x200
	orr	w22, w22, w8
	mov	x0, x21
	mov	w1, #0
	mov	w2, #37
	bl	_nvkm_rdvgac
	ubfiz	w8, w0, #10, #1
	orr	w22, w22, w8
	mov	x0, x21
	mov	w1, #0
	mov	w2, #65
	bl	_nvkm_rdvgac
	ubfiz	w8, w0, #11, #1
	orr	w8, w22, w8
	cbnz	w8, LBB0_5
; %bb.4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_nvkm_debug
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_5:
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adaptor not initialised\n"

.subsections_via_symbols
