	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function halveImage_uint
LCPI0_0:
	.quad	0x3fe0000000000000              ## double 0.5
LCPI0_1:
	.quad	0x3fd0000000000000              ## double 0.25
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_halveImage_uint:                       ## @halveImage_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
	movq	%r8, %r12
	movq	%rcx, %r15
	movl	%edx, %r13d
	movl	%edi, %r14d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	cmpl	$1, %esi
	je	LBB0_21
## %bb.1:
	cmpl	$1, %r13d
	je	LBB0_21
## %bb.2:
	movl	24(%rbp), %eax
	movl	16(%rbp), %ecx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, %edx
	shrl	$31, %edx
	addl	%esi, %edx
	sarl	%edx
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edx
	shrl	$31, %edx
	addl	%r13d, %edx
	sarl	%edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %edx
	imull	%esi, %edx
	movl	%ecx, %esi
	subl	%edx, %esi
	cmpl	$0, 32(%rbp)
	je	LBB0_11
## %bb.3:
	cmpl	$2, %r13d
	jl	LBB0_20
## %bb.4:
	movslq	%eax, %rbx
	movslq	%ecx, %rax
	movslq	%r9d, %rcx
	movslq	%esi, %rdx
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%rax), %rdx
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	addq	-88(%rbp), %r15                 ## 8-byte Folded Reload
	addq	%rax, %r15
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	incl	%esi
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	cmpl	-48(%rbp), %esi                 ## 4-byte Folded Reload
	je	LBB0_20
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_8 Depth 3
	cmpl	$2, -44(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=2
	addq	%rbx, %r15
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	incl	%esi
	cmpl	-56(%rbp), %esi                 ## 4-byte Folded Reload
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_10
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_8 Depth 3
	testl	%r14d, %r14d
	movl	%esi, -72(%rbp)                 ## 4-byte Spill
	jle	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	___GLU_SWAP_4_BYTES
	movq	%rax, %r13
	leaq	(%r15,%rbx), %rdi
	callq	___GLU_SWAP_4_BYTES
	movq	%rax, %r12
	addl	%r13d, %r12d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r15,%rax), %rdi
	callq	___GLU_SWAP_4_BYTES
	movq	%rbx, %r13
	movq	%rax, %rbx
	addl	%r12d, %ebx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r15,%rax), %rdi
	callq	___GLU_SWAP_4_BYTES
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	movl	%ebx, %ecx
	addl	%eax, %ecx
	leal	3(%rax,%rbx), %eax
	movq	%r13, %rbx
	cmovnsl	%ecx, %eax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	sarl	$2, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	addsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %eax
	movl	%eax, (%r12)
	addq	$4, %r12
	addq	%rcx, %r15
	decl	%r14d
	jne	LBB0_8
	jmp	LBB0_9
LBB0_21:
	movl	%r13d, %eax
	xorl	$1, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %ecx
	xorl	$1, %ecx
	xorl	%edi, %edi
	orl	%eax, %ecx
	setne	%dil
	movl	%r9d, -64(%rbp)                 ## 4-byte Spill
	callq	_assert
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movq	%r15, %rcx
	movq	%r12, %r8
	movl	-64(%rbp), %r9d                 ## 4-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_halve1Dimage_uint              ## TAILCALL
LBB0_11:
	cmpl	$2, %r13d
	jl	LBB0_20
## %bb.12:
	cltq
	movslq	%ecx, %rcx
	movslq	%r9d, %rdx
	movslq	%esi, %r8
	leaq	(%rax,%rcx), %rdi
	xorl	%r9d, %r9d
	movsd	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	addq	%r8, %r15
	addq	%rcx, %r15
	incl	%r9d
	cmpl	-48(%rbp), %r9d                 ## 4-byte Folded Reload
	je	LBB0_20
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
                                        ##       Child Loop BB0_17 Depth 3
	cmpl	$2, -44(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	xorl	%r10d, %r10d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=2
	addq	%rax, %r15
	incl	%r10d
	cmpl	-56(%rbp), %r10d                ## 4-byte Folded Reload
	je	LBB0_19
LBB0_15:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_17 Depth 3
	testl	%r14d, %r14d
	jle	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	%r14d, %ebx
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_13 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	xorps	%xmm2, %xmm2
	cvtsi2sdl	(%r15), %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sdl	(%r15,%rax), %xmm3
	addsd	%xmm2, %xmm3
	xorps	%xmm2, %xmm2
	cvtsi2sdl	(%r15,%rcx), %xmm2
	addsd	%xmm3, %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sdl	(%r15,%rdi), %xmm3
	addsd	%xmm2, %xmm3
	mulsd	%xmm0, %xmm3
	addsd	%xmm1, %xmm3
	cvttsd2si	%xmm3, %esi
	movl	%esi, (%r12)
	addq	$4, %r12
	addq	%rdx, %r15
	decl	%ebx
	jne	LBB0_17
	jmp	LBB0_18
LBB0_20:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_halveImage_uint
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function halveImage_uint
_halveImage_uint:                       ; @halveImage_uint
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x23, x7
	mov	x25, x6
	mov	x24, x5
	mov	x19, x4
	mov	x20, x3
	mov	x26, x2
	mov	x27, x0
	ldr	w21, [x29, #16]
	str	w1, [sp, #20]                   ; 4-byte Folded Spill
	cmp	w1, #1
	b.eq	LBB0_12
; %bb.1:
	cmp	w26, #1
	b.eq	LBB0_12
; %bb.2:
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w9, #0
	cinc	w8, w9, lt
	asr	w8, w8, #1
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	cmp	w26, #0
	cinc	w8, w26, lt
	asr	w8, w8, #1
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
	mul	w8, w23, w9
	sxtw	x25, w25
	sub	x8, x25, w8, sxtw
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	cmp	w26, #2
	cbz	w21, LBB0_13
; %bb.3:
	b.lt	LBB0_22
; %bb.4:
	mov	w9, #0
	sxtw	x28, w23
	sxtw	x24, w24
	add	x21, x28, x25
	fmov	d8, #0.50000000
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x8, x20, x8
	add	x20, x8, x25
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	add	w9, w9, #1
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	cmp	w9, w8
	b.eq	LBB0_22
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;       Child Loop BB0_11 Depth 3
	str	w9, [sp, #24]                   ; 4-byte Folded Spill
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w26, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x20, x20, x28
	add	w26, w26, #1
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w26, w8
	b.eq	LBB0_5
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_11 Depth 3
	cmp	w27, #1
	b.lt	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x22, x27
LBB0_11:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	mov	x0, x20
	bl	___GLU_SWAP_4_BYTES
	mov	x23, x0
	add	x0, x20, x28
	bl	___GLU_SWAP_4_BYTES
	add	w23, w0, w23
	add	x0, x20, x25
	bl	___GLU_SWAP_4_BYTES
	add	w23, w23, w0
	add	x0, x20, x21
	bl	___GLU_SWAP_4_BYTES
	add	w8, w23, w0
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	scvtf	d0, w8
	fadd	d0, d0, d8
	fcvtzs	w8, d0
	str	w8, [x19], #4
	add	x20, x20, x24
	subs	w22, w22, #1
	b.ne	LBB0_11
	b	LBB0_8
LBB0_12:
	ldr	w22, [sp, #20]                  ; 4-byte Folded Reload
	cmp	w22, #1
	ccmp	w26, #1, #0, eq
	cset	w0, ne
	bl	_assert
	str	w21, [x29, #16]
	mov	x0, x27
	mov	x1, x22
	mov	x2, x26
	mov	x3, x20
	mov	x4, x19
	mov	x5, x24
	mov	x6, x25
	mov	x7, x23
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_halve1Dimage_uint
LBB0_13:
	b.lt	LBB0_22
; %bb.14:
	mov	w8, #0
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	sxtw	x9, w23
	mov	x10, x24
	sxtw	x10, w10
	ldr	x11, [sp, #8]                   ; 8-byte Folded Reload
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	sxtw	x11, w11
	add	x12, x9, x25
	fmov	d0, #0.25000000
	fmov	d1, #0.50000000
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x13, x20, x11
	add	x20, x13, x25
	add	w8, w8, #1
	ldr	w13, [sp, #16]                  ; 4-byte Folded Reload
	cmp	w8, w13
	b.eq	LBB0_22
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
                                        ;       Child Loop BB0_21 Depth 3
	ldr	w13, [sp, #20]                  ; 4-byte Folded Reload
	cmp	w13, #2
	b.lt	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	w13, #0
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=2
	add	x20, x20, x9
	add	w13, w13, #1
	ldr	w14, [sp, #28]                  ; 4-byte Folded Reload
	cmp	w13, w14
	b.eq	LBB0_15
LBB0_19:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_21 Depth 3
	cmp	w27, #1
	b.lt	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=2
	mov	x14, x27
LBB0_21:                                ;   Parent Loop BB0_16 Depth=1
                                        ;     Parent Loop BB0_19 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	s2, [x20]
	sshll.2d	v2, v2, #0
	scvtf	d2, d2
	ldr	s3, [x20, x9]
	sshll.2d	v3, v3, #0
	scvtf	d3, d3
	fadd	d2, d2, d3
	ldr	s3, [x20, x25]
	sshll.2d	v3, v3, #0
	ldr	s4, [x20, x12]
	scvtf	d3, d3
	fadd	d2, d2, d3
	sshll.2d	v3, v4, #0
	scvtf	d3, d3
	fadd	d2, d2, d3
	fmul	d2, d2, d0
	fadd	d2, d2, d1
	fcvtzs	w15, d2
	str	w15, [x19], #4
	add	x20, x20, x10
	subs	w14, w14, #1
	b.ne	LBB0_21
	b	LBB0_18
LBB0_22:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_halveImage_uint
.subsections_via_symbols
