	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt312_initfe
_mt312_initfe:                          ## @mt312_initfe
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	(%rdi), %rbx
	movq	_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	cmpl	$6, (%rbx)
	setne	%al
	leal	136(,%rax,4), %edx
	movq	%rbx, %rdi
	callq	_mt312_writereg
	testl	%eax, %eax
	js	LBB0_13
## %bb.1:
	movl	$150, %edi
	callq	_udelay
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mt312_reset
	testl	%eax, %eax
	js	LBB0_13
## %bb.2:
	movaps	l___const.mt312_initfe.buf_def+16(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	l___const.mt312_initfe.buf_def(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	_VIT_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$32, %ecx
	callq	_mt312_write
	testl	%eax, %eax
	js	LBB0_13
## %bb.3:
	cmpl	$128, 4(%rbx)
	jne	LBB0_8
## %bb.4:
	movq	_GPP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$128, %edx
	callq	_mt312_writereg
	testl	%eax, %eax
	js	LBB0_13
## %bb.5:
	movabsq	$755914244224, %rax             ## imm = 0xB000000080
	movq	%rax, -64(%rbp)
	movq	_HW_CTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_mt312_write
	testl	%eax, %eax
	js	LBB0_13
## %bb.6:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mt312_writereg
	testl	%eax, %eax
	js	LBB0_13
## %bb.7:
	movq	_MPEG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mt312_writereg
	testl	%eax, %eax
	js	LBB0_13
LBB0_8:
	movl	8(%rbx), %edi
	imull	(%rbx), %edi
	addl	%edi, %edi
	movl	$1000000, %esi                  ## imm = 0xF4240
	callq	_mt312_div
	movl	%eax, -64(%rbp)
	movl	8(%rbx), %edi
	movl	$88000, %esi                    ## imm = 0x157C0
	callq	_mt312_div
	movl	%eax, -60(%rbp)
	movq	_SYS_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %ecx
	callq	_mt312_write
	testl	%eax, %eax
	js	LBB0_13
## %bb.9:
	movq	_SNR_THS_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$50, %edx
	callq	_mt312_writereg
	testl	%eax, %eax
	js	LBB0_13
## %bb.10:
	xorl	%edx, %edx
	cmpl	$128, 4(%rbx)
	setne	%dl
	shll	$5, %edx
	addl	$51, %edx
	movl	%edx, -64(%rbp)
	movq	_OP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mt312_writereg
	testl	%eax, %eax
	js	LBB0_13
## %bb.11:
	movabsq	$652835029132, %rax             ## imm = 0x980000008C
	movq	%rax, -64(%rbp)
	movq	_TS_SW_LIM_L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %ecx
	callq	_mt312_write
	testl	%eax, %eax
	js	LBB0_13
## %bb.12:
	movq	_CS_SW_LIM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$105, %edx
	callq	_mt312_writereg
	movl	%eax, %ecx
	sarl	$31, %eax
	andl	%ecx, %eax
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG,4,2                     ## @CONFIG
	.section	__TEXT,__const
	.p2align	4                               ## @__const.mt312_initfe.buf_def
l___const.mt312_initfe.buf_def:
	.long	20                              ## 0x14
	.long	18                              ## 0x12
	.long	3                               ## 0x3
	.long	2                               ## 0x2
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.comm	_VIT_SETUP,4,2                  ## @VIT_SETUP
	.comm	_GPP_CTRL,4,2                   ## @GPP_CTRL
	.comm	_HW_CTRL,4,2                    ## @HW_CTRL
	.comm	_MPEG_CTRL,4,2                  ## @MPEG_CTRL
	.comm	_SYS_CLK,4,2                    ## @SYS_CLK
	.comm	_SNR_THS_HIGH,4,2               ## @SNR_THS_HIGH
	.comm	_OP_CTRL,4,2                    ## @OP_CTRL
	.comm	_TS_SW_LIM_L,4,2                ## @TS_SW_LIM_L
	.comm	_CS_SW_LIM,4,2                  ## @CS_SW_LIM
	.no_dead_strip	_mt312_initfe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function mt312_initfe
lCPI0_0:
	.long	128                             ; 0x80
	.long	176                             ; 0xb0
lCPI0_1:
	.long	140                             ; 0x8c
	.long	152                             ; 0x98
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_mt312_initfe:                          ; @mt312_initfe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	x19, [x0]
Lloh3:
	adrp	x8, _CONFIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CONFIG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w8, [x19]
	mov	w9, #140
	mov	w10, #136
	cmp	w8, #6
	csel	w2, w10, w9, eq
	mov	x0, x19
	bl	_mt312_writereg
	tbnz	w0, #31, LBB0_13
; %bb.1:
	mov	w0, #150
	bl	_udelay
	mov	x0, x19
	mov	w1, #1
	bl	_mt312_reset
	tbnz	w0, #31, LBB0_13
; %bb.2:
Lloh6:
	adrp	x8, l___const.mt312_initfe.buf_def@PAGE
Lloh7:
	add	x8, x8, l___const.mt312_initfe.buf_def@PAGEOFF
	ldp	q0, q1, [x8]
	stp	q0, q1, [sp]
Lloh8:
	adrp	x8, _VIT_SETUP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VIT_SETUP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #32
	bl	_mt312_write
	tbnz	w0, #31, LBB0_13
; %bb.3:
	ldr	w8, [x19, #4]
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.4:
Lloh11:
	adrp	x8, _GPP_CTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GPP_CTRL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #128
	bl	_mt312_writereg
	tbnz	w0, #31, LBB0_13
; %bb.5:
Lloh14:
	adrp	x8, lCPI0_0@PAGE
Lloh15:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp]
Lloh16:
	adrp	x20, _HW_CTRL@GOTPAGE
Lloh17:
	ldr	x20, [x20, _HW_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #2
	bl	_mt312_write
	tbnz	w0, #31, LBB0_13
; %bb.6:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_mt312_writereg
	tbnz	w0, #31, LBB0_13
; %bb.7:
Lloh18:
	adrp	x8, _MPEG_CTRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MPEG_CTRL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mt312_writereg
	tbnz	w0, #31, LBB0_13
LBB0_8:
	ldr	w8, [x19, #8]
	ldr	w9, [x19]
	mul	w8, w8, w9
	lsl	w0, w8, #1
	mov	w1, #16960
	movk	w1, #15, lsl #16
	bl	_mt312_div
	str	w0, [sp]
	ldr	w0, [x19, #8]
	mov	w1, #22464
	movk	w1, #1, lsl #16
	bl	_mt312_div
	str	w0, [sp, #4]
Lloh21:
	adrp	x8, _SYS_CLK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SYS_CLK@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #8
	bl	_mt312_write
	tbnz	w0, #31, LBB0_13
; %bb.9:
Lloh24:
	adrp	x8, _SNR_THS_HIGH@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SNR_THS_HIGH@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #50
	bl	_mt312_writereg
	tbnz	w0, #31, LBB0_13
; %bb.10:
	ldr	w8, [x19, #4]
	mov	w9, #83
	mov	w10, #51
	cmp	w8, #128
	csel	w2, w10, w9, eq
	str	w2, [sp]
Lloh27:
	adrp	x8, _OP_CTRL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _OP_CTRL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt312_writereg
	tbnz	w0, #31, LBB0_13
; %bb.11:
Lloh30:
	adrp	x8, lCPI0_1@PAGE
Lloh31:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp]
Lloh32:
	adrp	x8, _TS_SW_LIM_L@GOTPAGE
Lloh33:
	ldr	x8, [x8, _TS_SW_LIM_L@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #8
	bl	_mt312_write
	tbnz	w0, #31, LBB0_13
; %bb.12:
Lloh35:
	adrp	x8, _CS_SW_LIM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CS_SW_LIM@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #105
	bl	_mt312_writereg
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_13:
	ldur	x8, [x29, #-24]
Lloh38:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh39:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdrp	Lloh30, Lloh32
	.loh AdrpLdr	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG,4,2                     ; @CONFIG
	.section	__TEXT,__const
	.p2align	2                               ; @__const.mt312_initfe.buf_def
l___const.mt312_initfe.buf_def:
	.long	20                              ; 0x14
	.long	18                              ; 0x12
	.long	3                               ; 0x3
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.comm	_VIT_SETUP,4,2                  ; @VIT_SETUP
	.comm	_GPP_CTRL,4,2                   ; @GPP_CTRL
	.comm	_HW_CTRL,4,2                    ; @HW_CTRL
	.comm	_MPEG_CTRL,4,2                  ; @MPEG_CTRL
	.comm	_SYS_CLK,4,2                    ; @SYS_CLK
	.comm	_SNR_THS_HIGH,4,2               ; @SNR_THS_HIGH
	.comm	_OP_CTRL,4,2                    ; @OP_CTRL
	.comm	_TS_SW_LIM_L,4,2                ; @TS_SW_LIM_L
	.comm	_CS_SW_LIM,4,2                  ; @CS_SW_LIM
	.no_dead_strip	_mt312_initfe
.subsections_via_symbols
