	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function correctstack
_correctstack:                          ## @correctstack
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	32(%rdi), %r12
	movq	40(%rdi), %rax
	subq	%rsi, %rax
	addq	(%rdi), %rax
	movq	%rax, 40(%rdi)
	testq	%r12, %r12
	je	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_gco2uv
	movq	(%rax), %rbx
	subq	%r15, %rbx
	addq	(%r14), %rbx
	movq	%r12, %rdi
	callq	_gco2uv
	movq	%rbx, (%rax)
	movq	(%r12), %r12
	testq	%r12, %r12
	jne	LBB0_1
LBB0_3:
	movq	24(%r14), %rcx
	movq	(%r14), %rax
	movq	16(%r14), %rdx
	cmpq	%rdx, %rcx
	ja	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rcx), %rsi
	subq	%r15, %rsi
	addq	%rax, %rsi
	movq	%rsi, 16(%rcx)
	movq	(%rcx), %rsi
	movq	8(%rcx), %rdi
	subq	%r15, %rdi
	addq	%rax, %rdi
	movq	%rdi, 8(%rcx)
	subq	%r15, %rsi
	addq	%rax, %rsi
	movq	%rsi, (%rcx)
	addq	$24, %rcx
	cmpq	%rdx, %rcx
	jbe	LBB0_4
LBB0_6:
	movq	8(%r14), %rcx
	subq	%r15, %rcx
	addq	%rcx, %rax
	movq	%rax, 8(%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_correctstack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function correctstack
_correctstack:                          ; @correctstack
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldp	x21, x9, [x0, #32]
	sub	x9, x9, x1
	add	x8, x8, x9
	str	x8, [x0, #40]
	cbz	x21, LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_gco2uv
	ldr	x8, [x0]
	ldr	x9, [x19]
	sub	x8, x8, x20
	add	x22, x9, x8
	mov	x0, x21
	bl	_gco2uv
	str	x22, [x0]
	ldr	x21, [x21]
	cbnz	x21, LBB0_1
LBB0_2:
	ldp	x9, x11, [x19, #16]
	ldr	x8, [x19]
	cmp	x11, x9
	b.hi	LBB0_9
; %bb.3:
	add	x10, x11, #24
	add	x12, x9, #1
	cmp	x10, x12
	csinc	x10, x10, x9, hi
	sub	x10, x10, #24
	cmp	x10, x11
	cinc	x12, x11, ne
	sub	x12, x10, x12
	cmp	x10, x11
	mov	x10, #-6148914691236517206
	movk	x10, #43691
	umulh	x10, x12, x10
	lsr	x10, x10, #4
	cinc	x10, x10, ne
	cbz	x10, LBB0_7
; %bb.4:
	add	x12, x10, #1
	and	x13, x12, #0x3ffffffffffffffe
	mov	w10, #24
	madd	x10, x13, x10, x11
	dup.2d	v0, x20
	dup.2d	v1, x8
	mov	x14, x13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ld3.2d	{ v2, v3, v4 }, [x11]
	sub.2d	v5, v4, v0
	add.2d	v7, v1, v5
	sub.2d	v16, v3, v0
	add.2d	v6, v1, v16
	sub.2d	v2, v2, v0
	add.2d	v5, v1, v2
	st3.2d	{ v5, v6, v7 }, [x11], #48
	subs	x14, x14, #2
	b.ne	LBB0_5
; %bb.6:
	cmp	x12, x13
	b.ne	LBB0_8
	b	LBB0_9
LBB0_7:
	mov	x10, x11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, #16]
	sub	x11, x11, x20
	add	x11, x8, x11
	str	x11, [x10, #16]
	ldp	x12, x11, [x10]
	sub	x11, x11, x20
	add	x11, x8, x11
	sub	x12, x12, x20
	add	x12, x8, x12
	stp	x12, x11, [x10], #24
	cmp	x10, x9
	b.ls	LBB0_8
LBB0_9:
	ldr	x9, [x19, #8]
	sub	x9, x9, x20
	add	x8, x8, x9
	str	x8, [x19, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_correctstack
.subsections_via_symbols
