	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pl111_mode_valid
_pl111_mode_valid:                      ## @pl111_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	8(%r15), %rax
	movl	(%rax), %eax
	leal	7(%rax), %r14d
	testl	%eax, %eax
	cmovnsl	%eax, %r14d
	movq	%rsi, %rbx
	sarl	$3, %r14d
	movl	(%rsi), %eax
	imull	%r14d, %eax
	imull	8(%rsi), %eax
	imull	12(%rsi), %eax
	imull	$1000, %eax, %edi               ## imm = 0x3E8
	movl	20(%rsi), %esi
	imull	16(%rbx), %esi
	callq	_div_u64
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	setne	%r8b
	cmpl	%ecx, %eax
	setg	%r9b
	movl	8(%rbx), %esi
	movl	12(%rbx), %edx
	imull	$1000, (%rbx), %ecx             ## imm = 0x3E8
	leaq	L_.str(%rip), %rbx
	leaq	L_.str.1(%rip), %rdi
	testb	%r9b, %r8b
	cmovneq	%rbx, %rdi
	movq	_MODE_OK@GOTPCREL(%rip), %rbx
	cmovneq	_MODE_BAD@GOTPCREL(%rip), %rbx
	movl	%r14d, %r8d
	movl	%eax, %r9d
	callq	_DRM_DEBUG_KMS
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d x %d @ %d Hz, %d cpp, bw %llu too fast\n"

	.comm	_MODE_BAD,4,2                   ## @MODE_BAD
L_.str.1:                               ## @.str.1
	.asciz	"%d x %d @ %d Hz, %d cpp, bw %llu bytes/s OK\n"

	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_pl111_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pl111_mode_valid
_pl111_mode_valid:                      ; @pl111_mode_valid
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	x8, [x0]
	ldr	x21, [x8]
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w20, w8, #3
	ldr	w8, [x1]
	ldp	w9, w10, [x1, #8]
	mul	w8, w20, w8
	mul	w8, w8, w9
	mul	w8, w8, w10
	mov	w22, #1000
	mul	w0, w8, w22
	ldp	w8, w9, [x1, #16]
	mul	w1, w9, w8
	bl	_div_u64
	mov	x5, x0
	ldr	w8, [x21]
	cmp	w8, #0
	cset	w9, ne
	cmp	w0, w8
	cset	w8, gt
	ldp	w1, w2, [x19, #8]
	ldr	w10, [x19]
	mul	w3, w10, w22
Lloh0:
	adrp	x10, l_.str.1@PAGE
Lloh1:
	add	x10, x10, l_.str.1@PAGEOFF
Lloh2:
	adrp	x11, l_.str@PAGE
Lloh3:
	add	x11, x11, l_.str@PAGEOFF
	tst	w9, w8
	csel	x0, x11, x10, ne
Lloh4:
	adrp	x8, _MODE_BAD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MODE_BAD@GOTPAGEOFF]
Lloh6:
	adrp	x9, _MODE_OK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MODE_OK@GOTPAGEOFF]
	csel	x19, x8, x9, ne
	mov	x4, x20
	bl	_DRM_DEBUG_KMS
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d x %d @ %d Hz, %d cpp, bw %llu too fast\n"

	.comm	_MODE_BAD,4,2                   ; @MODE_BAD
l_.str.1:                               ; @.str.1
	.asciz	"%d x %d @ %d Hz, %d cpp, bw %llu bytes/s OK\n"

	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_pl111_mode_valid
.subsections_via_symbols
