	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ptn3460_bridge_attach
_ptn3460_bridge_attach:                 ## @ptn3460_bridge_attach
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_bridge_to_ptn3460
	cmpl	$0, (%r15)
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_DRM_CONNECTOR_POLL_HPD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movl	4(%r15), %edi
	movq	_DRM_MODE_CONNECTOR_LVDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ptn3460_connector_funcs@GOTPCREL(%rip), %rdx
	movq	%r14, %rsi
	callq	_drm_connector_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_4:
	movq	_ptn3460_connector_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_drm_connector_helper_add
	movq	%r14, %rdi
	callq	_drm_connector_register
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_drm_connector_attach_encoder
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	movq	%r14, %rsi
	callq	_drm_panel_attach
LBB0_6:
	movl	(%r14), %edi
	callq	_drm_helper_hpd_irq_event
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Parent encoder object not found"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_DRM_CONNECTOR_POLL_HPD,4,2     ## @DRM_CONNECTOR_POLL_HPD
	.comm	_ptn3460_connector_funcs,4,2    ## @ptn3460_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_LVDS,4,2    ## @DRM_MODE_CONNECTOR_LVDS
L_.str.1:                               ## @.str.1
	.asciz	"Failed to initialize connector with drm\n"

	.comm	_ptn3460_connector_helper_funcs,4,2 ## @ptn3460_connector_helper_funcs
	.no_dead_strip	_ptn3460_bridge_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ptn3460_bridge_attach
_ptn3460_bridge_attach:                 ; @ptn3460_bridge_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	bl	_bridge_to_ptn3460
	ldr	w8, [x20]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _DRM_CONNECTOR_POLL_HPD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_CONNECTOR_POLL_HPD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #4]
	ldr	w0, [x20, #4]
Lloh3:
	adrp	x8, _DRM_MODE_CONNECTOR_LVDS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_LVDS@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x2, _ptn3460_connector_funcs@GOTPAGE
Lloh7:
	ldr	x2, [x2, _ptn3460_connector_funcs@GOTPAGEOFF]
	mov	x1, x19
	bl	_drm_connector_init
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_7
LBB0_3:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_4:
Lloh15:
	adrp	x1, _ptn3460_connector_helper_funcs@GOTPAGE
Lloh16:
	ldr	x1, [x1, _ptn3460_connector_helper_funcs@GOTPAGEOFF]
	mov	x0, x19
	bl	_drm_connector_helper_add
	mov	x0, x19
	bl	_drm_connector_register
	ldr	w1, [x20]
	mov	x0, x19
	bl	_drm_connector_attach_encoder
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.5:
	mov	x1, x19
	bl	_drm_panel_attach
LBB0_6:
	ldr	w0, [x19]
	bl	_drm_helper_hpd_irq_event
	mov	w21, #0
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Parent encoder object not found"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_DRM_CONNECTOR_POLL_HPD,4,2     ; @DRM_CONNECTOR_POLL_HPD
	.comm	_ptn3460_connector_funcs,4,2    ; @ptn3460_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_LVDS,4,2    ; @DRM_MODE_CONNECTOR_LVDS
l_.str.1:                               ; @.str.1
	.asciz	"Failed to initialize connector with drm\n"

	.comm	_ptn3460_connector_helper_funcs,4,2 ; @ptn3460_connector_helper_funcs
	.no_dead_strip	_ptn3460_bridge_attach
.subsections_via_symbols
