	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mipi_dbi_poweron_reset_conditional
_mipi_dbi_poweron_reset_conditional:    ## @mipi_dbi_poweron_reset_conditional
	.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
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	movq	16(%r15), %r14
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	callq	_regulator_enable
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_12
LBB0_3:
	leaq	8(%r15), %r12
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	_mipi_dbi_display_is_on
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_12
LBB0_5:
	movq	%r12, %rdi
	callq	_mipi_dbi_hw_reset
	movq	_MIPI_DCS_SOFT_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mipi_dbi_command
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.7:
	callq	_regulator_disable
	jmp	LBB0_12
LBB0_8:
	cmpq	$0, (%r12)
	je	LBB0_10
## %bb.9:
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	jmp	LBB0_11
LBB0_10:
	movl	$120, %edi
	callq	_msleep
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to enable regulator (%d)\n"

	.comm	_MIPI_DCS_SOFT_RESET,4,2        ## @MIPI_DCS_SOFT_RESET
L_.str.1:                               ## @.str.1
	.asciz	"Failed to send reset command (%d)\n"

	.no_dead_strip	_mipi_dbi_poweron_reset_conditional
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mipi_dbi_poweron_reset_conditional
_mipi_dbi_poweron_reset_conditional:    ; @mipi_dbi_poweron_reset_conditional
	.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	x23, x1
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	x0, [x0]
	cbz	x0, LBB0_3
; %bb.1:
	bl	_regulator_enable
	cbz	w0, LBB0_3
; %bb.2:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_DRM_DEV_ERROR
	b	LBB0_13
LBB0_3:
	add	x22, x19, #8
	cbz	w23, LBB0_6
; %bb.4:
	mov	x0, x22
	bl	_mipi_dbi_display_is_on
	cbz	x0, LBB0_6
; %bb.5:
	mov	w21, #1
	b	LBB0_13
LBB0_6:
	mov	x0, x22
	bl	_mipi_dbi_hw_reset
Lloh2:
	adrp	x8, _MIPI_DCS_SOFT_RESET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MIPI_DCS_SOFT_RESET@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_mipi_dbi_command
	cbz	w0, LBB0_9
; %bb.7:
	mov	x21, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_DRM_DEV_ERROR
	ldr	x0, [x19]
	cbz	x0, LBB0_13
; %bb.8:
	bl	_regulator_disable
	b	LBB0_13
LBB0_9:
	ldr	x8, [x22]
	cbz	x8, LBB0_11
; %bb.10:
	mov	w0, #5000
	mov	w1, #20000
	bl	_usleep_range
	b	LBB0_12
LBB0_11:
	mov	w0, #120
	bl	_msleep
LBB0_12:
	mov	w21, #0
LBB0_13:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to enable regulator (%d)\n"

	.comm	_MIPI_DCS_SOFT_RESET,4,2        ; @MIPI_DCS_SOFT_RESET
l_.str.1:                               ; @.str.1
	.asciz	"Failed to send reset command (%d)\n"

	.no_dead_strip	_mipi_dbi_poweron_reset_conditional
.subsections_via_symbols
