	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_encoder_phy_mode_valid
_dsi_encoder_phy_mode_valid:            ## @dsi_encoder_phy_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, %rbx
	callq	_encoder_to_dsi
	movq	%rax, %r14
	movl	4(%rax), %edi
	callq	_mipi_dsi_pixel_format_to_bpp
	movl	%eax, %r15d
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	(%rbx), %eax
	imull	%r15d, %eax
	cltd
	idivl	(%r14)
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_dsi_calc_phy_rate
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %r13d
	movl	8(%rbx), %r12d
	movq	%rbx, %rdi
	callq	_drm_mode_vrefresh
	movl	(%rbx), %r9d
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movl	(%rbx), %eax
	cltd
	idivl	(%r14)
	movslq	-44(%rbp), %rcx                 ## 4-byte Folded Reload
	imulq	$715827883, %rcx, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	cmpl	%ecx, %eax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdi
	cmoveq	%rax, %rdi
	movq	_MODE_BAD@GOTPCREL(%rip), %rbx
	cmoveq	_MODE_OK@GOTPCREL(%rip), %rbx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Checking mode %ix%i-%i@%i clock: %i..."

L_.str.1:                               ## @.str.1
	.asciz	"OK!\n"

	.comm	_MODE_OK,4,2                    ## @MODE_OK
L_.str.2:                               ## @.str.2
	.asciz	"BAD!\n"

	.comm	_MODE_BAD,4,2                   ## @MODE_BAD
	.no_dead_strip	_dsi_encoder_phy_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsi_encoder_phy_mode_valid
_dsi_encoder_phy_mode_valid:            ; @dsi_encoder_phy_mode_valid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	_encoder_to_dsi
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_mipi_dsi_pixel_format_to_bpp
	mov	x21, x0
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w8, [x19]
	mul	w8, w8, w21
	ldr	w9, [x20]
	sdiv	w0, w8, w9
	add	x1, sp, #40
	bl	_dsi_calc_phy_rate
	mov	x22, x0
	ldp	w24, w23, [x19, #4]
	mov	x0, x19
	bl	_drm_mode_vrefresh
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x19]
	stp	x0, x8, [sp, #24]
	stp	x24, x21, [sp, #8]
	str	x23, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w8, [x19]
	ldr	w9, [x20]
	sdiv	w8, w8, w9
	mov	w9, #43691
	movk	w9, #10922, lsl #16
	smull	x9, w22, w9
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #2
Lloh2:
	adrp	x10, l_.str.2@PAGE
Lloh3:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh4:
	adrp	x11, l_.str.1@PAGE
Lloh5:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	w8, w9
	csel	x0, x11, x10, eq
Lloh6:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
Lloh8:
	adrp	x9, _MODE_BAD@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MODE_BAD@GOTPAGEOFF]
	csel	x19, x8, x9, eq
	bl	_DRM_DEBUG_DRIVER
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Checking mode %ix%i-%i@%i clock: %i..."

l_.str.1:                               ; @.str.1
	.asciz	"OK!\n"

	.comm	_MODE_OK,4,2                    ; @MODE_OK
l_.str.2:                               ; @.str.2
	.asciz	"BAD!\n"

	.comm	_MODE_BAD,4,2                   ; @MODE_BAD
	.no_dead_strip	_dsi_encoder_phy_mode_valid
.subsections_via_symbols
