	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_dsi_create_conn_enc
_mtk_dsi_create_conn_enc:               ## @mtk_dsi_create_conn_enc
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_DRM_MODE_ENCODER_DSI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_mtk_dsi_encoder_funcs@GOTPCREL(%rip), %rdx
	xorl	%r8d, %r8d
	callq	_drm_encoder_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_8
LBB0_2:
	movq	_mtk_dsi_encoder_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_drm_encoder_helper_add
	movl	$1, (%r14)
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.3:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_drm_bridge_attach
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movl	%r15d, %ebx
	jmp	LBB0_5
LBB0_6:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mtk_dsi_create_connector
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	callq	_drm_encoder_cleanup
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_mtk_dsi_encoder_funcs,4,2      ## @mtk_dsi_encoder_funcs
	.comm	_DRM_MODE_ENCODER_DSI,4,2       ## @DRM_MODE_ENCODER_DSI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to encoder init to drm\n"

	.comm	_mtk_dsi_encoder_helper_funcs,4,2 ## @mtk_dsi_encoder_helper_funcs
L_.str.1:                               ## @.str.1
	.asciz	"Failed to attach bridge to drm\n"

	.no_dead_strip	_mtk_dsi_create_conn_enc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_dsi_create_conn_enc
_mtk_dsi_create_conn_enc:               ; @mtk_dsi_create_conn_enc
	.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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _DRM_MODE_ENCODER_DSI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_ENCODER_DSI@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x2, _mtk_dsi_encoder_funcs@GOTPAGE
Lloh4:
	ldr	x2, [x2, _mtk_dsi_encoder_funcs@GOTPAGEOFF]
	mov	x4, #0
	bl	_drm_encoder_init
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_7
LBB0_2:
Lloh7:
	adrp	x1, _mtk_dsi_encoder_helper_funcs@GOTPAGE
Lloh8:
	ldr	x1, [x1, _mtk_dsi_encoder_helper_funcs@GOTPAGEOFF]
	mov	x0, x19
	bl	_drm_encoder_helper_add
	mov	w8, #1
	str	w8, [x19]
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x2, #0
	bl	_drm_bridge_attach
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.4:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_6
LBB0_5:
	mov	x0, x21
	mov	x1, x19
	bl	_mtk_dsi_create_connector
	mov	x20, x0
	cbz	w0, LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_drm_encoder_cleanup
LBB0_7:
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_mtk_dsi_encoder_funcs,4,2      ; @mtk_dsi_encoder_funcs
	.comm	_DRM_MODE_ENCODER_DSI,4,2       ; @DRM_MODE_ENCODER_DSI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to encoder init to drm\n"

	.comm	_mtk_dsi_encoder_helper_funcs,4,2 ; @mtk_dsi_encoder_helper_funcs
l_.str.1:                               ; @.str.1
	.asciz	"Failed to attach bridge to drm\n"

	.no_dead_strip	_mtk_dsi_create_conn_enc
.subsections_via_symbols
