	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function block_contrast
_block_contrast:                        ## @block_contrast
	.cfi_startproc
## %bb.0:
	testl	%r8d, %r8d
	js	LBB0_1
## %bb.2:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	addl	%r8d, %r8d
	xorl	%eax, %eax
	testl	%r8d, %r8d
	cmovlel	%eax, %r8d
	orl	$1, %r8d
	imull	%ecx, %edx
	addl	%edx, %esi
	movl	$255, %r11d
	xorl	%r9d, %r9d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	$16, %r10d
	movl	%esi, %edx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	%edx, %rdx
	movl	(%rdi,%rdx,4), %r14d
	cmpl	%eax, %r14d
	movl	%eax, %ebx
	cmovgl	%r14d, %ebx
	cmpl	%r11d, %r14d
	cmovll	%r14d, %r11d
	cmovll	%eax, %ebx
	leal	1(%rdx), %eax
	cltq
	movl	(%rdi,%rax,4), %r14d
	cmpl	%ebx, %r14d
	movl	%ebx, %eax
	cmovgl	%r14d, %eax
	cmpl	%r11d, %r14d
	cmovll	%r14d, %r11d
	cmovll	%ebx, %eax
	addl	$2, %edx
	addq	$-2, %r10
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r9d
	addl	%ecx, %esi
	cmpl	%r8d, %r9d
	jne	LBB0_3
## %bb.6:
	subl	%r11d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movl	$-255, %eax
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_block_contrast
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function block_contrast
_block_contrast:                        ; @block_contrast
	.cfi_startproc
; %bb.0:
	tbnz	w4, #31, LBB0_4
; %bb.1:
	mov	w10, #0
	lsl	w8, w4, #1
	cmp	w8, #0
	csel	w8, w8, wzr, gt
	orr	w8, w8, #0x1
	madd	w9, w3, w2, w1
	mov	w11, #255
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x0, w9, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	add	w12, w9, #1
	ldr	w12, [x0, w12, sxtw #2]
	csel	w10, w10, w13, lt
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w12, w9, #2
	ldr	w12, [x0, w12, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w12, w9, #3
	ldr	w12, [x0, w12, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	add	w12, w9, #4
	ldr	w12, [x0, w12, sxtw #2]
	csel	w10, w10, w13, lt
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w12, w9, #5
	ldr	w12, [x0, w12, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w12, w9, #6
	ldr	w12, [x0, w12, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	add	w12, w9, #7
	ldr	w12, [x0, w12, sxtw #2]
	csel	w10, w10, w13, lt
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w12, w9, #8
	ldr	w12, [x0, w12, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w12, w9, #9
	ldr	w12, [x0, w12, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	add	w12, w9, #10
	ldr	w12, [x0, w12, sxtw #2]
	csel	w10, w10, w13, lt
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w12, w9, #11
	ldr	w12, [x0, w12, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w12, w9, #12
	ldr	w12, [x0, w12, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	add	w12, w9, #13
	ldr	w12, [x0, w12, sxtw #2]
	csel	w10, w10, w13, lt
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w12, w9, #14
	ldr	w12, [x0, w12, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w12, w9, #15
	ldr	w12, [x0, w12, sxtw #2]
	cmp	w12, w10
	csel	w13, w12, w10, gt
	cmp	w12, w11
	csel	w11, w12, w11, lt
	csel	w10, w10, w13, lt
	add	w9, w9, w3
	subs	x8, x8, #1
	b.ne	LBB0_2
; %bb.3:
	sub	w0, w10, w11
	ret
LBB0_4:
	mov	w0, #-255
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_block_contrast
.subsections_via_symbols
