	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function midequalizer16
_midequalizer16:                        ## @midequalizer16
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r12d
	movq	%rdx, %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	64(%rbp), %r15
	movl	24(%rbp), %eax
	movl	16(%rbp), %edx
	movl	%ecx, %r13d
	shrl	$31, %r13d
	addl	%ecx, %r13d
	movq	48(%rbp), %r8
	sarl	%r13d
	movq	72(%rbp), %r9
	movl	%r13d, %esi
	movl	%eax, %ecx
	callq	_compute_histogram16
	movl	%r12d, %esi
	shrl	$31, %esi
	addl	%r12d, %esi
	sarl	%esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	32(%rbp), %edx
	movl	40(%rbp), %ecx
	movq	56(%rbp), %r8
	movq	72(%rbp), %r9
	callq	_compute_histogram16
	movq	48(%rbp), %rdi
	movq	56(%rbp), %rsi
	movq	%r15, %rdx
	movq	72(%rbp), %rcx
	callq	_compute_contrast_change
	movl	24(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.1:
	movl	%eax, %r12d
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movslq	%eax, %r9
	movslq	%r13d, %r10
	movl	16(%rbp), %r13d
	leaq	-1(%r13), %r8
	movl	%r13d, %edi
	andl	$3, %edi
	andl	$-4, %r13d
	shlq	$3, %r10
	shlq	$3, %r9
	xorl	%r11d, %r11d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r11d
	addq	%r10, %rbx
	addq	%r9, %r14
	cmpl	%r12d, %r11d
	je	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##     Child Loop BB0_7 Depth 2
	cmpl	$0, 16(%rbp)
	jle	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	cmpq	$3, %r8
	jb	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx,%rax,8), %rcx
	movl	(%r15,%rcx,4), %ecx
	movq	%rcx, (%r14,%rax,8)
	movq	8(%rbx,%rax,8), %rcx
	movl	(%r15,%rcx,4), %ecx
	movq	%rcx, 8(%r14,%rax,8)
	movq	16(%rbx,%rax,8), %rcx
	movl	(%r15,%rcx,4), %ecx
	movq	%rcx, 16(%r14,%rax,8)
	movq	24(%rbx,%rax,8), %rcx
	movl	(%r15,%rcx,4), %ecx
	movq	%rcx, 24(%r14,%rax,8)
	addq	$4, %rax
	cmpq	%rax, %r13
	jne	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r14,%rax,8), %rcx
	leaq	(%rbx,%rax,8), %rax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rax,%rsi,8), %rdx
	movl	(%r15,%rdx,4), %edx
	movq	%rdx, (%rcx,%rsi,8)
	incq	%rsi
	cmpq	%rsi, %rdi
	jne	LBB0_7
	jmp	LBB0_8
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_midequalizer16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function midequalizer16
_midequalizer16:                        ; @midequalizer16
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x20, x6
	str	w5, [sp, #16]                   ; 4-byte Folded Spill
	mov	x26, x4
	mov	x21, x2
	str	x1, [sp, #24]                   ; 8-byte Folded Spill
	mov	x22, x0
	ldp	w28, w8, [x29, #16]
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	ldp	x27, x25, [x29, #24]
	ldp	x23, x24, [x29, #40]
	cmp	w3, #0
	cinc	w8, w3, lt
	asr	w1, w8, #1
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x6
	mov	x3, x7
	mov	x4, x27
	mov	x5, x24
	bl	_compute_histogram16
	cmp	w26, #0
	cinc	w8, w26, lt
	asr	w1, w8, #1
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x2, x28
	ldr	w3, [sp, #20]                   ; 4-byte Folded Reload
	mov	x4, x25
	mov	x5, x24
	bl	_compute_histogram16
	mov	x0, x27
	mov	x1, x25
	mov	x2, x23
	mov	x3, x24
	bl	_compute_contrast_change
	cmp	w19, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w8, #0
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	cmp	w9, #0
	mov	w11, w20
	cinc	w9, w9, lt
	asr	w9, w9, #1
	sbfiz	x9, x9, #3, #32
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	sbfiz	x10, x10, #3, #32
	lsl	x11, x11, #3
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w8, #1
	add	x21, x21, x9
	add	x22, x22, x10
	cmp	w8, w19
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w20, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x12, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x13, [x22, x12]
	ldr	w13, [x23, x13, lsl #2]
	str	x13, [x21, x12]
	add	x12, x12, #8
	cmp	x11, x12
	b.ne	LBB0_5
	b	LBB0_2
LBB0_6:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_midequalizer16
.subsections_via_symbols
