	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_bios_init              ## -- Begin function nouveau_bios_init
	.p2align	4, 0x90
_nouveau_bios_init:                     ## @nouveau_bios_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_nouveau_drm
	cmpl	$0, (%rbx)
	je	LBB0_15
## %bb.1:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_NVInitVBIOS
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_parse_dcb_table
	testl	%eax, %eax
	jne	LBB0_16
## %bb.4:
	cmpl	$0, (%r14)
	je	LBB0_15
## %bb.5:
	movl	$0, 4(%r14)
	movq	%rbx, %rdi
	callq	_nouveau_bios_posted
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_NV_INFO
	movl	$1, 4(%r14)
LBB0_7:
	movq	%rbx, %rdi
	callq	_nouveau_run_vbios_init
	testl	%eax, %eax
	jne	LBB0_16
## %bb.8:
	cmpl	$5, (%r14)
	jge	LBB0_9
## %bb.10:
	movq	_NV_CIO_CRE_4B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_NVReadVgaCrtc
	andl	$64, %eax
	movl	%eax, 8(%r14)
	jmp	LBB0_11
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
LBB0_9:
	movl	8(%r14), %eax
LBB0_11:
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	cmpl	$5, (%r14)
	jl	LBB0_14
LBB0_13:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_parse_fp_mode_table
LBB0_14:
	movl	$1, 4(%r14)
LBB0_15:
	xorl	%eax, %eax
LBB0_16:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Adaptor not initialised, running VBIOS init tables.\n"

	.comm	_NV_CIO_CRE_4B,4,2              ## @NV_CIO_CRE_4B
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_bios_init              ; -- Begin function nouveau_bios_init
	.p2align	2
_nouveau_bios_init:                     ; @nouveau_bios_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_nouveau_drm
	ldr	w8, [x20]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_NVInitVBIOS
	cbz	w0, LBB0_10
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_parse_dcb_table
	cbnz	w0, LBB0_11
; %bb.3:
	ldr	w8, [x19]
	cbz	w8, LBB0_9
; %bb.4:
	str	wzr, [x19, #4]
	mov	x0, x20
	bl	_nouveau_bios_posted
	cbnz	w0, LBB0_6
; %bb.5:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_NV_INFO
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_6:
	mov	x0, x20
	bl	_nouveau_run_vbios_init
	cbnz	w0, LBB0_11
; %bb.7:
	ldr	w8, [x19]
	cmp	w8, #5
	b.ge	LBB0_12
; %bb.8:
Lloh2:
	adrp	x8, _NV_CIO_CRE_4B@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NV_CIO_CRE_4B@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_NVReadVgaCrtc
	and	w8, w0, #0x40
	str	w8, [x19, #8]
	b	LBB0_13
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	w8, [x19, #8]
LBB0_13:
	cbnz	w8, LBB0_15
; %bb.14:
	ldr	w8, [x19]
	cmp	w8, #5
	b.lt	LBB0_16
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	bl	_parse_fp_mode_table
LBB0_16:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #4]
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Adaptor not initialised, running VBIOS init tables.\n"

	.comm	_NV_CIO_CRE_4B,4,2              ; @NV_CIO_CRE_4B
.subsections_via_symbols
