	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps8622_post_disable
_ps8622_post_disable:                   ## @ps8622_post_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_bridge_to_ps8622
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movl	$0, (%rax)
	movl	20(%rax), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value
	movl	16(%rbx), %edi
	callq	_drm_panel_unprepare
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_regulator_disable
LBB0_4:
	movq	_PS8622_POWER_FALL_T16_MAX_US@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	(%rdi,%rdi), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_usleep_range
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value
	movq	_PS8622_POWER_OFF_T17_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_msleep                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to unprepare panel\n"

	.comm	_PS8622_POWER_FALL_T16_MAX_US,4,2 ## @PS8622_POWER_FALL_T16_MAX_US
	.comm	_PS8622_POWER_OFF_T17_MS,4,2    ## @PS8622_POWER_OFF_T17_MS
	.no_dead_strip	_ps8622_post_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps8622_post_disable
_ps8622_post_disable:                   ; @ps8622_post_disable
	.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
	bl	_bridge_to_ps8622
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	str	wzr, [x0]
	ldr	w0, [x0, #20]
	mov	w1, #0
	bl	_gpiod_set_value
	ldr	w0, [x19, #16]
	bl	_drm_panel_unprepare
	cbz	x0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_ERROR
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_regulator_disable
LBB0_6:
Lloh2:
	adrp	x8, _PS8622_POWER_FALL_T16_MAX_US@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PS8622_POWER_FALL_T16_MAX_US@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	lsl	w1, w0, #1
	bl	_usleep_range
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_gpiod_set_value
Lloh5:
	adrp	x8, _PS8622_POWER_OFF_T17_MS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PS8622_POWER_OFF_T17_MS@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_msleep
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to unprepare panel\n"

	.comm	_PS8622_POWER_FALL_T16_MAX_US,4,2 ; @PS8622_POWER_FALL_T16_MAX_US
	.comm	_PS8622_POWER_OFF_T17_MS,4,2    ; @PS8622_POWER_OFF_T17_MS
	.no_dead_strip	_ps8622_post_disable
.subsections_via_symbols
