	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mediumthresh_c
_mediumthresh_c:                        ## @mediumthresh_c
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	_factor@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movl	(%r8), %eax
	imull	(%rsi), %eax
	movq	(%rdi), %rcx
	movslq	%edx, %rdx
	movq	(%rcx,%rdx,8), %r9
	movl	$1, %edi
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r8,%rdi,4), %r10d
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	imull	%r10d, %ecx
	addl	%eax, %ecx
	movl	%ecx, %eax
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%rdi
	cmpq	$16, %rdi
	je	LBB0_10
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r9,%rdi,4), %r11d
	leal	(%r11,%r11), %edx
	movl	(%rsi,%rdi,4), %ecx
	leal	(%rcx,%r11), %r10d
	cmpl	%edx, %r10d
	jbe	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	%ecx, %edx
	leal	(,%r11,4), %ebx
	cmpl	%ebx, %edx
	ja	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	subl	%r11d, %ecx
	movl	%ecx, %r10d
	addl	%ecx, %r10d
	jmp	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	addl	%r10d, %r10d
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r8,%rdi,4), %ecx
	jmp	LBB0_8
LBB0_10:
	addl	$2048, %eax                     ## imm = 0x800
	sarl	$12, %eax
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_factor,8,3                     ## @factor
	.no_dead_strip	_mediumthresh_c
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mediumthresh_c
_mediumthresh_c:                        ; @mediumthresh_c
	.cfi_startproc
; %bb.0:
	ldr	w9, [x1]
Lloh0:
	adrp	x8, _factor@GOTPAGE
Lloh1:
	ldr	x8, [x8, _factor@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w10, [x8]
	mul	w9, w10, w9
	ldr	x10, [x0]
	ldr	x10, [x10, w2, sxtw #3]
	mov	w11, #4
	b	LBB0_4
LBB0_1:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w13, [x8, x11]
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	madd	w9, w13, w12, w9
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x11, x11, #4
	cmp	x11, #64
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x10, x11]
	lsl	w15, w13, #1
	ldr	w12, [x1, x11]
	add	w14, w12, w13
	cmp	w14, w15
	b.ls	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w15, w12, w15
	cmp	w15, w13, lsl #2
	b.hi	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w12, #1
	b.lt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w12, w12, w13
	lsl	w13, w12, #1
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	lsl	w13, w14, #1
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w12, [x8, x11]
	b	LBB0_2
LBB0_10:
	add	w8, w9, #2048
	asr	w0, w8, #12
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_factor,8,3                     ; @factor
	.no_dead_strip	_mediumthresh_c
.subsections_via_symbols
