	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_dsi_create_connector
_mtk_dsi_create_connector:              ## @mtk_dsi_create_connector
	.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	_DRM_MODE_CONNECTOR_DSI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_mtk_dsi_connector_funcs@GOTPCREL(%rip), %rdx
	callq	_drm_connector_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_5
LBB0_2:
	movq	_mtk_dsi_connector_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_drm_connector_helper_add
	movq	_DRM_MODE_DPMS_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	leaq	16(%r14), %rsi
	movq	%r14, %rdi
	callq	_drm_connector_attach_encoder
	movq	8(%r14), %rdi
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.3:
	movq	%r14, %rsi
	callq	_drm_panel_attach
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movq	%r14, %rdi
	callq	_drm_connector_cleanup
	movl	%r15d, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mtk_dsi_connector_funcs,4,2    ## @mtk_dsi_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_DSI,4,2     ## @DRM_MODE_CONNECTOR_DSI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to connector init to drm\n"

	.comm	_mtk_dsi_connector_helper_funcs,4,2 ## @mtk_dsi_connector_helper_funcs
	.comm	_DRM_MODE_DPMS_OFF,4,2          ## @DRM_MODE_DPMS_OFF
L_.str.1:                               ## @.str.1
	.asciz	"Failed to attach panel to drm\n"

	.no_dead_strip	_mtk_dsi_create_connector
.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_connector
_mtk_dsi_create_connector:              ; @mtk_dsi_create_connector
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _DRM_MODE_CONNECTOR_DSI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_DSI@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x2, _mtk_dsi_connector_funcs@GOTPAGE
Lloh4:
	ldr	x2, [x2, _mtk_dsi_connector_funcs@GOTPAGEOFF]
	bl	_drm_connector_init
	cbz	w0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh7:
	adrp	x1, _mtk_dsi_connector_helper_funcs@GOTPAGE
Lloh8:
	ldr	x1, [x1, _mtk_dsi_connector_helper_funcs@GOTPAGEOFF]
	mov	x0, x19
	bl	_drm_connector_helper_add
Lloh9:
	adrp	x8, _DRM_MODE_DPMS_OFF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DRM_MODE_DPMS_OFF@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19]
	add	x1, x19, #16
	mov	x0, x19
	bl	_drm_connector_attach_encoder
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.4:
	mov	x1, x19
	bl	_drm_panel_attach
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.5:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x19
	bl	_drm_connector_cleanup
	b	LBB0_2
LBB0_6:
	mov	w20, #0
	b	LBB0_2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_mtk_dsi_connector_funcs,4,2    ; @mtk_dsi_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_DSI,4,2     ; @DRM_MODE_CONNECTOR_DSI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to connector init to drm\n"

	.comm	_mtk_dsi_connector_helper_funcs,4,2 ; @mtk_dsi_connector_helper_funcs
	.comm	_DRM_MODE_DPMS_OFF,4,2          ; @DRM_MODE_DPMS_OFF
l_.str.1:                               ; @.str.1
	.asciz	"Failed to attach panel to drm\n"

	.no_dead_strip	_mtk_dsi_create_connector
.subsections_via_symbols
