	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_connector_get_modes
_nouveau_connector_get_modes:           ## @nouveau_connector_get_modes
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_nouveau_drm
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_nouveau_connector
	movq	%rax, %r14
	movq	24(%rax), %r13
	movq	%r13, %rdi
	callq	_to_drm_encoder
	movq	%rax, %rbx
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_drm_mode_destroy
	movq	$0, 8(%r14)
LBB0_2:
	movq	16(%r14), %rsi
	testq	%rsi, %rsi
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_drm_add_edid_modes
	movl	%eax, %r13d
	jmp	LBB0_9
LBB0_4:
	movq	(%r13), %rax
	movq	(%rax), %rcx
	movq	_DCB_OUTPUT_LVDS@GOTPCREL(%rip), %rdx
	xorl	%r13d, %r13d
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.5:
	cmpq	$0, 8(%rax)
	jne	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	je	LBB0_9
LBB0_7:
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_nouveau_bios_fp_mode
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	-72(%rbp), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_nouveau_bios_fp_mode
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_mode_duplicate
	movq	%rax, 8(%r14)
LBB0_9:
	movq	(%r12), %rax
	movq	_DRM_MODE_CONNECTOR_LVDS@GOTPCREL(%rip), %rcx
	movq	%rcx, %rbx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	callq	_nouveau_connector_detect_depth
LBB0_11:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	testl	%r13d, %r13d
	jne	LBB0_17
	jmp	LBB0_14
LBB0_12:
	movq	%r12, %rdi
	callq	_nouveau_connector_native_mode
	movq	%rax, 8(%r14)
	testl	%r13d, %r13d
	jne	LBB0_17
LBB0_14:
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_drm_mode_duplicate
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_drm_mode_probed_add
	movl	$1, %r13d
	jmp	LBB0_17
LBB0_15:
	xorl	%r13d, %r13d
LBB0_17:
	movq	(%r12), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_19
## %bb.18:
	movq	%r12, %rdi
	callq	_nouveau_connector_detect_depth
LBB0_19:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_DCB_OUTPUT_TV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.20:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_get_slave_funcs
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	*(%rax)
	movl	%eax, %r13d
LBB0_21:
	movq	(%r14), %rax
	movq	_DCB_CONNECTOR_LVDS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_24
## %bb.22:
	movq	_DCB_CONNECTOR_LVDS_SPWG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_24
## %bb.23:
	movq	_DCB_CONNECTOR_eDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
LBB0_24:
	movq	%r12, %rdi
	callq	_nouveau_connector_scaler_modes_add
	addl	%eax, %r13d
LBB0_25:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DCB_OUTPUT_LVDS,8,3            ## @DCB_OUTPUT_LVDS
	.comm	_DRM_MODE_CONNECTOR_LVDS,8,3    ## @DRM_MODE_CONNECTOR_LVDS
	.comm	_DCB_OUTPUT_TV,8,3              ## @DCB_OUTPUT_TV
	.comm	_DCB_CONNECTOR_LVDS,8,3         ## @DCB_CONNECTOR_LVDS
	.comm	_DCB_CONNECTOR_LVDS_SPWG,8,3    ## @DCB_CONNECTOR_LVDS_SPWG
	.comm	_DCB_CONNECTOR_eDP,8,3          ## @DCB_CONNECTOR_eDP
	.no_dead_strip	_nouveau_connector_get_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_connector_get_modes
_nouveau_connector_get_modes:           ; @nouveau_connector_get_modes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x23, [x0, #8]
	mov	x0, x23
	bl	_nouveau_drm
	mov	x24, x0
	mov	x0, x19
	bl	_nouveau_connector
	mov	x20, x0
	ldr	x22, [x0, #24]
	mov	x0, x22
	bl	_to_drm_encoder
	mov	x21, x0
	ldr	x1, [x20, #8]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x23
	bl	_drm_mode_destroy
	str	xzr, [x20, #8]
LBB0_2:
	ldr	x1, [x20, #16]
	cbz	x1, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_drm_add_edid_modes
	mov	x24, x0
	b	LBB0_10
LBB0_4:
	ldr	x8, [x22]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _DCB_OUTPUT_LVDS@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DCB_OUTPUT_LVDS@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.5:
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_7
; %bb.6:
	ldr	x8, [x24]
	cbz	x8, LBB0_9
LBB0_7:
	mov	x0, x23
	mov	x1, #0
	bl	_nouveau_bios_fp_mode
	cbz	x0, LBB0_9
; %bb.8:
	add	x1, sp, #8
	mov	x0, x23
	bl	_nouveau_bios_fp_mode
	add	x1, sp, #8
	mov	x0, x23
	bl	_drm_mode_duplicate
	mov	w24, #0
	str	x0, [x20, #8]
	b	LBB0_10
LBB0_9:
	mov	w24, #0
LBB0_10:
	ldr	x8, [x19]
Lloh3:
	adrp	x25, _DRM_MODE_CONNECTOR_LVDS@GOTPAGE
Lloh4:
	ldr	x25, [x25, _DRM_MODE_CONNECTOR_LVDS@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.11:
	ldr	x1, [x20, #8]
	cbz	x1, LBB0_14
LBB0_12:
	cbnz	w24, LBB0_18
	b	LBB0_15
LBB0_13:
	mov	x0, x19
	bl	_nouveau_connector_detect_depth
	ldr	x1, [x20, #8]
	cbnz	x1, LBB0_12
LBB0_14:
	mov	x0, x19
	bl	_nouveau_connector_native_mode
	mov	x1, x0
	str	x0, [x20, #8]
	cbnz	w24, LBB0_18
LBB0_15:
	cbz	x1, LBB0_17
; %bb.16:
	mov	x0, x23
	bl	_drm_mode_duplicate
	mov	x1, x0
	mov	x0, x19
	bl	_drm_mode_probed_add
	mov	w24, #1
	b	LBB0_18
LBB0_17:
	mov	w24, #0
LBB0_18:
	ldr	x8, [x19]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.19:
	mov	x0, x19
	bl	_nouveau_connector_detect_depth
LBB0_20:
	ldr	x8, [x22]
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _DCB_OUTPUT_TV@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DCB_OUTPUT_TV@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x21
	bl	_get_slave_funcs
	ldr	x8, [x0]
	mov	x0, x21
	mov	x1, x19
	blr	x8
	mov	x24, x0
LBB0_22:
	ldr	x8, [x20]
Lloh8:
	adrp	x9, _DCB_CONNECTOR_LVDS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DCB_CONNECTOR_LVDS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_25
; %bb.23:
Lloh11:
	adrp	x9, _DCB_CONNECTOR_LVDS_SPWG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DCB_CONNECTOR_LVDS_SPWG@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_25
; %bb.24:
Lloh14:
	adrp	x9, _DCB_CONNECTOR_eDP@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DCB_CONNECTOR_eDP@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_26
LBB0_25:
	mov	x0, x19
	bl	_nouveau_connector_scaler_modes_add
	add	w24, w24, w0
LBB0_26:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DCB_OUTPUT_LVDS,8,3            ; @DCB_OUTPUT_LVDS
	.comm	_DRM_MODE_CONNECTOR_LVDS,8,3    ; @DRM_MODE_CONNECTOR_LVDS
	.comm	_DCB_OUTPUT_TV,8,3              ; @DCB_OUTPUT_TV
	.comm	_DCB_CONNECTOR_LVDS,8,3         ; @DCB_CONNECTOR_LVDS
	.comm	_DCB_CONNECTOR_LVDS_SPWG,8,3    ; @DCB_CONNECTOR_LVDS_SPWG
	.comm	_DCB_CONNECTOR_eDP,8,3          ; @DCB_CONNECTOR_eDP
	.no_dead_strip	_nouveau_connector_get_modes
.subsections_via_symbols
