	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_dp_detect              ## -- Begin function nouveau_dp_detect
	.p2align	4, 0x90
_nouveau_dp_detect:                     ## @nouveau_dp_detect
	.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_encoder
	movq	%rax, %r14
	movq	(%rbx), %rbx
	movq	%rbx, %rdi
	callq	_nouveau_drm
	movq	24(%r14), %r13
	xorl	%r12d, %r12d
	testq	%r13, %r13
	je	LBB0_7
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rbx
	movq	_DP_DPCD_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	movl	$8, %ecx
	callq	_nv_rdaux
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	imull	$27000, 4(%rbx), %ecx           ## imm = 0x6978
	movl	%ecx, 8(%r14)
	movq	_DP_MAX_LANE_COUNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	8(%rbx), %edx
	movl	%edx, 12(%r14)
	movl	(%rbx), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_NV_DEBUG
	movq	16(%r14), %rax
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_NV_DEBUG
	movq	16(%r14), %rax
	movl	(%rax), %ecx
	movl	12(%r14), %edx
	cmpl	%edx, %ecx
	jge	LBB0_4
## %bb.3:
	movl	%ecx, 12(%r14)
	movl	%ecx, %edx
LBB0_4:
	movl	4(%rax), %eax
	movl	8(%r14), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_6
## %bb.5:
	movl	%eax, 8(%r14)
	movl	%eax, %ecx
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_NV_DEBUG
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_nouveau_dp_probe_oui
	movl	$1, %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_DPCD_REV,4,2                ## @DP_DPCD_REV
	.comm	_DP_MAX_LANE_COUNT_MASK,4,2     ## @DP_MAX_LANE_COUNT_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"display: %dx%d dpcd 0x%02x\n"

L_.str.1:                               ## @.str.1
	.asciz	"encoder: %dx%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"maximum: %dx%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_dp_detect              ; -- Begin function nouveau_dp_detect
	.p2align	2
_nouveau_dp_detect:                     ; @nouveau_dp_detect
	.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	x19, x0
	bl	_nouveau_encoder
	mov	x22, x0
	ldr	x19, [x19]
	mov	x0, x19
	bl	_nouveau_drm
	ldr	x20, [x22, #24]
	cbz	x20, LBB0_2
; %bb.1:
	mov	x23, x0
	ldr	x21, [x22]
Lloh0:
	adrp	x8, _DP_DPCD_REV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_DPCD_REV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	mov	w3, #8
	bl	_nv_rdaux
	cbz	w0, LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_8
LBB0_3:
	ldr	w8, [x21, #4]
	mov	w9, #27000
	mul	w3, w8, w9
	str	w3, [x22, #8]
	ldr	w8, [x21, #8]
Lloh3:
	adrp	x9, _DP_MAX_LANE_COUNT_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DP_MAX_LANE_COUNT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w2, w9, w8
	str	w2, [x22, #12]
	ldr	w8, [x21]
	str	x8, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_NV_DEBUG
	ldr	x8, [x22, #16]
	ldp	w2, w3, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_NV_DEBUG
	ldr	x8, [x22, #16]
	ldr	w9, [x8]
	ldr	w2, [x22, #12]
	cmp	w9, w2
	b.ge	LBB0_5
; %bb.4:
	str	w9, [x22, #12]
	mov	x2, x9
LBB0_5:
	ldr	w8, [x8, #4]
	ldr	w3, [x22, #8]
	cmp	w8, w3
	b.ge	LBB0_7
; %bb.6:
	str	w8, [x22, #8]
	mov	x3, x8
LBB0_7:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_NV_DEBUG
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_nouveau_dp_probe_oui
	mov	w0, #1
LBB0_8:
	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 AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_DPCD_REV,4,2                ; @DP_DPCD_REV
	.comm	_DP_MAX_LANE_COUNT_MASK,4,2     ; @DP_MAX_LANE_COUNT_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"display: %dx%d dpcd 0x%02x\n"

l_.str.1:                               ; @.str.1
	.asciz	"encoder: %dx%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"maximum: %dx%d\n"

.subsections_via_symbols
