	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_dsi_output_init          ## -- Begin function mdfld_dsi_output_init
	.p2align	4, 0x90
_mdfld_dsi_output_init:                 ## @mdfld_dsi_output_init
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movl	4(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_dev_dbg
	testl	$-3, %r13d
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$120, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movl	%r13d, (%rax)
	movl	(%r12), %esi
	movl	$120, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %r12
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	%r13d, %edx
	callq	_mdfld_dsi_get_default_config
	movq	%r12, 112(%rbx)
	movl	$1, 4(%r12)
	movq	%r14, 104(%r12)
	movq	%r14, %rdi
	callq	*8(%r15)
	movq	%rax, 16(%r12)
	leaq	-96(%rbp), %rdx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	*(%r15)
	testq	%rax, %rax
	jne	LBB0_18
## %bb.9:
	movaps	-96(%rbp), %xmm0
	movq	16(%r12), %rax
	movq	%rax, 96(%r12)
	movq	%rbx, 88(%r12)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.13:
	movaps	%xmm0, -80(%rbp)                ## 16-byte Spill
	movl	$0, 8(%r12)
	addq	$8, %rax
	jmp	LBB0_16
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
LBB0_7:
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_18:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_25:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_7
LBB0_15:
	movaps	%xmm0, -80(%rbp)                ## 16-byte Spill
	movl	$1, 8(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
LBB0_16:
	movq	%r12, (%rax)
	leaq	48(%rbx), %rsi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	_mdfld_dsi_connector_save@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_mdfld_dsi_connector_restore@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	_DRM_MODE_CONNECTOR_LVDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_mdfld_dsi_connector_funcs@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	callq	_drm_connector_init
	movq	_mdfld_dsi_connector_helper_funcs@GOTPCREL(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_connector_helper_add
	movq	_SubPixelHorizontalRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%rbx)
	movaps	-80(%rbp), %xmm0                ## 16-byte Reload
	movups	%xmm0, 64(%rbx)
	movq	$0, 48(%rbx)
	movq	%rbx, %rdi
	addq	$56, %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	(%r14), %esi
	movq	_DRM_MODE_SCALE_FULLSCREEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_drm_object_attach_property
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	_MDFLD_DSI_BRIGHTNESS_MAX_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_object_attach_property
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_mdfld_dsi_pkg_sender_init
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	leaq	L_.str.6(%rip), %rdi
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_18
LBB0_19:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_mdfld_dsi_dpi_init
	testq	%rax, %rax
	je	LBB0_20
## %bb.21:
	movq	%r12, 8(%rax)
	movq	%rax, 32(%r12)
	testl	%r13d, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_22
## %bb.23:
	movq	_INTEL_OUTPUT_MIPI@GOTPCREL(%rip), %rcx
	jmp	LBB0_24
LBB0_14:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_7
LBB0_20:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movl	24(%rbx), %edi
	callq	_mdfld_dsi_pkg_sender_destroy
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_connector_cleanup
	movq	16(%r12), %rdi
	callq	_kfree
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_18
LBB0_22:
	movq	_INTEL_OUTPUT_MIPI2@GOTPCREL(%rip), %rcx
LBB0_24:
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	callq	_drm_connector_register
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init DSI output on pipe %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid parameter\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"No memory"

L_.str.3:                               ## @.str.3
	.asciz	"cannot allocate memory for DSI config\n"

L_.str.4:                               ## @.str.4
	.asciz	"No pannel fixed mode was found\n"

L_.str.5:                               ## @.str.5
	.asciz	"Trying to init MIPI1 before MIPI0\n"

	.comm	_mdfld_dsi_connector_save,4,2   ## @mdfld_dsi_connector_save
	.comm	_mdfld_dsi_connector_restore,4,2 ## @mdfld_dsi_connector_restore
	.comm	_mdfld_dsi_connector_funcs,4,2  ## @mdfld_dsi_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_LVDS,4,2    ## @DRM_MODE_CONNECTOR_LVDS
	.comm	_mdfld_dsi_connector_helper_funcs,4,2 ## @mdfld_dsi_connector_helper_funcs
	.comm	_SubPixelHorizontalRGB,4,2      ## @SubPixelHorizontalRGB
	.comm	_DRM_MODE_SCALE_FULLSCREEN,4,2  ## @DRM_MODE_SCALE_FULLSCREEN
	.comm	_MDFLD_DSI_BRIGHTNESS_MAX_LEVEL,4,2 ## @MDFLD_DSI_BRIGHTNESS_MAX_LEVEL
L_.str.6:                               ## @.str.6
	.asciz	"Package Sender initialization failed on pipe %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"Create DPI encoder failed\n"

	.comm	_INTEL_OUTPUT_MIPI,4,2          ## @INTEL_OUTPUT_MIPI
	.comm	_INTEL_OUTPUT_MIPI2,4,2         ## @INTEL_OUTPUT_MIPI2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_dsi_output_init          ; -- Begin function mdfld_dsi_output_init
	.p2align	2
_mdfld_dsi_output_init:                 ; @mdfld_dsi_output_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x26, [x0, #8]
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	tst	w20, #0xfffffffd
	b.eq	LBB0_3
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_2:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_DRM_ERROR
LBB0_3:
Lloh4:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #120
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.4:
	mov	x19, x0
	str	w20, [x0]
	ldr	w1, [x23]
	mov	w0, #120
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.5:
	mov	x23, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x20
	bl	_mdfld_dsi_get_default_config
	str	x23, [x19, #112]
	mov	w8, #1
	str	w8, [x23, #4]
	str	x22, [x23, #104]
	ldr	x8, [x21, #8]
	mov	x0, x22
	blr	x8
	str	x0, [x23, #16]
	ldr	x8, [x21]
	add	x2, sp, #16
	mov	x0, x22
	mov	x1, x20
	blr	x8
	cbnz	x0, LBB0_13
; %bb.6:
	ldp	x27, x25, [sp, #16]
	ldr	x8, [x23, #16]
	stp	x19, x8, [x23, #88]
	cbz	x8, LBB0_15
; %bb.7:
	cbz	w20, LBB0_16
; %bb.8:
	ldr	x8, [x26, #8]
	ldr	x9, [x8]
	cbz	x9, LBB0_21
; %bb.9:
	str	wzr, [x23, #8]
	add	x8, x8, #8
	b	LBB0_17
LBB0_10:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_11:
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_12:
	bl	_DRM_ERROR
LBB0_13:
	mov	x0, x19
	bl	_kfree
LBB0_14:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_15:
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_16:
	mov	w8, #1
	str	w8, [x23, #8]
	ldr	x8, [x26, #8]
LBB0_17:
	str	x23, [x8]
	add	x24, x19, #48
Lloh12:
	adrp	x8, _mdfld_dsi_connector_save@GOTPAGE
Lloh13:
	ldr	x8, [x8, _mdfld_dsi_connector_save@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _mdfld_dsi_connector_restore@GOTPAGE
Lloh16:
	ldr	x9, [x9, _mdfld_dsi_connector_restore@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #40]
Lloh18:
	adrp	x8, _DRM_MODE_CONNECTOR_LVDS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_LVDS@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
Lloh21:
	adrp	x2, _mdfld_dsi_connector_funcs@GOTPAGE
Lloh22:
	ldr	x2, [x2, _mdfld_dsi_connector_funcs@GOTPAGEOFF]
	mov	x0, x22
	mov	x1, x24
	bl	_drm_connector_init
Lloh23:
	adrp	x1, _mdfld_dsi_connector_helper_funcs@GOTPAGE
Lloh24:
	ldr	x1, [x1, _mdfld_dsi_connector_helper_funcs@GOTPAGEOFF]
	mov	x0, x24
	bl	_drm_connector_helper_add
Lloh25:
	adrp	x8, _SubPixelHorizontalRGB@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SubPixelHorizontalRGB@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x19, #80]
	stp	x27, x25, [x19, #64]
	str	xzr, [x19, #48]
	add	x25, x19, #56
	ldr	w1, [x22]
Lloh28:
	adrp	x8, _DRM_MODE_SCALE_FULLSCREEN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DRM_MODE_SCALE_FULLSCREEN@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x25
	bl	_drm_object_attach_property
	ldr	w1, [x26]
Lloh31:
	adrp	x8, _MDFLD_DSI_BRIGHTNESS_MAX_LEVEL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MDFLD_DSI_BRIGHTNESS_MAX_LEVEL@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x25
	bl	_drm_object_attach_property
	mov	x0, x19
	mov	x1, x20
	bl	_mdfld_dsi_pkg_sender_init
	cbz	x0, LBB0_19
; %bb.18:
	str	x20, [sp]
Lloh34:
	adrp	x0, l_.str.6@PAGE
Lloh35:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_12
LBB0_19:
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	bl	_mdfld_dsi_dpi_init
	cbz	x0, LBB0_22
; %bb.20:
	str	x23, [x0, #8]
	str	x0, [x23, #32]
Lloh36:
	adrp	x8, _INTEL_OUTPUT_MIPI@GOTPAGE
Lloh37:
	ldr	x8, [x8, _INTEL_OUTPUT_MIPI@GOTPAGEOFF]
Lloh38:
	adrp	x9, _INTEL_OUTPUT_MIPI2@GOTPAGE
Lloh39:
	ldr	x9, [x9, _INTEL_OUTPUT_MIPI2@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x0]
	mov	x0, x24
	bl	_drm_connector_register
	b	LBB0_14
LBB0_21:
Lloh40:
	adrp	x0, l_.str.5@PAGE
Lloh41:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_12
LBB0_22:
Lloh42:
	adrp	x0, l_.str.7@PAGE
Lloh43:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_ERROR
	ldr	w0, [x19, #24]
	bl	_mdfld_dsi_pkg_sender_destroy
	mov	x0, x24
	bl	_drm_connector_cleanup
	ldr	x0, [x23, #16]
	bl	_kfree
	mov	x0, x23
	bl	_kfree
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init DSI output on pipe %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid parameter\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"No memory"

l_.str.3:                               ; @.str.3
	.asciz	"cannot allocate memory for DSI config\n"

l_.str.4:                               ; @.str.4
	.asciz	"No pannel fixed mode was found\n"

l_.str.5:                               ; @.str.5
	.asciz	"Trying to init MIPI1 before MIPI0\n"

	.comm	_mdfld_dsi_connector_save,4,2   ; @mdfld_dsi_connector_save
	.comm	_mdfld_dsi_connector_restore,4,2 ; @mdfld_dsi_connector_restore
	.comm	_mdfld_dsi_connector_funcs,4,2  ; @mdfld_dsi_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_LVDS,4,2    ; @DRM_MODE_CONNECTOR_LVDS
	.comm	_mdfld_dsi_connector_helper_funcs,4,2 ; @mdfld_dsi_connector_helper_funcs
	.comm	_SubPixelHorizontalRGB,4,2      ; @SubPixelHorizontalRGB
	.comm	_DRM_MODE_SCALE_FULLSCREEN,4,2  ; @DRM_MODE_SCALE_FULLSCREEN
	.comm	_MDFLD_DSI_BRIGHTNESS_MAX_LEVEL,4,2 ; @MDFLD_DSI_BRIGHTNESS_MAX_LEVEL
l_.str.6:                               ; @.str.6
	.asciz	"Package Sender initialization failed on pipe %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"Create DPI encoder failed\n"

	.comm	_INTEL_OUTPUT_MIPI,4,2          ; @INTEL_OUTPUT_MIPI
	.comm	_INTEL_OUTPUT_MIPI2,4,2         ; @INTEL_OUTPUT_MIPI2
.subsections_via_symbols
