	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function TPCircularBufferInit
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_TPCircularBufferInit
	.p2align	4, 0x90
_TPCircularBufferInit:                  ## @TPCircularBufferInit
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -80(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	leaq	8(%rdi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$3, %r15d
	movq	_VM_FLAGS_ANYWHERE@GOTPCREL(%rip), %r12
	leaq	-48(%rbp), %rbx
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_1
LBB0_19:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, 32(%r13)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	$0, 16(%rax)
	movl	$1, -52(%rbp)                   ## 4-byte Folded Spill
	movl	$1, %eax
LBB0_20:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_VM_FLAGS_ANYWHERE@GOTPCREL(%rip), %r12
	leaq	-48(%rbp), %rbx
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$2, %eax
	jne	LBB0_22
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %r14d
	movl	-80(%rbp), %edi                 ## 4-byte Reload
	callq	_round_page
	movl	%eax, (%r13)
	xorl	%eax, %eax
	callq	_mach_task_self
	movl	(%r13), %edx
	addl	%edx, %edx
	movl	(%r12), %ecx
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_vm_allocate
	movq	_ERR_SUCCESS@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_mach_task_self
	movslq	(%r13), %rdx
	movq	%rdx, %rsi
	addq	-48(%rbp), %rsi
	movl	%eax, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_vm_deallocate
	cmpq	(%r15), %rax
	jne	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movslq	(%r13), %rax
	addq	-48(%rbp), %rax
	movq	%rax, -72(%rbp)
	xorl	%eax, %eax
	callq	_mach_task_self
	movl	%eax, %r12d
	movl	(%r13), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_mach_task_self
	movq	_VM_INHERIT_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	subq	$8, %rsp
	movl	%r12d, %edi
	leaq	-72(%rbp), %rsi
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	%eax, %r9d
	pushq	%rbx
	leaq	-92(%rbp), %rax
	pushq	%rax
	leaq	-96(%rbp), %rax
	pushq	%rax
	pushq	$0
	pushq	-48(%rbp)
	callq	_vm_remap
	addq	$48, %rsp
	cmpq	(%r15), %rax
	jne	LBB0_12
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rax
	movslq	(%r13), %rcx
	addq	%rax, %rcx
	cmpq	%rcx, -72(%rbp)
	movl	%r14d, %r15d
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_1 Depth=1
	testl	%r15d, %r15d
	movq	_VM_FLAGS_ANYWHERE@GOTPCREL(%rip), %r12
	leaq	-48(%rbp), %rbx
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_1 Depth=1
	decl	%r15d
	xorl	%eax, %eax
	callq	_mach_task_self
	movq	-72(%rbp), %rsi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %edx
	movl	%eax, %edi
	callq	_vm_deallocate
	xorl	%eax, %eax
	callq	_mach_task_self
	movq	-48(%rbp), %rsi
	movl	(%r14), %edx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %r15d
	decl	%r15d
	movl	$2, %eax
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%r14d, %r14d
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %r15d
	decl	%r15d
	xorl	%eax, %eax
	callq	_mach_task_self
	movq	-48(%rbp), %rsi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edx
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %edi
	callq	_vm_deallocate
	movl	$2, %eax
	jmp	LBB0_21
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %r15d
	decl	%r15d
	xorl	%eax, %eax
	callq	_mach_task_self
	movq	-48(%rbp), %rsi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_vm_deallocate
	movl	$2, %eax
	jmp	LBB0_20
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_reportResult
	movl	$1, %eax
	movl	$-1, %r15d
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_20
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	$1, %eax
	movl	$-1, %r15d
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_21
LBB0_4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	movq	%rax, %rdi
	callq	_reportResult
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
LBB0_22:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_FLAGS_ANYWHERE,4,2          ## @VM_FLAGS_ANYWHERE
	.comm	_ERR_SUCCESS,8,3                ## @ERR_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Buffer allocation"

L_.str.1:                               ## @.str.1
	.asciz	"Buffer deallocation"

	.comm	_VM_INHERIT_DEFAULT,4,2         ## @VM_INHERIT_DEFAULT
L_.str.2:                               ## @.str.2
	.asciz	"Remap buffer memory"

L_str:                                  ## @str
	.asciz	"Couldn't map buffer memory to end of buffer"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TPCircularBufferInit           ; -- Begin function TPCircularBufferInit
	.p2align	2
_TPCircularBufferInit:                  ; @TPCircularBufferInit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	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
	mov	x19, x1
	mov	x20, x0
	add	x26, x0, #8
	mov	w22, #3
Lloh0:
	adrp	x27, _VM_FLAGS_ANYWHERE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _VM_FLAGS_ANYWHERE@GOTPAGEOFF]
Lloh2:
	adrp	x28, _ERR_SUCCESS@GOTPAGE
Lloh3:
	ldr	x28, [x28, _ERR_SUCCESS@GOTPAGEOFF]
	add	x21, sp, #28
                                        ; implicit-def: $w23
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	x8, [x20, #32]
	stp	xzr, xzr, [x26, #8]
	mov	w23, #1
	mov	w8, #1
	str	xzr, [x26]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #2
	b.ne	LBB0_21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_round_page
	str	w0, [x20]
	bl	_mach_task_self
	ldr	w8, [x20]
	lsl	w2, w8, #1
	ldr	w3, [x27]
	add	x1, sp, #40
	bl	_vm_allocate
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_mach_task_self
	ldr	x8, [sp, #40]
	ldrsw	x2, [x20]
	add	x1, x8, x2
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_vm_deallocate
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #40]
	ldrsw	x9, [x20]
	add	x8, x8, x9
	str	x8, [sp, #32]
	bl	_mach_task_self
	mov	x24, x0
	ldr	w25, [x20]
	bl	_mach_task_self
	mov	x5, x0
	ldr	x6, [sp, #40]
Lloh4:
	adrp	x8, _VM_INHERIT_DEFAULT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VM_INHERIT_DEFAULT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	add	x1, sp, #32
	add	x8, sp, #24
	stp	x21, x8, [sp]
	mov	x0, x24
	mov	x2, x25
	mov	w3, #0
	mov	w4, #0
	mov	w7, #0
	bl	_vm_remap
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x9, x8, [sp, #32]
	ldrsw	x10, [x20]
	add	x10, x8, x10
	cmp	x9, x10
	b.eq	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w22, LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w22, w22, #1
	bl	_mach_task_self
	ldr	x1, [sp, #32]
	ldr	w2, [x20]
	bl	_vm_deallocate
	b	LBB0_14
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	w22, LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	sub	w22, w22, #1
	mov	w8, #2
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w22, LBB0_13
	b	LBB0_19
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w22, LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w22, w22, #1
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_mach_task_self
	ldr	x1, [sp, #40]
	ldr	w2, [x20]
	bl	_vm_deallocate
	mov	w8, #2
	b	LBB0_2
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_reportResult
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh9:
	adrp	x0, l_str@PAGE
Lloh10:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w23, #0
	mov	w8, #1
	mov	w22, #-1
	b	LBB0_2
LBB0_18:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_20
LBB0_19:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_20:
	bl	_reportResult
	mov	w23, #0
LBB0_21:
	mov	x0, 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
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_FLAGS_ANYWHERE,4,2          ; @VM_FLAGS_ANYWHERE
	.comm	_ERR_SUCCESS,8,3                ; @ERR_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Buffer allocation"

l_.str.1:                               ; @.str.1
	.asciz	"Buffer deallocation"

	.comm	_VM_INHERIT_DEFAULT,4,2         ; @VM_INHERIT_DEFAULT
l_.str.2:                               ; @.str.2
	.asciz	"Remap buffer memory"

l_str:                                  ; @str
	.asciz	"Couldn't map buffer memory to end of buffer"

.subsections_via_symbols
