	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function event_buffer_open
_event_buffer_open:                     ## @event_buffer_open
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_buffer_opened@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_test_and_set_bit_lock
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_dcookie_register
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	xorl	%eax, %eax
	callq	_oprofile_setup
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	movl	%eax, %ebx
	movl	(%r14), %edi
	callq	_dcookie_unregister
LBB0_7:
	movq	_buffer_opened@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	callq	___clear_bit_unlock
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nonseekable_open               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_buffer_opened,4,2              ## @buffer_opened
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_event_buffer_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function event_buffer_open
_event_buffer_open:                     ; @event_buffer_open
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x1, _buffer_opened@GOTPAGE
Lloh4:
	ldr	x1, [x1, _buffer_opened@GOTPAGEOFF]
	mov	w0, #0
	bl	_test_and_set_bit_lock
	cbz	x0, LBB0_6
; %bb.2:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _EPERM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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
LBB0_6:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	bl	_dcookie_register
	str	w0, [x19]
	cbz	w0, LBB0_9
; %bb.7:
	bl	_oprofile_setup
	cbz	w0, LBB0_11
; %bb.8:
	mov	x21, x0
	ldr	w0, [x19]
	bl	_dcookie_unregister
	b	LBB0_10
LBB0_9:
	neg	w21, w21
LBB0_10:
Lloh12:
	adrp	x1, _buffer_opened@GOTPAGE
Lloh13:
	ldr	x1, [x1, _buffer_opened@GOTPAGEOFF]
	mov	w0, #0
	bl	___clear_bit_unlock
	b	LBB0_5
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	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
	b	_nonseekable_open
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_buffer_opened,4,2              ; @buffer_opened
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_event_buffer_open
.subsections_via_symbols
