	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function simple_dvb_configure
_simple_dvb_configure:                  ## @simple_dvb_configure
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r15d
	movq	%rsi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r13
	movslq	%ecx, %rcx
	imulq	$1125899907, %rcx, %rcx         ## imm = 0x431BDE83
	movq	%rcx, %rsi
	shrq	$63, %rsi
	sarq	$46, %rcx
	addl	%esi, %ecx
	movl	%ecx, -44(%rbp)
	cmpl	$0, (%r13)
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r14
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	_TUNER_PARAM_TYPE_DIGITAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_simple_tuner_params
	leaq	-44(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movq	%rax, %r12
	movq	%rax, %rsi
	callq	_simple_config_lookup
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	(%r12), %eax
	addl	-44(%rbp), %eax
	imull	$62500, %eax, %ecx              ## imm = 0xF424
	movq	_offset@GOTPCREL(%rip), %rax
	addl	(%rax), %ecx
	movl	(%r13), %esi
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	addl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, %r12d
	sarl	$8, %eax
	movl	%eax, (%rbx)
	movzbl	%r12b, %eax
	movl	%eax, 4(%rbx)
	movl	-60(%rbp), %eax
	movl	%eax, 8(%rbx)
	movl	-56(%rbp), %eax
	movl	%eax, 12(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_simple_set_dvb
	movl	4(%r13), %esi
	movl	(%rbx), %ecx
	movl	4(%rbx), %r8d
	movl	8(%rbx), %r9d
	movl	12(%rbx), %eax
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %edx
	callq	_tuner_dbg
	imull	(%r13), %r12d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	subl	(%rax), %r12d
	jmp	LBB0_5
LBB0_3:
	movl	8(%rax), %esi
	movl	4(%r13), %edx
	leaq	L_.str(%rip), %rdi
	callq	_tuner_err
LBB0_4:
	xorl	%r12d, %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$40, %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	"attempt to treat tuner %d (%s) as digital tuner without stepsize defined.\n"

	.comm	_TUNER_PARAM_TYPE_DIGITAL,4,2   ## @TUNER_PARAM_TYPE_DIGITAL
	.comm	_offset,4,2                     ## @offset
L_.str.1:                               ## @.str.1
	.asciz	"%s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n"

	.no_dead_strip	_simple_dvb_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function simple_dvb_configure
_simple_dvb_configure:                  ; @simple_dvb_configure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x8, [x0]
	ldr	x26, [x8]
	mov	w9, #56963
	movk	w9, #17179, lsl #16
	smull	x9, w3, w9
	lsr	x10, x9, #63
	asr	x9, x9, #46
	add	w9, w9, w10
	str	w9, [sp, #4]
	ldr	w9, [x26]
	cbz	w9, LBB0_3
; %bb.1:
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _TUNER_PARAM_TYPE_DIGITAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TUNER_PARAM_TYPE_DIGITAL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_simple_tuner_params
	mov	x23, x0
	add	x2, sp, #4
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x0, x24
	mov	x1, x23
	bl	_simple_config_lookup
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	w8, [sp, #4]
	ldr	w9, [x23]
	add	w8, w9, w8
	mov	w9, #62500
Lloh3:
	adrp	x10, _offset@GOTPAGE
Lloh4:
	ldr	x10, [x10, _offset@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	madd	w8, w8, w9, w10
	ldr	w9, [x26]
	cmp	w9, #0
	cinc	w10, w9, lt
	add	w8, w8, w10, asr #1
	sdiv	w25, w8, w9
	asr	w8, w25, #8
	and	w9, w25, #0xff
	stp	w8, w9, [x19]
	ldp	w9, w8, [sp, #8]
	stp	w8, w9, [x19, #8]
	mov	x0, x24
	mov	x1, x19
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_simple_set_dvb
	ldr	w1, [x26, #4]
	ldp	w3, w4, [x19]
	ldp	w5, w6, [x19, #8]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x25
	bl	_tuner_dbg
	ldr	w8, [x26]
	ldr	w9, [x23]
	neg	w9, w9
	madd	w0, w8, w25, w9
	b	LBB0_5
LBB0_3:
	ldr	w1, [x8, #8]
	ldr	w2, [x26, #4]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tuner_err
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"attempt to treat tuner %d (%s) as digital tuner without stepsize defined.\n"

	.comm	_TUNER_PARAM_TYPE_DIGITAL,4,2   ; @TUNER_PARAM_TYPE_DIGITAL
	.comm	_offset,4,2                     ; @offset
l_.str.1:                               ; @.str.1
	.asciz	"%s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n"

	.no_dead_strip	_simple_dvb_configure
.subsections_via_symbols
