	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ptn3460_get_modes
_ptn3460_get_modes:                     ## @ptn3460_get_modes
	.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
	movq	%rdi, %rbx
	callq	_connector_to_ptn3460
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.9:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_add_edid_modes             ## TAILCALL
LBB0_1:
	movq	%rax, %r14
	movl	16(%rax), %r12d
	movq	%rax, %rdi
	callq	_ptn3460_pre_enable
	movq	_EDID_LENGTH@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	movq	_PTN3460_EDID_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %ecx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_ptn3460_read_bytes
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_kfree
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	jne	LBB0_8
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	movq	%r15, 8(%r14)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_drm_connector_update_edid_property
	movq	8(%r14), %rsi
	movq	%rbx, %rdi
	callq	_drm_add_edid_modes
	movl	%eax, %ebx
	testl	%r12d, %r12d
	jne	LBB0_8
LBB0_7:
	movq	%r14, %rdi
	callq	_ptn3460_disable
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EDID_LENGTH,4,2                ## @EDID_LENGTH
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate EDID\n"

	.comm	_PTN3460_EDID_ADDR,4,2          ## @PTN3460_EDID_ADDR
	.no_dead_strip	_ptn3460_get_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ptn3460_get_modes
_ptn3460_get_modes:                     ; @ptn3460_get_modes
	.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	x20, x0
	bl	_connector_to_ptn3460
	ldr	x1, [x0, #8]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x20
	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
	b	_drm_add_edid_modes
LBB0_2:
	mov	x19, x0
	ldr	w22, [x0, #16]
	bl	_ptn3460_pre_enable
Lloh0:
	adrp	x23, _EDID_LENGTH@GOTPAGE
Lloh1:
	ldr	x23, [x23, _EDID_LENGTH@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x21, x0
Lloh5:
	adrp	x8, _PTN3460_EDID_ADDR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PTN3460_EDID_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w3, [x23]
	mov	x0, x19
	mov	x2, x21
	bl	_ptn3460_read_bytes
	cbz	w0, LBB0_6
; %bb.4:
	mov	x0, x21
	bl	_kfree
	mov	w20, #0
	cbnz	w22, LBB0_8
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	mov	w20, #0
	b	LBB0_8
LBB0_6:
	str	x21, [x19, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_drm_connector_update_edid_property
	ldr	x1, [x19, #8]
	mov	x0, x20
	bl	_drm_add_edid_modes
	mov	x20, x0
	cbnz	w22, LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_ptn3460_disable
LBB0_8:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EDID_LENGTH,4,2                ; @EDID_LENGTH
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate EDID\n"

	.comm	_PTN3460_EDID_ADDR,4,2          ; @PTN3460_EDID_ADDR
	.no_dead_strip	_ptn3460_get_modes
.subsections_via_symbols
