	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_framebuffer_new        ## -- Begin function nouveau_framebuffer_new
	.p2align	4, 0x90
_nouveau_framebuffer_new:               ## @nouveau_framebuffer_new
	.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	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_nouveau_drm
	movq	(%rax), %rax
	movq	_NV_DEVICE_INFO_V0_TESLA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_10
## %bb.1:
	movq	(%r14), %rdi
	movq	_DRM_FORMAT_YUYV@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_5
## %bb.2:
	movq	_DRM_FORMAT_UYVY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_5
## %bb.3:
	movq	_DRM_FORMAT_NV12@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_5
## %bb.4:
	movq	_DRM_FORMAT_NV21@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_5
LBB0_10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_11
## %bb.13:
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_drm_helper_mode_fill_fb_struct
	movq	%r15, 8(%rbx)
	movq	_nouveau_framebuffer_funcs@GOTPCREL(%rip), %rdx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_drm_framebuffer_init
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_16
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	movq	8(%r14), %rcx
	movl	(%rcx), %eax
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	jg	LBB0_9
## %bb.6:
	movl	%eax, %edx
	andl	$63, %edx
	jne	LBB0_9
## %bb.7:
	movl	4(%rcx), %ecx
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.8:
	cmpl	%ecx, %eax
	je	LBB0_10
LBB0_9:
	leaq	-48(%rbp), %rsi
	callq	_drm_get_format_name
	movq	8(%r14), %rcx
	movl	(%rcx), %edx
	movl	4(%rcx), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_KMS
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_16
LBB0_14:
	xorl	%r14d, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ## @NV_DEVICE_INFO_V0_TESLA
	.comm	_DRM_FORMAT_YUYV,8,3            ## @DRM_FORMAT_YUYV
	.comm	_DRM_FORMAT_UYVY,8,3            ## @DRM_FORMAT_UYVY
	.comm	_DRM_FORMAT_NV12,8,3            ## @DRM_FORMAT_NV12
	.comm	_DRM_FORMAT_NV21,8,3            ## @DRM_FORMAT_NV21
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsuitable framebuffer: format: %s; pitches: 0x%x\n 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.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_new        ; -- Begin function nouveau_framebuffer_new
	.p2align	2
_nouveau_framebuffer_new:               ; @nouveau_framebuffer_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_nouveau_drm
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _NV_DEVICE_INFO_V0_TESLA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NV_DEVICE_INFO_V0_TESLA@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.1:
	ldr	x0, [x19]
Lloh3:
	adrp	x8, _DRM_FORMAT_YUYV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_FORMAT_YUYV@GOTPAGEOFF]
Lloh5:
	adrp	x9, _DRM_FORMAT_UYVY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DRM_FORMAT_UYVY@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _DRM_FORMAT_NV12@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DRM_FORMAT_NV12@GOTPAGEOFF]
Lloh11:
	adrp	x11, _DRM_FORMAT_NV21@GOTPAGE
Lloh12:
	ldr	x11, [x11, _DRM_FORMAT_NV21@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
Lloh14:
	ldr	x11, [x11]
	cmp	x0, x8
	ccmp	x0, x9, #4, ne
	ccmp	x0, x10, #4, ne
	ccmp	x0, x11, #4, ne
	b.ne	LBB0_4
; %bb.2:
	ldr	x9, [x19, #8]
	ldr	w8, [x9]
	and	w10, w8, #0x3f
	cmp	w8, #16, lsl #12                ; =65536
	ccmp	w10, #0, #0, lt
	b.ne	LBB0_8
; %bb.3:
	ldr	w9, [x9, #4]
	cmp	w9, #0
	ccmp	w8, w9, #4, ne
	b.ne	LBB0_8
LBB0_4:
Lloh15:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	str	x0, [x22]
	cbz	x0, LBB0_7
; %bb.5:
	mov	x23, x0
	mov	x0, x20
	mov	x1, x23
	mov	x2, x19
	bl	_drm_helper_mode_fill_fb_struct
	str	x21, [x23, #8]
Lloh18:
	adrp	x2, _nouveau_framebuffer_funcs@GOTPAGE
Lloh19:
	ldr	x2, [x2, _nouveau_framebuffer_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x23
	bl	_drm_framebuffer_init
	mov	x19, x0
	cbz	w0, LBB0_10
; %bb.6:
	mov	x0, x23
	bl	_kfree
	b	LBB0_10
LBB0_7:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
	add	x1, sp, #8
	bl	_drm_get_format_name
	mov	x1, x0
	ldr	x8, [x19, #8]
	ldp	w2, w3, [x8]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ; @NV_DEVICE_INFO_V0_TESLA
	.comm	_DRM_FORMAT_YUYV,8,3            ; @DRM_FORMAT_YUYV
	.comm	_DRM_FORMAT_UYVY,8,3            ; @DRM_FORMAT_UYVY
	.comm	_DRM_FORMAT_NV12,8,3            ; @DRM_FORMAT_NV12
	.comm	_DRM_FORMAT_NV21,8,3            ; @DRM_FORMAT_NV21
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsuitable framebuffer: format: %s; pitches: 0x%x\n 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nouveau_framebuffer_funcs,4,2  ; @nouveau_framebuffer_funcs
.subsections_via_symbols
