	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stb0899_set_iterations
_stb0899_set_iterations:                ## @stb0899_set_iterations
	.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, %r14
	movq	(%rdi), %rcx
	movslq	8(%rdi), %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$38, %rax
	addl	%edx, %eax
	movl	%eax, %edx
	shll	$4, %edx
	addl	%edx, %eax
	addl	$410000, %eax                   ## imm = 0x64190
	movslq	12(%rdi), %rdx
	imulq	$1125899907, %rdx, %rsi         ## imm = 0x431BDE83
	movq	%rsi, %rdx
	shrq	$63, %rdx
	sarq	$50, %rsi
	addl	%edx, %esi
	cltd
	idivl	%esi
	cltq
	imulq	$274877907, %rax, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$38, %rbx
	addl	%eax, %ebx
	movl	(%rcx), %eax
	cmpl	%eax, %ebx
	cmovgel	%eax, %ebx
	movq	_STB0899_S2FEC@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_MAX_ITER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_STB0899_READ_S2REG
	movl	%eax, %r15d
	movq	_MAX_ITERATIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_STB0899_SETFIELD_VAL
	movl	(%r12), %esi
	movq	_STB0899_BASE_MAX_ITER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_STB0899_OFF0_MAX_ITER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%r15d, %r8d
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stb0899_write_s2reg            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_STB0899_S2FEC,4,2              ## @STB0899_S2FEC
	.comm	_MAX_ITER,4,2                   ## @MAX_ITER
	.comm	_MAX_ITERATIONS,4,2             ## @MAX_ITERATIONS
	.comm	_STB0899_BASE_MAX_ITER,4,2      ## @STB0899_BASE_MAX_ITER
	.comm	_STB0899_OFF0_MAX_ITER,4,2      ## @STB0899_OFF0_MAX_ITER
	.no_dead_strip	_stb0899_set_iterations
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stb0899_set_iterations
_stb0899_set_iterations:                ; @stb0899_set_iterations
	.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	x19, x0
	ldr	x8, [x0]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	ldpsw	x10, x11, [x0, #8]
	mul	x10, x10, x9
	lsr	x12, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w12
	add	w10, w10, w10, lsl #4
	add	w10, w10, #100, lsl #12         ; =409600
	add	w10, w10, #400
	mov	w12, #56963
	movk	w12, #17179, lsl #16
	mul	x11, x11, x12
	lsr	x12, x11, #63
	asr	x11, x11, #50
	add	w11, w11, w12
	sdiv	w10, w10, w11
	smull	x9, w10, w9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	ldr	w8, [x8]
	add	w9, w9, w10
	cmp	w9, w8
	csel	w20, w9, w8, lt
Lloh0:
	adrp	x22, _STB0899_S2FEC@GOTPAGE
Lloh1:
	ldr	x22, [x22, _STB0899_S2FEC@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _MAX_ITER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_ITER@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_STB0899_READ_S2REG
	mov	x21, x0
Lloh5:
	adrp	x8, _MAX_ITERATIONS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_ITERATIONS@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, x20
	bl	_STB0899_SETFIELD_VAL
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _STB0899_BASE_MAX_ITER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STB0899_BASE_MAX_ITER@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _STB0899_OFF0_MAX_ITER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STB0899_OFF0_MAX_ITER@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x4, x21
	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
	b	_stb0899_write_s2reg
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_STB0899_S2FEC,4,2              ; @STB0899_S2FEC
	.comm	_MAX_ITER,4,2                   ; @MAX_ITER
	.comm	_MAX_ITERATIONS,4,2             ; @MAX_ITERATIONS
	.comm	_STB0899_BASE_MAX_ITER,4,2      ; @STB0899_BASE_MAX_ITER
	.comm	_STB0899_OFF0_MAX_ITER,4,2      ; @STB0899_OFF0_MAX_ITER
	.no_dead_strip	_stb0899_set_iterations
.subsections_via_symbols
