	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_dsi_pkg_sender_init      ## -- Begin function mdfld_dsi_pkg_sender_init
	.p2align	4, 0x90
_mdfld_dsi_pkg_sender_init:             ## @mdfld_dsi_pkg_sender_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %r14
	callq	_mdfld_dsi_get_config
	testq	%r14, %r14
	je	LBB0_1
## %bb.3:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r12
	movq	(%r12), %rax
	movq	(%rax), %r15
	movq	(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$112, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %rbx
	movq	%rax, (%r14)
LBB0_8:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movslq	%r13d, %r13
	movq	%r12, 104(%rbx)
	movq	%r14, 96(%rbx)
	movl	%r13d, (%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 80(%rbx)
	movq	_MDFLD_DSI_PKG_SENDER_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%rbx)
	leaq	(%r13,%r13,2), %rax
	movl	20(%r15,%rax,8), %ecx
	movl	%ecx, 68(%rbx)
	movl	16(%r15,%rax,8), %ecx
	movl	%ecx, 64(%rbx)
	movups	(%r15,%rax,8), %xmm0
	movups	%xmm0, 48(%rbx)
	movl	%r13d, %edi
	callq	_MIPI_INTR_STAT_REG
	movl	%eax, 44(%rbx)
	movl	%r13d, %edi
	callq	_MIPI_LP_GEN_DATA_REG
	movl	%eax, 40(%rbx)
	movl	%r13d, %edi
	callq	_MIPI_HS_GEN_DATA_REG
	movl	%eax, 36(%rbx)
	movl	%r13d, %edi
	callq	_MIPI_LP_GEN_CTRL_REG
	movl	%eax, 32(%rbx)
	movl	%r13d, %edi
	callq	_MIPI_HS_GEN_CTRL_REG
	movl	%eax, 28(%rbx)
	movl	%r13d, %edi
	callq	_MIPI_GEN_FIFO_STAT_REG
	movl	%eax, 24(%rbx)
	movl	%r13d, %edi
	callq	_MIPI_DATA_ADD_REG
	movl	%eax, 20(%rbx)
	movl	%r13d, %edi
	callq	_MIPI_DATA_LEN_REG
	movl	%eax, 16(%rbx)
	movl	%r13d, %edi
	callq	_MIPI_CMD_ADD_REG
	movl	%eax, 12(%rbx)
	movl	%r13d, %edi
	callq	_MIPI_CMD_LEN_REG
	movl	%eax, 8(%rbx)
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_init
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_mdfld_get_panel_type
	movq	_TC35876X@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	movq	_PASS_FROM_SPHY_TO_AFE@GOTPCREL(%rip), %rax
	movq	_SEL_FLOPPED_HSTX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, %r14d
	orl	$2, %r14d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	testl	%r15d, %r15d
	cmovnel	%ecx, %r14d
	movl	%r15d, %edi
	callq	_MIPI_PORT_CONTROL
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_REG_WRITE
	movl	%r15d, %edi
	callq	_MIPI_PORT_CONTROL
	movl	%eax, %edi
	callq	_REG_READ
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_mdfld_dsi_controller_init
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid parameter\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"Create DSI pkg sender failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MDFLD_DSI_PKG_SENDER_FREE,4,2  ## @MDFLD_DSI_PKG_SENDER_FREE
	.comm	_TC35876X,8,3                   ## @TC35876X
	.comm	_PASS_FROM_SPHY_TO_AFE,4,2      ## @PASS_FROM_SPHY_TO_AFE
	.comm	_SEL_FLOPPED_HSTX,4,2           ## @SEL_FLOPPED_HSTX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_dsi_pkg_sender_init      ; -- Begin function mdfld_dsi_pkg_sender_init
	.p2align	2
_mdfld_dsi_pkg_sender_init:             ; @mdfld_dsi_pkg_sender_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x23, x0
	bl	_mdfld_dsi_get_config
	cbz	x23, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	x21, [x0]
	ldr	x8, [x21]
	ldr	x24, [x8]
	ldr	x22, [x23]
	cbz	x22, LBB0_3
; %bb.2:
	mov	x0, x22
	bl	_IS_ERR
	cbz	x0, LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #112
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.4:
	mov	x22, x0
	str	x0, [x23]
LBB0_5:
	sxtw	x8, w19
	stp	x23, x21, [x22, #96]
	str	w19, [x22]
	stp	xzr, xzr, [x22, #80]
Lloh3:
	adrp	x9, _MDFLD_DSI_PKG_SENDER_FREE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MDFLD_DSI_PKG_SENDER_FREE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [x22, #72]
	mov	w9, #24
	madd	x8, x8, x9, x24
	ldr	d0, [x8, #16]
	str	d0, [x22, #64]
	ldr	q0, [x8]
	str	q0, [x22, #48]
	mov	x0, x19
	bl	_MIPI_INTR_STAT_REG
	str	w0, [x22, #44]
	mov	x0, x19
	bl	_MIPI_LP_GEN_DATA_REG
	str	w0, [x22, #40]
	mov	x0, x19
	bl	_MIPI_HS_GEN_DATA_REG
	str	w0, [x22, #36]
	mov	x0, x19
	bl	_MIPI_LP_GEN_CTRL_REG
	str	w0, [x22, #32]
	mov	x0, x19
	bl	_MIPI_HS_GEN_CTRL_REG
	str	w0, [x22, #28]
	mov	x0, x19
	bl	_MIPI_GEN_FIFO_STAT_REG
	str	w0, [x22, #24]
	mov	x0, x19
	bl	_MIPI_DATA_ADD_REG
	str	w0, [x22, #20]
	mov	x0, x19
	bl	_MIPI_DATA_LEN_REG
	str	w0, [x22, #16]
	mov	x0, x19
	bl	_MIPI_CMD_ADD_REG
	str	w0, [x22, #12]
	mov	x0, x19
	bl	_MIPI_CMD_LEN_REG
	str	w0, [x22, #8]
	add	x0, x22, #4
	bl	_spin_lock_init
	mov	x0, x21
	mov	x1, x19
	bl	_mdfld_get_panel_type
Lloh6:
	adrp	x8, _TC35876X@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TC35876X@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.6:
Lloh9:
	adrp	x8, _PASS_FROM_SPHY_TO_AFE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PASS_FROM_SPHY_TO_AFE@GOTPAGEOFF]
Lloh11:
	adrp	x9, _SEL_FLOPPED_HSTX@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SEL_FLOPPED_HSTX@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	orr	w9, w8, #0x2
	cmp	w19, #0
	csel	w21, w9, w8, eq
	mov	x0, x19
	bl	_MIPI_PORT_CONTROL
	mov	x1, x21
	bl	_REG_WRITE
	mov	x0, x19
	bl	_MIPI_PORT_CONTROL
	bl	_REG_READ
	mov	x0, x20
	mov	x1, x19
	bl	_mdfld_dsi_controller_init
LBB0_7:
	mov	w0, #0
	b	LBB0_11
LBB0_8:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid parameter\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"Create DSI pkg sender failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MDFLD_DSI_PKG_SENDER_FREE,4,2  ; @MDFLD_DSI_PKG_SENDER_FREE
	.comm	_TC35876X,8,3                   ; @TC35876X
	.comm	_PASS_FROM_SPHY_TO_AFE,4,2      ; @PASS_FROM_SPHY_TO_AFE
	.comm	_SEL_FLOPPED_HSTX,4,2           ; @SEL_FLOPPED_HSTX
.subsections_via_symbols
