	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0900_get_sw_loop_params
_stv0900_get_sw_loop_params:            ## @stv0900_get_sw_loop_params
	.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
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r11
	movl	%r8d, %r15d
	movq	(%rdi), %rax
	movq	8(%rdi), %r14
	movl	(%rax,%r15,4), %r10d
	movq	16(%rdi), %rax
	movl	(%rax,%r15,4), %ebx
	movl	24(%rdi), %r8d
	movl	%r8d, %edi
	sarl	$10, %edi
	movl	%r10d, %eax
	cltd
	idivl	%edi
	movl	%eax, %edi
	leal	-129(%rbx), %eax
	cmpl	$2, %eax
	jae	LBB0_1
## %bb.8:
	shll	$6, %edi
	leal	(%rdi,%rdi,2), %edi
	movl	$550000, %r9d                   ## imm = 0x86470
	jmp	LBB0_5
LBB0_1:
	cmpl	$128, %ebx
	jne	LBB0_3
## %bb.2:
	shll	$8, %edi
	jmp	LBB0_4
LBB0_3:
	shll	$6, %edi
	leal	(%rdi,%rdi,2), %edi
LBB0_4:
	movl	$687500, %r9d                   ## imm = 0xA7D8C
LBB0_5:
	movl	(%r14,%r15,4), %r15d
	testl	%r10d, %r10d
	jle	LBB0_7
## %bb.6:
	movl	%r10d, %eax
	imulq	$274877907, %rax, %rbx          ## imm = 0x10624DD3
	shrq	$38, %rbx
	movl	%r9d, %eax
	xorl	%edx, %edx
	divl	%ebx
	movl	%eax, %r9d
LBB0_7:
	movslq	%edi, %r14
	imulq	$1374389535, %r14, %r10         ## imm = 0x51EB851F
	movq	%r10, %rax
	shrq	$63, %rax
	sarq	$37, %r10
	addl	%eax, %r10d
	movslq	%r15d, %rax
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rdi
	shrq	$63, %rdi
	sarq	$38, %rdx
	addl	%edi, %edx
	imulq	$1759218605, %rax, %rdi         ## imm = 0x68DB8BAD
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$44, %rdi
	addl	%eax, %edi
	addl	%edx, %edi
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	andl	$-2, %eax
	shll	$15, %eax
	movslq	%r8d, %rdx
	imulq	$274877907, %rdx, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rdx
	shrq	$63, %rdx
	sarq	$38, %rdi
	addl	%edx, %edi
	cltd
	idivl	%edi
	cmpl	$16384, %eax                    ## imm = 0x4000
	movl	$16384, %edi                    ## imm = 0x4000
	cmovll	%eax, %edi
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	cmpl	%edi, %r10d
	cmovgl	%eax, %r10d
	cmpl	$-99, %r14d
	cmovll	%eax, %r10d
	movl	%edi, %eax
	cltd
	idivl	%r10d
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edx
	addl	$-100, %eax
	movslq	%edi, %rdi
	imulq	$1374389535, %rdi, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rbx
	shrq	$63, %rbx
	sarq	$37, %rdi
	addl	%ebx, %edi
	cmpl	$-101, %eax
	movl	$100, %eax
	cmovbl	%eax, %edx
	cmovael	%r10d, %edi
	cmpl	$100, %r9d
	cmovll	%r9d, %eax
	movl	%edi, (%rsi)
	movl	%eax, (%r11)
	movl	%edx, (%rcx)
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_stv0900_get_sw_loop_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0900_get_sw_loop_params
_stv0900_get_sw_loop_params:            ; @stv0900_get_sw_loop_params
	.cfi_startproc
; %bb.0:
	mov	w8, w4
	lsl	x8, x8, #2
	ldp	x9, x10, [x0]
	ldr	w12, [x9, x8]
	ldr	w11, [x10, x8]
	ldr	x9, [x0, #16]
	ldr	w10, [x0, #24]
	asr	w13, w10, #10
	sdiv	w13, w12, w13
	add	w14, w13, w13, lsl #1
	ldr	w8, [x9, x8]
	sub	w9, w8, #129
	lsl	w14, w14, #6
	mov	w15, #25712
	movk	w15, #8, lsl #16
	mov	w16, #32140
	movk	w16, #10, lsl #16
	lsl	w13, w13, #8
	mov	w17, #32140
	movk	w17, #10, lsl #16
	cmp	w8, #128
	csel	w8, w13, w14, eq
	csel	w13, w16, w17, eq
	cmp	w9, #2
	csel	w9, w14, w8, lo
	csel	w8, w15, w13, lo
	cmp	w12, #1
	b.lt	LBB0_2
; %bb.1:
	mov	w13, #19923
	movk	w13, #4194, lsl #16
	umull	x12, w12, w13
	lsr	x12, x12, #38
	udiv	w8, w8, w12
LBB0_2:
	mov	w12, #34079
	movk	w12, #20971, lsl #16
	smull	x13, w9, w12
	lsr	x14, x13, #63
	asr	x13, x13, #37
	mov	w15, #19923
	movk	w15, #4194, lsl #16
	smull	x16, w11, w15
	lsr	x17, x16, #63
	asr	x16, x16, #38
	add	w16, w16, w17
	mov	w17, #35757
	movk	w17, #26843, lsl #16
	smull	x11, w11, w17
	lsr	x17, x11, #63
	asr	x11, x11, #44
	add	w11, w11, w17
	add	w11, w16, w11
	cmp	w11, #0
	cinc	w11, w11, lt
	lsl	w11, w11, #15
	and	w11, w11, #0xffff0000
	smull	x10, w10, w15
	lsr	x15, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w15
	sdiv	w10, w11, w10
	mov	w11, #16384
	cmp	w10, #4, lsl #12                ; =16384
	csel	w10, w10, w11, lt
	cmp	w10, #0
	cinc	w11, w10, lt
	add	w13, w13, w14
	cmp	w13, w10
	mov	w14, #-99
	ccmp	w9, w14, #8, le
	asr	w9, w11, #1
	csel	w9, w9, w13, lt
	sdiv	w11, w10, w9
	sub	w13, w11, #100
	smull	x10, w10, w12
	lsr	x12, x10, #63
	asr	x10, x10, #37
	add	w10, w10, w12
	cmn	w13, #101
	mov	w12, #100
	csinc	w11, w12, w11, lo
	csel	w9, w10, w9, lo
	str	w9, [x1]
	cmp	w8, #100
	csel	w8, w8, w12, lt
	str	w8, [x2]
	str	w11, [x3]
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_stv0900_get_sw_loop_params
.subsections_via_symbols
