	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dp_set_link_config
_dp_set_link_config:                    ## @dp_set_link_config
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	32(%rdi), %rdi
	callq	_nouveau_bios
	movq	%rax, %r14
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, -88(%rbp)
	movl	20(%r15), %eax
	movl	%eax, -80(%rbp)
	movl	24(%r15), %eax
	movl	%eax, -76(%rbp)
	movq	%r14, -72(%rbp)
	movq	32(%r15), %rdi
	callq	_nv_subdev
	movl	%eax, -64(%rbp)
	movl	(%r15), %esi
	movl	4(%r15), %edx
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	movslq	4(%r15), %rax
	imulq	$-1688717511, %rax, %rcx        ## imm = 0x9B583739
	shrq	$32, %rcx
	addl	%eax, %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	sarl	$14, %ecx
	addl	%eax, %ecx
	movl	%ecx, -56(%rbp)
	movl	(%r15), %eax
	movl	%eax, -52(%rbp)
	movq	8(%r15), %rcx
	movq	_DPCD_RC02@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	movq	_DPCD_RC02_ENHANCED_FRAME_CAP@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rcx,%rdx,4)
	je	LBB0_2
## %bb.1:
	movq	_DPCD_LC01_ENHANCED_FRAME_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -52(%rbp)
LBB0_2:
	movl	56(%r15), %edi
	movq	_DPCD_LC00@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movl	$2, %ecx
	callq	_nv_wraux
	movq	48(%r15), %r13
	testq	%r13, %r13
	je	LBB0_10
## %bb.3:
	cmpl	$48, 16(%r15)
	jge	LBB0_7
## %bb.4:
	movq	%r12, %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movslq	4(%r15), %rax
	imulq	$1717986919, %rax, %r12         ## imm = 0x66666667
	movq	%r12, %rax
	shrq	$63, %rax
	sarq	$34, %r12
	addl	%eax, %r12d
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_nv_ro16
	addq	$4, %r13
	cmpl	%eax, %r12d
	jl	LBB0_5
## %bb.6:
	addq	$-2, %r13
	movq	%rbx, %r12
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	4(%r15), %rax
	imulq	$-1688717511, %rax, %rbx        ## imm = 0x9B583739
	shrq	$32, %rbx
	addl	%eax, %ebx
	movl	%ebx, %eax
	shrl	$31, %eax
	sarl	$14, %ebx
	addl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_nv_ro08
	addq	$3, %r13
	cmpl	%eax, %ebx
	jl	LBB0_7
## %bb.8:
	addq	$-2, %r13
LBB0_9:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_nv_ro16
	movl	%eax, -88(%rbp)
	leaq	-88(%rbp), %rdi
	callq	_nvbios_exec
LBB0_10:
	movq	40(%r15), %r10
	movq	32(%r15), %rdi
	movl	24(%r15), %esi
	movl	20(%r15), %edx
	movl	(%r15), %ecx
	movslq	4(%r15), %rbx
	imulq	$-1688717511, %rbx, %r8         ## imm = 0x9B583739
	shrq	$32, %r8
	addl	%ebx, %r8d
	movl	%r8d, %ebx
	shrl	$31, %ebx
	sarl	$14, %r8d
	addl	%ebx, %r8d
	movq	8(%r15), %r11
	movq	(%r12), %rax
	movq	_DPCD_RC02_ENHANCED_FRAME_CAP@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r9d
	andl	(%r11,%rax,4), %r9d
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	*(%r10)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_12
## %bb.11:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d lanes at %d KB/s\n"

	.comm	_DPCD_RC02,8,3                  ## @DPCD_RC02
	.comm	_DPCD_RC02_ENHANCED_FRAME_CAP,4,2 ## @DPCD_RC02_ENHANCED_FRAME_CAP
	.comm	_DPCD_LC01_ENHANCED_FRAME_EN,4,2 ## @DPCD_LC01_ENHANCED_FRAME_EN
	.comm	_DPCD_LC00,4,2                  ## @DPCD_LC00
	.no_dead_strip	_dp_set_link_config
.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 dp_set_link_config
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_dp_set_link_config:                    ; @dp_set_link_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x0, [x0, #32]
	bl	_nouveau_bios
	mov	x20, x0
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	ldur	d1, [x19, #20]
	stp	d0, d1, [sp]
	str	x0, [sp, #16]
	ldr	x0, [x19, #32]
	bl	_nv_subdev
	str	w0, [sp, #24]
	ldp	w1, w2, [x19]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	mov	x9, #-51399
	movk	x9, #39768, lsl #16
	ldp	w8, w10, [x19]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	mul	x9, x10, x9
	lsr	x9, x9, #32
	add	w9, w9, w10
	asr	w10, w9, #14
	add	w9, w10, w9, lsr #31
	stp	w9, w8, [sp, #32]
	ldr	x9, [x19, #8]
Lloh7:
	adrp	x22, _DPCD_RC02@GOTPAGE
Lloh8:
	ldr	x22, [x22, _DPCD_RC02@GOTPAGEOFF]
	ldr	x10, [x22]
	ldr	w9, [x9, x10, lsl #2]
Lloh9:
	adrp	x23, _DPCD_RC02_ENHANCED_FRAME_CAP@GOTPAGE
Lloh10:
	ldr	x23, [x23, _DPCD_RC02_ENHANCED_FRAME_CAP@GOTPAGEOFF]
	ldr	w10, [x23]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
Lloh11:
	adrp	x9, _DPCD_LC01_ENHANCED_FRAME_EN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DPCD_LC01_ENHANCED_FRAME_EN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #36]
LBB0_2:
	ldr	w0, [x19, #56]
Lloh14:
	adrp	x8, _DPCD_LC00@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DPCD_LC00@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x2, sp, #32
	mov	w3, #2
	bl	_nv_wraux
	ldr	x21, [x19, #48]
	cbz	x21, LBB0_9
; %bb.3:
	ldr	w8, [x19, #16]
	cmp	w8, #48
	b.ge	LBB0_6
; %bb.4:
	mov	w24, #26215
	movk	w24, #26214, lsl #16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x19, #4]
	mul	x8, x8, x24
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w25, w8, w9
	mov	x0, x20
	mov	x1, x21
	bl	_nv_ro16
	add	x21, x21, #4
	cmp	w25, w0
	b.lt	LBB0_5
	b	LBB0_8
LBB0_6:
	mov	x24, #-51399
	movk	x24, #39768, lsl #16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x19, #4]
	mul	x9, x8, x24
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #14
	add	w25, w9, w8, lsr #31
	mov	x0, x20
	mov	x1, x21
	bl	_nv_ro08
	add	x21, x21, #3
	cmp	w25, w0
	b.lt	LBB0_7
LBB0_8:
	sub	x1, x21, #2
	mov	x0, x20
	bl	_nv_ro16
	str	w0, [sp]
	mov	x0, sp
	bl	_nvbios_exec
LBB0_9:
	ldp	x0, x8, [x19, #32]
	ldr	x8, [x8]
	ldp	w2, w1, [x19, #20]
	ldp	w3, w9, [x19]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	mov	x10, #-51399
	movk	x10, #39768, lsl #16
	mul	x10, x9, x10
	lsr	x10, x10, #32
	add	w9, w10, w9
	asr	w10, w9, #14
	add	w4, w10, w9, lsr #31
	ldr	x9, [x19, #8]
	ldr	x10, [x22]
	ldr	w9, [x9, x10, lsl #2]
	ldr	w10, [x23]
	and	w5, w10, w9
	blr	x8
	ldr	x8, [sp, #40]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d lanes at %d KB/s\n"

	.comm	_DPCD_RC02,8,3                  ; @DPCD_RC02
	.comm	_DPCD_RC02_ENHANCED_FRAME_CAP,4,2 ; @DPCD_RC02_ENHANCED_FRAME_CAP
	.comm	_DPCD_LC01_ENHANCED_FRAME_EN,4,2 ; @DPCD_LC01_ENHANCED_FRAME_EN
	.comm	_DPCD_LC00,4,2                  ; @DPCD_LC00
	.no_dead_strip	_dp_set_link_config
.subsections_via_symbols
