	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdn_dp_connector_mode_valid
_cdn_dp_connector_mode_valid:           ## @cdn_dp_connector_mode_valid
	.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	%rsi, %r14
	callq	_connector_to_dp
	cmpl	$0, 12(%rax)
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	16(%rax), %eax
	xorl	%ecx, %ecx
	cmpl	$6, %eax
	setne	%cl
	addl	%ecx, %ecx
	addl	$6, %ecx
	cmpl	$10, %eax
	cmovel	%eax, %ecx
	imull	(%r14), %ecx
	leal	(%rcx,%rcx,2), %eax
	cltq
	imulq	$274877907, %rax, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$38, %rbx
	addl	%eax, %ebx
	movl	(%r15), %r12d
	movl	8(%r15), %edi
	callq	_drm_dp_max_lane_count
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_min
	movl	%eax, %r12d
	movq	_CDN_DP_MAX_LINK_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_drm_dp_bw_code_to_link_rate
	movl	%eax, %r13d
	movl	8(%r15), %edi
	callq	_drm_dp_max_link_rate
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_min
	imull	%r12d, %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	shll	$3, %eax
	cltq
	imulq	$1717986919, %rax, %rcx         ## imm = 0x66666667
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$34, %rcx
	addl	%eax, %ecx
	cmpl	%ecx, %ebx
	jle	LBB0_3
## %bb.4:
	movl	4(%r15), %edi
	movl	(%r14), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_DRM_DEV_DEBUG_KMS
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_MODE_BAD@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MODE_BAD,4,2                   ## @MODE_BAD
	.comm	_CDN_DP_MAX_LINK_RATE,4,2       ## @CDN_DP_MAX_LINK_RATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"requested=%d, actual=%d, clock=%d\n"

	.comm	_MODE_CLOCK_HIGH,4,2            ## @MODE_CLOCK_HIGH
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_cdn_dp_connector_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdn_dp_connector_mode_valid
_cdn_dp_connector_mode_valid:           ; @cdn_dp_connector_mode_valid
	.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, x1
	bl	_connector_to_dp
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0, #16]
	mov	w9, #8
	cmp	w8, #6
	csel	w9, w8, w9, eq
	cmp	w8, #10
	csel	w8, w8, w9, eq
	ldr	w9, [x19]
	mul	w8, w9, w8
	add	w8, w8, w8, lsl #1
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w21, w8, w9
	ldr	w22, [x0]
	ldr	w0, [x0, #8]
	bl	_drm_dp_max_lane_count
	mov	x1, x0
	mov	x0, x22
	bl	_min
	mov	x22, x0
Lloh0:
	adrp	x8, _CDN_DP_MAX_LINK_RATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDN_DP_MAX_LINK_RATE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_drm_dp_bw_code_to_link_rate
	mov	x23, x0
	ldr	w0, [x20, #8]
	bl	_drm_dp_max_link_rate
	mov	x1, x0
	mov	x0, x23
	bl	_min
	mul	w8, w0, w22
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	lsl	w8, w8, #3
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w3, w8, w9
	cmp	w21, w3
	b.le	LBB0_4
; %bb.2:
	ldr	w0, [x20, #4]
	ldr	w4, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_DRM_DEV_DEBUG_KMS
Lloh5:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh7:
	adrp	x8, _MODE_BAD@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MODE_BAD@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MODE_BAD,4,2                   ; @MODE_BAD
	.comm	_CDN_DP_MAX_LINK_RATE,4,2       ; @CDN_DP_MAX_LINK_RATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"requested=%d, actual=%d, clock=%d\n"

	.comm	_MODE_CLOCK_HIGH,4,2            ; @MODE_CLOCK_HIGH
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_cdn_dp_connector_mode_valid
.subsections_via_symbols
