	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cr0014114_sync
_cr0014114_sync:                        ## @cr0014114_sync
	.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, %r14
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	movq	16(%rdi), %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	16(%r14), %rdi
	subq	%rbx, %rdi
	callq	_jiffies_to_usecs
	leaq	1(%rax), %rsi
	movq	%rax, %rdi
	callq	_usleep_range
LBB0_2:
	movl	(%r14), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_cr0014114_recount
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.4:
	movl	$0, (%r14)
	movq	_CR_FW_DELAY_MSEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
LBB0_5:
	movq	_CR_SET_BRIGHTNESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	24(%r14), %rdi
	movl	%eax, (%rdi)
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_21
## %bb.6:
	movq	40(%r14), %rax
	cmpq	$8, %rsi
	jb	LBB0_7
## %bb.8:
	movq	%rdi, %rcx
	subq	%rax, %rcx
	addq	$4, %rcx
	cmpq	$32, %rcx
	jae	LBB0_10
LBB0_7:
	xorl	%ecx, %ecx
LBB0_17:
	movq	%rcx, %r8
	notq	%r8
	addq	%rsi, %r8
	movq	%rsi, %rbx
	andq	$3, %rbx
	je	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rcx,4), %edx
	movl	%edx, 4(%rdi,%rcx,4)
	incq	%rcx
	decq	%rbx
	jne	LBB0_18
LBB0_19:
	cmpq	$3, %r8
	jb	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rcx,4), %edx
	movl	%edx, 4(%rdi,%rcx,4)
	movl	4(%rax,%rcx,4), %edx
	movl	%edx, 8(%rdi,%rcx,4)
	movl	8(%rax,%rcx,4), %edx
	movl	%edx, 12(%rdi,%rcx,4)
	movl	12(%rax,%rcx,4), %edx
	movl	%edx, 16(%rdi,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %rsi
	jne	LBB0_20
	jmp	LBB0_21
LBB0_10:
	movq	%rsi, %rcx
	andq	$-8, %rcx
	leaq	-8(%rcx), %rbx
	movq	%rbx, %rdx
	shrq	$3, %rdx
	incq	%rdx
	movl	%edx, %r8d
	andl	$3, %r8d
	cmpq	$24, %rbx
	jae	LBB0_12
## %bb.11:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_12:
	andq	$-4, %rdx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rax,%rbx,4), %xmm0
	movups	16(%rax,%rbx,4), %xmm1
	movups	%xmm0, 4(%rdi,%rbx,4)
	movups	%xmm1, 20(%rdi,%rbx,4)
	movups	32(%rax,%rbx,4), %xmm0
	movups	48(%rax,%rbx,4), %xmm1
	movups	%xmm0, 36(%rdi,%rbx,4)
	movups	%xmm1, 52(%rdi,%rbx,4)
	movups	64(%rax,%rbx,4), %xmm0
	movups	80(%rax,%rbx,4), %xmm1
	movups	%xmm0, 68(%rdi,%rbx,4)
	movups	%xmm1, 84(%rdi,%rbx,4)
	movups	96(%rax,%rbx,4), %xmm0
	movups	112(%rax,%rbx,4), %xmm1
	movups	%xmm0, 100(%rdi,%rbx,4)
	movups	%xmm1, 116(%rdi,%rbx,4)
	addq	$32, %rbx
	addq	$-4, %rdx
	jne	LBB0_13
LBB0_14:
	testq	%r8, %r8
	je	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rax,%rbx,4), %xmm0
	movups	16(%rax,%rbx,4), %xmm1
	leaq	(,%rbx,4), %rdx
	orq	$4, %rdx
	movups	%xmm0, (%rdi,%rdx)
	movups	%xmm1, 16(%rdi,%rdx)
	addq	$8, %rbx
	decq	%r8
	jne	LBB0_15
LBB0_16:
	cmpq	%rcx, %rsi
	jne	LBB0_17
LBB0_21:
	addl	$2, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_cr0014114_calc_crc
	movl	32(%r14), %edi
	movq	24(%r14), %rsi
	movl	8(%r14), %edx
	addl	$2, %edx
	callq	_spi_write
	movl	%eax, %ebx
LBB0_22:
	movq	(%r15), %r15
	movq	_CR_FW_DELAY_MSEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	addq	%r15, %rax
	movq	%rax, 16(%r14)
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_CR_FW_DELAY_MSEC,4,2           ## @CR_FW_DELAY_MSEC
	.comm	_CR_SET_BRIGHTNESS,4,2          ## @CR_SET_BRIGHTNESS
	.no_dead_strip	_cr0014114_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cr0014114_sync
_cr0014114_sync:                        ; @cr0014114_sync
	.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, x0
Lloh0:
	adrp	x21, _jiffies@GOTPAGE
Lloh1:
	ldr	x21, [x21, _jiffies@GOTPAGEOFF]
	ldr	x20, [x21]
	ldr	x0, [x0, #16]
	mov	x1, x20
	bl	_time_after
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x19, #16]
	sub	x0, x8, x20
	bl	_jiffies_to_usecs
	add	x1, x0, #1
	bl	_usleep_range
LBB0_2:
	ldr	w0, [x19]
	bl	_unlikely
Lloh2:
	adrp	x22, _CR_FW_DELAY_MSEC@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CR_FW_DELAY_MSEC@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_cr0014114_recount
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.4:
	str	wzr, [x19]
	ldr	w0, [x22]
	bl	_msleep
LBB0_5:
Lloh4:
	adrp	x8, _CR_SET_BRIGHTNESS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CR_SET_BRIGHTNESS@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	x0, [x19, #24]
	str	w8, [x0]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_11
; %bb.6:
	ldr	x9, [x19, #40]
	cmp	x8, #16
	b.lo	LBB0_8
; %bb.7:
	sub	x10, x0, x9
	add	x10, x10, #4
	cmp	x10, #64
	b.hs	LBB0_13
LBB0_8:
	mov	x10, #0
LBB0_9:
	sub	x11, x8, x10
	lsl	x12, x10, #2
	add	x10, x12, x0
	add	x10, x10, #4
	add	x9, x9, x12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x9], #4
	str	w12, [x10], #4
	subs	x11, x11, #1
	b.ne	LBB0_10
LBB0_11:
	add	w1, w8, #2
	bl	_cr0014114_calc_crc
	ldr	w0, [x19, #32]
	ldr	x1, [x19, #24]
	ldr	w8, [x19, #8]
	add	w2, w8, #2
	bl	_spi_write
	mov	x20, x0
LBB0_12:
	ldr	x21, [x21]
	ldr	w0, [x22]
	bl	_msecs_to_jiffies
	add	x8, x0, x21
	str	x8, [x19, #16]
	mov	x0, x20
	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
LBB0_13:
	and	x10, x8, #0xfffffffffffffff0
	add	x11, x0, #36
	add	x12, x9, #32
	mov	x13, x10
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #16
	b.ne	LBB0_14
; %bb.15:
	cmp	x8, x10
	b.eq	LBB0_11
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_CR_FW_DELAY_MSEC,4,2           ; @CR_FW_DELAY_MSEC
	.comm	_CR_SET_BRIGHTNESS,4,2          ; @CR_SET_BRIGHTNESS
	.no_dead_strip	_cr0014114_sync
.subsections_via_symbols
