	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib8000_set_frontend
_dib8000_set_frontend:                  ## @dib8000_set_frontend
	.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
	movq	8(%rdi), %r15
	movq	24(%r15), %rax
	movq	(%rax), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	cmpl	$0, 8(%rbx)
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
	movl	$6000000, 8(%rbx)               ## imm = 0x5B8D80
LBB0_4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	24(%r15), %r12
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.6:
	xorl	%ebx, %ebx
	movq	_SYS_ISDBT@GOTPCREL(%rip), %r15
	movq	_CT_AGC_START@GOTPCREL(%rip), %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %esi
	callq	_dib8000_set_tune_state
	incq	%rbx
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jae	LBB0_20
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r15), %eax
	movl	%eax, 44(%rdi)
	movq	%r14, %rsi
	movl	$48, %edx
	callq	_memcpy
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$32912, (%rax)                  ## imm = 0x8090
	movq	24(%rax), %rax
	movq	(%rax,%rbx,8), %rdi
	movl	$1, %esi
	jne	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	callq	_dib8096p_set_diversity_in
	movq	(%r12), %rax
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rax,%rbx,8), %rdi
	movq	_OUTMODE_DIVERSITY@GOTPCREL(%rip), %rax
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	callq	_dib8000_set_diversity_in
	movq	(%r12), %rax
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rax,%rbx,8), %rdi
	movq	_OUTMODE_DIVERSITY@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rax), %rdi
	movq	_OUTMODE_HIGH_Z@GOTPCREL(%rip), %rax
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rax), %esi
	callq	_dib8096p_set_output_mode
	jmp	LBB0_17
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rax), %rdi
	movq	_OUTMODE_HIGH_Z@GOTPCREL(%rip), %rax
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rax), %esi
	callq	_dib8000_set_output_mode
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	48(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	callq	*%rcx
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	jmp	LBB0_19
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_78
LBB0_5:
	xorl	%ebx, %ebx
LBB0_20:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$32912, (%rax)                  ## imm = 0x8090
	movq	24(%rax), %rax
	movq	-8(%rax,%rbx,8), %rdi
	jne	LBB0_21
## %bb.22:
	xorl	%esi, %esi
	callq	_dib8096p_set_diversity_in
	jmp	LBB0_23
LBB0_21:
	xorl	%esi, %esi
	callq	_dib8000_set_diversity_in
LBB0_23:
	movq	_CT_AGC_STOP@GOTPCREL(%rip), %r14
LBB0_24:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_28 Depth 2
                                        ##     Child Loop BB0_36 Depth 2
	movq	(%r12), %rax
	movq	(%rax), %rdi
	callq	_dib8000_agc_startup
	movl	%eax, %ebx
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$2, %rax
	jb	LBB0_29
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	(%r12), %rcx
	movq	8(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_29
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=1
	movl	$2, %r15d
	.p2align	4, 0x90
LBB0_28:                                ##   Parent Loop BB0_24 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	callq	_dib8000_agc_startup
	cmpl	%ebx, %eax
	movl	%ebx, %ecx
	cmovgl	%eax, %ecx
	testl	%eax, %eax
	cmovel	%ebx, %ecx
	testl	%ebx, %ebx
	movl	%ecx, %ebx
	cmovel	%eax, %ebx
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %r15
	jae	LBB0_29
## %bb.27:                              ##   in Loop: Header=BB0_28 Depth=2
	movq	(%r12), %rcx
	movq	(%rcx,%r15,8), %rdi
	incq	%r15
	testq	%rdi, %rdi
	jne	LBB0_28
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_24 Depth=1
	testl	%ebx, %ebx
	je	LBB0_37
## %bb.30:                              ##   in Loop: Header=BB0_24 Depth=1
	leal	(%rbx,%rbx,4), %eax
	addl	%eax, %eax
	addl	$990, %eax                      ## imm = 0x3DE
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	imull	$1000, %eax, %edi               ## imm = 0x3E8
	leal	1000(%rdi), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_usleep_range
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_31
## %bb.32:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	(%r12), %rcx
	movq	(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_39
## %bb.33:                              ##   in Loop: Header=BB0_24 Depth=1
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_36:                                ##   Parent Loop BB0_24 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	callq	_dib8000_get_tune_state
	cmpq	(%r14), %rax
	jne	LBB0_24
## %bb.34:                              ##   in Loop: Header=BB0_36 Depth=2
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rbx
	jae	LBB0_37
## %bb.35:                              ##   in Loop: Header=BB0_36 Depth=2
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdi
	incq	%rbx
	testq	%rdi, %rdi
	jne	LBB0_36
	jmp	LBB0_39
LBB0_37:
	testq	%rax, %rax
	je	LBB0_38
LBB0_39:
	movq	(%r12), %rcx
	movq	(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_43
## %bb.40:
	movl	$1, %ebx
	movq	_CT_DEMOD_START@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_42:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	callq	_dib8000_set_tune_state
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rbx
	jae	LBB0_43
## %bb.41:                              ##   in Loop: Header=BB0_42 Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdi
	incq	%rbx
	testq	%rdi, %rdi
	jne	LBB0_42
LBB0_43:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_45
LBB0_38:
	xorl	%eax, %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_45
LBB0_31:
	xorl	%eax, %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_45
	.p2align	4, 0x90
LBB0_44:                                ##   in Loop: Header=BB0_45 Depth=1
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r14, %rbx
LBB0_45:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_47 Depth 2
                                        ##       Child Loop BB0_55 Depth 3
                                        ##     Child Loop BB0_65 Depth 2
                                        ##     Child Loop BB0_71 Depth 2
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_60
## %bb.46:                              ##   in Loop: Header=BB0_45 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_47
	.p2align	4, 0x90
LBB0_59:                                ##   in Loop: Header=BB0_47 Depth=2
	incq	%r14
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jae	LBB0_60
LBB0_47:                                ##   Parent Loop BB0_45 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_55 Depth 3
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_60
## %bb.48:                              ##   in Loop: Header=BB0_47 Depth=2
	callq	_dib8000_tune
	testq	%rax, %rax
	je	LBB0_50
## %bb.49:                              ##   in Loop: Header=BB0_47 Depth=2
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	imull	$100, %eax, %edi
	callq	_usecs_to_jiffies
	addq	%rbx, %rax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%r13, %rax
	movq	%r13, %rcx
	cmovbq	%rax, %rcx
	testq	%r13, %r13
	cmoveq	%rax, %rcx
	movq	%rcx, %r13
LBB0_50:                                ##   in Loop: Header=BB0_47 Depth=2
	cmpl	$0, 4(%rbx)
	jne	LBB0_59
## %bb.51:                              ##   in Loop: Header=BB0_47 Depth=2
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rdi
	callq	_dib8000_get_status
	movq	_FE_STATUS_DEMOD_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_53
## %bb.52:                              ##   in Loop: Header=BB0_47 Depth=2
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rdi
	callq	_dib8000_get_status
	movq	_FE_STATUS_FFT_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_59
LBB0_53:                                ##   in Loop: Header=BB0_47 Depth=2
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movq	24(%rbx), %rax
	movq	(%rax,%r14,8), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_dib8000_get_frontend
	movl	$1, 4(%rbx)
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_59
## %bb.54:                              ##   in Loop: Header=BB0_47 Depth=2
	movq	(%r12), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_55
	.p2align	4, 0x90
LBB0_58:                                ##   in Loop: Header=BB0_55 Depth=3
	incq	%r15
	cmpq	%r15, %rcx
	jbe	LBB0_59
LBB0_55:                                ##   Parent Loop BB0_45 Depth=1
                                        ##     Parent Loop BB0_47 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpq	$0, (%rax,%r15,8)
	je	LBB0_59
## %bb.56:                              ##   in Loop: Header=BB0_55 Depth=3
	cmpq	%r15, %r14
	je	LBB0_58
## %bb.57:                              ##   in Loop: Header=BB0_55 Depth=3
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rdi
	callq	_dib8000_tune_restart_from_demod
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rcx
	movl	40(%rcx), %edx
	movq	(%rax,%r15,8), %rsi
	movl	%edx, 40(%rsi)
	movups	24(%rcx), %xmm0
	movups	%xmm0, 24(%rsi)
	movq	16(%rcx), %rcx
	movq	16(%rsi), %rdx
	movups	(%rcx), %xmm0
	movups	%xmm0, (%rdx)
	movups	16(%rcx), %xmm0
	movups	%xmm0, 16(%rdx)
	movups	32(%rcx), %xmm0
	movups	%xmm0, 32(%rdx)
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	jmp	LBB0_58
	.p2align	4, 0x90
LBB0_60:                                ##   in Loop: Header=BB0_45 Depth=1
	movq	(%r12), %rax
	movq	(%rax), %rdi
	callq	_dib8000_get_status
	movq	_FE_STATUS_TUNE_FAILED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_63
## %bb.61:                              ##   in Loop: Header=BB0_45 Depth=1
	movq	(%r12), %rax
	movq	(%rax), %rdi
	callq	_dib8000_get_status
	movq	_FE_STATUS_LOCKED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_63
## %bb.62:                              ##   in Loop: Header=BB0_45 Depth=1
	movq	(%r12), %rax
	movq	(%rax), %rdi
	callq	_dib8000_get_status
	movq	_FE_STATUS_DATA_LOCKED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_69
	.p2align	4, 0x90
LBB0_63:                                ##   in Loop: Header=BB0_45 Depth=1
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_68
## %bb.64:                              ##   in Loop: Header=BB0_45 Depth=1
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_65:                                ##   Parent Loop BB0_45 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_67
## %bb.66:                              ##   in Loop: Header=BB0_65 Depth=2
	callq	_dib8000_get_tune_state
	movq	_CT_DEMOD_STOP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$1, %eax
	cmovnel	%eax, %r14d
	incq	%rbx
	movq	_MAX_NUMBER_OF_FRONTENDS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jb	LBB0_65
LBB0_67:                                ##   in Loop: Header=BB0_45 Depth=1
	testl	%r14d, %r14d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_68
LBB0_69:                                ##   in Loop: Header=BB0_45 Depth=1
	testq	%r13, %r13
	je	LBB0_73
## %bb.70:                              ##   in Loop: Header=BB0_45 Depth=1
	movq	%rbx, %r14
	movq	_jiffies@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_71:                                ##   Parent Loop BB0_45 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rdi
	movq	%r13, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_44
## %bb.72:                              ##   in Loop: Header=BB0_71 Depth=2
	movl	$100, %edi
	callq	_msleep
	jmp	LBB0_71
LBB0_68:
	movq	(%r12), %rax
	movq	(%rax), %rdi
	callq	_dib8000_get_status
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_74
LBB0_73:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
LBB0_74:
	movl	16(%rbx), %esi
	cmpl	$32912, (%rbx)                  ## imm = 0x8090
	movq	24(%rbx), %rax
	movq	(%rax), %rdi
	jne	LBB0_75
## %bb.76:
	callq	_dib8096p_set_output_mode
	cmpq	$0, 8(%rbx)
	jne	LBB0_78
## %bb.77:
	movq	_MPEG_ON_DIBTX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib8096p_setDibTxMux
	movq	_DIBTX_ON_HOSTBUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib8096p_setHostBusMux
	jmp	LBB0_78
LBB0_75:
	callq	_dib8000_set_output_mode
LBB0_78:
	xorl	%eax, %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	"dib8000: must at least specify frequency\n"

L_.str.1:                               ## @.str.1
	.asciz	"dib8000: no bandwidth specified, set to default\n"

	.comm	_MAX_NUMBER_OF_FRONTENDS,8,3    ## @MAX_NUMBER_OF_FRONTENDS
	.comm	_SYS_ISDBT,4,2                  ## @SYS_ISDBT
	.comm	_OUTMODE_DIVERSITY,4,2          ## @OUTMODE_DIVERSITY
	.comm	_OUTMODE_HIGH_Z,4,2             ## @OUTMODE_HIGH_Z
	.comm	_CT_AGC_START,4,2               ## @CT_AGC_START
	.comm	_CT_AGC_STOP,8,3                ## @CT_AGC_STOP
	.comm	_CT_DEMOD_START,4,2             ## @CT_DEMOD_START
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_FE_STATUS_DEMOD_SUCCESS,4,2    ## @FE_STATUS_DEMOD_SUCCESS
	.comm	_FE_STATUS_FFT_SUCCESS,4,2      ## @FE_STATUS_FFT_SUCCESS
L_.str.2:                               ## @.str.2
	.asciz	"autosearch succeeded on fe%i\n"

L_.str.3:                               ## @.str.3
	.asciz	"Restarting frontend %d\n"

	.comm	_FE_STATUS_TUNE_FAILED,4,2      ## @FE_STATUS_TUNE_FAILED
	.comm	_FE_STATUS_LOCKED,4,2           ## @FE_STATUS_LOCKED
	.comm	_FE_STATUS_DATA_LOCKED,4,2      ## @FE_STATUS_DATA_LOCKED
	.comm	_CT_DEMOD_STOP,8,3              ## @CT_DEMOD_STOP
L_.str.4:                               ## @.str.4
	.asciz	"tuning done with status %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"strange callback time something went wrong\n"

	.comm	_MPEG_ON_DIBTX,4,2              ## @MPEG_ON_DIBTX
	.comm	_DIBTX_ON_HOSTBUS,4,2           ## @DIBTX_ON_HOSTBUS
	.no_dead_strip	_dib8000_set_frontend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib8000_set_frontend
_dib8000_set_frontend:                  ; @dib8000_set_frontend
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, [x0, #8]
	mov	x24, x19
	ldr	x8, [x24, #24]!
	ldr	x20, [x8]
	ldr	x8, [x20]
	cbz	x8, LBB0_18
; %bb.1:
	mov	x21, x0
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
	mov	w8, #36224
	movk	w8, #91, lsl #16
	str	w8, [x20, #8]
LBB0_3:
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
Lloh2:
	adrp	x25, _MAX_NUMBER_OF_FRONTENDS@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MAX_NUMBER_OF_FRONTENDS@GOTPAGEOFF]
	ldr	x8, [x25]
	cbz	x8, LBB0_19
; %bb.4:
	mov	x20, #0
Lloh4:
	adrp	x22, _SYS_ISDBT@GOTPAGE
Lloh5:
	ldr	x22, [x22, _SYS_ISDBT@GOTPAGEOFF]
	mov	w23, #32912
Lloh6:
	adrp	x26, _OUTMODE_HIGH_Z@GOTPAGE
Lloh7:
	ldr	x26, [x26, _OUTMODE_HIGH_Z@GOTPAGEOFF]
Lloh8:
	adrp	x27, _OUTMODE_DIVERSITY@GOTPAGE
Lloh9:
	ldr	x27, [x27, _OUTMODE_DIVERSITY@GOTPAGEOFF]
Lloh10:
	adrp	x28, _CT_AGC_START@GOTPAGE
Lloh11:
	ldr	x28, [x28, _CT_AGC_START@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x28]
	bl	_dib8000_set_tune_state
	add	x20, x20, #1
	ldr	x8, [x25]
	cmp	x20, x8
	b.hs	LBB0_20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x0, [x8, x20, lsl #3]
	cbz	x0, LBB0_20
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x22]
	str	w8, [x0, #44]
	mov	x1, x21
	mov	w2, #48
	bl	_memcpy
	ldr	w8, [x19]
	ldr	x9, [x19, #24]
	ldr	x0, [x9, x20, lsl #3]
	mov	w1, #1
	cmp	w8, w23
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_dib8096p_set_diversity_in
	ldr	x8, [x24]
	cbz	x20, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x8, x20, lsl #3]
	ldr	w1, [x27]
	b	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_dib8000_set_diversity_in
	ldr	x8, [x24]
	cbz	x20, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x8, x20, lsl #3]
	ldr	w1, [x27]
	b	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x8]
	ldr	w1, [x26]
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_dib8096p_set_output_mode
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x8]
	ldr	w1, [x26]
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_dib8000_set_output_mode
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x24]
	ldr	x0, [x8, x20, lsl #3]
	ldr	x8, [x0, #48]
	cbz	x8, LBB0_5
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	blr	x8
	ldr	x8, [x24]
	ldr	x0, [x8, x20, lsl #3]
	b	LBB0_5
LBB0_18:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	b	LBB0_75
LBB0_19:
	mov	x20, #0
LBB0_20:
	ldr	w8, [x19]
	ldr	x9, [x19, #24]
	add	x9, x9, x20, lsl #3
	ldur	x0, [x9, #-8]
	mov	w9, #32912
	cmp	w8, w9
	b.ne	LBB0_22
; %bb.21:
	mov	w1, #0
	bl	_dib8096p_set_diversity_in
	b	LBB0_23
LBB0_22:
	mov	w1, #0
	bl	_dib8000_set_diversity_in
LBB0_23:
	mov	w20, #10
	mov	w22, #34079
	movk	w22, #20971, lsl #16
	mov	w23, #1000
Lloh14:
	adrp	x26, _CT_AGC_STOP@GOTPAGE
Lloh15:
	ldr	x26, [x26, _CT_AGC_STOP@GOTPAGEOFF]
LBB0_24:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_27 Depth 2
                                        ;     Child Loop BB0_33 Depth 2
	ldr	x8, [x24]
	ldr	x0, [x8]
	bl	_dib8000_agc_startup
	mov	x21, x0
	ldr	x8, [x25]
	cmp	x8, #2
	b.lo	LBB0_29
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	x9, [x24]
	ldr	x0, [x9, #8]
	cbz	x0, LBB0_29
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=1
	mov	w27, #2
LBB0_27:                                ;   Parent Loop BB0_24 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_dib8000_agc_startup
	cmp	w0, w21
	ccmp	w0, #0, #4, gt
	ccmp	w21, #0, #4, eq
	csel	w21, w0, w21, eq
	ldr	x8, [x25]
	cmp	x27, x8
	b.hs	LBB0_29
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=2
	ldr	x9, [x24]
	ldr	x0, [x9, x27, lsl #3]
	add	x27, x27, #1
	cbnz	x0, LBB0_27
LBB0_29:                                ;   in Loop: Header=BB0_24 Depth=1
	cbz	w21, LBB0_36
; %bb.30:                               ;   in Loop: Header=BB0_24 Depth=1
	mul	w8, w21, w20
	add	w8, w8, #990
	smull	x8, w8, w22
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	mul	w0, w8, w23
	add	w1, w0, #1000
	bl	_usleep_range
	ldr	x8, [x25]
	cbz	x8, LBB0_41
; %bb.31:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	x9, [x24]
	ldr	x0, [x9]
	cbz	x0, LBB0_37
; %bb.32:                               ;   in Loop: Header=BB0_24 Depth=1
	mov	w21, #1
LBB0_33:                                ;   Parent Loop BB0_24 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_dib8000_get_tune_state
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_24
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=2
	ldr	x8, [x25]
	cmp	x21, x8
	b.hs	LBB0_36
; %bb.35:                               ;   in Loop: Header=BB0_33 Depth=2
	ldr	x9, [x24]
	ldr	x0, [x9, x21, lsl #3]
	add	x21, x21, #1
	cbnz	x0, LBB0_33
	b	LBB0_37
LBB0_36:
	cbz	x8, LBB0_41
LBB0_37:
	ldr	x9, [x24]
	ldr	x0, [x9]
	cbz	x0, LBB0_41
; %bb.38:
	mov	w20, #1
Lloh16:
	adrp	x21, _CT_DEMOD_START@GOTPAGE
Lloh17:
	ldr	x21, [x21, _CT_DEMOD_START@GOTPAGEOFF]
LBB0_39:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	bl	_dib8000_set_tune_state
	ldr	x8, [x25]
	cmp	x20, x8
	b.hs	LBB0_41
; %bb.40:                               ;   in Loop: Header=BB0_39 Depth=1
	ldr	x9, [x24]
	ldr	x0, [x9, x20, lsl #3]
	add	x20, x20, #1
	cbnz	x0, LBB0_39
LBB0_41:
Lloh18:
	adrp	x27, _CT_DEMOD_STOP@GOTPAGE
Lloh19:
	ldr	x27, [x27, _CT_DEMOD_STOP@GOTPAGEOFF]
Lloh20:
	adrp	x28, _jiffies@GOTPAGE
Lloh21:
	ldr	x28, [x28, _jiffies@GOTPAGEOFF]
Lloh22:
	adrp	x22, l_.str.3@PAGE
Lloh23:
	add	x22, x22, l_.str.3@PAGEOFF
	b	LBB0_43
LBB0_42:                                ;   in Loop: Header=BB0_43 Depth=1
	ldr	x8, [x25]
LBB0_43:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_46 Depth 2
                                        ;       Child Loop BB0_55 Depth 3
                                        ;     Child Loop BB0_63 Depth 2
                                        ;     Child Loop BB0_67 Depth 2
	mov	x23, #0
	cbz	x8, LBB0_58
; %bb.44:                               ;   in Loop: Header=BB0_43 Depth=1
	mov	x21, #0
	b	LBB0_46
LBB0_45:                                ;   in Loop: Header=BB0_46 Depth=2
	add	x21, x21, #1
	ldr	x8, [x25]
	cmp	x21, x8
	b.hs	LBB0_58
LBB0_46:                                ;   Parent Loop BB0_43 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_55 Depth 3
	ldr	x8, [x24]
	ldr	x0, [x8, x21, lsl #3]
	cbz	x0, LBB0_58
; %bb.47:                               ;   in Loop: Header=BB0_46 Depth=2
	bl	_dib8000_tune
	cbz	x0, LBB0_49
; %bb.48:                               ;   in Loop: Header=BB0_46 Depth=2
	ldr	x20, [x28]
	mov	w8, #100
	mul	w0, w0, w8
	bl	_usecs_to_jiffies
	add	x8, x0, x20
	cmp	x8, x23
	ccmp	x23, #0, #4, hs
	csel	x23, x8, x23, eq
LBB0_49:                                ;   in Loop: Header=BB0_46 Depth=2
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_45
; %bb.50:                               ;   in Loop: Header=BB0_46 Depth=2
	ldr	x8, [x24]
	ldr	x0, [x8, x21, lsl #3]
	bl	_dib8000_get_status
Lloh24:
	adrp	x8, _FE_STATUS_DEMOD_SUCCESS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _FE_STATUS_DEMOD_SUCCESS@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_52
; %bb.51:                               ;   in Loop: Header=BB0_46 Depth=2
	ldr	x8, [x24]
	ldr	x0, [x8, x21, lsl #3]
	bl	_dib8000_get_status
Lloh27:
	adrp	x8, _FE_STATUS_FFT_SUCCESS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FE_STATUS_FFT_SUCCESS@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_45
LBB0_52:                                ;   in Loop: Header=BB0_46 Depth=2
	str	x21, [sp]
Lloh30:
	adrp	x0, l_.str.2@PAGE
Lloh31:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dprintk
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x21, lsl #3]
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	bl	_dib8000_get_frontend
	mov	w8, #1
	str	w8, [x19, #4]
	ldr	x9, [x25]
	cbz	x9, LBB0_45
; %bb.53:                               ;   in Loop: Header=BB0_46 Depth=2
	mov	x20, #0
	ldr	x8, [x24]
	b	LBB0_55
LBB0_54:                                ;   in Loop: Header=BB0_55 Depth=3
	add	x20, x20, #1
	cmp	x9, x20
	b.ls	LBB0_45
LBB0_55:                                ;   Parent Loop BB0_43 Depth=1
                                        ;     Parent Loop BB0_46 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x10, [x8, x20, lsl #3]
	cbz	x10, LBB0_45
; %bb.56:                               ;   in Loop: Header=BB0_55 Depth=3
	cmp	x21, x20
	b.eq	LBB0_54
; %bb.57:                               ;   in Loop: Header=BB0_55 Depth=3
	str	x20, [sp]
	mov	x0, x22
	bl	_dprintk
	ldr	x8, [x24]
	lsl	x26, x20, #3
	ldr	x0, [x8, x26]
	bl	_dib8000_tune_restart_from_demod
	ldr	x8, [x24]
	ldr	x9, [x8, x21, lsl #3]
	ldr	w10, [x9, #40]
	ldr	x11, [x8, x26]
	str	w10, [x11, #40]
	ldur	q0, [x9, #24]
	stur	q0, [x11, #24]
	ldr	x9, [x9, #16]
	ldr	x10, [x11, #16]
	ldr	q0, [x9]
	str	q0, [x10]
	ldr	q0, [x9, #16]
	str	q0, [x10, #16]
	ldr	q0, [x9, #32]
	str	q0, [x10, #32]
	ldr	x9, [x25]
	b	LBB0_54
LBB0_58:                                ;   in Loop: Header=BB0_43 Depth=1
	ldr	x8, [x24]
	ldr	x0, [x8]
	bl	_dib8000_get_status
Lloh32:
	adrp	x8, _FE_STATUS_TUNE_FAILED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _FE_STATUS_TUNE_FAILED@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_61
; %bb.59:                               ;   in Loop: Header=BB0_43 Depth=1
	ldr	x8, [x24]
	ldr	x0, [x8]
	bl	_dib8000_get_status
Lloh35:
	adrp	x8, _FE_STATUS_LOCKED@GOTPAGE
Lloh36:
	ldr	x8, [x8, _FE_STATUS_LOCKED@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_61
; %bb.60:                               ;   in Loop: Header=BB0_43 Depth=1
	ldr	x8, [x24]
	ldr	x0, [x8]
	bl	_dib8000_get_status
Lloh38:
	adrp	x8, _FE_STATUS_DATA_LOCKED@GOTPAGE
Lloh39:
	ldr	x8, [x8, _FE_STATUS_DATA_LOCKED@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_66
LBB0_61:                                ;   in Loop: Header=BB0_43 Depth=1
	ldr	x8, [x25]
	cbz	x8, LBB0_69
; %bb.62:                               ;   in Loop: Header=BB0_43 Depth=1
	mov	x21, #0
	mov	w20, #0
LBB0_63:                                ;   Parent Loop BB0_43 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x24]
	ldr	x0, [x8, x21, lsl #3]
	cbz	x0, LBB0_65
; %bb.64:                               ;   in Loop: Header=BB0_63 Depth=2
	bl	_dib8000_get_tune_state
	ldr	x8, [x27]
	cmp	x0, x8
	csinc	w20, w20, wzr, eq
	add	x21, x21, #1
	ldr	x8, [x25]
	cmp	x21, x8
	b.lo	LBB0_63
LBB0_65:                                ;   in Loop: Header=BB0_43 Depth=1
	cbz	w20, LBB0_69
LBB0_66:                                ;   in Loop: Header=BB0_43 Depth=1
	cbz	x23, LBB0_70
LBB0_67:                                ;   Parent Loop BB0_43 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x28]
	mov	x1, x23
	bl	_time_before
	cbz	x0, LBB0_42
; %bb.68:                               ;   in Loop: Header=BB0_67 Depth=2
	mov	w0, #100
	bl	_msleep
	b	LBB0_67
LBB0_69:
	ldr	x8, [x24]
	ldr	x0, [x8]
	bl	_dib8000_get_status
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh41:
	adrp	x0, l_.str.4@PAGE
Lloh42:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_71
LBB0_70:
Lloh43:
	adrp	x0, l_.str.5@PAGE
Lloh44:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_71:
	bl	_dprintk
	ldr	w8, [x19]
	ldr	x9, [x19, #24]
	ldr	x0, [x9]
	ldr	w1, [x19, #16]
	mov	w9, #32912
	cmp	w8, w9
	b.ne	LBB0_74
; %bb.72:
	bl	_dib8096p_set_output_mode
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_75
; %bb.73:
Lloh45:
	adrp	x8, _MPEG_ON_DIBTX@GOTPAGE
Lloh46:
	ldr	x8, [x8, _MPEG_ON_DIBTX@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib8096p_setDibTxMux
Lloh48:
	adrp	x8, _DIBTX_ON_HOSTBUS@GOTPAGE
Lloh49:
	ldr	x8, [x8, _DIBTX_ON_HOSTBUS@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib8096p_setHostBusMux
	b	LBB0_75
LBB0_74:
	bl	_dib8000_set_output_mode
LBB0_75:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dib8000: must at least specify frequency\n"

l_.str.1:                               ; @.str.1
	.asciz	"dib8000: no bandwidth specified, set to default\n"

	.comm	_MAX_NUMBER_OF_FRONTENDS,8,3    ; @MAX_NUMBER_OF_FRONTENDS
	.comm	_SYS_ISDBT,4,2                  ; @SYS_ISDBT
	.comm	_OUTMODE_DIVERSITY,4,2          ; @OUTMODE_DIVERSITY
	.comm	_OUTMODE_HIGH_Z,4,2             ; @OUTMODE_HIGH_Z
	.comm	_CT_AGC_START,4,2               ; @CT_AGC_START
	.comm	_CT_AGC_STOP,8,3                ; @CT_AGC_STOP
	.comm	_CT_DEMOD_START,4,2             ; @CT_DEMOD_START
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_FE_STATUS_DEMOD_SUCCESS,4,2    ; @FE_STATUS_DEMOD_SUCCESS
	.comm	_FE_STATUS_FFT_SUCCESS,4,2      ; @FE_STATUS_FFT_SUCCESS
l_.str.2:                               ; @.str.2
	.asciz	"autosearch succeeded on fe%i\n"

l_.str.3:                               ; @.str.3
	.asciz	"Restarting frontend %d\n"

	.comm	_FE_STATUS_TUNE_FAILED,4,2      ; @FE_STATUS_TUNE_FAILED
	.comm	_FE_STATUS_LOCKED,4,2           ; @FE_STATUS_LOCKED
	.comm	_FE_STATUS_DATA_LOCKED,4,2      ; @FE_STATUS_DATA_LOCKED
	.comm	_CT_DEMOD_STOP,8,3              ; @CT_DEMOD_STOP
l_.str.4:                               ; @.str.4
	.asciz	"tuning done with status %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"strange callback time something went wrong\n"

	.comm	_MPEG_ON_DIBTX,4,2              ; @MPEG_ON_DIBTX
	.comm	_DIBTX_ON_HOSTBUS,4,2           ; @DIBTX_ON_HOSTBUS
	.no_dead_strip	_dib8000_set_frontend
.subsections_via_symbols
