	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ptn3460_pre_enable
_ptn3460_pre_enable:                    ## @ptn3460_pre_enable
	.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_ptn3460
	cmpl	$0, (%rax)
	je	LBB0_1
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %rbx
	movl	12(%rax), %edi
	movl	$1, %esi
	callq	_gpiod_set_value
	movl	8(%rbx), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	8(%rbx), %edi
	movl	$1, %esi
	callq	_gpiod_set_value
	movl	4(%rbx), %edi
	callq	_drm_panel_prepare
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_2:
	movl	$90, %edi
	callq	_msleep
	movq	%rbx, %rdi
	callq	_ptn3460_select_edid
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_4:
	movl	$1, (%rbx)
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to prepare panel\n"

L_.str.1:                               ## @.str.1
	.asciz	"Select EDID failed ret=%d\n"

	.no_dead_strip	_ptn3460_pre_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ptn3460_pre_enable
_ptn3460_pre_enable:                    ; @ptn3460_pre_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_bridge_to_ptn3460
	ldr	w8, [x0]
	cbz	w8, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	mov	x19, x0
	ldr	w0, [x0, #12]
	mov	w1, #1
	bl	_gpiod_set_value
	ldr	w0, [x19, #8]
	mov	w1, #0
	bl	_gpiod_set_value
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w0, [x19, #8]
	mov	w1, #1
	bl	_gpiod_set_value
	ldr	w0, [x19, #4]
	bl	_drm_panel_prepare
	cbz	x0, LBB0_4
; %bb.3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_DRM_ERROR
LBB0_4:
	mov	w0, #90
	bl	_msleep
	mov	x0, x19
	bl	_ptn3460_select_edid
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_6
; %bb.5:
	str	x0, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_6:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_1
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to prepare panel\n"

l_.str.1:                               ; @.str.1
	.asciz	"Select EDID failed ret=%d\n"

	.no_dead_strip	_ptn3460_pre_enable
.subsections_via_symbols
