	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloc_event_buffer             ## -- Begin function alloc_event_buffer
	.p2align	4, 0x90
_alloc_event_buffer:                    ## @alloc_event_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_oprofilefs_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_raw_spin_lock_irqsave
	movq	_oprofile_buffer_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_buffer_size@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	movq	_oprofile_buffer_watershed@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_buffer_watershed@GOTPCREL(%rip), %rbx
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	callq	_raw_spin_unlock_irqrestore
	movq	(%r15), %rdi
	cmpq	%rdi, (%rbx)
	jge	LBB0_1
## %bb.2:
	movq	_buffer_pos@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movl	$8, %esi
	callq	_array_size
	movl	%eax, %edi
	callq	_vmalloc
	movl	%eax, %ecx
	movq	_event_buffer@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_5
## %bb.3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_oprofilefs_lock,4,2            ## @oprofilefs_lock
	.comm	_oprofile_buffer_size,8,3       ## @oprofile_buffer_size
	.comm	_buffer_size,8,3                ## @buffer_size
	.comm	_oprofile_buffer_watershed,8,3  ## @oprofile_buffer_watershed
	.comm	_buffer_watershed,8,3           ## @buffer_watershed
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_buffer_pos,8,3                 ## @buffer_pos
	.comm	_event_buffer,4,2               ## @event_buffer
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloc_event_buffer             ; -- Begin function alloc_event_buffer
	.p2align	2
_alloc_event_buffer:                    ; @alloc_event_buffer
	.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
Lloh0:
	adrp	x19, _oprofilefs_lock@GOTPAGE
Lloh1:
	ldr	x19, [x19, _oprofilefs_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_raw_spin_lock_irqsave
Lloh2:
	adrp	x8, _oprofile_buffer_size@GOTPAGE
Lloh3:
	ldr	x8, [x8, _oprofile_buffer_size@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x20, _buffer_size@GOTPAGE
Lloh6:
	ldr	x20, [x20, _buffer_size@GOTPAGEOFF]
	str	x8, [x20]
Lloh7:
	adrp	x8, _oprofile_buffer_watershed@GOTPAGE
Lloh8:
	ldr	x8, [x8, _oprofile_buffer_watershed@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x21, _buffer_watershed@GOTPAGE
Lloh11:
	ldr	x21, [x21, _buffer_watershed@GOTPAGEOFF]
	str	x8, [x21]
	mov	x0, x19
	bl	_raw_spin_unlock_irqrestore
	ldr	x8, [x21]
	ldr	x0, [x20]
	cmp	x8, x0
	b.ge	LBB0_3
; %bb.1:
Lloh12:
	adrp	x8, _buffer_pos@GOTPAGE
Lloh13:
	ldr	x8, [x8, _buffer_pos@GOTPAGEOFF]
Lloh14:
	str	xzr, [x8]
	mov	w1, #8
	bl	_array_size
	bl	_vmalloc
Lloh15:
	adrp	x8, _event_buffer@GOTPAGE
Lloh16:
	ldr	x8, [x8, _event_buffer@GOTPAGEOFF]
Lloh17:
	str	w0, [x8]
	cbz	w0, LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_oprofilefs_lock,4,2            ; @oprofilefs_lock
	.comm	_oprofile_buffer_size,8,3       ; @oprofile_buffer_size
	.comm	_buffer_size,8,3                ; @buffer_size
	.comm	_oprofile_buffer_watershed,8,3  ; @oprofile_buffer_watershed
	.comm	_buffer_watershed,8,3           ; @buffer_watershed
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_buffer_pos,8,3                 ; @buffer_pos
	.comm	_event_buffer,4,2               ; @event_buffer
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
