	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_add_event_entry                ## -- Begin function add_event_entry
	.p2align	4, 0x90
_add_event_entry:                       ## @add_event_entry
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_event_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_buffer_pos@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	_buffer_size@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rsi
	jne	LBB0_2
## %bb.5:
	movq	_oprofile_stats@GOTPCREL(%rip), %rdi
	popq	%rbp
	jmp	_atomic_inc                     ## TAILCALL
LBB0_4:
	movl	$1, %edi
	popq	%rbp
	jmp	_WARN_ON_ONCE                   ## TAILCALL
LBB0_2:
	movq	%rdi, (%rax,%rsi,8)
	movq	(%rcx), %rax
	incq	%rax
	movq	%rax, (%rcx)
	movq	(%rdx), %rcx
	movq	_buffer_watershed@GOTPCREL(%rip), %rdx
	subq	(%rdx), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_3
## %bb.6:
	movq	_buffer_ready@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_atomic_set
	movq	_buffer_wait@GOTPCREL(%rip), %rdi
	popq	%rbp
	jmp	_wake_up                        ## TAILCALL
LBB0_3:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_event_buffer,8,3               ## @event_buffer
	.comm	_buffer_pos,8,3                 ## @buffer_pos
	.comm	_buffer_size,8,3                ## @buffer_size
	.comm	_oprofile_stats,4,2             ## @oprofile_stats
	.comm	_buffer_watershed,8,3           ## @buffer_watershed
	.comm	_buffer_ready,4,2               ## @buffer_ready
	.comm	_buffer_wait,4,2                ## @buffer_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_add_event_entry                ; -- Begin function add_event_entry
	.p2align	2
_add_event_entry:                       ; @add_event_entry
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _event_buffer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _event_buffer@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _buffer_pos@GOTPAGE
Lloh4:
	ldr	x9, [x9, _buffer_pos@GOTPAGEOFF]
	ldr	x11, [x9]
Lloh5:
	adrp	x10, _buffer_size@GOTPAGE
Lloh6:
	ldr	x10, [x10, _buffer_size@GOTPAGEOFF]
	ldr	x12, [x10]
	cmp	x11, x12
	b.ne	LBB0_4
; %bb.2:
Lloh7:
	adrp	x0, _oprofile_stats@GOTPAGE
Lloh8:
	ldr	x0, [x0, _oprofile_stats@GOTPAGEOFF]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_atomic_inc
LBB0_3:
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_WARN_ON_ONCE
LBB0_4:
	str	x0, [x8, x11, lsl #3]
	ldr	x8, [x9]
	add	x8, x8, #1
	str	x8, [x9]
	ldr	x9, [x10]
Lloh9:
	adrp	x10, _buffer_watershed@GOTPAGE
Lloh10:
	ldr	x10, [x10, _buffer_watershed@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	sub	x9, x9, x10
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh12:
	adrp	x0, _buffer_ready@GOTPAGE
Lloh13:
	ldr	x0, [x0, _buffer_ready@GOTPAGEOFF]
	mov	w1, #1
	bl	_atomic_set
Lloh14:
	adrp	x0, _buffer_wait@GOTPAGE
Lloh15:
	ldr	x0, [x0, _buffer_wait@GOTPAGEOFF]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_wake_up
LBB0_6:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_event_buffer,8,3               ; @event_buffer
	.comm	_buffer_pos,8,3                 ; @buffer_pos
	.comm	_buffer_size,8,3                ; @buffer_size
	.comm	_oprofile_stats,4,2             ; @oprofile_stats
	.comm	_buffer_watershed,8,3           ; @buffer_watershed
	.comm	_buffer_ready,4,2               ; @buffer_ready
	.comm	_buffer_wait,4,2                ; @buffer_wait
.subsections_via_symbols
