	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sharp_panel_prepare
_sharp_panel_prepare:                   ## @sharp_panel_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
	movq	%rdi, %r15
	callq	_to_sharp_panel
	xorl	%r14d, %r14d
	cmpl	$0, (%rax)
	jne	LBB0_19
## %bb.1:
	movq	%rax, %rbx
	movq	_MIPI_DCS_PIXEL_FMT_24BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	4(%rbx), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movl	$150, %edi
	callq	_msleep
	movl	8(%rbx), %edi
	callq	_mipi_dsi_dcs_exit_sleep_mode
	testl	%eax, %eax
	js	LBB0_4
## %bb.7:
	movq	%rbx, %rdi
	movl	$4096, %esi                     ## imm = 0x1000
	movl	$42, %edx
	callq	_sharp_panel_write
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	%rbx, %rdi
	movl	$4097, %esi                     ## imm = 0x1001
	movl	$1, %edx
	callq	_sharp_panel_write
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movl	8(%rbx), %edi
	movl	%r12d, %esi
	callq	_mipi_dsi_dcs_set_pixel_format
	testl	%eax, %eax
	js	LBB0_12
## %bb.14:
	movl	16(%rbx), %esi
	movl	8(%rbx), %edi
	movl	12(%rbx), %edx
	callq	_sharp_setup_symmetrical_split
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	movl	8(%rbx), %edi
	callq	_mipi_dsi_dcs_set_display_on
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_sharp_wait_frames
	jmp	LBB0_19
LBB0_2:
	movl	%eax, %r14d
	jmp	LBB0_19
LBB0_4:
	movl	%eax, %r13d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_8:
	movl	%eax, %r13d
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_10:
	movl	%eax, %r13d
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_5:
	movl	%r13d, %edx
	callq	_dev_err
	movl	%r13d, %r14d
LBB0_6:
	movl	4(%rbx), %edi
	callq	_regulator_disable
LBB0_19:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	%eax, %r12d
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_13
LBB0_15:
	movl	%eax, %r12d
	movl	(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_13
LBB0_17:
	movl	%eax, %r12d
	movl	(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
LBB0_13:
	movl	%r12d, %edx
	callq	_dev_err
	movl	%r12d, %r14d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_MIPI_DCS_PIXEL_FMT_24BIT,4,2   ## @MIPI_DCS_PIXEL_FMT_24BIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to exit sleep mode: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to set left-right mode: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to enable command mode: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to set pixel format: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to set up symmetrical split: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to set display on: %d\n"

	.no_dead_strip	_sharp_panel_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sharp_panel_prepare
_sharp_panel_prepare:                   ; @sharp_panel_prepare
	.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	x21, x0
	bl	_to_sharp_panel
	ldr	w8, [x0]
	cbz	w8, LBB0_2
LBB0_1:
	mov	w20, #0
	b	LBB0_18
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x8, _MIPI_DCS_PIXEL_FMT_24BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MIPI_DCS_PIXEL_FMT_24BIT@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	w0, [x0, #4]
	bl	_regulator_enable
	tbnz	w0, #31, LBB0_10
; %bb.3:
	mov	w0, #150
	bl	_msleep
	ldr	w0, [x19, #8]
	bl	_mipi_dsi_dcs_exit_sleep_mode
	tbnz	w0, #31, LBB0_11
; %bb.4:
	mov	x0, x19
	mov	w1, #4096
	mov	w2, #42
	bl	_sharp_panel_write
	tbnz	w0, #31, LBB0_12
; %bb.5:
	mov	x0, x19
	mov	w1, #4097
	mov	w2, #1
	bl	_sharp_panel_write
	tbnz	w0, #31, LBB0_13
; %bb.6:
	ldr	w0, [x19, #8]
	mov	x1, x22
	bl	_mipi_dsi_dcs_set_pixel_format
	tbnz	w0, #31, LBB0_14
; %bb.7:
	ldp	w2, w1, [x19, #12]
	ldr	w0, [x19, #8]
	bl	_sharp_setup_symmetrical_split
	tbnz	w0, #31, LBB0_15
; %bb.8:
	ldr	w0, [x19, #8]
	bl	_mipi_dsi_dcs_set_display_on
	tbnz	w0, #31, LBB0_16
; %bb.9:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #6
	bl	_sharp_wait_frames
	b	LBB0_1
LBB0_10:
	mov	x20, x0
	b	LBB0_18
LBB0_11:
	mov	x20, x0
	ldr	w0, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_17
LBB0_12:
	mov	x20, x0
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_13:
	mov	x20, x0
	ldr	w0, [x21]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_14:
	mov	x20, x0
	ldr	w0, [x21]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_15:
	mov	x20, x0
	ldr	w0, [x21]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_17
LBB0_16:
	mov	x20, x0
	ldr	w0, [x21]
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_17:
	mov	x2, x20
	bl	_dev_err
	ldr	w0, [x19, #4]
	bl	_regulator_disable
LBB0_18:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MIPI_DCS_PIXEL_FMT_24BIT,4,2   ; @MIPI_DCS_PIXEL_FMT_24BIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to exit sleep mode: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to set left-right mode: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to enable command mode: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to set pixel format: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to set up symmetrical split: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to set display on: %d\n"

	.no_dead_strip	_sharp_panel_prepare
.subsections_via_symbols
