	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function panel_bridge_attach
_panel_bridge_attach:                   ## @panel_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	_drm_bridge_to_panel_bridge
	cmpl	$0, (%r15)
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_panel_bridge_connector_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_drm_connector_helper_add
	movl	4(%r15), %edi
	movl	8(%r14), %ecx
	movq	_panel_bridge_connector_funcs@GOTPCREL(%rip), %rdx
	movq	%r14, %rsi
	callq	_drm_connector_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	jmp	LBB0_5
LBB0_6:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_drm_connector_attach_encoder
	movl	4(%r14), %edi
	movq	%r14, %rsi
	callq	_drm_panel_attach
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_5:
	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	"Missing encoder\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_panel_bridge_connector_helper_funcs,4,2 ## @panel_bridge_connector_helper_funcs
	.comm	_panel_bridge_connector_funcs,4,2 ## @panel_bridge_connector_funcs
L_.str.1:                               ## @.str.1
	.asciz	"Failed to initialize connector\n"

	.no_dead_strip	_panel_bridge_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function panel_bridge_attach
_panel_bridge_attach:                   ; @panel_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	_drm_bridge_to_panel_bridge
	ldr	w8, [x20]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x1, _panel_bridge_connector_helper_funcs@GOTPAGE
Lloh1:
	ldr	x1, [x1, _panel_bridge_connector_helper_funcs@GOTPAGEOFF]
	bl	_drm_connector_helper_add
	ldr	w0, [x20, #4]
	ldr	w3, [x19, #8]
Lloh2:
	adrp	x2, _panel_bridge_connector_funcs@GOTPAGE
Lloh3:
	ldr	x2, [x2, _panel_bridge_connector_funcs@GOTPAGEOFF]
	mov	x1, x19
	bl	_drm_connector_init
	cbz	w0, LBB0_5
; %bb.2:
	mov	x21, x0
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	mov	x0, x21
	b	LBB0_6
LBB0_5:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_drm_connector_attach_encoder
	ldr	w0, [x19, #4]
	mov	x1, x19
	bl	_drm_panel_attach
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_6:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Missing encoder\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_panel_bridge_connector_helper_funcs,4,2 ; @panel_bridge_connector_helper_funcs
	.comm	_panel_bridge_connector_funcs,4,2 ; @panel_bridge_connector_funcs
l_.str.1:                               ; @.str.1
	.asciz	"Failed to initialize connector\n"

	.no_dead_strip	_panel_bridge_attach
.subsections_via_symbols
