	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ili9881c_prepare
_ili9881c_prepare:                      ## @ili9881c_prepare
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_panel_to_ili9881c
	movq	%rax, %r14
	movl	8(%rax), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movl	$5, %edi
	callq	_msleep
	movl	4(%r14), %edi
	movl	$1, %esi
	callq	_gpiod_set_value
	movl	$20, %edi
	callq	_msleep
	movl	4(%r14), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value
	movl	$20, %edi
	callq	_msleep
	movq	_ili9881c_init@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_10
## %bb.2:
	movl	$16, %ebx
	xorl	%r12d, %r12d
	movq	_ILI9881C_SWITCH_PAGE@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rdi,%rbx), %esi
	movq	%r14, %rdi
	callq	_ili9881c_switch_page
	testl	%eax, %eax
	je	LBB0_8
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movq	-16(%rdi,%rbx), %rax
	cmpq	(%r13), %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_ILI9881C_COMMAND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-8(%rdi,%rbx), %edx
	movl	-4(%rdi,%rbx), %esi
	movq	%r14, %rdi
	callq	_ili9881c_send_cmd_data
	testl	%eax, %eax
	jne	LBB0_12
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rdi
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addq	$24, %rbx
	cmpq	%rax, %r12
	jb	LBB0_3
LBB0_10:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ili9881c_switch_page
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movl	(%r14), %edi
	movq	_MIPI_DSI_DCS_TEAR_MODE_VBLANK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mipi_dsi_dcs_set_tear_on
	testl	%eax, %eax
	je	LBB0_13
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mipi_dsi_dcs_exit_sleep_mode   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ili9881c_init,8,3              ## @ili9881c_init
	.comm	_ILI9881C_SWITCH_PAGE,8,3       ## @ILI9881C_SWITCH_PAGE
	.comm	_ILI9881C_COMMAND,8,3           ## @ILI9881C_COMMAND
	.comm	_MIPI_DSI_DCS_TEAR_MODE_VBLANK,4,2 ## @MIPI_DSI_DCS_TEAR_MODE_VBLANK
	.no_dead_strip	_ili9881c_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ili9881c_prepare
_ili9881c_prepare:                      ; @ili9881c_prepare
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_panel_to_ili9881c
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_regulator_enable
	cbnz	w0, LBB0_11
; %bb.1:
	mov	w0, #5
	bl	_msleep
	ldr	w0, [x19, #4]
	mov	w1, #1
	bl	_gpiod_set_value
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_gpiod_set_value
	mov	w0, #20
	bl	_msleep
Lloh0:
	adrp	x20, _ili9881c_init@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ili9881c_init@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_9
; %bb.2:
	mov	x21, #0
	mov	x22, #0
Lloh2:
	adrp	x23, _ILI9881C_SWITCH_PAGE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ILI9881C_SWITCH_PAGE@GOTPAGEOFF]
Lloh4:
	adrp	x24, _ILI9881C_COMMAND@GOTPAGE
Lloh5:
	ldr	x24, [x24, _ILI9881C_COMMAND@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x0, x21
	ldr	w1, [x8, #16]
	mov	x0, x19
	bl	_ili9881c_switch_page
	cbz	w0, LBB0_7
	b	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	x8, [x0, x21]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x0, x21
	ldp	w2, w1, [x8, #8]
	mov	x0, x19
	bl	_ili9881c_send_cmd_data
	cbnz	w0, LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x20]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	add	x21, x21, #24
	cmp	x22, w0, uxtw
	b.lo	LBB0_4
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	bl	_ili9881c_switch_page
	cbnz	w0, LBB0_11
; %bb.10:
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _MIPI_DSI_DCS_TEAR_MODE_VBLANK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MIPI_DSI_DCS_TEAR_MODE_VBLANK@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_mipi_dsi_dcs_set_tear_on
	cbz	w0, LBB0_12
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mipi_dsi_dcs_exit_sleep_mode
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ili9881c_init,8,3              ; @ili9881c_init
	.comm	_ILI9881C_SWITCH_PAGE,8,3       ; @ILI9881C_SWITCH_PAGE
	.comm	_ILI9881C_COMMAND,8,3           ; @ILI9881C_COMMAND
	.comm	_MIPI_DSI_DCS_TEAR_MODE_VBLANK,4,2 ; @MIPI_DSI_DCS_TEAR_MODE_VBLANK
	.no_dead_strip	_ili9881c_prepare
.subsections_via_symbols
