	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7511_bridge_attach
_adv7511_bridge_attach:                 ## @adv7511_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_bridge_to_adv7511
	cmpl	$0, (%r12)
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %r14
	movq	16(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.4:
	movq	_DRM_CONNECTOR_POLL_HPD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_3:
	movq	_DRM_CONNECTOR_POLL_CONNECT@GOTPCREL(%rip), %rcx
	movq	_DRM_CONNECTOR_POLL_DISCONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
LBB0_5:
	addq	$24, %rbx
	movl	%eax, 24(%r14)
	movl	4(%r12), %edi
	movq	_DRM_MODE_CONNECTOR_HDMIA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_adv7511_connector_funcs@GOTPCREL(%rip), %rdx
	movq	%rbx, %rsi
	callq	_drm_connector_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_11
LBB0_7:
	movq	_adv7511_connector_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_drm_connector_helper_add
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_drm_connector_attach_encoder
	movq	(%r14), %rax
	movq	_ADV7533@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_adv7533_attach_dsi
	movl	%eax, %r15d
LBB0_9:
	movq	16(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.10:
	movl	8(%r14), %ebx
	xorl	%edi, %edi
	callq	_ADV7511_REG_INT_ENABLE
	movq	_ADV7511_INT0_HPD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_regmap_write
LBB0_11:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	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	_DRM_CONNECTOR_POLL_CONNECT,4,2 ## @DRM_CONNECTOR_POLL_CONNECT
	.comm	_DRM_CONNECTOR_POLL_DISCONNECT,4,2 ## @DRM_CONNECTOR_POLL_DISCONNECT
	.comm	_adv7511_connector_funcs,4,2    ## @adv7511_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_HDMIA,4,2   ## @DRM_MODE_CONNECTOR_HDMIA
L_.str.1:                               ## @.str.1
	.asciz	"Failed to initialize connector with drm\n"

	.comm	_adv7511_connector_helper_funcs,4,2 ## @adv7511_connector_helper_funcs
	.comm	_ADV7533,8,3                    ## @ADV7533
	.comm	_ADV7511_INT0_HPD,4,2           ## @ADV7511_INT0_HPD
	.no_dead_strip	_adv7511_bridge_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7511_bridge_attach
_adv7511_bridge_attach:                 ; @adv7511_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	x21, x0
	bl	_bridge_to_adv7511
	ldr	w8, [x21]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x9, _DRM_CONNECTOR_POLL_CONNECT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_CONNECTOR_POLL_CONNECT@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _DRM_CONNECTOR_POLL_DISCONNECT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DRM_CONNECTOR_POLL_DISCONNECT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh6:
	adrp	x10, _DRM_CONNECTOR_POLL_HPD@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DRM_CONNECTOR_POLL_HPD@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	x8, #0
	csel	w8, w9, w10, eq
	mov	x22, x0
	str	w8, [x22, #24]!
	ldr	w0, [x21, #4]
Lloh9:
	adrp	x8, _DRM_MODE_CONNECTOR_HDMIA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_HDMIA@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x2, _adv7511_connector_funcs@GOTPAGE
Lloh13:
	ldr	x2, [x2, _adv7511_connector_funcs@GOTPAGEOFF]
	mov	x1, x22
	bl	_drm_connector_init
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_9
LBB0_3:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_4:
Lloh21:
	adrp	x1, _adv7511_connector_helper_funcs@GOTPAGE
Lloh22:
	ldr	x1, [x1, _adv7511_connector_helper_funcs@GOTPAGEOFF]
	mov	x0, x22
	bl	_drm_connector_helper_add
	ldr	w1, [x21]
	mov	x0, x22
	bl	_drm_connector_attach_encoder
	ldr	x8, [x19]
Lloh23:
	adrp	x9, _ADV7533@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ADV7533@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_adv7533_attach_dsi
	mov	x20, x0
	b	LBB0_7
LBB0_6:
	mov	w20, #0
LBB0_7:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w19, [x19, #8]
	mov	w0, #0
	bl	_ADV7511_REG_INT_ENABLE
	mov	x1, x0
Lloh26:
	adrp	x8, _ADV7511_INT0_HPD@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ADV7511_INT0_HPD@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_regmap_write
LBB0_9:
	mov	x0, x20
	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	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.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	_DRM_CONNECTOR_POLL_CONNECT,4,2 ; @DRM_CONNECTOR_POLL_CONNECT
	.comm	_DRM_CONNECTOR_POLL_DISCONNECT,4,2 ; @DRM_CONNECTOR_POLL_DISCONNECT
	.comm	_adv7511_connector_funcs,4,2    ; @adv7511_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_HDMIA,4,2   ; @DRM_MODE_CONNECTOR_HDMIA
l_.str.1:                               ; @.str.1
	.asciz	"Failed to initialize connector with drm\n"

	.comm	_adv7511_connector_helper_funcs,4,2 ; @adv7511_connector_helper_funcs
	.comm	_ADV7533,8,3                    ; @ADV7533
	.comm	_ADV7511_INT0_HPD,4,2           ; @ADV7511_INT0_HPD
	.no_dead_strip	_adv7511_bridge_attach
.subsections_via_symbols
