	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function truly_nt35597_unprepare
_truly_nt35597_unprepare:               ## @truly_nt35597_unprepare
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_panel_to_ctx
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	8(%rax), %rax
	movq	(%rax), %rcx
	movq	$0, (%rcx)
	movq	8(%rax), %rax
	movq	$0, (%rax)
	movq	_MIPI_DCS_SET_DISPLAY_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_truly_dcs_write
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
LBB0_4:
	movl	$120, %edi
	callq	_msleep
	movq	_MIPI_DCS_ENTER_SLEEP_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_truly_dcs_write
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
LBB0_6:
	movq	%r14, %rdi
	callq	_truly_nt35597_power_off
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	callq	_DRM_DEV_ERROR
LBB0_8:
	movl	$0, (%r14)
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIPI_DCS_SET_DISPLAY_OFF,4,2   ## @MIPI_DCS_SET_DISPLAY_OFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set_display_off cmd failed ret = %d\n"

	.comm	_MIPI_DCS_ENTER_SLEEP_MODE,4,2  ## @MIPI_DCS_ENTER_SLEEP_MODE
L_.str.1:                               ## @.str.1
	.asciz	"enter_sleep cmd failed ret = %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"power_off failed ret = %d\n"

	.no_dead_strip	_truly_nt35597_unprepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function truly_nt35597_unprepare
_truly_nt35597_unprepare:               ; @truly_nt35597_unprepare
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_panel_to_ctx
	ldr	w8, [x0]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldp	x9, x8, [x8]
	str	xzr, [x9]
	str	xzr, [x8]
Lloh0:
	adrp	x8, _MIPI_DCS_SET_DISPLAY_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MIPI_DCS_SET_DISPLAY_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_truly_dcs_write
	tbz	w0, #31, LBB0_3
; %bb.2:
	mov	x2, x0
	ldr	w0, [x19, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
LBB0_3:
	mov	w0, #120
	bl	_msleep
Lloh5:
	adrp	x8, _MIPI_DCS_ENTER_SLEEP_MODE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MIPI_DCS_ENTER_SLEEP_MODE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_truly_dcs_write
	tbz	w0, #31, LBB0_5
; %bb.4:
	mov	x2, x0
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DRM_DEV_ERROR
LBB0_5:
	mov	x0, x19
	bl	_truly_nt35597_power_off
	mov	x20, x0
	tbz	w0, #31, LBB0_7
; %bb.6:
	ldr	w0, [x19, #4]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_DRM_DEV_ERROR
LBB0_7:
	str	wzr, [x19]
	b	LBB0_9
LBB0_8:
	mov	w20, #0
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MIPI_DCS_SET_DISPLAY_OFF,4,2   ; @MIPI_DCS_SET_DISPLAY_OFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set_display_off cmd failed ret = %d\n"

	.comm	_MIPI_DCS_ENTER_SLEEP_MODE,4,2  ; @MIPI_DCS_ENTER_SLEEP_MODE
l_.str.1:                               ; @.str.1
	.asciz	"enter_sleep cmd failed ret = %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"power_off failed ret = %d\n"

	.no_dead_strip	_truly_nt35597_unprepare
.subsections_via_symbols
