	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edp_link_rate_down_shift
_edp_link_rate_down_shift:              ## @edp_link_rate_down_shift
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	movq	_DP_LINK_BW_1_62@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setle	%cl
	movq	_EDP_LINK_BW_MAX@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	setg	%dl
	orb	%cl, %dl
	leal	-4(%rax), %r12d
	testb	%dl, %dl
	cmovnel	%eax, %r12d
	jne	LBB0_3
## %bb.1:
	movq	%rdi, %r14
	movl	12(%rdi), %r9d
	movl	4(%rdi), %r15d
	movl	8(%rdi), %eax
	leal	(%rax,%rax,2), %eax
	movl	%eax, %ecx
	imull	%r9d, %ecx
	leal	7(%rcx), %r13d
	testl	%ecx, %ecx
	cmovnsl	%ecx, %r13d
	sarl	$3, %r13d
	testl	%r15d, %r15d
	setg	%dl
	cmpl	16(%rdi), %r15d
	setl	%cl
	andb	%dl, %cl
	shll	%cl, %r15d
	movl	%r12d, %ecx
	imull	%r15d, %ecx
	imull	$27000, %ecx, %esi              ## imm = 0x6978
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_DBG
	cmpl	%r13d, -44(%rbp)                ## 4-byte Folded Reload
	jle	LBB0_3
## %bb.2:
	movl	%r12d, (%r14)
	movl	%r15d, 4(%r14)
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_DBG
	jmp	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_LINK_BW_1_62,4,2            ## @DP_LINK_BW_1_62
	.comm	_EDP_LINK_BW_MAX,4,2            ## @EDP_LINK_BW_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"new lrate=%u prate=%u(kHz) rate=%d lane=%d p=%u b=%d"

L_.str.1:                               ## @.str.1
	.asciz	"new rate=%d %d"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_edp_link_rate_down_shift
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edp_link_rate_down_shift
_edp_link_rate_down_shift:              ; @edp_link_rate_down_shift
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _DP_LINK_BW_1_62@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DP_LINK_BW_1_62@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
Lloh3:
	adrp	x9, _EDP_LINK_BW_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EDP_LINK_BW_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ccmp	w8, w9, #0, gt
	cset	w9, gt
	sub	w10, w8, #4
	cmp	w9, #0
	csel	w20, w8, w10, ne
	tbnz	w9, #0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldp	w9, w8, [x0, #4]
	add	w8, w8, w8, lsl #1
	ldp	w10, w11, [x0, #12]
	mul	w12, w8, w10
	add	w13, w12, #7
	cmp	w12, #0
	csel	w12, w13, w12, lt
	asr	w22, w12, #3
	cmp	w9, #0
	ccmp	w9, w11, #0, gt
	cset	w11, lt
	lsl	w21, w9, w11
	mul	w9, w20, w21
	mov	w11, #27000
	mul	w23, w9, w11
	stp	x10, x8, [sp, #16]
	stp	x20, x21, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	mov	x2, x22
	bl	_DBG
	cmp	w23, w22
	b.le	LBB0_3
; %bb.2:
	stp	w20, w21, [x19]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_DBG
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_LINK_BW_1_62,4,2            ; @DP_LINK_BW_1_62
	.comm	_EDP_LINK_BW_MAX,4,2            ; @EDP_LINK_BW_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"new lrate=%u prate=%u(kHz) rate=%d lane=%d p=%u b=%d"

l_.str.1:                               ; @.str.1
	.asciz	"new rate=%d %d"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_edp_link_rate_down_shift
.subsections_via_symbols
