	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AllocWinding                   ## -- Begin function AllocWinding
	.p2align	4, 0x90
_AllocWinding:                          ## @AllocWinding
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	leal	(%r14,%r14,2), %eax
	leal	4(,%rax,4), %ebx
	movl	%ebx, %edi
	callq	_GetMemory
	movq	%rax, %r15
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	_numthreads@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_5
## %bb.1:
	movq	_c_winding_allocs@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_c_winding_points@GOTPCREL(%rip), %rax
	addl	%r14d, (%rax)
	movq	_c_active_windings@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	leaq	1(%rdx), %rax
	movq	%rax, (%rcx)
	movq	_c_peak_windings@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jl	LBB0_3
## %bb.2:
	movq	%rax, (%rcx)
LBB0_3:
	movq	%r15, %rdi
	callq	_MemorySize
	movq	_c_windingmemory@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%rax, (%rcx)
	movq	_c_peak_windingmemory@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_5
## %bb.4:
	movq	%rax, (%rcx)
LBB0_5:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_numthreads,4,2                 ## @numthreads
	.comm	_c_winding_allocs,4,2           ## @c_winding_allocs
	.comm	_c_winding_points,4,2           ## @c_winding_points
	.comm	_c_active_windings,8,3          ## @c_active_windings
	.comm	_c_peak_windings,8,3            ## @c_peak_windings
	.comm	_c_windingmemory,8,3            ## @c_windingmemory
	.comm	_c_peak_windingmemory,8,3       ## @c_peak_windingmemory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AllocWinding                   ; -- Begin function AllocWinding
	.p2align	2
_AllocWinding:                          ; @AllocWinding
	.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, x0
	mov	w8, #12
	orr	w9, wzr, #0x4
	madd	w21, w0, w8, w9
	mov	x0, x21
	bl	_GetMemory
	mov	x19, x0
	mov	w1, #0
	mov	x2, x21
	bl	_memset
Lloh0:
	adrp	x8, _numthreads@GOTPAGE
Lloh1:
	ldr	x8, [x8, _numthreads@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _c_winding_allocs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _c_winding_allocs@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh5:
	adrp	x8, _c_winding_points@GOTPAGE
Lloh6:
	ldr	x8, [x8, _c_winding_points@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, w20
	str	w9, [x8]
Lloh7:
	adrp	x9, _c_active_windings@GOTPAGE
Lloh8:
	ldr	x9, [x9, _c_active_windings@GOTPAGEOFF]
	ldr	x10, [x9]
	add	x8, x10, #1
	str	x8, [x9]
Lloh9:
	adrp	x9, _c_peak_windings@GOTPAGE
Lloh10:
	ldr	x9, [x9, _c_peak_windings@GOTPAGEOFF]
	ldr	x11, [x9]
	cmp	x10, x11
	b.lt	LBB0_3
; %bb.2:
	str	x8, [x9]
LBB0_3:
	mov	x0, x19
	bl	_MemorySize
Lloh11:
	adrp	x10, _c_windingmemory@GOTPAGE
Lloh12:
	ldr	x10, [x10, _c_windingmemory@GOTPAGEOFF]
	ldr	x9, [x10]
Lloh13:
	adrp	x8, _c_peak_windingmemory@GOTPAGE
Lloh14:
	ldr	x8, [x8, _c_peak_windingmemory@GOTPAGEOFF]
	ldr	x11, [x8]
	add	x9, x9, x0
	cmp	x9, x11
	str	x9, [x10]
	b.le	LBB0_5
; %bb.4:
	str	x9, [x8]
LBB0_5:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_numthreads,4,2                 ; @numthreads
	.comm	_c_winding_allocs,4,2           ; @c_winding_allocs
	.comm	_c_winding_points,4,2           ; @c_winding_points
	.comm	_c_active_windings,8,3          ; @c_active_windings
	.comm	_c_peak_windings,8,3            ; @c_peak_windings
	.comm	_c_windingmemory,8,3            ; @c_windingmemory
	.comm	_c_peak_windingmemory,8,3       ; @c_peak_windingmemory
.subsections_via_symbols
