	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stb0899_dvbs2_calc_srate
_stb0899_dvbs2_calc_srate:              ## @stb0899_dvbs2_calc_srate
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movl	8(%rdi), %eax
	addl	%eax, %eax
	movl	12(%rdi), %ecx
	leal	(%rcx,%rcx,4), %ecx
	cltd
	idivl	%ecx
	testl	%eax, %eax
	movl	$1, %r14d
	cmovel	%r14d, %eax
	movl	%eax, %edi
	callq	_Log2Int
	movl	%eax, %r8d
	movl	$1, %edx
	movl	%r8d, %ecx
	shll	%cl, %edx
	movslq	8(%rbx), %rax
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rcx
	shrq	$63, %rcx
	sarq	$38, %rsi
	addl	%ecx, %esi
	movl	12(%rbx), %ebx
	movb	(%r15), %cl
	decb	%cl
	shll	%cl, %r14d
	cmpl	$4, %edx
	jg	LBB0_2
## %bb.1:
	movl	%r8d, %ecx
	shll	%cl, %r14d
	movl	%r14d, %eax
	cltd
	idivl	%esi
	movl	%eax, %edi
	jmp	LBB0_3
LBB0_2:
	cltq
	imulq	$351843721, %rax, %rcx          ## imm = 0x14F8B589
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$45, %rcx
	addl	%eax, %ecx
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	movl	%r8d, %ecx
	shll	%cl, %eax
	cltq
	imulq	$1374389535, %rax, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$37, %rdi
	addl	%eax, %edi
	shll	%cl, %r14d
LBB0_3:
	movl	%r14d, %eax
	cltd
	idivl	%esi
	movslq	%ebx, %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	imull	%eax, %edi
	imull	%edx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%esi
	addl	%edi, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_stb0899_dvbs2_calc_srate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stb0899_dvbs2_calc_srate
_stb0899_dvbs2_calc_srate:              ; @stb0899_dvbs2_calc_srate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0]
	ldp	w8, w9, [x0, #8]
	lsl	w8, w8, #1
	add	w9, w9, w9, lsl #2
	sdiv	w8, w8, w9
	cmp	w8, #0
	csinc	w0, w8, wzr, ne
	bl	_Log2Int
	mov	w8, #1
	lsl	w9, w8, w0
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	ldp	w11, w12, [x19, #8]
                                        ; kill: def $w11 killed $w11 def $x11
	sxtw	x11, w11
	mul	x13, x11, x10
	lsr	x14, x13, #63
	asr	x13, x13, #38
	add	w13, w13, w14
	ldr	w14, [x20]
	sub	w14, w14, #1
	lsl	w8, w8, w14
	mov	w14, #46473
	movk	w14, #5368, lsl #16
	smull	x11, w11, w14
	lsr	x14, x11, #63
	asr	x11, x11, #45
	add	w11, w11, w14
	sdiv	w11, w8, w11
	lsl	w11, w11, w0
	mov	w14, #34079
	movk	w14, #20971, lsl #16
	smull	x11, w11, w14
	lsr	x14, x11, #63
	asr	x11, x11, #37
	add	w11, w11, w14
	lsl	w8, w8, w0
	sdiv	w14, w8, w13
	cmp	w9, #4
	csel	w9, w11, w14, gt
	csel	w8, w8, w8, gt
	sdiv	w11, w8, w13
	msub	w8, w11, w13, w8
	smull	x10, w12, w10
	lsr	x11, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w11
	mul	w8, w8, w10
	sdiv	w8, w8, w13
	madd	w0, w9, w10, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_stb0899_dvbs2_calc_srate
.subsections_via_symbols
