	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_calc_timestamping_constants ## -- Begin function drm_calc_timestamping_constants
	.p2align	4, 0x90
_drm_calc_timestamping_constants:       ## @drm_calc_timestamping_constants
	.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
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	callq	_drm_crtc_index
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.1:
	movq	8(%rbx), %r13
	movl	%eax, %r15d
	movl	(%r14), %ebx
	xorl	%edi, %edi
	cmpl	%ecx, %r15d
	setae	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	testl	%ebx, %ebx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_6
## %bb.3:
	imull	$1000000, 4(%r14), %edi         ## imm = 0xF4240
	movl	8(%r14), %r13d
	imull	%edi, %r13d
	movl	%ebx, %esi
	callq	_div_u64
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_div_u64
	movl	%eax, %r13d
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%r14)
	je	LBB0_5
## %bb.4:
	movl	%r13d, %eax
	shrl	$31, %eax
	addl	%r13d, %eax
	sarl	%eax
	movl	%eax, %r13d
LBB0_5:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_7
LBB0_6:
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
LBB0_7:
	leaq	(%r15,%r15,8), %rax
	leaq	(%rax,%rax,2), %rax
	addq	%r15, %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%ebx, (%rdx,%rax)
	movl	%r13d, 4(%rdx,%rax)
	movups	(%r14), %xmm0
	movups	%xmm0, 8(%rdx,%rax)
	movl	16(%r14), %ecx
	movl	%ecx, 24(%rdx,%rax)
	movl	(%r12), %esi
	movl	4(%r14), %edx
	movl	8(%r14), %ecx
	movl	16(%r14), %r8d
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG
	movl	(%r12), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"crtc %u: Can't calculate constants, dotclock = 0!\n"

L_.str.1:                               ## @.str.1
	.asciz	"crtc %u: hwmode: htotal %d, vtotal %d, vdisplay %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"crtc %u: clock %d kHz framedur %d linedur %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_calc_timestamping_constants ; -- Begin function drm_calc_timestamping_constants
	.p2align	2
_drm_calc_timestamping_constants:       ; @drm_calc_timestamping_constants
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	bl	_drm_crtc_index
	ldr	w8, [x21]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x24, [x21, #8]
	mov	w25, w0
	ldr	w21, [x20]
	cmp	w25, w8
	cset	w0, hs
	bl	_WARN_ON
	cbz	x0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	cmp	w21, #1
	b.lt	LBB0_5
; %bb.4:
	ldp	w8, w26, [x20, #4]
	mov	w9, #16960
	movk	w9, #15, lsl #16
	mul	w23, w8, w9
	mov	x0, x23
	mov	x1, x21
	bl	_div_u64
	mov	x22, x0
	mul	w0, w23, w26
	mov	x1, x21
	bl	_div_u64
	ldr	w8, [x20, #12]
Lloh0:
	adrp	x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w0, #0
	cinc	w10, w0, lt
	asr	w10, w10, #1
	tst	w9, w8
	csel	w23, w0, w10, eq
	b	LBB0_6
LBB0_5:
	ldr	w1, [x19]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	mov	w23, #0
	mov	w22, #0
LBB0_6:
	mov	w8, #28
	madd	x8, x25, x8, x24
	stp	w22, w23, [x8]
	ldr	q0, [x20]
	ldr	w9, [x20, #16]
	str	w9, [x8, #24]
	stur	q0, [x8, #8]
	ldr	w1, [x19]
	ldp	w2, w3, [x20, #4]
	ldr	w4, [x20, #16]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	ldr	w1, [x19]
	mov	x2, x21
	mov	x3, x23
	mov	x4, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_DRM_DEBUG
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"crtc %u: Can't calculate constants, dotclock = 0!\n"

l_.str.1:                               ; @.str.1
	.asciz	"crtc %u: hwmode: htotal %d, vtotal %d, vdisplay %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"crtc %u: clock %d kHz framedur %d linedur %d\n"

.subsections_via_symbols
