	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function truly_nt35597_prepare
_truly_nt35597_prepare:                 ## @truly_nt35597_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, %r12
	callq	_panel_to_ctx
	xorl	%r13d, %r13d
	cmpl	$0, (%rax)
	je	LBB0_1
LBB0_16:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_truly_35597_power_on
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_MIPI_DSI_MODE_LPM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	16(%rbx), %rdx
	movq	(%rdx), %rsi
	orl	%ecx, (%rsi)
	movl	(%rax), %eax
	movq	8(%rdx), %rcx
	orl	%eax, (%rcx)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	movl	(%rax), %r14d
	testl	%r14d, %r14d
	jle	LBB0_10
## %bb.4:
	movq	8(%rax), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,8), %edx
	movl	4(%r15,%rbx,8), %esi
	movq	%r12, %rdi
	callq	_truly_dcs_write_buf
	testl	%eax, %eax
	js	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_5
LBB0_10:
	movq	_MIPI_DCS_EXIT_SLEEP_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_truly_dcs_write
	testl	%eax, %eax
	js	LBB0_11
## %bb.13:
	movl	$120, %edi
	callq	_msleep
	movq	_MIPI_DCS_SET_DISPLAY_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_truly_dcs_write
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	movl	$120, %edi
	callq	_msleep
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%r13d, %r13d
	jmp	LBB0_16
LBB0_2:
	movl	%eax, %r13d
	jmp	LBB0_16
LBB0_6:
	movl	%eax, %r13d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	jmp	LBB0_7
LBB0_11:
	movl	%eax, %r13d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_12
LBB0_14:
	movl	%eax, %r13d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_12:
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
LBB0_7:
	movq	%r14, %rdi
	callq	_truly_nt35597_power_off
	testq	%rax, %rax
	je	LBB0_16
## %bb.8:
	movl	4(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_MIPI_DSI_MODE_LPM,4,2          ## @MIPI_DSI_MODE_LPM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cmd set tx failed i = %d ret = %d\n"

	.comm	_MIPI_DCS_EXIT_SLEEP_MODE,4,2   ## @MIPI_DCS_EXIT_SLEEP_MODE
L_.str.1:                               ## @.str.1
	.asciz	"exit_sleep_mode cmd failed ret = %d\n"

	.comm	_MIPI_DCS_SET_DISPLAY_ON,4,2    ## @MIPI_DCS_SET_DISPLAY_ON
L_.str.2:                               ## @.str.2
	.asciz	"set_display_on cmd failed ret = %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"power_off failed\n"

	.no_dead_strip	_truly_nt35597_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function truly_nt35597_prepare
_truly_nt35597_prepare:                 ; @truly_nt35597_prepare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	_panel_to_ctx
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	mov	w21, #0
LBB0_2:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_3:
	mov	x19, x0
	bl	_truly_35597_power_on
	tbnz	w0, #31, LBB0_11
; %bb.4:
Lloh0:
	adrp	x9, _MIPI_DSI_MODE_LPM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MIPI_DSI_MODE_LPM@GOTPAGEOFF]
	ldr	w10, [x9]
	ldp	x8, x11, [x19, #8]
	ldp	x12, x11, [x11]
	ldr	w13, [x12]
	orr	w10, w13, w10
	str	w10, [x12]
	ldr	w9, [x9]
	ldr	w10, [x11]
	orr	w9, w10, w9
	str	w9, [x11]
	ldr	w23, [x8]
	cmp	w23, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x22, #0
	ldr	x8, [x8, #8]
	add	x24, x8, #4
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w2, w1, [x24, #-4]
	mov	x0, x20
	bl	_truly_dcs_write_buf
	tbnz	w0, #31, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	add	x24, x24, #8
	cmp	x23, x22
	b.ne	LBB0_6
LBB0_8:
Lloh2:
	adrp	x8, _MIPI_DCS_EXIT_SLEEP_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MIPI_DCS_EXIT_SLEEP_MODE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_truly_dcs_write
	tbnz	w0, #31, LBB0_13
; %bb.9:
	mov	w0, #120
	bl	_msleep
Lloh5:
	adrp	x8, _MIPI_DCS_SET_DISPLAY_ON@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MIPI_DCS_SET_DISPLAY_ON@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_truly_dcs_write
	tbnz	w0, #31, LBB0_14
; %bb.10:
	mov	w0, #120
	bl	_msleep
	mov	w21, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_2
LBB0_11:
	mov	x21, x0
	b	LBB0_2
LBB0_12:
	mov	x21, x0
	ldr	w0, [x19, #4]
	stp	x22, x21, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
	b	LBB0_16
LBB0_13:
	mov	x21, x0
	ldr	w0, [x19, #4]
	str	x21, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_14:
	mov	x21, x0
	ldr	w0, [x19, #4]
	str	x21, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_15:
	bl	_DRM_DEV_ERROR
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
LBB0_16:
	mov	x0, x19
	bl	_truly_nt35597_power_off
	cbz	x0, LBB0_2
; %bb.17:
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_DRM_DEV_ERROR
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MIPI_DSI_MODE_LPM,4,2          ; @MIPI_DSI_MODE_LPM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cmd set tx failed i = %d ret = %d\n"

	.comm	_MIPI_DCS_EXIT_SLEEP_MODE,4,2   ; @MIPI_DCS_EXIT_SLEEP_MODE
l_.str.1:                               ; @.str.1
	.asciz	"exit_sleep_mode cmd failed ret = %d\n"

	.comm	_MIPI_DCS_SET_DISPLAY_ON,4,2    ; @MIPI_DCS_SET_DISPLAY_ON
l_.str.2:                               ; @.str.2
	.asciz	"set_display_on cmd failed ret = %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"power_off failed\n"

	.no_dead_strip	_truly_nt35597_prepare
.subsections_via_symbols
