	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function CalculateFlipSchedule
LCPI0_0:
	.quad	0x3fd0000000000000              ## double 0.25
LCPI0_1:
	.quad	0x3fc0000000000000              ## double 0.125
LCPI0_2:
	.quad	0x4010000000000000              ## double 4
LCPI0_3:
	.quad	0x4020000000000000              ## double 8
LCPI0_4:
	.quad	0x4030000000000000              ## double 16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CalculateFlipSchedule:                 ## @CalculateFlipSchedule
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r14
	movq	80(%rbp), %rdx
	movq	72(%rbp), %r10
	movq	64(%rbp), %rdi
	movq	56(%rbp), %rbx
	movq	_dm_420_8@GOTPCREL(%rip), %rax
	cmpl	%r8d, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_dm_420_10@GOTPCREL(%rip), %rax
	cmpl	%r8d, (%rax)
	je	LBB0_2
## %bb.3:
	movsd	%xmm2, -56(%rbp)                ## 8-byte Spill
	movsd	%xmm1, -96(%rbp)                ## 8-byte Spill
	movsd	%xmm6, -104(%rbp)               ## 8-byte Spill
	movsd	%xmm4, -64(%rbp)                ## 8-byte Spill
	movl	%r9d, %r15d
	movl	%ecx, %ebx
	xorpd	%xmm1, %xmm1
	cmpl	$1, %r13d
	movsd	%xmm3, -48(%rbp)                ## 8-byte Spill
	jne	LBB0_5
## %bb.4:
	xorps	%xmm1, %xmm1
	cvtsi2sd	%r15, %xmm1
	mulsd	-56(%rbp), %xmm1                ## 8-byte Folded Reload
	xorps	%xmm2, %xmm2
	cvtsi2sd	%rbx, %xmm2
	divsd	%xmm2, %xmm1
	movq	(%r14), %rax
	movsd	%xmm1, (%rax)
	movsd	-104(%rbp), %xmm2               ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	divsd	%xmm1, %xmm2
	addsd	%xmm5, %xmm2
	movsd	%xmm2, -72(%rbp)                ## 8-byte Spill
	decl	%esi
	xorps	%xmm1, %xmm1
	cvtsi2sd	%rsi, %xmm1
	mulsd	-96(%rbp), %xmm1                ## 8-byte Folded Reload
	addsd	%xmm0, %xmm1
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	mulsd	%xmm3, %xmm0
	cvttsd2si	%xmm0, %rdi
	movapd	%xmm1, %xmm0
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_dml_max
	movsd	-72(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movl	%eax, %edi
	callq	_dml_max
	movsd	-48(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	movl	%eax, %eax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%rax, %xmm1
LBB0_5:
	movl	24(%rbp), %r12d
	movsd	%xmm1, -72(%rbp)                ## 8-byte Spill
	movapd	%xmm1, %xmm0
	divsd	%xmm3, %xmm0
	addsd	LCPI0_1(%rip), %xmm0
	mulsd	LCPI0_2(%rip), %xmm0
	movl	$1, %edi
	callq	_dml_floor
	mulsd	LCPI0_0(%rip), %xmm0
	movq	56(%rbp), %rax
	movsd	%xmm0, (%rax)
	cmpl	$1, %r13d
	xorpd	%xmm0, %xmm0
	je	LBB0_7
## %bb.6:
	cmpl	$1, 32(%rbp)
	jne	LBB0_8
LBB0_7:
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r15, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sd	%rbx, %xmm1
	mulsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	divsd	%xmm1, %xmm0
	movq	(%r14), %rax
	movsd	%xmm0, (%rax)
	movl	16(%rbp), %eax
	addl	%r12d, %eax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%rax, %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	mulsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	cvttsd2si	%xmm0, %rdi
	movsd	-96(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_dml_max
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movl	%eax, %edi
	callq	_dml_max
	movl	%eax, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
LBB0_8:
	movapd	%xmm0, -96(%rbp)                ## 16-byte Spill
	divsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	addsd	LCPI0_1(%rip), %xmm0
	mulsd	LCPI0_2(%rip), %xmm0
	movl	$1, %edi
	callq	_dml_floor
	mulsd	LCPI0_0(%rip), %xmm0
	movq	64(%rbp), %r14
	movsd	%xmm0, (%r14)
	cmpl	$1, %r13d
	jne	LBB0_10
## %bb.9:
	movq	56(%rbp), %r15
	movsd	(%r15), %xmm1                   ## xmm1 = mem[0],zero
	movsd	-48(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	mulsd	%xmm3, %xmm1
	movsd	-104(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	divsd	%xmm1, %xmm0
	movl	16(%rbp), %eax
	addl	%eax, %r12d
	xorps	%xmm2, %xmm2
	cvtsi2sd	%r12, %xmm2
	movapd	-96(%rbp), %xmm1                ## 16-byte Reload
	mulsd	%xmm3, %xmm1
	divsd	%xmm1, %xmm2
	cvttsd2si	%xmm2, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_dml_max
	movl	%eax, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	jmp	LBB0_13
LBB0_2:
	movq	$0, (%rbx)
	movq	$0, (%rdi)
	movsd	%xmm7, (%r10)
	movl	$1, %eax
	jmp	LBB0_23
LBB0_10:
	movl	16(%rbp), %eax
	addl	%eax, %r12d
	movq	56(%rbp), %r15
	je	LBB0_11
## %bb.12:
	movl	%r12d, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movapd	-96(%rbp), %xmm1                ## 16-byte Reload
	mulsd	-48(%rbp), %xmm1                ## 8-byte Folded Reload
	divsd	%xmm1, %xmm0
	jmp	LBB0_13
LBB0_11:
	xorpd	%xmm0, %xmm0
LBB0_13:
	movsd	-64(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	movq	72(%rbp), %rax
	movl	40(%rbp), %edi
	movsd	%xmm0, (%rax)
	testl	%r13d, %r13d
	je	LBB0_17
## %bb.14:
	cmpl	$0, 32(%rbp)
	jne	LBB0_17
## %bb.15:
	movl	%edi, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	jmp	LBB0_21
LBB0_17:
	movl	48(%rbp), %esi
	testl	%r13d, %r13d
	jne	LBB0_20
## %bb.18:
	cmpl	$0, 32(%rbp)
	je	LBB0_20
## %bb.19:
	movl	%esi, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	jmp	LBB0_21
LBB0_20:
	callq	_dml_min
	movsd	-64(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
LBB0_21:
	movq	80(%rbp), %rdx
	movsd	-48(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	movsd	(%r15), %xmm1                   ## xmm1 = mem[0],zero
	xorl	%eax, %eax
	ucomisd	LCPI0_3(%rip), %xmm1
	jae	LBB0_23
## %bb.22:
	mulsd	%xmm3, %xmm0
	divsd	%xmm2, %xmm0
	movapd	-96(%rbp), %xmm1                ## 16-byte Reload
	addsd	%xmm1, %xmm1
	addsd	-72(%rbp), %xmm1                ## 8-byte Folded Reload
	cmpnltpd	%xmm1, %xmm0
	movsd	(%r14), %xmm1                   ## xmm1 = mem[0],zero
	movsd	LCPI0_4(%rip), %xmm2            ## xmm2 = mem[0],zero
	cmpnlepd	%xmm1, %xmm2
	andpd	%xmm0, %xmm2
	movd	%xmm2, %eax
	andl	$1, %eax
LBB0_23:
	movl	%eax, (%rdx)
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dm_420_8,4,2                   ## @dm_420_8
	.comm	_dm_420_10,4,2                  ## @dm_420_10
	.no_dead_strip	_CalculateFlipSchedule
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CalculateFlipSchedule
_CalculateFlipSchedule:                 ; @CalculateFlipSchedule
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	d15, d14, [sp, #16]             ; 16-byte Folded Spill
	stp	d13, d12, [sp, #32]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #48]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #64]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	.cfi_offset b12, -136
	.cfi_offset b13, -144
	.cfi_offset b14, -152
	.cfi_offset b15, -160
	ldp	x26, x23, [x29, #48]
	ldp	x25, x24, [x29, #32]
Lloh0:
	adrp	x8, _dm_420_8@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dm_420_8@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _dm_420_10@GOTPAGE
Lloh4:
	ldr	x9, [x9, _dm_420_10@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w4
	ccmp	w9, w4, #4, ne
	b.ne	LBB0_2
; %bb.1:
	str	xzr, [x25]
	str	xzr, [x24]
	mov	w8, #1
	str	d7, [x26]
	b	LBB0_22
LBB0_2:
	mov	x20, x7
	mov	x21, x6
	mov	x19, x2
	fmov	d10, d6
	fmov	d9, d3
	fmov	d12, d2
	fmov	d11, d1
	mov	x22, x0
	str	d4, [sp, #8]                    ; 8-byte Folded Spill
	movi	d14, #0000000000000000
	ucvtf	d15, w5
	ucvtf	d8, w3
	movi	d13, #0000000000000000
	cmp	w2, #1
	b.ne	LBB0_4
; %bb.3:
	fmul	d1, d15, d12
	fdiv	d1, d1, d8
	ldr	x8, [x22]
	str	d1, [x8]
	fdiv	d1, d10, d1
	sub	w8, w1, #1
	ucvtf	d2, w8
	fadd	d13, d1, d5
	fmadd	d0, d11, d2, d0
	fmov	d1, #0.25000000
	fmul	d1, d9, d1
	fcvtzu	w0, d1
	bl	_dml_max
	fmov	d0, d13
	bl	_dml_max
	ucvtf	d13, w0
LBB0_4:
	ldr	w27, [x29, #16]
	fdiv	d0, d13, d9
	fmov	d1, #0.12500000
	fadd	d0, d0, d1
	fmov	d1, #4.00000000
	fmul	d0, d0, d1
	mov	w0, #1
	bl	_dml_floor
	fmov	d1, #0.25000000
	fmul	d0, d0, d1
	str	d0, [x25]
	cmp	w19, #1
	b.eq	LBB0_6
; %bb.5:
	cmp	w27, #1
	b.ne	LBB0_7
LBB0_6:
	fmul	d0, d15, d12
	fdiv	d0, d0, d8
	ldr	x8, [x22]
	str	d0, [x8]
	add	w8, w20, w21
	ucvtf	d2, w8
	fdiv	d12, d2, d0
	fmul	d0, d9, d1
	fcvtzu	w0, d0
	fmov	d0, d11
	bl	_dml_max
	fmov	d0, d12
	bl	_dml_max
	ucvtf	d14, w0
LBB0_7:
	fdiv	d0, d14, d9
	fmov	d1, #0.12500000
	fadd	d0, d0, d1
	fmov	d1, #4.00000000
	fmul	d0, d0, d1
	mov	w0, #1
	bl	_dml_floor
	fmov	d1, #0.25000000
	fmul	d0, d0, d1
	str	d0, [x24]
	cmp	w19, #1
	b.ne	LBB0_9
; %bb.8:
	ldr	d0, [x25]
	fmul	d0, d0, d9
	fdiv	d0, d10, d0
	add	w8, w20, w21
	ucvtf	d1, w8
	fmul	d2, d14, d9
	fdiv	d1, d1, d2
	fcvtzu	w0, d1
	bl	_dml_max
	ucvtf	d0, w0
	b	LBB0_12
LBB0_9:
	adds	w8, w20, w21
	b.eq	LBB0_11
; %bb.10:
	ucvtf	d0, w8
	fmul	d1, d14, d9
	fdiv	d0, d0, d1
	b	LBB0_12
LBB0_11:
	movi	d0, #0000000000000000
LBB0_12:
	ldr	w0, [x29, #20]
	str	d0, [x26]
	cbz	w19, LBB0_15
; %bb.13:
	cbnz	w27, LBB0_15
; %bb.14:
	ucvtf	d0, w0
	b	LBB0_19
LBB0_15:
	ldr	w1, [x29, #24]
	cbnz	w19, LBB0_18
; %bb.16:
	cbz	w27, LBB0_18
; %bb.17:
	ucvtf	d0, w1
	b	LBB0_19
LBB0_18:
	bl	_dml_min
LBB0_19:
	ldr	d1, [x25]
	fmov	d2, #8.00000000
	fcmp	d1, d2
	b.ge	LBB0_21
; %bb.20:
	fmul	d0, d0, d9
	ldr	d1, [sp, #8]                    ; 8-byte Folded Reload
	fdiv	d0, d0, d1
	ldr	d1, [x24]
	fmov	d2, #16.00000000
	fcmp	d1, d2
	cset	w8, lt
	fmov	d1, #2.00000000
	fmadd	d1, d14, d1, d13
	fcmp	d1, d0
	cset	w9, le
	and	w8, w8, w9
	b	LBB0_22
LBB0_21:
	mov	w8, #0
LBB0_22:
	str	w8, [x23]
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #64]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #48]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #32]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_dm_420_8,4,2                   ; @dm_420_8
	.comm	_dm_420_10,4,2                  ; @dm_420_10
	.no_dead_strip	_CalculateFlipSchedule
.subsections_via_symbols
