	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function start
LCPI0_0:
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_start:                                 ## @start
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_MCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	movl	%esi, %eax
	andl	$-2, %eax
	cmpl	%edi, (%rbx)
	cmovll	%esi, %eax
	testb	$3, %al
	je	LBB0_9
## %bb.1:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rbx), %rsi
	movq	16(%rsi), %r14
	xorl	%r15d, %r15d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	testb	$2, %al
	je	LBB0_5
## %bb.2:
	movl	$1, %r15d
	testb	$1, %dl
	je	LBB0_5
## %bb.3:
	movl	$1, %r15d
	movl	%edx, %eax
	movl	%edx, %ecx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%ecx
	incl	%r15d
	testb	$2, %al
	movl	%ecx, %eax
	jne	LBB0_4
LBB0_5:
	movl	%edx, %r12d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movslq	(%rsi), %r13
	leaq	4(%r14), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	cmpl	$0, (%r14)
	je	LBB0_10
LBB0_6:
	movl	%r12d, %r13d
LBB0_7:
	movq	%rbx, %r15
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%r13d, %r12d
	testl	%ebx, %ebx
	je	LBB0_17
## %bb.8:
	negl	%ebx
	jmp	LBB0_21
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_10:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	cmpq	$0, 32(%r14)
	je	LBB0_22
## %bb.11:
	movq	_MCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, (%rbx)
	setge	%al
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %ecx
	cmpl	$4, %ecx
	setge	%dl
	testb	%dl, %al
	movl	%r12d, %r13d
	jne	LBB0_7
## %bb.12:
	testl	%ecx, %ecx
	js	LBB0_7
## %bb.13:
	movq	16(%r14), %rdx
	movl	%r15d, %eax
	movl	%r13d, %r12d
LBB0_14:
	movl	%ecx, %esi
	movl	$1, (%rdx,%rsi,4)
	imull	(%rbx), %eax
	movq	8(%r14), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movslq	4(%rdi), %rsi
	movl	%eax, (%rdx,%rsi,4)
	movl	%ecx, 8(%rdi)
	movq	24(%r14), %rax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rax,%rsi,4), %ecx
	testl	%ecx, %ecx
	jne	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$1, %edx
	callq	_mci_set_tuner
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	24(%r14), %rax
	movl	(%rax,%rsi,4), %ecx
LBB0_16:
	movq	%rbx, %r15
	incl	%ecx
	movl	%ecx, (%rax,%rsi,4)
	xorl	%eax, %eax
	cmpl	$2, -44(%rbp)                   ## 4-byte Folded Reload
	setge	%al
	movl	%eax, (%r14)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_17:
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	leaq	-120(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$44, %edx
	callq	_memset
	movq	%r14, %r12
	cmpl	$0, (%r14)
	movl	$0, %edi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_19
## %bb.18:
	movq	_SX8_CMD_ENABLE_IQOUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movl	8(%r14), %eax
	movl	%eax, -120(%rbp)
	movl	$0, -116(%rbp)
	leaq	-120(%rbp), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_ddb_mci_cmd
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_ddb_mci_config
	movl	(%r12), %edi
LBB0_19:
	movq	%r15, %r12
	movl	4(%r15), %eax
	movq	_NO_STREAM_ID_FILTER@GOTPCREL(%rip), %r15
	movl	%r13d, %ecx
	orl	$128, %r13d
	cmpl	(%r15), %eax
	cmovel	%ecx, %r13d
	cmpl	$-2147483648, %eax              ## imm = 0x80000000
	cmovel	%ecx, %r13d
	movslq	4(%r14), %rdx
	movl	(%r14), %ecx
	movl	8(%r14), %r8d
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_MCI_CMD_SEARCH_DVBS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movl	%r13d, -108(%rbp)
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -104(%rbp)
	movl	$2, -100(%rbp)
	imull	$1000, 8(%r12), %eax            ## imm = 0x3E8
	movl	%eax, -96(%rbp)
	movl	(%r12), %eax
	movl	%eax, -92(%rbp)
	movl	$-2147483648, %eax              ## imm = 0x80000000
	orl	12(%r12), %eax
	movl	%eax, -88(%rbp)
	movl	4(%r12), %eax
	cmpl	(%r15), %eax
	movl	%eax, %ecx
	cmovel	%ebx, %ecx
	movl	%ecx, -84(%rbp)
	movl	(%r14), %ecx
	movl	%ecx, -112(%rbp)
	movl	8(%r14), %ecx
	movl	%ecx, -120(%rbp)
	movl	4(%r14), %ecx
	movl	%ecx, %edx
	orl	$128, %edx
	cmpl	$-2147483648, %eax              ## imm = 0x80000000
	cmovnel	%ecx, %edx
	movl	%edx, -116(%rbp)
	leaq	-120(%rbp), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_ddb_mci_cmd
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_stop
	movl	%r15d, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	_SX8_DEMOD_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	movl	%r12d, %r13d
	jle	LBB0_25
## %bb.23:
	movq	8(%r14), %rcx
	movq	16(%r14), %rdx
	movq	%rbx, %r9
	cmpl	$8, %eax
	jae	LBB0_26
## %bb.24:
	xorl	%esi, %esi
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	jmp	LBB0_33
LBB0_25:
	movq	%rbx, %r9
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	jmp	LBB0_34
LBB0_26:
	movl	%eax, %esi
	andl	$-8, %esi
	leaq	-8(%rsi), %rdi
	movq	%rdi, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rdi, %rdi
	je	LBB0_29
## %bb.27:
	movq	%r8, %rbx
	andq	$-2, %rbx
	pxor	%xmm9, %xmm9
	xorl	%edi, %edi
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [2,2,2,2]
	pxor	%xmm7, %xmm7
	pxor	%xmm6, %xmm6
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rdi,4), %xmm1
	paddd	%xmm0, %xmm1
	movdqu	16(%rcx,%rdi,4), %xmm3
	paddd	%xmm2, %xmm3
	movdqu	32(%rcx,%rdi,4), %xmm0
	paddd	%xmm1, %xmm0
	movdqu	48(%rcx,%rdi,4), %xmm2
	paddd	%xmm3, %xmm2
	movdqu	(%rdx,%rdi,4), %xmm5
	movdqu	16(%rdx,%rdi,4), %xmm4
	movdqu	32(%rdx,%rdi,4), %xmm1
	movdqu	48(%rdx,%rdi,4), %xmm3
	pcmpeqd	%xmm9, %xmm5
	paddd	%xmm7, %xmm5
	pcmpeqd	%xmm9, %xmm4
	paddd	%xmm6, %xmm4
	pcmpeqd	%xmm9, %xmm1
	pcmpeqd	%xmm9, %xmm3
	paddd	%xmm8, %xmm1
	paddd	%xmm5, %xmm1
	paddd	%xmm8, %xmm3
	paddd	%xmm4, %xmm3
	addq	$16, %rdi
	movdqa	%xmm1, %xmm7
	movdqa	%xmm3, %xmm6
	addq	$-2, %rbx
	jne	LBB0_28
	jmp	LBB0_30
LBB0_29:
	pxor	%xmm1, %xmm1
	xorl	%edi, %edi
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
LBB0_30:
	testb	$1, %r8b
	je	LBB0_32
## %bb.31:
	movdqu	(%rcx,%rdi,4), %xmm4
	paddd	%xmm4, %xmm0
	movdqu	16(%rcx,%rdi,4), %xmm4
	paddd	%xmm4, %xmm2
	movdqu	(%rdx,%rdi,4), %xmm4
	movdqu	16(%rdx,%rdi,4), %xmm5
	pxor	%xmm6, %xmm6
	pcmpeqd	%xmm6, %xmm4
	paddd	%xmm4, %xmm1
	pcmpeqd	%xmm6, %xmm5
	paddd	%xmm5, %xmm3
	pcmpeqd	%xmm4, %xmm4
	psubd	%xmm4, %xmm1
	psubd	%xmm4, %xmm3
LBB0_32:
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	pshufd	$238, %xmm0, %xmm2              ## xmm2 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm2
	pshufd	$85, %xmm2, %xmm0               ## xmm0 = xmm2[1,1,1,1]
	paddd	%xmm2, %xmm0
	movd	%xmm0, %ebx
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edi
	cmpq	%rax, %rsi
	je	LBB0_34
	.p2align	4, 0x90
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	addl	(%rcx,%rsi,4), %ebx
	cmpl	$1, (%rdx,%rsi,4)
	sbbl	$-1, %edi
	incq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_33
LBB0_34:
	movq	_MAX_LDPC_BITRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	subl	%ebx, %ecx
	jle	LBB0_52
## %bb.35:
	movq	_SX8_TSCONFIG_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	_SX8_TSCONFIG_MODE_NORMAL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	movq	%r9, %rbx
	jle	LBB0_37
## %bb.36:
	testl	%edi, %edi
	jne	LBB0_7
LBB0_37:
	movq	_MAX_DEMOD_LDPC_BITRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	cmovll	%ecx, %eax
	movl	(%rbx), %esi
	leal	1(%r15), %ecx
	imull	%esi, %ecx
	.p2align	4, 0x90
LBB0_38:                                ## =>This Inner Loop Header: Depth=1
	decl	%r15d
	subl	%esi, %ecx
	cmpl	%eax, %ecx
	jg	LBB0_38
## %bb.39:
	leal	1(%r15), %eax
	cmpl	$2, %eax
	jl	LBB0_7
## %bb.40:
	movl	$-1, %r12d
	movl	%r15d, %ecx
	shll	%cl, %r12d
	notl	%r12d
	andl	%r13d, %r12d
	testb	$2, -48(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_42
## %bb.41:
	xorl	%r13d, %r13d
	testl	%r12d, %r12d
	je	LBB0_7
LBB0_42:
	movq	_MCLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edi
	shrl	$31, %edi
	addl	%ecx, %edi
	sarl	%edi
	xorl	%ecx, %ecx
	cmpl	%edi, %esi
	setle	%cl
	leal	3(,%rcx,4), %ecx
	movq	16(%r14), %rdx
	cmpl	$0, (%rdx,%rcx,4)
	je	LBB0_14
## %bb.43:
	movq	%rbx, %r9
	leal	-1(%rcx), %ebx
	cmpl	$0, (%rdx,%rbx,4)
	je	LBB0_53
## %bb.44:
	leal	-2(%rcx), %ebx
	cmpl	$0, (%rdx,%rbx,4)
	je	LBB0_53
## %bb.45:
	leal	-3(%rcx), %ebx
	cmpl	$0, (%rdx,%rbx,4)
	je	LBB0_53
## %bb.46:
	testl	%ebx, %ebx
	je	LBB0_51
## %bb.47:
	leal	-4(%rcx), %ebx
	cmpl	$0, (%rdx,%rbx,4)
	je	LBB0_53
## %bb.48:
	cmpl	%edi, %esi
	jg	LBB0_51
## %bb.49:
	leal	-5(%rcx), %ebx
	cmpl	$0, (%rdx,%rbx,4)
	je	LBB0_53
## %bb.50:
	cmpl	%edi, %esi
	jle	LBB0_54
LBB0_51:
	movl	%r12d, %r13d
LBB0_52:
	movq	%r9, %rbx
	jmp	LBB0_7
LBB0_53:
	movl	%ebx, %ecx
	movq	%r9, %rbx
	jmp	LBB0_14
LBB0_54:
	movq	%r9, %r13
	leal	-6(%rcx), %ebx
	cmpl	$0, (%rdx,%rbx,4)
	je	LBB0_57
## %bb.55:
	cmpl	%edi, %esi
	jle	LBB0_58
## %bb.56:
	movl	%r12d, %eax
	movq	%r13, %rbx
	jmp	LBB0_6
LBB0_57:
	movl	%ebx, %ecx
	movq	%r13, %rbx
	jmp	LBB0_14
LBB0_58:
	addl	$-7, %ecx
	cmpl	$0, (%rdx,%rcx,4)
	movl	%r12d, %esi
	movq	%r13, %rbx
	movl	%r12d, %r13d
	jne	LBB0_7
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MCLK,4,2                       ## @MCLK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SX8_DEMOD_NUM,4,2              ## @SX8_DEMOD_NUM
	.comm	_MAX_LDPC_BITRATE,4,2           ## @MAX_LDPC_BITRATE
	.comm	_SX8_TSCONFIG_MODE_MASK,4,2     ## @SX8_TSCONFIG_MODE_MASK
	.comm	_SX8_TSCONFIG_MODE_NORMAL,4,2   ## @SX8_TSCONFIG_MODE_NORMAL
	.comm	_MAX_DEMOD_LDPC_BITRATE,4,2     ## @MAX_DEMOD_LDPC_BITRATE
	.comm	_SX8_CMD_ENABLE_IQOUTPUT,4,2    ## @SX8_CMD_ENABLE_IQOUTPUT
	.comm	_NO_STREAM_ID_FILTER,4,2        ## @NO_STREAM_ID_FILTER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MCI-%d: tuner=%d demod=%d\n"

	.comm	_MCI_CMD_SEARCH_DVBS,4,2        ## @MCI_CMD_SEARCH_DVBS
	.no_dead_strip	_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function start
_start:                                 ; @start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x27, _MCLK@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MCLK@GOTPAGEOFF]
	ldr	w9, [x27]
	cmp	w9, #0
	cinc	w9, w9, lt
	and	w10, w1, #0xfffffffe
	cmp	w8, w9, asr #1
	csel	w25, w1, w10, lt
	tst	w25, #0x3
	b.eq	LBB0_5
; %bb.1:
	mov	x22, x3
	mov	x21, x2
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	x26, [x20, #16]
	tbz	w25, #1, LBB0_6
; %bb.2:
	mov	w28, #1
	tbz	w21, #0, LBB0_7
; %bb.3:
	mov	x8, x21
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x8
	asr	w8, w8, #1
	add	w28, w28, #1
	tbnz	w9, #1, LBB0_4
	b	LBB0_7
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_22
LBB0_6:
	mov	w28, #0
LBB0_7:
	ldrsw	x24, [x20]
	add	x23, x26, #4
	mov	x0, x23
	bl	_mutex_lock
	ldr	w8, [x26]
	cbz	w8, LBB0_10
LBB0_8:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
	mov	x0, x23
	bl	_mutex_unlock
	cbz	w24, LBB0_17
; %bb.9:
	neg	w20, w24
	b	LBB0_22
LBB0_10:
	ldr	x8, [x26, #32]
	cbz	x8, LBB0_23
; %bb.11:
	ldr	w8, [x19]
	ldr	w9, [x27]
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	ldr	w10, [x20, #4]
	cmp	w10, #3
	ccmp	w8, w9, #8, gt
	b.ge	LBB0_8
; %bb.12:
	tbnz	w10, #31, LBB0_8
; %bb.13:
	ldr	x9, [x26, #16]
	mov	x8, x28
LBB0_14:
	mov	w11, #1
	str	w11, [x9, w10, uxtw #2]
	ldr	w9, [x19]
	mul	w8, w9, w8
	ldr	x9, [x26, #8]
	ldrsw	x11, [x20, #4]
	str	w8, [x9, x11, lsl #2]
	str	w10, [x20, #8]
	ldr	x8, [x26, #24]
	ldr	w9, [x8, x24, lsl #2]
	cbnz	w9, LBB0_16
; %bb.15:
	mov	x0, x19
	mov	x1, x24
	mov	w2, #1
	bl	_mci_set_tuner
	ldr	x8, [x26, #24]
	ldr	w9, [x8, x24, lsl #2]
LBB0_16:
	add	w9, w9, #1
	str	w9, [x8, x24, lsl #2]
	cmp	w22, #1
	cset	w8, gt
	str	w8, [x26]
	mov	x0, x23
	bl	_mutex_unlock
LBB0_17:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #44
	bl	_memset
	ldr	w8, [x26]
	cbz	w8, LBB0_19
; %bb.18:
Lloh8:
	adrp	x8, _SX8_CMD_ENABLE_IQOUTPUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SX8_CMD_ENABLE_IQOUTPUT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	ldr	w8, [x20, #8]
	stp	w8, wzr, [sp]
	mov	x1, sp
	mov	x0, x20
	mov	x2, #0
	bl	_ddb_mci_cmd
	mov	x0, x20
	mov	x1, x22
	bl	_ddb_mci_config
	ldr	w0, [x26]
	b	LBB0_20
LBB0_19:
	mov	w0, #0
LBB0_20:
	ldr	w8, [x19, #4]
Lloh11:
	adrp	x22, _NO_STREAM_ID_FILTER@GOTPAGE
Lloh12:
	ldr	x22, [x22, _NO_STREAM_ID_FILTER@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w9
	mov	w23, #-2147483648
	ccmp	w8, w23, #4, ne
	orr	w8, w25, #0x80
	csel	w24, w25, w8, eq
	ldp	w3, w2, [x20]
                                        ; kill: def $w2 killed $w2 def $x2
	sxtw	x2, w2
	ldr	w4, [x20, #8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh15:
	adrp	x8, _MCI_CMD_SEARCH_DVBS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MCI_CMD_SEARCH_DVBS@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	stp	w24, w21, [sp, #12]
	mov	w9, #1000
	ldp	w10, w11, [x19, #8]
	mul	w9, w10, w9
	mov	w10, #2
	stp	w10, w9, [sp, #20]
	orr	w9, w11, #0x80000000
	ldp	w10, w11, [x19]
	stp	w10, w9, [sp, #28]
	ldr	w9, [x22]
	cmp	w11, w9
	csel	w9, wzr, w11, eq
	stp	w9, w8, [sp, #36]
	ldr	w8, [x20]
	str	w8, [sp, #8]
	ldp	w9, w8, [x20, #4]
	orr	w10, w9, #0x80
	cmp	w11, w23
	csel	w9, w10, w9, eq
	stp	w8, w9, [sp]
	mov	x1, sp
	mov	x0, x20
	mov	x2, #0
	bl	_ddb_mci_cmd
	mov	x20, x0
	cbz	w0, LBB0_22
; %bb.21:
	mov	x0, x19
	bl	_stop
LBB0_22:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_23:
Lloh18:
	adrp	x8, _SX8_DEMOD_NUM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SX8_DEMOD_NUM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_26
; %bb.24:
	ldp	x9, x10, [x26, #8]
	cmp	w8, #16
	b.hs	LBB0_27
; %bb.25:
	mov	x11, #0
	mov	w12, #0
	mov	w13, #0
	b	LBB0_30
LBB0_26:
	mov	w13, #0
	mov	w12, #0
	b	LBB0_32
LBB0_27:
	movi.2d	v0, #0000000000000000
	and	x11, x8, #0xfffffff0
	movi.2d	v1, #0000000000000000
	add	x12, x10, #32
	add	x13, x9, #32
	mov	x14, x11
	movi.2d	v3, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v4, #0000000000000000
	movi.2d	v5, #0000000000000000
	movi.2d	v6, #0000000000000000
	movi.2d	v7, #0000000000000000
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	ldp	q16, q17, [x13, #-32]
	ldp	q18, q19, [x13], #64
	add.4s	v4, v16, v4
	add.4s	v5, v17, v5
	add.4s	v6, v18, v6
	add.4s	v7, v19, v7
	ldp	q16, q17, [x12, #-32]
	ldp	q18, q19, [x12], #64
	cmtst.4s	v16, v16, v16
	cmtst.4s	v17, v17, v17
	cmtst.4s	v18, v18, v18
	cmtst.4s	v19, v19, v19
	sub.4s	v0, v0, v16
	sub.4s	v1, v1, v17
	sub.4s	v3, v3, v18
	sub.4s	v2, v2, v19
	subs	x14, x14, #16
	b.ne	LBB0_28
; %bb.29:
	add.4s	v4, v5, v4
	add.4s	v4, v6, v4
	add.4s	v4, v7, v4
	addv.4s	s4, v4
	fmov	w13, s4
	add.4s	v0, v1, v0
	add.4s	v0, v3, v0
	add.4s	v0, v2, v0
	addv.4s	s0, v0
	fmov	w12, s0
	cmp	x11, x8
	b.eq	LBB0_32
LBB0_30:
	lsl	x14, x11, #2
	add	x10, x10, x14
	add	x9, x9, x14
	sub	x8, x8, x11
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9], #4
	add	w13, w11, w13
	ldr	w11, [x10], #4
	cmp	w11, #0
	cinc	w12, w12, ne
	subs	x8, x8, #1
	b.ne	LBB0_31
LBB0_32:
Lloh21:
	adrp	x8, _MAX_LDPC_BITRATE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MAX_LDPC_BITRATE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	subs	w8, w8, w13
	b.le	LBB0_8
; %bb.33:
Lloh24:
	adrp	x9, _SX8_TSCONFIG_MODE_MASK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SX8_TSCONFIG_MODE_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	and	w9, w9, w22
Lloh27:
	adrp	x10, _SX8_TSCONFIG_MODE_NORMAL@GOTPAGE
Lloh28:
	ldr	x10, [x10, _SX8_TSCONFIG_MODE_NORMAL@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	cmp	w9, w10
	ccmp	w12, #0, #4, gt
	b.ne	LBB0_8
; %bb.34:
Lloh30:
	adrp	x9, _MAX_DEMOD_LDPC_BITRATE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _MAX_DEMOD_LDPC_BITRATE@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	ldr	w11, [x19]
	madd	w9, w11, w28, w11
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	sub	w28, w28, #1
	sub	w9, w9, w11
	cmp	w9, w8
	b.gt	LBB0_35
; %bb.36:
	add	w8, w28, #1
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.37:
	mov	w9, #-1
	lsl	w9, w9, w28
	bic	w21, w21, w9
	tbz	w25, #1, LBB0_39
; %bb.38:
	cbz	w21, LBB0_8
LBB0_39:
	ldr	w9, [x27]
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w13, w9, #1
	mov	w9, #7
	mov	w10, #3
	cmp	w11, w13
	csel	w12, w10, w9, gt
	ldr	x9, [x26, #16]
	ldr	w10, [x9, w12, uxtw #2]
	cbz	w10, LBB0_51
; %bb.40:
	sub	w10, w12, #1
	ldr	w14, [x9, w10, uxtw #2]
	cbz	w14, LBB0_14
; %bb.41:
	sub	w10, w12, #2
	ldr	w14, [x9, w10, uxtw #2]
	cbz	w14, LBB0_14
; %bb.42:
	sub	w10, w12, #3
	ldr	w14, [x9, w10, uxtw #2]
	cbz	w14, LBB0_14
; %bb.43:
	cbz	w10, LBB0_8
; %bb.44:
	sub	w10, w12, #4
	ldr	w14, [x9, w10, uxtw #2]
	cbz	w14, LBB0_14
; %bb.45:
	cmp	w11, w13
	b.gt	LBB0_8
; %bb.46:
	sub	w10, w12, #5
	ldr	w14, [x9, w10, uxtw #2]
	cbz	w14, LBB0_14
; %bb.47:
	cmp	w11, w13
	b.gt	LBB0_8
; %bb.48:
	sub	w10, w12, #6
	ldr	w14, [x9, w10, uxtw #2]
	cbz	w14, LBB0_14
; %bb.49:
	cmp	w11, w13
	b.gt	LBB0_8
; %bb.50:
	sub	w10, w12, #7
	ldr	w11, [x9, w10, uxtw #2]
	cbnz	w11, LBB0_8
	b	LBB0_14
LBB0_51:
	mov	x10, x12
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MCLK,4,2                       ; @MCLK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SX8_DEMOD_NUM,4,2              ; @SX8_DEMOD_NUM
	.comm	_MAX_LDPC_BITRATE,4,2           ; @MAX_LDPC_BITRATE
	.comm	_SX8_TSCONFIG_MODE_MASK,4,2     ; @SX8_TSCONFIG_MODE_MASK
	.comm	_SX8_TSCONFIG_MODE_NORMAL,4,2   ; @SX8_TSCONFIG_MODE_NORMAL
	.comm	_MAX_DEMOD_LDPC_BITRATE,4,2     ; @MAX_DEMOD_LDPC_BITRATE
	.comm	_SX8_CMD_ENABLE_IQOUTPUT,4,2    ; @SX8_CMD_ENABLE_IQOUTPUT
	.comm	_NO_STREAM_ID_FILTER,4,2        ; @NO_STREAM_ID_FILTER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MCI-%d: tuner=%d demod=%d\n"

	.comm	_MCI_CMD_SEARCH_DVBS,4,2        ; @MCI_CMD_SEARCH_DVBS
	.no_dead_strip	_start
.subsections_via_symbols
