	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function innolux_panel_prepare
_innolux_panel_prepare:                 ## @innolux_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, %r14
	callq	_to_innolux_panel
	xorl	%r12d, %r12d
	cmpl	$0, (%rax)
	jne	LBB0_19
## %bb.1:
	movq	%rax, %r15
	movl	16(%rax), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movl	4(%r15), %esi
	callq	_regulator_bulk_enable
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movl	$20000, %edi                    ## imm = 0x4E20
	movl	$21000, %esi                    ## imm = 0x5208
	callq	_usleep_range
	movl	16(%r15), %edi
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movl	$20000, %edi                    ## imm = 0x4E20
	movl	$21000, %esi                    ## imm = 0x5208
	callq	_usleep_range
	movq	8(%r15), %rax
	movq	8(%rax), %r13
	testq	%r13, %r13
	je	LBB0_13
## %bb.4:
	movq	(%r13), %rdx
	testq	%rdx, %rdx
	je	LBB0_13
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	20(%r15), %edi
	movq	%rbx, %rax
	shlq	$4, %rax
	movl	8(%r13,%rax), %esi
	callq	_mipi_dsi_generic_write
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	20(%r15), %edi
	callq	_mipi_dsi_dcs_nop
	testl	%eax, %eax
	js	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	movq	%rbx, %rax
	shlq	$4, %rax
	movq	(%r13,%rax), %rdx
	testq	%rdx, %rdx
	jne	LBB0_6
LBB0_13:
	movl	20(%r15), %edi
	callq	_mipi_dsi_dcs_exit_sleep_mode
	testl	%eax, %eax
	js	LBB0_14
## %bb.16:
	movl	$120, %edi
	callq	_msleep
	movl	20(%r15), %edi
	callq	_mipi_dsi_dcs_set_display_on
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$6000, %esi                     ## imm = 0x1770
	callq	_usleep_range
	movl	$1, (%r15)
	xorl	%r12d, %r12d
	jmp	LBB0_19
LBB0_2:
	movl	%eax, %r12d
	jmp	LBB0_19
LBB0_14:
	movl	%eax, %r12d
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_15
LBB0_17:
	movl	%eax, %r12d
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_15:
	movl	%r12d, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_11
LBB0_7:
	movl	%eax, %r12d
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %r12d
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
LBB0_10:
	callq	_dev_err
LBB0_11:
	movl	16(%r15), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movl	4(%r15), %esi
	callq	_regulator_bulk_disable
LBB0_19:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to write command %u\n"

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

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

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

	.no_dead_strip	_innolux_panel_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function innolux_panel_prepare
_innolux_panel_prepare:                 ; @innolux_panel_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
	mov	x20, x0
	bl	_to_innolux_panel
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_20
LBB0_2:
	mov	x19, x0
	ldr	w0, [x0, #16]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_regulator_bulk_enable
	tbnz	w0, #31, LBB0_12
; %bb.3:
	mov	w0, #20000
	mov	w1, #21000
	bl	_usleep_range
	ldr	w0, [x19, #16]
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
	mov	w0, #20000
	mov	w1, #21000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	x23, [x8, #8]
	cbz	x23, LBB0_9
; %bb.4:
	ldr	x2, [x23]
	cbz	x2, LBB0_9
; %bb.5:
	mov	x22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #20]
	add	x8, x23, x22, lsl #4
	ldr	w1, [x8, #8]
	bl	_mipi_dsi_generic_write
	tbnz	w0, #31, LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x19, #20]
	bl	_mipi_dsi_dcs_nop
	tbnz	w0, #31, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w22, w22, #1
	lsl	x8, x22, #4
	ldr	x2, [x23, x8]
	cbnz	x2, LBB0_6
LBB0_9:
	ldr	w0, [x19, #20]
	bl	_mipi_dsi_dcs_exit_sleep_mode
	tbnz	w0, #31, LBB0_13
; %bb.10:
	mov	w0, #120
	bl	_msleep
	ldr	w0, [x19, #20]
	bl	_mipi_dsi_dcs_set_display_on
	tbnz	w0, #31, LBB0_14
; %bb.11:
	mov	w0, #5000
	mov	w1, #6000
	bl	_usleep_range
	mov	w21, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_20
LBB0_12:
	mov	x21, x0
	b	LBB0_20
LBB0_13:
	mov	x21, x0
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_14:
	mov	x21, x0
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str.3@PAGE
Lloh3:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_15:
	mov	x2, x21
	bl	_DRM_DEV_ERROR
	b	LBB0_19
LBB0_16:
	mov	x21, x0
	ldr	w0, [x20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	b	LBB0_18
LBB0_17:
	mov	x21, x0
	ldr	w0, [x20]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
LBB0_18:
	bl	_dev_err
LBB0_19:
	ldr	w0, [x19, #16]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_regulator_bulk_disable
LBB0_20:
	mov	x0, x21
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to write command %u\n"

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

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

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

	.no_dead_strip	_innolux_panel_prepare
.subsections_via_symbols
