	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rad_panel_disable
_rad_panel_disable:                     ## @rad_panel_disable
	.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
	callq	_to_rad_panel
	xorl	%r15d, %r15d
	cmpl	$0, (%rax)
	je	LBB0_6
## %bb.1:
	movq	%rax, %r12
	movq	8(%rax), %rbx
	leaq	4(%rbx), %r14
	movq	_MIPI_DSI_MODE_LPM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movl	4(%r12), %edi
	callq	_backlight_disable
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$12000, %esi                    ## imm = 0x2EE0
	callq	_usleep_range
	movq	%rbx, %rdi
	callq	_mipi_dsi_dcs_set_display_off
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_usleep_range
	movq	%rbx, %rdi
	callq	_mipi_dsi_dcs_enter_sleep_mode
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	$0, (%r12)
	jmp	LBB0_6
LBB0_2:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	movl	%r13d, %r15d
	jmp	LBB0_6
LBB0_4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	movl	%ebx, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIPI_DSI_MODE_LPM,4,2          ## @MIPI_DSI_MODE_LPM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set display OFF (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to enter sleep mode (%d)\n"

	.no_dead_strip	_rad_panel_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rad_panel_disable
_rad_panel_disable:                     ; @rad_panel_disable
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_to_rad_panel
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x8, _MIPI_DSI_MODE_LPM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MIPI_DSI_MODE_LPM@GOTPAGEOFF]
	add	x20, x21, #4
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
	ldr	w0, [x0, #4]
	bl	_backlight_disable
	mov	w0, #10000
	mov	w1, #12000
	bl	_usleep_range
	mov	x0, x21
	bl	_mipi_dsi_dcs_set_display_off
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	w0, #5000
	mov	w1, #10000
	bl	_usleep_range
	mov	x0, x21
	bl	_mipi_dsi_dcs_enter_sleep_mode
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	w22, #0
	str	wzr, [x19]
	b	LBB0_8
LBB0_4:
	mov	w22, #0
	b	LBB0_8
LBB0_5:
	mov	x22, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	mov	x22, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x20
	mov	x2, x22
	bl	_DRM_DEV_ERROR
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MIPI_DSI_MODE_LPM,4,2          ; @MIPI_DSI_MODE_LPM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set display OFF (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to enter sleep mode (%d)\n"

	.no_dead_strip	_rad_panel_disable
.subsections_via_symbols
