	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ptn3460_select_edid
_ptn3460_select_edid:                   ## @ptn3460_select_edid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_PTN3460_EDID_SRAM_LOAD_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movsbl	(%rdi), %edx
	callq	_ptn3460_write_byte
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_5
LBB0_2:
	movq	_PTN3460_EDID_ENABLE_EMULATION@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movzbl	(%r14), %edx
	movq	_PTN3460_EDID_EMULATION_SELECTION@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	btsl	%eax, %edx
	movq	_PTN3460_EDID_EMULATION_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movsbl	%dl, %edx
	movq	%r14, %rdi
	callq	_ptn3460_write_byte
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	movl	%ebx, %esi
	callq	_DRM_ERROR
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_PTN3460_EDID_SRAM_LOAD_ADDR,4,2 ## @PTN3460_EDID_SRAM_LOAD_ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to transfer EDID to sram, ret=%d\n"

	.comm	_PTN3460_EDID_ENABLE_EMULATION,4,2 ## @PTN3460_EDID_ENABLE_EMULATION
	.comm	_PTN3460_EDID_EMULATION_SELECTION,4,2 ## @PTN3460_EDID_EMULATION_SELECTION
	.comm	_PTN3460_EDID_EMULATION_ADDR,4,2 ## @PTN3460_EDID_EMULATION_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"Failed to write EDID value, ret=%d\n"

	.no_dead_strip	_ptn3460_select_edid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ptn3460_select_edid
_ptn3460_select_edid:                   ; @ptn3460_select_edid
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _PTN3460_EDID_SRAM_LOAD_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTN3460_EDID_SRAM_LOAD_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldrsb	w2, [x0]
	bl	_ptn3460_write_byte
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x8, _PTN3460_EDID_ENABLE_EMULATION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PTN3460_EDID_ENABLE_EMULATION@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
	ldrb	w9, [x19]
Lloh8:
	adrp	x10, _PTN3460_EDID_EMULATION_SELECTION@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PTN3460_EDID_EMULATION_SELECTION@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _PTN3460_EDID_EMULATION_ADDR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PTN3460_EDID_EMULATION_ADDR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x9]
	sxtb	w2, w8
	mov	x0, x19
	bl	_ptn3460_write_byte
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.3:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	mov	x1, x20
	bl	_DRM_ERROR
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PTN3460_EDID_SRAM_LOAD_ADDR,4,2 ; @PTN3460_EDID_SRAM_LOAD_ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to transfer EDID to sram, ret=%d\n"

	.comm	_PTN3460_EDID_ENABLE_EMULATION,4,2 ; @PTN3460_EDID_ENABLE_EMULATION
	.comm	_PTN3460_EDID_EMULATION_SELECTION,4,2 ; @PTN3460_EDID_EMULATION_SELECTION
	.comm	_PTN3460_EDID_EMULATION_ADDR,4,2 ; @PTN3460_EDID_EMULATION_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"Failed to write EDID value, ret=%d\n"

	.no_dead_strip	_ptn3460_select_edid
.subsections_via_symbols
