	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmc_etr_sync_perf_buffer
_tmc_etr_sync_perf_buffer:              ## @tmc_etr_sync_perf_buffer
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	decq	%r12
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rsi
	andq	%rsi, %r12
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	24(%rdx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	%r13, %r15
	testq	%r14, %r14
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	cmpq	%rax, %r15
	movl	$0, %ecx
	cmovbq	%rcx, %rax
	subq	%rax, %r15
	movq	%r15, %rsi
	movq	%r14, %rdx
	leaq	-80(%rbp), %rcx
	callq	_tmc_etr_buf_get_data
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setle	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	subq	%r12, %rsi
	movq	%rbx, %rdi
	callq	_min
	movq	%rax, %r13
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rbx,8), %rdi
	addq	%r12, %rdi
	movq	-80(%rbp), %rsi
	movq	%r13, %rdx
	callq	_memcpy
	subq	%r13, %r14
	addq	%r13, %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	8(%rax), %rbx
	movl	$0, %eax
	cmoveq	%rax, %rbx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_tmc_etr_sync_perf_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmc_etr_sync_perf_buffer
_tmc_etr_sync_perf_buffer:              ; @tmc_etr_sync_perf_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cbz	x2, LBB0_6
; %bb.1:
	mov	x19, x2
	mov	x20, x0
	ldp	x24, x21, [x0, #16]
Lloh0:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldrsw	x8, [x25]
	sub	x8, x8, #1
	ldr	x9, [x0]
	and	x26, x9, x8
Lloh2:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	lsr	x27, x9, x8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x1, x23, x22
	cbz	x19, LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	cmp	x1, x8
	csel	x8, xzr, x8, lo
	sub	x22, x1, x8
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_tmc_etr_buf_get_data
	mov	x23, x0
	cmp	x0, #1
	cset	w0, lt
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [x25]
	sub	x1, x8, x26
	mov	x0, x23
	bl	_min
	mov	x23, x0
	ldr	x8, [x24, x27, lsl #3]
	add	x0, x8, x26
	ldr	x1, [sp, #8]
	mov	x2, x23
	bl	_memcpy
	sub	x19, x19, x23
	ldrsw	x8, [x25]
	add	x26, x23, x26
	cmp	x26, x8
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, #0
	add	x8, x27, #1
	ldr	x9, [x20, #8]
	cmp	x8, x9
	csinc	x27, xzr, x27, eq
	b	LBB0_2
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_tmc_etr_sync_perf_buffer
.subsections_via_symbols
