	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_framebuffer_init       ## -- Begin function nouveau_framebuffer_init
	.p2align	4, 0x90
_nouveau_framebuffer_init:              ## @nouveau_framebuffer_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_nouveau_drm
	movq	%rax, %r15
	leaq	24(%r13), %r12
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_drm_helper_mode_fill_fb_struct
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, 16(%r13)
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	(%r15), %edi
	callq	_nv_device
	movq	(%rax), %rax
	movq	_NV_50@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_22
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_nouveau_bo_tile_layout
	movl	%eax, %ebx
	movq	_NvEvoFB32@GOTPCREL(%rip), %rax
	cmpl	$65024, %ebx                    ## imm = 0xFE00
	je	LBB0_2
## %bb.3:
	cmpl	$31232, %ebx                    ## imm = 0x7A00
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_7
## %bb.4:
	cmpl	$28672, %ebx                    ## imm = 0x7000
	jne	LBB0_6
## %bb.5:
	movq	_NvEvoFB16@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_6:
	movq	_NvEvoVRAM_LP@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movl	24(%r15), %edx
	leal	-8(%rdx), %ecx
	cmpl	$24, %ecx
	ja	LBB0_19
## %bb.8:
	movl	$7680, %eax                     ## imm = 0x1E00
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rcx,4), %rcx
	addq	%rsi, %rcx
	jmpq	*%rcx
LBB0_11:
	movl	$52992, %eax                    ## imm = 0xCF00
	jmp	LBB0_13
LBB0_19:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_NV_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	$59648, %eax                    ## imm = 0xE900
	jmp	LBB0_13
LBB0_10:
	movl	$59392, %eax                    ## imm = 0xE800
	jmp	LBB0_13
LBB0_12:
	movl	$53504, %eax                    ## imm = 0xD100
LBB0_13:
	movl	%eax, (%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_nv_device
	cmpl	$80, 8(%rax)
	jne	LBB0_15
## %bb.14:
	movl	%ebx, %eax
	shll	$8, %eax
	orl	%eax, (%r15)
LBB0_15:
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.18:
	movl	(%r14), %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_nv_device
	movq	(%rax), %rax
	movq	_NV_C0@GOTPCREL(%rip), %rcx
	movl	%ebx, %edx
	sarl	$4, %edx
	cmpq	(%rcx), %rax
	cmovll	%ebx, %edx
	movq	32(%r15), %rax
	movl	(%rax), %ecx
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	shll	$2, %eax
	andl	$-16, %eax
	orl	%edx, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_21
LBB0_16:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_nv_device
	movq	(%rax), %rcx
	movq	_NV_D0@GOTPCREL(%rip), %rdx
	movq	32(%r15), %rax
	movl	(%rax), %eax
	cmpq	(%rdx), %rcx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jge	LBB0_20
## %bb.17:
	orl	$1048576, %eax                  ## imm = 0x100000
	jmp	LBB0_21
LBB0_20:
	orl	$16777216, %eax                 ## imm = 0x1000000
LBB0_21:
	movl	%eax, 4(%r15)
LBB0_22:
	movq	_nouveau_framebuffer_funcs@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_framebuffer_init           ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_11
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_12
	.long	L0_0_set_19
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_NV_50,8,3                      ## @NV_50
	.comm	_NvEvoFB32,4,2                  ## @NvEvoFB32
	.comm	_NvEvoFB16,4,2                  ## @NvEvoFB16
	.comm	_NvEvoVRAM_LP,4,2               ## @NvEvoVRAM_LP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown depth %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NV_D0,8,3                      ## @NV_D0
	.comm	_NV_C0,8,3                      ## @NV_C0
	.comm	_nouveau_framebuffer_funcs,4,2  ## @nouveau_framebuffer_funcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_framebuffer_init       ; -- Begin function nouveau_framebuffer_init
	.p2align	2
_nouveau_framebuffer_init:              ; @nouveau_framebuffer_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	x22, x3
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
	bl	_nouveau_drm
	mov	x23, x0
	add	x21, x20, #24
	mov	x0, x21
	mov	x1, x24
	bl	_drm_helper_mode_fill_fb_struct
	str	x22, [x20, #16]
	ldr	w0, [x23]
	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.lt	LBB0_14
; %bb.1:
	mov	x0, x22
	bl	_nouveau_bo_tile_layout
Lloh3:
	adrp	x8, _NvEvoFB32@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NvEvoFB32@GOTPAGEOFF]
	mov	w9, #65024
	mov	w10, #31232
	cmp	w0, #7, lsl #12                 ; =28672
Lloh5:
	adrp	x11, _NvEvoVRAM_LP@GOTPAGE
Lloh6:
	ldr	x11, [x11, _NvEvoVRAM_LP@GOTPAGEOFF]
Lloh7:
	adrp	x12, _NvEvoFB16@GOTPAGE
Lloh8:
	ldr	x12, [x12, _NvEvoFB16@GOTPAGEOFF]
	csel	x11, x11, x12, ne
	cmp	w0, w10
	csel	x10, x8, x11, eq
	cmp	w0, w9
	csel	x8, x8, x10, eq
	ldr	w8, [x8]
	str	w8, [x20, #8]
	ldr	w2, [x20, #24]
	sub	w9, w2, #8
	cmp	w9, #24
	b.hi	LBB0_4
; %bb.2:
	mov	x24, x0
	mov	w8, #7680
Lloh9:
	adrp	x10, lJTI0_0@PAGE
Lloh10:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_3
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_3:
	mov	w8, #52992
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_NV_ERROR
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	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
LBB0_5:
	mov	w8, #59648
	b	LBB0_8
LBB0_6:
	mov	w8, #59392
	b	LBB0_8
LBB0_7:
	mov	w8, #53504
LBB0_8:
	str	w8, [x20]
	ldr	w0, [x23]
	bl	_nv_device
	ldr	w8, [x0, #8]
	cmp	w8, #80
	b.ne	LBB0_10
; %bb.9:
	ldr	w8, [x20]
	orr	w8, w8, w24, lsl #8
	str	w8, [x20]
LBB0_10:
	cbz	w24, LBB0_12
; %bb.11:
	ldr	w22, [x22]
	ldr	w0, [x23]
	bl	_nv_device
	ldr	x8, [x0]
Lloh16:
	adrp	x9, _NV_C0@GOTPAGE
Lloh17:
	ldr	x9, [x9, _NV_C0@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	asr	w10, w22, #4
	cmp	x8, x9
	csel	w8, w22, w10, lt
	ldr	x9, [x20, #32]
	ldr	w9, [x9]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	lsl	w9, w9, #2
	and	w9, w9, #0xfffffff0
	orr	w8, w9, w8
	b	LBB0_13
LBB0_12:
	ldr	w0, [x23]
	bl	_nv_device
	ldr	x8, [x0]
Lloh19:
	adrp	x9, _NV_D0@GOTPAGE
Lloh20:
	ldr	x9, [x9, _NV_D0@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	ldr	x10, [x20, #32]
	ldr	w10, [x10]
	cmp	x8, x9
	orr	w8, w10, #0x1000000
	orr	w9, w10, #0x100000
	csel	w8, w8, w9, ge
LBB0_13:
	str	w8, [x20, #4]
LBB0_14:
Lloh22:
	adrp	x2, _nouveau_framebuffer_funcs@GOTPAGE
Lloh23:
	ldr	x2, [x2, _nouveau_framebuffer_funcs@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x21
	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
	b	_drm_framebuffer_init
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
                                        ; -- End function
	.comm	_NV_50,8,3                      ; @NV_50
	.comm	_NvEvoFB32,4,2                  ; @NvEvoFB32
	.comm	_NvEvoFB16,4,2                  ; @NvEvoFB16
	.comm	_NvEvoVRAM_LP,4,2               ; @NvEvoVRAM_LP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown depth %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NV_D0,8,3                      ; @NV_D0
	.comm	_NV_C0,8,3                      ; @NV_C0
	.comm	_nouveau_framebuffer_funcs,4,2  ; @nouveau_framebuffer_funcs
.subsections_via_symbols
