	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib3000mc_set_frontend
_dib3000mc_set_frontend:                ## @dib3000mc_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, %r12
	leaq	16(%rdi), %r15
	movq	8(%rdi), %r14
	movq	_OUTMODE_HIGH_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dib3000mc_set_output_mode
	movl	48(%r12), %edi
	movl	%edi, 4(%r14)
	callq	_BANDWIDTH_TO_KHZ
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dib3000mc_set_bandwidth
	movq	_buggy_sfn_workaround@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	*%rax
	movl	$100, %edi
	callq	_msleep
LBB0_2:
	movq	(%r15), %rax
	movq	_TRANSMISSION_MODE_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.3:
	movq	24(%r12), %rax
	movq	_GUARD_INTERVAL_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.4:
	movq	32(%r12), %rax
	movq	_QAM_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	40(%r12), %rax
	movq	_FEC_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_6:
	movq	%r12, %rdi
	callq	_dib3000mc_autosearch_start
	movl	$-1000, %ebx                    ## imm = 0xFC18
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_msleep
	movq	%r12, %rdi
	callq	_dib3000mc_autosearch_is_irq
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_7
LBB0_9:
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	callq	_dprintk
	cmpl	$2, %r13d
	jae	LBB0_10
## %bb.12:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_10:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_dib3000mc_get_frontend
LBB0_11:
	movq	%r12, %rdi
	callq	_dib3000mc_tune
	movl	%eax, %ebx
	movq	_OUTMODE_MPEG2_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dib3000mc_set_output_mode
	movl	%ebx, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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	_OUTMODE_MPEG2_FIFO,4,2         ## @OUTMODE_MPEG2_FIFO
	.no_dead_strip	_dib3000mc_set_frontend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib3000mc_set_frontend
_dib3000mc_set_frontend:                ; @dib3000mc_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
	add	x21, x0, #16
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _OUTMODE_HIGH_Z@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OUTMODE_HIGH_Z@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib3000mc_set_output_mode
	ldr	w0, [x20, #48]
	str	w0, [x19, #4]
	bl	_BANDWIDTH_TO_KHZ
	mov	x1, x0
	mov	x0, x19
	bl	_dib3000mc_set_bandwidth
Lloh3:
	adrp	x8, _buggy_sfn_workaround@GOTPAGE
Lloh4:
	ldr	x8, [x8, _buggy_sfn_workaround@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	blr	x8
	mov	w0, #100
	bl	_msleep
LBB0_2:
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _TRANSMISSION_MODE_AUTO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TRANSMISSION_MODE_AUTO@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.3:
	ldr	x8, [x20, #24]
Lloh9:
	adrp	x9, _GUARD_INTERVAL_AUTO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GUARD_INTERVAL_AUTO@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.4:
	ldr	x8, [x20, #32]
Lloh12:
	adrp	x9, _QAM_AUTO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _QAM_AUTO@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x20, #40]
Lloh15:
	adrp	x9, _FEC_AUTO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _FEC_AUTO@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
LBB0_6:
	mov	x0, x20
	bl	_dib3000mc_autosearch_start
	mov	w8, #-1000
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x8
	mov	w0, #1
	bl	_msleep
	mov	x0, x20
	bl	_dib3000mc_autosearch_is_irq
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w8, w23, #1
	cbnz	w23, LBB0_7
LBB0_9:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_dprintk
	cmp	w22, #2
	b.hs	LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_13
LBB0_11:
	mov	x0, x20
	mov	x1, x21
	bl	_dib3000mc_get_frontend
LBB0_12:
	mov	x0, x20
	bl	_dib3000mc_tune
	mov	x20, x0
Lloh20:
	adrp	x8, _OUTMODE_MPEG2_FIFO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OUTMODE_MPEG2_FIFO@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib3000mc_set_output_mode
	mov	x0, x20
LBB0_13:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.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	_OUTMODE_MPEG2_FIFO,4,2         ; @OUTMODE_MPEG2_FIFO
	.no_dead_strip	_dib3000mc_set_frontend
.subsections_via_symbols
