	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function halve1Dimage_uint
LCPI0_0:
	.quad	0x3fe0000000000000              ## double 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_halve1Dimage_uint:                     ## @halve1Dimage_uint
	.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	$72, %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
	movq	%r8, %r12
	movq	%rcx, %r14
	movl	%edx, %r15d
	movl	%esi, %r13d
	movl	%edi, %ebx
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	cmpl	$1, %esi
	sete	%al
	cmpl	$1, %edx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpl	%r15d, %r13d
	setne	%dil
	callq	_assert
	movl	%r15d, %ecx
	movl	32(%rbp), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	24(%rbp), %r15d
	cmpl	$1, %ecx
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	jne	LBB0_10
## %bb.1:
	xorl	%edi, %edi
	cmpl	$1, %r13d
	setne	%dil
	callq	_assert
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
	cmpl	$2, %r13d
	jl	LBB0_19
## %bb.2:
	movslq	%r15d, %r15
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	%r15, %r14
	movl	-96(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cmpl	-52(%rbp), %eax                 ## 4-byte Folded Reload
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_20
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	testl	%ebx, %ebx
	movl	%eax, -96(%rbp)                 ## 4-byte Spill
	jle	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=2
	movl	(%r14), %ebx
	movl	(%r14,%r15), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ebx, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	addsd	%xmm0, %xmm1
	mulsd	LCPI0_0(%rip), %xmm1
	cvttsd2si	%xmm1, %eax
	movl	%eax, (%r12)
	addq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	addq	$4, %r12
	decl	%r13d
	je	LBB0_3
LBB0_8:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$0, -76(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	%r14, %rdi
	callq	___GLU_SWAP_4_BYTES
	movl	%eax, %ebx
	leaq	(%r14,%r15), %rdi
	callq	___GLU_SWAP_4_BYTES
	jmp	LBB0_7
LBB0_10:
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	cmpl	$1, %r13d
	jne	LBB0_19
## %bb.11:
	movl	16(%rbp), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	$1, -52(%rbp)                   ## 4-byte Folded Spill
	movl	$1, %edi
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	callq	_assert
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	movq	%r14, %r13
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	cmpl	$2, %ecx
	jl	LBB0_22
## %bb.12:
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, %eax
	subl	%r15d, %eax
	movslq	%edx, %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movslq	-44(%rbp), %rdx                 ## 4-byte Folded Reload
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	cltq
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r14, %r13
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_14 Depth=1
	addq	-112(%rbp), %r13                ## 8-byte Folded Reload
	addq	-64(%rbp), %r13                 ## 8-byte Folded Reload
	movl	-100(%rbp), %eax                ## 4-byte Reload
	incl	%eax
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_22
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movl	%eax, -100(%rbp)                ## 4-byte Spill
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	jg	LBB0_17
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_17 Depth=2
	movl	(%r13), %r15d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%r13,%rax), %eax
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r15d, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	addsd	%xmm0, %xmm1
	mulsd	LCPI0_0(%rip), %xmm1
	cvttsd2si	%xmm1, %eax
	movl	%eax, (%r12)
	addq	-96(%rbp), %r13                 ## 8-byte Folded Reload
	addq	$4, %r12
	decl	%ebx
	je	LBB0_13
LBB0_17:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$0, -76(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	%r13, %rdi
	callq	___GLU_SWAP_4_BYTES
	movl	%eax, %r15d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r13), %rdi
	callq	___GLU_SWAP_4_BYTES
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_16
LBB0_19:
	movq	%r12, %rcx
	jmp	LBB0_23
LBB0_20:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_22:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	imull	%ecx, %eax
	cltq
	addq	%rax, %r14
	xorl	%edi, %edi
	cmpq	%r14, %r13
	sete	%dil
	callq	_assert
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
LBB0_23:
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	imull	-52(%rbp), %edx                 ## 4-byte Folded Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	imull	%ebx, %eax
	imull	%edx, %eax
	cltq
	addq	%rax, %rcx
	xorl	%edi, %edi
	cmpq	%r12, %rcx
	sete	%dil
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_assert                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BOX2,4,2                       ## @BOX2
	.no_dead_strip	_halve1Dimage_uint
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function halve1Dimage_uint
_halve1Dimage_uint:                     ; @halve1Dimage_uint
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	d9, d8, [sp, #48]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x26, x7
	mov	x28, x6
	mov	x23, x5
	mov	x21, x4
	mov	x22, x3
	mov	x24, x2
	mov	x25, x1
	str	w0, [sp, #44]                   ; 4-byte Folded Spill
	cmp	w1, #0
	cinc	w19, 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	w25, w24
	cset	w0, ne
	bl	_assert
	ldr	w27, [x29, #16]
	asr	w19, w19, #1
	cmp	w24, #1
	str	x23, [sp, #24]                  ; 8-byte Folded Spill
	b.ne	LBB0_10
; %bb.1:
	cmp	w25, #1
	cset	w0, ne
	bl	_assert
	cmp	w25, #2
	b.lt	LBB0_19
; %bb.2:
	mov	w20, #0
	sxtw	x24, w26
	sxtw	x25, w23
	fmov	d8, #0.50000000
	str	x21, [sp, #16]                  ; 8-byte Folded Spill
	mov	x28, x21
	ldr	w21, [sp, #44]                  ; 4-byte Folded Reload
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, x24
	add	w20, w20, #1
	cmp	w20, w19
	b.eq	LBB0_20
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	cmp	w21, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, x21
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldr	w23, [x22]
	ldr	w0, [x22, x24]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	scvtf	d0, w23
	scvtf	d1, w0
	fadd	d0, d1, d0
	fmul	d0, d0, d8
	fcvtzs	w8, d0
	str	w8, [x28], #4
	add	x22, x22, x25
	subs	w26, w26, #1
	b.eq	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbz	w27, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x22
	bl	___GLU_SWAP_4_BYTES
	mov	x23, x0
	add	x0, x22, x24
	bl	___GLU_SWAP_4_BYTES
	b	LBB0_7
LBB0_10:
	asr	w10, w20, #1
	cmp	w25, #1
	b.ne	LBB0_21
; %bb.11:
	str	x28, [sp, #8]                   ; 8-byte Folded Spill
	str	w10, [sp, #40]                  ; 4-byte Folded Spill
	mov	w0, #1
	bl	_assert
	mov	x25, x22
	str	x21, [sp, #16]                  ; 8-byte Folded Spill
	mov	x28, x21
	cmp	w24, #2
	b.lt	LBB0_22
; %bb.12:
	mov	w19, #0
	ldp	x8, x28, [sp, #8]               ; 16-byte Folded Reload
	sxtw	x23, w8
	sub	x8, x23, w26, sxtw
	str	x8, [sp, #32]                   ; 8-byte Folded Spill
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x20, w8
	fmov	d8, #0.50000000
	mov	x25, x22
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	add	x8, x25, x8
	add	x25, x8, x23
	add	w19, w19, #1
	ldr	w8, [sp, #40]                   ; 4-byte Folded Reload
	cmp	w19, w8
	b.eq	LBB0_22
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	ldr	w21, [sp, #44]                  ; 4-byte Folded Reload
	cmp	w21, #1
	b.ge	LBB0_17
	b	LBB0_13
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=2
	ldr	w26, [x25]
	ldr	w0, [x25, x23]
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=2
	scvtf	d0, w26
	scvtf	d1, w0
	fadd	d0, d1, d0
	fmul	d0, d0, d8
	fcvtzs	w8, d0
	str	w8, [x28], #4
	add	x25, x25, x20
	subs	w21, w21, #1
	b.eq	LBB0_13
LBB0_17:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbz	w27, LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	mov	x0, x25
	bl	___GLU_SWAP_4_BYTES
	mov	x26, x0
	add	x0, x25, x23
	bl	___GLU_SWAP_4_BYTES
	b	LBB0_16
LBB0_19:
	mov	w10, #1
	mov	x28, x21
	b	LBB0_23
LBB0_20:
	mov	w10, #1
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
	b	LBB0_23
LBB0_21:
	mov	x28, x21
	b	LBB0_23
LBB0_22:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	smaddl	x8, w8, w24, x22
	cmp	x25, x8
	cset	w0, eq
	bl	_assert
	mov	w19, #1
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
	ldr	w10, [sp, #40]                  ; 4-byte Folded Reload
LBB0_23:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	mul	w8, w8, w9
	mul	w8, w8, w10
	mul	w8, w8, w19
	add	x8, x21, w8, sxtw
	cmp	x8, x28
	cset	w0, eq
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_assert
	.cfi_endproc
                                        ; -- End function
	.comm	_BOX2,4,2                       ; @BOX2
	.no_dead_strip	_halve1Dimage_uint
.subsections_via_symbols
