	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kingdisplay_panel_prepare
_kingdisplay_panel_prepare:             ## @kingdisplay_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, %rbx
	callq	_to_kingdisplay_panel
	xorl	%r13d, %r13d
	cmpl	$0, (%rax)
	je	LBB0_1
LBB0_15:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r15
	movl	8(%rax), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	movl	4(%r15), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	$15000, %edi                    ## imm = 0x3A98
	movl	$16000, %esi                    ## imm = 0x3E80
	callq	_usleep_range
	movl	8(%r15), %edi
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movl	$15000, %edi                    ## imm = 0x3A98
	movl	$16000, %esi                    ## imm = 0x3E80
	callq	_usleep_range
	movq	_init_code@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%r15), %edi
	movq	(%r12), %rsi
	addq	%rbx, %rsi
	movl	$4, %edx
	callq	_mipi_dsi_generic_write
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jb	LBB0_6
LBB0_10:
	movl	12(%r15), %edi
	callq	_mipi_dsi_dcs_exit_sleep_mode
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movl	$120, %edi
	callq	_msleep
	movl	12(%r15), %edi
	callq	_mipi_dsi_dcs_set_display_on
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	movl	$1, (%r15)
	xorl	%r13d, %r13d
	jmp	LBB0_15
LBB0_2:
	movl	%eax, %r13d
	jmp	LBB0_15
LBB0_7:
	movl	%eax, %r13d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_8
LBB0_11:
	movl	%eax, %r13d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_13:
	movl	%eax, %r13d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_8:
	movl	%r13d, %edx
	callq	_DRM_DEV_ERROR
	movl	8(%r15), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	movl	4(%r15), %edi
	callq	_regulator_disable
	testl	%eax, %eax
	je	LBB0_15
## %bb.9:
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_init_code,8,3                  ## @init_code
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed write init cmds: %d\n"

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

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

L_.str.3:                               ## @.str.3
	.asciz	"failed to disable regulator: %d\n"

	.no_dead_strip	_kingdisplay_panel_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kingdisplay_panel_prepare
_kingdisplay_panel_prepare:             ; @kingdisplay_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	x19, x0
	bl	_to_kingdisplay_panel
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	mov	w21, #0
LBB0_2:
	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
LBB0_3:
	mov	x20, x0
	ldr	w0, [x0, #8]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
	ldr	w0, [x20, #4]
	bl	_regulator_enable
	tbnz	w0, #31, LBB0_11
; %bb.4:
	mov	w0, #15000
	mov	w1, #16000
	bl	_usleep_range
	ldr	w0, [x20, #8]
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
	mov	w0, #15000
	mov	w1, #16000
	bl	_usleep_range
Lloh0:
	adrp	x22, _init_code@GOTPAGE
Lloh1:
	ldr	x22, [x22, _init_code@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_8
; %bb.5:
	mov	x23, #0
	mov	x24, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #12]
	ldr	x8, [x22]
	add	x1, x8, x23
	mov	w2, #4
	bl	_mipi_dsi_generic_write
	tbnz	w0, #31, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x24, #1
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	add	x23, x23, #4
	cmp	x24, w0, uxtw
	b.lo	LBB0_6
LBB0_8:
	ldr	w0, [x20, #12]
	bl	_mipi_dsi_dcs_exit_sleep_mode
	tbnz	w0, #31, LBB0_13
; %bb.9:
	mov	w0, #120
	bl	_msleep
	ldr	w0, [x20, #12]
	bl	_mipi_dsi_dcs_set_display_on
	tbnz	w0, #31, LBB0_14
; %bb.10:
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
	mov	w21, #0
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_2
LBB0_11:
	mov	x21, x0
	b	LBB0_2
LBB0_12:
	mov	x21, x0
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_15
LBB0_13:
	mov	x21, x0
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_14:
	mov	x21, x0
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_15:
	mov	x2, x21
	bl	_DRM_DEV_ERROR
	ldr	w0, [x20, #8]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
	ldr	w0, [x20, #4]
	bl	_regulator_disable
	cbz	w0, LBB0_2
; %bb.16:
	mov	x2, x0
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_DRM_DEV_ERROR
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_init_code,8,3                  ; @init_code
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed write init cmds: %d\n"

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

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

l_.str.3:                               ; @.str.3
	.asciz	"failed to disable regulator: %d\n"

	.no_dead_strip	_kingdisplay_panel_prepare
.subsections_via_symbols
