	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function halveImage_ubyte
_halveImage_ubyte:                      ## @halveImage_ubyte
	.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
	movq	%r8, %r14
	movq	%rcx, %rbx
	movl	%edx, %r13d
	movl	%edi, %r12d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	cmpl	$1, %esi
	je	LBB0_12
## %bb.1:
	cmpl	$1, %r13d
	je	LBB0_12
## %bb.2:
	jle	LBB0_11
## %bb.3:
	movl	24(%rbp), %eax
	movl	16(%rbp), %ecx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, %r11d
	shrl	$31, %r11d
	addl	%esi, %r11d
	sarl	%r11d
	movl	%r13d, %edx
	shrl	$31, %edx
	addl	%r13d, %edx
	sarl	%edx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movslq	%eax, %rdx
	imull	%esi, %eax
	movslq	%ecx, %r10
	subl	%eax, %ecx
	movslq	%r9d, %rdi
	movslq	%ecx, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	(%rdx,%r10), %rcx
	xorl	%eax, %eax
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	addq	%r10, %rbx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cmpl	-52(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_11
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##       Child Loop BB0_8 Depth 3
	cmpl	$2, -44(%rbp)                   ## 4-byte Folded Reload
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jl	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	addq	%rdx, %rbx
	incl	%r13d
	cmpl	%r11d, %r13d
	je	LBB0_10
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_8 Depth 3
	testl	%r12d, %r12d
	jle	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	%r12d, %eax
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_6 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%rbx), %r8d
	movl	(%rbx,%rcx), %r15d
	addl	(%rbx,%rdx), %r8d
	addl	(%rbx,%r10), %r8d
	leal	(%r15,%r8), %r9d
	addl	$2, %r9d
	leal	(%r15,%r8), %esi
	addl	$5, %esi
	testl	%r9d, %r9d
	cmovnsl	%r9d, %esi
	sarl	$2, %esi
	movl	%esi, (%r14)
	addq	$4, %r14
	addq	%rdi, %rbx
	decl	%eax
	jne	LBB0_8
	jmp	LBB0_9
LBB0_12:
	movl	%r13d, %eax
	xorl	$1, %eax
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %ecx
	xorl	$1, %ecx
	xorl	%edi, %edi
	orl	%eax, %ecx
	setne	%dil
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	callq	_assert
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%r13d, %edx
	movq	%rbx, %rcx
	movq	%r14, %r8
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_halve1Dimage_ubyte             ## TAILCALL
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_halveImage_ubyte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function halveImage_ubyte
_halveImage_ubyte:                      ; @halveImage_ubyte
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x23, x7
	mov	x25, x6
	mov	x24, x5
	mov	x19, x4
	mov	x20, x3
	mov	x26, x2
	mov	x21, x1
	mov	x22, x0
	cmp	w1, #1
	b.eq	LBB0_11
; %bb.1:
	cmp	w26, #1
	b.eq	LBB0_11
; %bb.2:
	cmp	w21, #0
	cinc	w9, w21, lt
	cmp	w26, #0
	cinc	w10, w26, lt
	cmp	w26, #2
	b.lt	LBB0_12
; %bb.3:
	mov	w8, #0
	asr	w9, w9, #1
	asr	w10, w10, #1
	mul	w12, w23, w21
	sxtw	x11, w25
	sub	x12, x11, w12, sxtw
	sxtw	x13, w23
	sxtw	x14, w24
	add	x15, x13, x11
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x16, x20, x12
	add	x20, x16, x11
	add	w8, w8, #1
	cmp	w8, w10
	b.eq	LBB0_12
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
	cmp	w21, #2
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w16, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x20, x20, x13
	add	w16, w16, #1
	cmp	w16, w9
	b.eq	LBB0_4
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
	cmp	w22, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x17, x22
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w0, [x20]
	ldr	w1, [x20, x13]
	ldr	w2, [x20, x11]
	ldr	w3, [x20, x15]
	add	w0, w0, w1
	add	w0, w0, w2
	add	w0, w0, w3
	add	w1, w0, #2
	add	w0, w0, #5
	cmp	w1, #0
	csel	w0, w0, w1, lt
	asr	w0, w0, #2
	str	w0, [x19], #4
	add	x20, x20, x14
	subs	w17, w17, #1
	b.ne	LBB0_10
	b	LBB0_7
LBB0_11:
	cmp	w21, #1
	ccmp	w26, #1, #0, eq
	cset	w0, ne
	bl	_assert
	mov	x0, x22
	mov	x1, x21
	mov	x2, x26
	mov	x3, x20
	mov	x4, x19
	mov	x5, x24
	mov	x6, x25
	mov	x7, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_halve1Dimage_ubyte
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_halveImage_ubyte
.subsections_via_symbols
