	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function halve1Dimage_ubyte
_halve1Dimage_ubyte:                    ## @halve1Dimage_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -60(%rbp)                 ## 4-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movl	%edx, %ebx
	movl	%esi, %r14d
	movl	%edi, %r15d
	movl	%esi, %r13d
	shrl	$31, %r13d
	addl	%esi, %r13d
	sarl	%r13d
	cmpl	$1, %esi
	sete	%al
	cmpl	$1, %edx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpl	%ebx, %r14d
	setne	%dil
	callq	_assert
	movl	%ebx, %ecx
	movl	24(%rbp), %edx
	movl	16(%rbp), %ebx
	cmpl	$1, %ecx
	jne	LBB0_11
## %bb.1:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	cmpl	$1, %r14d
	setne	%dil
	callq	_assert
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	cmpl	$2, %r14d
	movl	-60(%rbp), %r11d                ## 4-byte Reload
	jl	LBB0_10
## %bb.2:
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	movslq	%r11d, %rcx
	movl	%r15d, %r8d
	andl	$-2, %r8d
	leaq	(%rax,%rcx), %r10
	xorl	%r9d, %r9d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%rax, %rsi
	incl	%r9d
	cmpl	%r13d, %r9d
	je	LBB0_10
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	testl	%r15d, %r15d
	jle	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$1, %r15d
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r8d, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi,%rax), %edi
	addl	(%rsi), %edi
	movl	%edi, %edx
	shrl	$31, %edx
	addl	%edi, %edx
	sarl	%edx
	movl	%edx, (%r12)
	movl	(%rsi,%r10), %edx
	addl	(%rsi,%rcx), %edx
	addq	%rcx, %rsi
	movl	%edx, %edi
	shrl	$31, %edi
	addl	%edx, %edi
	sarl	%edi
	movl	%edi, 4(%r12)
	addq	%rcx, %rsi
	addq	$8, %r12
	addl	$-2, %ebx
	jne	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %r15b
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rsi,%rax), %edx
	addl	(%rsi), %edx
	movl	%edx, %edi
	shrl	$31, %edi
	addl	%edx, %edi
	sarl	%edi
	movl	%edi, (%r12)
	addq	%rcx, %rsi
	addq	$4, %r12
	jmp	LBB0_9
LBB0_11:
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$1, %r14d
	jne	LBB0_12
## %bb.13:
	movl	%edx, %r14d
	movl	$1, %edi
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	callq	_assert
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	$2, %ecx
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jl	LBB0_14
## %bb.15:
	movl	%ebx, %eax
	subl	%r14d, %eax
	movslq	%ebx, %rcx
	movslq	-60(%rbp), %rdx                 ## 4-byte Folded Reload
	movslq	%eax, %r9
	movl	%r15d, %r8d
	andl	$-2, %r8d
	leaq	(%rcx,%rdx), %r11
	xorl	%r10d, %r10d
	movq	%r12, %rax
	movq	%rsi, %r12
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_16 Depth=1
	addq	%r9, %rax
	addq	%rcx, %rax
	incl	%r10d
	cmpl	%r13d, %r10d
	je	LBB0_23
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	testl	%r15d, %r15d
	jle	LBB0_22
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$1, %r15d
	je	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%r8d, %ebx
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rax,%rcx), %edi
	addl	(%rax), %edi
	movl	%edi, %esi
	shrl	$31, %esi
	addl	%edi, %esi
	sarl	%esi
	movl	%esi, (%r12)
	movl	(%rax,%r11), %esi
	addl	(%rax,%rdx), %esi
	addq	%rdx, %rax
	movl	%esi, %edi
	shrl	$31, %edi
	addl	%esi, %edi
	sarl	%edi
	movl	%edi, 4(%r12)
	addq	%rdx, %rax
	addq	$8, %r12
	addl	$-2, %ebx
	jne	LBB0_19
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	testb	$1, %r15b
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	(%rax,%rcx), %esi
	addl	(%rax), %esi
	movl	%esi, %edi
	shrl	$31, %edi
	addl	%esi, %edi
	sarl	%edi
	movl	%edi, (%r12)
	addq	%rdx, %rax
	addq	$4, %r12
	jmp	LBB0_22
LBB0_10:
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	imull	%r14d, %ecx
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %eax
	subl	%ecx, %eax
	cltq
	addq	%rsi, %rax
	movl	$1, %r13d
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_24
LBB0_12:
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	movq	%r12, %rax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r12, %rdx
	movq	%r14, %r12
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_24
LBB0_14:
	movl	$1, -56(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, %rax
	movq	%rsi, %r14
	movq	%r12, %rdx
	movq	%rsi, %r12
	jmp	LBB0_24
LBB0_23:
	movl	$1, -56(%rbp)                   ## 4-byte Folded Spill
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
LBB0_24:
	imull	%ecx, %ebx
	movslq	%ebx, %rcx
	addq	%rcx, %rdx
	xorl	%edi, %edi
	cmpq	%rdx, %rax
	sete	%dil
	callq	_assert
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	imull	%r15d, %eax
	imull	-56(%rbp), %r13d                ## 4-byte Folded Reload
	imull	%eax, %r13d
	movslq	%r13d, %rax
	addq	%rax, %r14
	xorl	%edi, %edi
	cmpq	%r12, %r14
	sete	%dil
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_assert                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_halve1Dimage_ubyte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function halve1Dimage_ubyte
_halve1Dimage_ubyte:                    ; @halve1Dimage_ubyte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x25, x7
	mov	x22, x6
	str	x5, [sp, #8]                    ; 8-byte Folded Spill
	mov	x19, x4
	mov	x23, x3
	mov	x24, x2
	mov	x26, x1
	mov	x21, x0
	cmp	w1, #0
	cinc	w27, w1, lt
	cmp	w2, #0
	cinc	w20, w2, lt
	cmp	w1, #1
	cset	w8, eq
	cmp	w2, #1
	cset	w9, eq
	orr	w0, w8, w9
	bl	_assert
	cmp	w26, w24
	cset	w0, ne
	bl	_assert
	asr	w28, w27, #1
	cmp	w24, #1
	b.ne	LBB0_7
; %bb.1:
	cmp	w26, #1
	cset	w0, ne
	bl	_assert
	mov	x8, x23
	mov	x27, x19
	cmp	w26, #2
	b.lt	LBB0_14
; %bb.2:
	mov	w9, #0
	sxtw	x10, w25
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	sxtw	x11, w8
	mov	x27, x19
	mov	x8, x23
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, x10
	add	w9, w9, #1
	cmp	w9, w28
	b.eq	LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cmp	w21, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x12, x21
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w13, [x8]
	ldr	w14, [x8, x10]
	add	w13, w14, w13
	cmp	w13, #0
	cinc	w13, w13, lt
	asr	w13, w13, #1
	str	w13, [x27], #4
	add	x8, x8, x11
	subs	w12, w12, #1
	b.ne	LBB0_6
	b	LBB0_3
LBB0_7:
	asr	w20, w20, #1
	cmp	w26, #1
	b.ne	LBB0_15
; %bb.8:
	mov	w28, #1
	mov	w0, #1
	bl	_assert
	cmp	w24, #2
	b.lt	LBB0_15
; %bb.9:
	mov	w9, #0
	mov	x8, x22
	sxtw	x10, w8
	sub	x11, x10, w25, sxtw
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x12, w8
	mov	x27, x19
	mov	x8, x23
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x8, x8, x11
	add	x8, x8, x10
	add	w9, w9, #1
	cmp	w9, w20
	b.eq	LBB0_16
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x13, x21
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w14, [x8]
	ldr	w15, [x8, x10]
	add	w14, w15, w14
	cmp	w14, #0
	cinc	w14, w14, lt
	asr	w14, w14, #1
	str	w14, [x27], #4
	add	x8, x8, x12
	subs	w13, w13, #1
	b.ne	LBB0_13
	b	LBB0_10
LBB0_14:
	mul	w9, w25, w26
	sxtw	x10, w22
	sub	x9, x10, w9, sxtw
	add	x8, x8, x9
	mov	w20, #1
	b	LBB0_17
LBB0_15:
	mov	x8, x23
	mov	x27, x19
	b	LBB0_17
LBB0_16:
	mov	w28, #1
LBB0_17:
	smaddl	x9, w22, w24, x23
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	mul	w8, w8, w21
	mul	w8, w8, w20
	mul	w8, w8, w28
	add	x8, x19, w8, sxtw
	cmp	x8, x27
	cset	w0, eq
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_assert
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_halve1Dimage_ubyte
.subsections_via_symbols
