	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s6d16d0_prepare
_s6d16d0_prepare:                       ## @s6d16d0_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_panel_to_s6d16d0
	movq	%rax, %r14
	movl	(%rax), %edi
	callq	_to_mipi_dsi_device
	movq	%rax, %r15
	movl	8(%r14), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_6
LBB0_2:
	movl	4(%r14), %edi
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movl	$10, %edi
	callq	_udelay
	movl	4(%r14), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	movl	$120, %edi
	callq	_msleep
	movq	_MIPI_DSI_DCS_TEAR_MODE_VBLANK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mipi_dsi_dcs_set_tear_on
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	movl	%r12d, %ebx
	jmp	LBB0_6
LBB0_4:
	movq	%r15, %rdi
	callq	_mipi_dsi_dcs_exit_sleep_mode
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	movl	%r15d, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable supply (%d)\n"

	.comm	_MIPI_DSI_DCS_TEAR_MODE_VBLANK,4,2 ## @MIPI_DSI_DCS_TEAR_MODE_VBLANK
L_.str.1:                               ## @.str.1
	.asciz	"failed to enable vblank TE (%d)\n"

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

	.no_dead_strip	_s6d16d0_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s6d16d0_prepare
_s6d16d0_prepare:                       ; @s6d16d0_prepare
	.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	_panel_to_s6d16d0
	mov	x19, x0
	ldr	w0, [x0]
	bl	_to_mipi_dsi_device
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_regulator_enable
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_2:
	ldr	w0, [x19, #4]
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
	mov	w0, #10
	bl	_udelay
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
	mov	w0, #120
	bl	_msleep
Lloh2:
	adrp	x8, _MIPI_DSI_DCS_TEAR_MODE_VBLANK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MIPI_DSI_DCS_TEAR_MODE_VBLANK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mipi_dsi_dcs_set_tear_on
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_mipi_dsi_dcs_exit_sleep_mode
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.5:
	ldr	w0, [x19]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x2, x21
	bl	_DRM_DEV_ERROR
LBB0_7:
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable supply (%d)\n"

	.comm	_MIPI_DSI_DCS_TEAR_MODE_VBLANK,4,2 ; @MIPI_DSI_DCS_TEAR_MODE_VBLANK
l_.str.1:                               ; @.str.1
	.asciz	"failed to enable vblank TE (%d)\n"

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

	.no_dead_strip	_s6d16d0_prepare
.subsections_via_symbols
