	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_fbcon_init             ## -- Begin function nouveau_fbcon_init
	.p2align	4, 0x90
_nouveau_fbcon_init:                    ## @nouveau_fbcon_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	%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	_nouveau_drm
	xorl	%r14d, %r14d
	cmpl	$0, 8(%rbx)
	je	LBB0_17
## %bb.1:
	movq	%rax, %r13
	movq	(%rbx), %rax
	movl	(%rax), %eax
	sarl	$8, %eax
	movq	_PCI_CLASS_DISPLAY_VGA@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.2:
	movq	_nouveau_fbcon_bpp@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, 8(%r13)
	movq	%r13, %rdi
	addq	$4, %rdi
	movq	_nouveau_fbcon_set_suspend_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	%r15, %rdi
	addq	$8, %rdi
	callq	_mutex_init
	movq	_nouveau_fbcon_helper_funcs@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_drm_fb_helper_prepare
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_drm_fb_helper_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.5:
	movq	%r15, %rdi
	callq	_drm_fb_helper_single_add_all_connectors
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.6:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	cmpl	$32, %r12d
	ja	LBB0_8
## %bb.7:
	movl	%r12d, %eax
	movabsq	$4295033088, %rcx               ## imm = 0x100010100
	btq	%rax, %rcx
	jae	LBB0_8
LBB0_10:
	movq	%rbx, %rdi
	callq	_drm_drv_uses_atomic_modeset
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	_drm_helper_disable_unused_functions
LBB0_12:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_drm_fb_helper_initial_config
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_13
LBB0_15:
	movq	%r15, %rdi
	callq	_drm_fb_helper_fini
LBB0_16:
	movq	%r15, %rdi
	callq	_kfree
	movl	%r12d, %r14d
	jmp	LBB0_17
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_17:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	movl	$4, (%rax)
	jmp	LBB0_17
LBB0_8:
	movl	(%r13), %eax
	movl	$8, %r12d
	cmpl	$33554433, %eax                 ## imm = 0x2000001
	jl	LBB0_10
## %bb.9:
	xorl	%r12d, %r12d
	cmpl	$67108865, %eax                 ## imm = 0x4000001
	setae	%r12b
	shll	$4, %r12d
	addl	$16, %r12d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_nouveau_fbcon_bpp,4,2          ## @nouveau_fbcon_bpp
	.comm	_PCI_CLASS_DISPLAY_VGA,4,2      ## @PCI_CLASS_DISPLAY_VGA
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nouveau_fbcon_set_suspend_work,4,2 ## @nouveau_fbcon_set_suspend_work
	.comm	_nouveau_fbcon_helper_funcs,4,2 ## @nouveau_fbcon_helper_funcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_fbcon_init             ; -- Begin function nouveau_fbcon_init
	.p2align	2
_nouveau_fbcon_init:                    ; @nouveau_fbcon_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_nouveau_drm
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_15
; %bb.1:
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _PCI_CLASS_DISPLAY_VGA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_CLASS_DISPLAY_VGA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w8, asr #8
	b.ne	LBB0_15
; %bb.2:
	mov	x22, x0
Lloh3:
	adrp	x8, _nouveau_fbcon_bpp@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nouveau_fbcon_bpp@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.3:
	mov	x20, x0
	str	x0, [x22, #8]
	add	x0, x22, #4
Lloh9:
	adrp	x8, _nouveau_fbcon_set_suspend_work@GOTPAGE
Lloh10:
	ldr	x8, [x8, _nouveau_fbcon_set_suspend_work@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x20, #8
	bl	_mutex_init
Lloh12:
	adrp	x2, _nouveau_fbcon_helper_funcs@GOTPAGE
Lloh13:
	ldr	x2, [x2, _nouveau_fbcon_helper_funcs@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x20
	bl	_drm_fb_helper_prepare
	mov	x0, x19
	mov	x1, x20
	mov	w2, #4
	bl	_drm_fb_helper_init
	mov	x23, x0
	cbnz	w0, LBB0_11
; %bb.4:
	mov	x0, x20
	bl	_drm_fb_helper_single_add_all_connectors
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.5:
	cmp	w21, #32
	mov	w8, #1
	lsl	x8, x8, x21
	mov	x9, #256
	movk	x9, #1, lsl #16
	movk	x9, #1, lsl #32
	and	x8, x8, x9
	ccmp	x8, #0, #4, ls
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [x22]
	mov	w9, #8
	mov	w10, #1
	movk	w10, #512, lsl #16
	mov	w11, #1
	movk	w11, #1024, lsl #16
	mov	w12, #32
	mov	w13, #16
	cmp	w8, w11
	csel	w11, w13, w12, lo
	cmp	w8, w10
	csel	w21, w9, w11, lt
LBB0_7:
	mov	x0, x19
	bl	_drm_drv_uses_atomic_modeset
	cbnz	w0, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_drm_helper_disable_unused_functions
LBB0_9:
	mov	x0, x20
	mov	x1, x21
	bl	_drm_fb_helper_initial_config
	mov	x23, x0
	cbz	w0, LBB0_13
LBB0_10:
	mov	x0, x20
	bl	_drm_fb_helper_fini
LBB0_11:
	mov	x0, x20
	bl	_kfree
	b	LBB0_16
LBB0_12:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_16
LBB0_13:
	ldr	x8, [x20]
	cbz	x8, LBB0_15
; %bb.14:
	mov	w23, #0
	mov	w9, #4
	str	w9, [x8]
	b	LBB0_16
LBB0_15:
	mov	w23, #0
LBB0_16:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_nouveau_fbcon_bpp,4,2          ; @nouveau_fbcon_bpp
	.comm	_PCI_CLASS_DISPLAY_VGA,4,2      ; @PCI_CLASS_DISPLAY_VGA
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nouveau_fbcon_set_suspend_work,4,2 ; @nouveau_fbcon_set_suspend_work
	.comm	_nouveau_fbcon_helper_funcs,4,2 ; @nouveau_fbcon_helper_funcs
.subsections_via_symbols
