	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sharp_panel_write
_sharp_panel_write:                     ## @sharp_panel_write
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	%esi, %eax
	sarl	$8, %eax
	movl	%eax, -52(%rbp)
	movzbl	%r15b, %eax
	movl	%eax, -48(%rbp)
	movl	%edx, -44(%rbp)
	movq	(%rdi), %r14
	leaq	-52(%rbp), %rsi
	movq	%r14, %rdi
	movl	$12, %edx
	callq	_mipi_dsi_generic_write
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_mipi_dsi_dcs_nop
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	%rax, %rbx
	movslq	%r12d, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %ecx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_3:
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to write %02x to %04x: %zd\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to send DCS nop: %zd\n"

	.no_dead_strip	_sharp_panel_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sharp_panel_write
_sharp_panel_write:                     ; @sharp_panel_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x2
	mov	x21, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	asr	w8, w1, #8
	and	w9, w1, #0xff
	stp	w8, w9, [sp, #28]
	str	w2, [sp, #36]
	ldr	x19, [x0]
	add	x1, sp, #28
	mov	x0, x19
	mov	w2, #12
	bl	_mipi_dsi_generic_write
	tbnz	x0, #63, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_mipi_dsi_dcs_nop
	tbnz	x0, #63, LBB0_4
; %bb.2:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	mov	w20, #0
	b	LBB0_5
LBB0_3:
	mov	x20, x0
	sxtw	x2, w22
	stp	x21, x0, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_5
LBB0_4:
	mov	x20, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
LBB0_5:
	ldr	x8, [sp, #40]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to write %02x to %04x: %zd\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to send DCS nop: %zd\n"

	.no_dead_strip	_sharp_panel_write
.subsections_via_symbols
