	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dtt200u_fe_set_frontend
_dtt200u_fe_set_frontend:               ## @dtt200u_fe_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movslq	8(%rdi), %r12
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_SET_BANDWIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rsi
	movl	%eax, (%rsi)
	movl	12(%rbx), %eax
	cmpl	$6000000, %eax                  ## imm = 0x5B8D80
	je	LBB0_6
## %bb.1:
	cmpl	$8000000, %eax                  ## imm = 0x7A1200
	je	LBB0_2
## %bb.3:
	cmpl	$7000000, %eax                  ## imm = 0x6ACFC0
	jne	LBB0_5
## %bb.4:
	movl	$7, %eax
	jmp	LBB0_7
LBB0_6:
	movl	$6, %eax
	jmp	LBB0_7
LBB0_2:
	movl	$8, %eax
LBB0_7:
	movl	%eax, 4(%rsi)
	movl	12(%r15), %edi
	movl	$2, %edx
	callq	_dvb_usb_generic_write
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:
	imulq	$1125899907, %r12, %rax         ## imm = 0x431BDE83
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$48, %rax
	addl	%ecx, %eax
	movq	_SET_RF_FREQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	(%r15), %rsi
	movl	%ecx, (%rsi)
	movzbl	%al, %ecx
	movl	%ecx, 4(%rsi)
	movzbl	%ah, %eax
	movl	%eax, 8(%rsi)
	movl	12(%r15), %edi
	movl	$3, %edx
	callq	_dvb_usb_generic_write
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SET_BANDWIDTH,4,2              ## @SET_BANDWIDTH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SET_RF_FREQ,4,2                ## @SET_RF_FREQ
	.no_dead_strip	_dtt200u_fe_set_frontend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dtt200u_fe_set_frontend
_dtt200u_fe_set_frontend:               ; @dtt200u_fe_set_frontend
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x21, [x0]
	ldrsw	x22, [x0, #8]
	add	x19, x21, #8
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _SET_BANDWIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SET_BANDWIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x1, [x21]
	str	w8, [x1]
	ldr	w8, [x20, #12]
	sub	w9, w8, #1464, lsl #12          ; =5996544
	cmp	w9, #3456
	b.eq	LBB0_4
; %bb.1:
	mov	w9, #4608
	movk	w9, #122, lsl #16
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.2:
	mov	w9, #53184
	movk	w9, #106, lsl #16
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.3:
	mov	w8, #7
	b	LBB0_6
LBB0_4:
	mov	w8, #6
	b	LBB0_6
LBB0_5:
	mov	w8, #8
LBB0_6:
	str	w8, [x1, #4]
	ldr	w0, [x21, #12]
	mov	w2, #2
	bl	_dvb_usb_generic_write
	tbnz	w0, #31, LBB0_8
; %bb.7:
	mov	w8, #56963
	movk	w8, #17179, lsl #16
	mul	x8, x22, x8
	lsr	x9, x8, #63
	asr	x8, x8, #48
	add	w8, w8, w9
Lloh3:
	adrp	x9, _SET_RF_FREQ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SET_RF_FREQ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	x1, [x21]
	and	w10, w8, #0xff
	stp	w9, w10, [x1]
	ubfx	w8, w8, #8, #8
	str	w8, [x1, #8]
	ldr	w0, [x21, #12]
	mov	w2, #3
	bl	_dvb_usb_generic_write
LBB0_8:
	mov	x20, x0
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SET_BANDWIDTH,4,2              ; @SET_BANDWIDTH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SET_RF_FREQ,4,2                ; @SET_RF_FREQ
	.no_dead_strip	_dtt200u_fe_set_frontend
.subsections_via_symbols
