	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_display_create         ## -- Begin function nouveau_display_create
	.p2align	4, 0x90
_nouveau_display_create:                ## @nouveau_display_create
	.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
	movq	%rax, %r14
	leaq	8(%rax), %r12
	movq	%r12, %rdi
	callq	_nvxx_device
	movq	%rax, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_drm_mode_config_init
	movq	%rbx, %rdi
	callq	_drm_mode_create_scaling_mode_property
	movq	%rbx, %rdi
	callq	_drm_mode_create_dvi_i_properties
	movq	_nouveau_mode_config_funcs@GOTPCREL(%rip), %rax
	movq	%rax, 56(%rbx)
	movq	(%r13), %rax
	movq	%r13, %rdi
	movl	$1, %esi
	callq	*(%rax)
	movl	%eax, 48(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	(%r12), %rax
	movq	_NV_DEVICE_INFO_V0_CELSIUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_4
## %bb.3:
	movl	$2048, (%rbx)                   ## imm = 0x800
	movl	$2048, %eax                     ## imm = 0x800
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_21
LBB0_4:
	movq	_NV_DEVICE_INFO_V0_TESLA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_6
## %bb.5:
	movl	$4096, (%rbx)                   ## imm = 0x1000
	movl	$4096, %eax                     ## imm = 0x1000
	jmp	LBB0_9
LBB0_6:
	movq	_NV_DEVICE_INFO_V0_FERMI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_8
## %bb.7:
	movl	$8192, (%rbx)                   ## imm = 0x2000
	movl	$8192, %eax                     ## imm = 0x2000
	jmp	LBB0_9
LBB0_8:
	movl	$16384, (%rbx)                  ## imm = 0x4000
	movl	$16384, %eax                    ## imm = 0x4000
LBB0_9:
	movl	%eax, 4(%rbx)
	movabsq	$4294967320, %rax               ## imm = 0x100000018
	movq	%rax, 8(%rbx)
	xorl	%eax, %eax
	cmpl	$17, 16(%r14)
	setge	%al
	movl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_drm_kms_helper_poll_init
	movq	%rbx, %rdi
	callq	_drm_kms_helper_poll_disable
	movq	_nouveau_modeset@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	je	LBB0_16
## %bb.10:
	cmpq	$0, 24(%r14)
	je	LBB0_16
## %bb.11:
	leaq	8(%r15), %r13
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_nvif_disp_ctor
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.12:
	movq	%rbx, %rdi
	callq	_nouveau_display_create_properties
	movq	(%r13), %rax
	movq	_NV50_DISP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	callq	_nv04_display_create
	jmp	LBB0_15
LBB0_14:
	movq	%rbx, %rdi
	callq	_nv50_display_create
LBB0_15:
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_20
LBB0_16:
	movq	%rbx, %rdi
	callq	_drm_mode_config_reset
	cmpq	$0, 24(%rbx)
	je	LBB0_18
## %bb.17:
	movq	%rbx, %rdi
	callq	_nouveau_display_vblank_init
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	*(%r15)
LBB0_20:
	movq	%rbx, %rdi
	callq	_drm_kms_helper_poll_fini
	movq	%rbx, %rdi
	callq	_drm_mode_config_cleanup
	jmp	LBB0_21
LBB0_18:
	addq	$4, %r14
	movq	_nouveau_display_hpd_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_INIT_WORK
	xorl	%r12d, %r12d
LBB0_21:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nouveau_mode_config_funcs,4,2  ## @nouveau_mode_config_funcs
	.comm	_NV_DEVICE_INFO_V0_CELSIUS,8,3  ## @NV_DEVICE_INFO_V0_CELSIUS
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ## @NV_DEVICE_INFO_V0_TESLA
	.comm	_NV_DEVICE_INFO_V0_FERMI,8,3    ## @NV_DEVICE_INFO_V0_FERMI
	.comm	_nouveau_modeset,4,2            ## @nouveau_modeset
	.comm	_NV50_DISP,8,3                  ## @NV50_DISP
	.comm	_nouveau_display_hpd_work,4,2   ## @nouveau_display_hpd_work
	.comm	_nouveau_display_acpi_ntfy,4,2  ## @nouveau_display_acpi_ntfy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function nouveau_display_create
lCPI0_0:
	.long	24                              ; 0x18
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_nouveau_display_create
	.p2align	2
_nouveau_display_create:                ; @nouveau_display_create
	.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
	mov	x20, x0
	add	x22, x0, #8
	mov	x0, x22
	bl	_nvxx_device
	mov	x23, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	str	x0, [x20, #32]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	bl	_drm_mode_config_init
	mov	x0, x19
	bl	_drm_mode_create_scaling_mode_property
	mov	x0, x19
	bl	_drm_mode_create_dvi_i_properties
Lloh3:
	adrp	x8, _nouveau_mode_config_funcs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nouveau_mode_config_funcs@GOTPAGEOFF]
	str	x8, [x19, #56]
	ldr	x8, [x23]
	ldr	x8, [x8]
	mov	x0, x23
	mov	w1, #1
	blr	x8
	str	w0, [x19, #48]
	stp	xzr, xzr, [x19, #32]
	ldr	x8, [x22]
Lloh5:
	adrp	x9, _NV_DEVICE_INFO_V0_CELSIUS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NV_DEVICE_INFO_V0_CELSIUS@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.2:
	mov	w8, #2048
	b	LBB0_9
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_20
LBB0_4:
Lloh11:
	adrp	x9, _NV_DEVICE_INFO_V0_TESLA@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NV_DEVICE_INFO_V0_TESLA@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.5:
	mov	w8, #4096
	b	LBB0_9
LBB0_6:
Lloh14:
	adrp	x9, _NV_DEVICE_INFO_V0_FERMI@GOTPAGE
Lloh15:
	ldr	x9, [x9, _NV_DEVICE_INFO_V0_FERMI@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.7:
	mov	w8, #8192
	b	LBB0_9
LBB0_8:
	mov	w8, #16384
LBB0_9:
	stp	w8, w8, [x19]
Lloh17:
	adrp	x8, lCPI0_0@PAGE
Lloh18:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #8]
	ldr	w8, [x20, #16]
	cmp	w8, #16
	cset	w8, gt
	str	w8, [x19, #16]
	mov	x0, x19
	bl	_drm_kms_helper_poll_init
	mov	x0, x19
	bl	_drm_kms_helper_poll_disable
Lloh19:
	adrp	x8, _nouveau_modeset@GOTPAGE
Lloh20:
	ldr	x8, [x8, _nouveau_modeset@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w8, #2
	b.eq	LBB0_15
; %bb.10:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_15
; %bb.11:
	add	x23, x21, #8
	mov	x0, x22
	mov	w1, #0
	mov	x2, x23
	bl	_nvif_disp_ctor
	mov	x22, x0
	cbnz	w0, LBB0_18
; %bb.12:
	mov	x0, x19
	bl	_nouveau_display_create_properties
	ldr	x8, [x23]
Lloh22:
	adrp	x9, _NV50_DISP@GOTPAGE
Lloh23:
	ldr	x9, [x9, _NV50_DISP@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	mov	x0, x19
	cmp	x8, x9
	b.ge	LBB0_14
; %bb.13:
	bl	_nv04_display_create
	mov	x22, x0
	cbnz	w0, LBB0_18
	b	LBB0_15
LBB0_14:
	bl	_nv50_display_create
	mov	x22, x0
	cbnz	w0, LBB0_18
LBB0_15:
	mov	x0, x19
	bl	_drm_mode_config_reset
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_19
; %bb.16:
	mov	x0, x19
	bl	_nouveau_display_vblank_init
	cbz	w0, LBB0_19
; %bb.17:
	mov	x22, x0
	ldr	x8, [x21]
	mov	x0, x19
	blr	x8
LBB0_18:
	mov	x0, x19
	bl	_drm_kms_helper_poll_fini
	mov	x0, x19
	bl	_drm_mode_config_cleanup
	b	LBB0_20
LBB0_19:
	add	x0, x20, #4
Lloh25:
	adrp	x8, _nouveau_display_hpd_work@GOTPAGE
Lloh26:
	ldr	x8, [x8, _nouveau_display_hpd_work@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	bl	_INIT_WORK
	mov	w22, #0
LBB0_20:
	mov	x0, x22
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nouveau_mode_config_funcs,4,2  ; @nouveau_mode_config_funcs
	.comm	_NV_DEVICE_INFO_V0_CELSIUS,8,3  ; @NV_DEVICE_INFO_V0_CELSIUS
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ; @NV_DEVICE_INFO_V0_TESLA
	.comm	_NV_DEVICE_INFO_V0_FERMI,8,3    ; @NV_DEVICE_INFO_V0_FERMI
	.comm	_nouveau_modeset,4,2            ; @nouveau_modeset
	.comm	_NV50_DISP,8,3                  ; @NV50_DISP
	.comm	_nouveau_display_hpd_work,4,2   ; @nouveau_display_hpd_work
	.comm	_nouveau_display_acpi_ntfy,4,2  ; @nouveau_display_acpi_ntfy
.subsections_via_symbols
