	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib7000p_set_frontend
_dib7000p_set_frontend:                 ## @dib7000p_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	8(%rdi), %r14
	movq	(%r14), %rax
	movq	_SOC7090@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_dib7090_set_diversity_in
	jmp	LBB0_3
LBB0_2:
	movq	_OUTMODE_HIGH_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dib7000p_set_output_mode
LBB0_3:
	movq	_buggy_sfn_workaround@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	callq	*%rax
LBB0_5:
	leaq	16(%r13), %rbx
	movq	$0, 24(%r14)
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_dib7000p_agc_startup
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %edi
	callq	_msleep
	jmp	LBB0_7
LBB0_8:
	movq	(%rbx), %rax
	movq	_TRANSMISSION_MODE_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.9:
	movq	24(%r13), %rax
	movq	_GUARD_INTERVAL_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.10:
	movq	32(%r13), %rax
	movq	_QAM_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:
	movq	40(%r13), %rax
	movq	_FEC_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
LBB0_12:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_dib7000p_autosearch_start
	movl	$-800, %ebx                     ## imm = 0xFCE0
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_msleep
	movq	%r13, %rdi
	callq	_dib7000p_autosearch_is_irq
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_13
LBB0_15:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_dprintk
	xorl	%r12d, %r12d
	cmpl	$2, %r15d
	jb	LBB0_21
## %bb.16:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_dib7000p_get_frontend
	movq	_SOC7090@GOTPCREL(%rip), %r15
LBB0_17:
	movq	%r13, %rdi
	callq	_dib7000p_tune
	movl	%eax, %r12d
	movq	(%r14), %rax
	movl	16(%r14), %esi
	cmpq	(%r15), %rax
	jne	LBB0_20
## %bb.18:
	movq	%r13, %rdi
	callq	_dib7090_set_output_mode
	cmpq	$0, 8(%r14)
	jne	LBB0_21
## %bb.19:
	movq	_MPEG_ON_DIBTX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dib7090_setDibTxMux
	movq	_DIBTX_ON_HOSTBUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dib7090_setHostBusMux
	jmp	LBB0_21
LBB0_20:
	movq	%r14, %rdi
	callq	_dib7000p_set_output_mode
LBB0_21:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOC7090,8,3                    ## @SOC7090
	.comm	_OUTMODE_HIGH_Z,4,2             ## @OUTMODE_HIGH_Z
	.comm	_buggy_sfn_workaround,4,2       ## @buggy_sfn_workaround
	.comm	_TRANSMISSION_MODE_AUTO,8,3     ## @TRANSMISSION_MODE_AUTO
	.comm	_GUARD_INTERVAL_AUTO,8,3        ## @GUARD_INTERVAL_AUTO
	.comm	_QAM_AUTO,8,3                   ## @QAM_AUTO
	.comm	_FEC_AUTO,8,3                   ## @FEC_AUTO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"autosearch returns: %d\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib7000p_set_frontend
_dib7000p_set_frontend:                 ; @dib7000p_set_frontend
	.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	x20, x0
	ldr	x19, [x0, #8]
	ldr	x8, [x19]
Lloh0:
	adrp	x23, _SOC7090@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SOC7090@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	bl	_dib7090_set_diversity_in
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _OUTMODE_HIGH_Z@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OUTMODE_HIGH_Z@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7000p_set_output_mode
LBB0_3:
Lloh5:
	adrp	x8, _buggy_sfn_workaround@GOTPAGE
Lloh6:
	ldr	x8, [x8, _buggy_sfn_workaround@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x20
	blr	x8
LBB0_5:
	add	x21, x20, #16
	str	xzr, [x19, #24]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_dib7000p_agc_startup
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_msleep
	b	LBB0_6
LBB0_8:
	ldr	x8, [x21]
Lloh8:
	adrp	x9, _TRANSMISSION_MODE_AUTO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TRANSMISSION_MODE_AUTO@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.9:
	ldr	x8, [x20, #24]
Lloh11:
	adrp	x9, _GUARD_INTERVAL_AUTO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _GUARD_INTERVAL_AUTO@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.10:
	ldr	x8, [x20, #32]
Lloh14:
	adrp	x9, _QAM_AUTO@GOTPAGE
Lloh15:
	ldr	x9, [x9, _QAM_AUTO@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.11:
	ldr	x8, [x20, #40]
Lloh17:
	adrp	x9, _FEC_AUTO@GOTPAGE
Lloh18:
	ldr	x9, [x9, _FEC_AUTO@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
LBB0_12:
	mov	x0, x20
	bl	_dib7000p_autosearch_start
	mov	w8, #-800
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x24, x8
	mov	w0, #1
	bl	_msleep
	mov	x0, x20
	bl	_dib7000p_autosearch_is_irq
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	w8, w24, #1
	cbnz	w24, LBB0_13
LBB0_15:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_dprintk
	cmp	w22, #2
	b.hs	LBB0_17
; %bb.16:
	mov	w21, #0
	b	LBB0_22
LBB0_17:
	mov	x0, x20
	mov	x1, x21
	bl	_dib7000p_get_frontend
LBB0_18:
	mov	x0, x20
	bl	_dib7000p_tune
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x9, [x23]
	ldr	w1, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.19:
	mov	x0, x20
	bl	_dib7090_set_output_mode
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_22
; %bb.20:
Lloh22:
	adrp	x8, _MPEG_ON_DIBTX@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MPEG_ON_DIBTX@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7090_setDibTxMux
Lloh25:
	adrp	x8, _DIBTX_ON_HOSTBUS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DIBTX_ON_HOSTBUS@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib7090_setHostBusMux
	b	LBB0_22
LBB0_21:
	mov	x0, x19
	bl	_dib7000p_set_output_mode
LBB0_22:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SOC7090,8,3                    ; @SOC7090
	.comm	_OUTMODE_HIGH_Z,4,2             ; @OUTMODE_HIGH_Z
	.comm	_buggy_sfn_workaround,4,2       ; @buggy_sfn_workaround
	.comm	_TRANSMISSION_MODE_AUTO,8,3     ; @TRANSMISSION_MODE_AUTO
	.comm	_GUARD_INTERVAL_AUTO,8,3        ; @GUARD_INTERVAL_AUTO
	.comm	_QAM_AUTO,8,3                   ; @QAM_AUTO
	.comm	_FEC_AUTO,8,3                   ; @FEC_AUTO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"autosearch returns: %d\n"

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