	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ExpandHalfTextureToGrid
_ExpandHalfTextureToGrid:               ## @ExpandHalfTextureToGrid
	.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	%rdi, -64(%rbp)                 ## 8-byte Spill
	cmpl	$2, %edx
	jl	LBB0_6
## %bb.1:
	movl	%edx, %r12d
	movl	%esi, %r14d
	shrl	%r12d
	leal	(,%r14,4), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	leal	(,%rax,4), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	incl	%eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	-1(%r12), %rax
	cmpq	$1, %r12
	movq	%rax, %r12
	jle	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$2, %r14d
	jl	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	imull	%r12d, %eax
	addl	$-4, %eax
	cltq
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r13
	leal	(%r12,%r12), %eax
	addl	$1073741823, %eax               ## imm = 0x3FFFFFFF
	imull	-48(%rbp), %eax                 ## 4-byte Folded Reload
	addl	$-8, %eax
	cltq
	leaq	(%rcx,%rax,4), %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_COPYSAMPLE
	addq	$-32, %rbx
	addq	$-16, %r13
	decl	%r15d
	cmpl	$1, %r15d
	jg	LBB0_4
	jmp	LBB0_5
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ExpandHalfTextureToGrid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ExpandHalfTextureToGrid
_ExpandHalfTextureToGrid:               ; @ExpandHalfTextureToGrid
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cmp	w2, #2
	b.lt	LBB0_6
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	lsr	w23, w2, #1
	lsl	w24, w1, #2
	cmp	w1, #0
	cinc	w8, w1, lt
	asr	w8, w8, #1
	lsl	w25, w8, #2
	add	w26, w8, #1
	mov	w27, #1073741823
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	subs	x23, x23, #1
	b.le	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w19, #2
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mul	w8, w25, w23
	sub	w8, w8, #4
	add	x21, x20, w8, sxtw #2
	add	w8, w27, w23, lsl #1
	mul	w8, w24, w8
	sub	w8, w8, #8
	add	x22, x20, w8, sxtw #2
	mov	x28, x26
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	mov	x1, x21
	bl	_COPYSAMPLE
	sub	x22, x22, #32
	sub	x21, x21, #16
	sub	w28, w28, #1
	cmp	w28, #1
	b.gt	LBB0_5
	b	LBB0_2
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ExpandHalfTextureToGrid
.subsections_via_symbols
