	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sync_buffer                    ## -- Begin function sync_buffer
	.p2align	4, 0x90
_sync_buffer:                           ## @sync_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_sb_buffer_start@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_buffer_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	%ebx, %edi
	callq	_add_cpu_switch
	movl	%ebx, %edi
	callq	_op_cpu_buffer_reset
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_op_cpu_buffer_entries
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %r12d
	leaq	-88(%rbp), %rbx
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %r14
	movq	%r15, %rbx
LBB0_27:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %eax
	incl	%r12d
	movq	%r14, %r13
	cmpq	%rax, -80(%rbp)                 ## 8-byte Folded Reload
	jbe	LBB0_28
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %r15
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_op_cpu_buffer_read_entry
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movl	8(%rax), %edi
	callq	_is_code
	testq	%rax, %rax
	je	LBB0_22
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rbx
	movq	_TRACE_BEGIN@GOTPCREL(%rip), %rax
	testq	%rbx, (%rax)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_sb_bt_start@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	xorl	%eax, %eax
	callq	_add_trace_begin
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_KERNEL_CTX_SWITCH@GOTPCREL(%rip), %rax
	testq	%rbx, (%rax)
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IS_KERNEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	%rbx, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_sb_buffer_start@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_sb_sample_start@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_add_kernel_ctx_switch
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_USER_CTX_SWITCH@GOTPCREL(%rip), %rax
	testq	%rbx, (%rax)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rbx
	movq	%r15, %rdi
	leaq	-96(%rbp), %rsi
	callq	_op_cpu_buffer_get_data
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-96(%rbp), %rbx
	movq	%r13, %rdi
	callq	_release_mm
	movq	%rbx, %rdi
	callq	_get_task_mm
	movq	%rax, %r14
	cmpq	%r13, %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_get_exec_dcookie
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_add_user_ctx_switch
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	_sb_bt_start@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jl	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_add_sample
	testq	%rax, %rax
	jne	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_sb_bt_start@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_sb_bt_ignore@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_oprofile_stats@GOTPCREL(%rip), %rdi
	callq	_atomic_inc
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %r14
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rbx
	jmp	LBB0_20
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %r14
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_op_cpu_buffer_get_size
	testq	%rax, %rax
	je	LBB0_27
## %bb.21:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_add_data
	jmp	LBB0_27
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_28
LBB0_4:
	movq	%r13, %r14
LBB0_28:
	movq	%r14, %rdi
	callq	_release_mm
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_mark_done
	movq	_buffer_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sb_buffer_start,8,3            ## @sb_buffer_start
	.comm	_buffer_mutex,4,2               ## @buffer_mutex
	.comm	_TRACE_BEGIN,8,3                ## @TRACE_BEGIN
	.comm	_sb_bt_start,8,3                ## @sb_bt_start
	.comm	_KERNEL_CTX_SWITCH,8,3          ## @KERNEL_CTX_SWITCH
	.comm	_IS_KERNEL,8,3                  ## @IS_KERNEL
	.comm	_sb_sample_start,8,3            ## @sb_sample_start
	.comm	_USER_CTX_SWITCH,8,3            ## @USER_CTX_SWITCH
	.comm	_sb_bt_ignore,8,3               ## @sb_bt_ignore
	.comm	_oprofile_stats,4,2             ## @oprofile_stats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sync_buffer                    ; -- Begin function sync_buffer
	.p2align	2
_sync_buffer:                           ; @sync_buffer
	.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, x0
Lloh0:
	adrp	x26, _sb_buffer_start@GOTPAGE
Lloh1:
	ldr	x26, [x26, _sb_buffer_start@GOTPAGEOFF]
	ldr	x28, [x26]
Lloh2:
	adrp	x0, _buffer_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _buffer_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x19
	bl	_add_cpu_switch
	mov	x0, x19
	bl	_op_cpu_buffer_reset
	mov	x0, x19
	bl	_op_cpu_buffer_entries
	cbz	x0, LBB0_22
; %bb.1:
	mov	x20, x0
	mov	x24, #0
	str	xzr, [sp, #16]                  ; 8-byte Folded Spill
Lloh4:
	adrp	x22, _sb_bt_start@GOTPAGE
Lloh5:
	ldr	x22, [x22, _sb_bt_start@GOTPAGEOFF]
Lloh6:
	adrp	x21, _TRACE_BEGIN@GOTPAGE
Lloh7:
	ldr	x21, [x21, _TRACE_BEGIN@GOTPAGEOFF]
Lloh8:
	adrp	x23, _KERNEL_CTX_SWITCH@GOTPAGE
Lloh9:
	ldr	x23, [x23, _KERNEL_CTX_SWITCH@GOTPAGEOFF]
	mov	w27, #1
	mov	w8, #1
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	str	w19, [sp, #12]                  ; 4-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x24
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x20, w27, uxtw
	add	w27, w27, #1
	mov	x24, x25
	b.ls	LBB0_24
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #32
	mov	x1, x19
	bl	_op_cpu_buffer_read_entry
	cbz	x0, LBB0_23
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	ldr	w0, [x0, #8]
	bl	_is_code
	cbz	x0, LBB0_18
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x25, [x25]
	ldr	x8, [x21]
	tst	x8, x25
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x28, [x22]
	bl	_add_trace_begin
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23]
	tst	x8, x25
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh10:
	adrp	x8, _IS_KERNEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IS_KERNEL@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	and	x0, x8, x25
	ldr	x8, [x26]
Lloh13:
	adrp	x9, _sb_sample_start@GOTPAGE
Lloh14:
	ldr	x9, [x9, _sb_sample_start@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x28, x8
	csel	x28, x9, x28, eq
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	bl	_add_kernel_ctx_switch
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh16:
	adrp	x8, _USER_CTX_SWITCH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _USER_CTX_SWITCH@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	tst	x8, x25
	b.eq	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #32
	add	x1, sp, #40
	bl	_op_cpu_buffer_get_data
	cbz	x0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x19, x20
	mov	x20, x23
	mov	x23, x22
	mov	x22, x21
	mov	x21, x26
	ldr	x26, [sp, #40]
	mov	x0, x24
	bl	_release_mm
	mov	x0, x26
	bl	_get_task_mm
	mov	x25, x0
	cmp	x0, x24
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	bl	_get_exec_dcookie
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x26
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	bl	_add_user_ctx_switch
	mov	x26, x21
	mov	x21, x22
	mov	x22, x23
	mov	x23, x20
	mov	x20, x19
	ldr	w19, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x24
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #32
	bl	_op_cpu_buffer_get_size
	cbz	x0, LBB0_3
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #32
	mov	x1, x25
	bl	_add_data
	b	LBB0_3
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22]
	cmp	x28, x8
	b.lt	LBB0_2
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x25
	ldr	x2, [sp, #24]                   ; 8-byte Folded Reload
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_add_sample
	cbnz	x0, LBB0_2
; %bb.20:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22]
	cmp	x28, x8
	b.ne	LBB0_2
; %bb.21:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh19:
	adrp	x8, _sb_bt_ignore@GOTPAGE
Lloh20:
	ldr	x8, [x8, _sb_bt_ignore@GOTPAGEOFF]
Lloh21:
	ldr	x28, [x8]
Lloh22:
	adrp	x0, _oprofile_stats@GOTPAGE
Lloh23:
	ldr	x0, [x0, _oprofile_stats@GOTPAGEOFF]
	bl	_atomic_inc
	b	LBB0_2
LBB0_22:
	mov	x25, #0
	b	LBB0_24
LBB0_23:
	mov	x25, x24
LBB0_24:
	mov	x0, x25
	bl	_release_mm
	mov	x0, x19
	bl	_mark_done
Lloh24:
	adrp	x0, _buffer_mutex@GOTPAGE
Lloh25:
	ldr	x0, [x0, _buffer_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	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 AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_sb_buffer_start,8,3            ; @sb_buffer_start
	.comm	_buffer_mutex,4,2               ; @buffer_mutex
	.comm	_TRACE_BEGIN,8,3                ; @TRACE_BEGIN
	.comm	_sb_bt_start,8,3                ; @sb_bt_start
	.comm	_KERNEL_CTX_SWITCH,8,3          ; @KERNEL_CTX_SWITCH
	.comm	_IS_KERNEL,8,3                  ; @IS_KERNEL
	.comm	_sb_sample_start,8,3            ; @sb_sample_start
	.comm	_USER_CTX_SWITCH,8,3            ; @USER_CTX_SWITCH
	.comm	_sb_bt_ignore,8,3               ; @sb_bt_ignore
	.comm	_oprofile_stats,4,2             ; @oprofile_stats
.subsections_via_symbols
