	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fimd_atomic_check
_fimd_atomic_check:                     ## @fimd_atomic_check
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rbx
	movslq	(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	imulq	$1000, %rax, %r14               ## imm = 0x3E8
	cmpq	$0, 16(%rbx)
	setne	%cl
	shlq	%cl, %r14
	movl	8(%rbx), %edi
	callq	_clk_get_rate
	movq	%rax, %rcx
	addq	%rax, %rcx
	cmpq	%r14, %rcx
	jae	LBB0_5
## %bb.4:
	movl	4(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rax, %rdx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	jmp	LBB0_2
LBB0_1:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	jmp	LBB0_2
LBB0_5:
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_DIV_ROUND_CLOSEST
	cmpl	$512, %eax                      ## imm = 0x200
	jl	LBB0_7
## %bb.6:
	movl	4(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	cmpl	$255, %eax
	movl	$255, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, (%rbx)
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Mode has zero clock value.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"sclk_fimd clock too low(%lu) for requested pixel clock(%lu)\n"

L_.str.2:                               ## @.str.2
	.asciz	"requested pixel clock(%lu) too low\n"

	.no_dead_strip	_fimd_atomic_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fimd_atomic_check
_fimd_atomic_check:                     ; @fimd_atomic_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x20, [x0]
	ldrsw	x8, [x1]
	cbz	w8, LBB0_3
; %bb.1:
	mov	w9, #1000
	mul	x8, x8, x9
	ldr	x9, [x20, #16]
	cmp	x9, #0
	cset	w9, ne
	lsl	x19, x8, x9
	ldr	w0, [x20, #8]
	bl	_clk_get_rate
	cmp	x19, x0, lsl #1
	b.ls	LBB0_4
; %bb.2:
	ldr	w8, [x20, #4]
	stp	x0, x19, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	b	LBB0_6
LBB0_3:
	ldr	w0, [x20, #4]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:
	mov	x1, x19
	bl	_DIV_ROUND_CLOSEST
	cmp	w0, #512
	b.lt	LBB0_8
; %bb.5:
	ldr	w0, [x20, #4]
	str	x19, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	bl	_DRM_DEV_ERROR
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	mov	x8, x0
	mov	w0, #0
	mov	w9, #255
	cmp	w8, #255
	csel	w8, w8, w9, lt
	str	w8, [x20]
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Mode has zero clock value.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"sclk_fimd clock too low(%lu) for requested pixel clock(%lu)\n"

l_.str.2:                               ; @.str.2
	.asciz	"requested pixel clock(%lu) too low\n"

	.no_dead_strip	_fimd_atomic_check
.subsections_via_symbols
