	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __add_event
___add_event:                           ## @__add_event
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	testq	%r15, %r15
	jne	LBB0_4
## %bb.1:
	movl	$4, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_INIT_LIST_HEAD
LBB0_4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_event_attr_init
	movl	(%r12), %esi
	leal	1(%rsi), %eax
	movl	%eax, (%r12)
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_perf_evsel__new
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	movq	%r14, 8(%rax)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_strdup
	movl	%eax, 4(%rbx)
LBB0_8:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_list_add_tail
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_5:
	movq	%r15, %rdi
	callq	_free
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	___add_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __add_event
___add_event:                           ; @__add_event
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	ldr	x20, [x0]
	cbnz	x20, LBB0_3
; %bb.1:
	mov	w0, #4
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.2:
	mov	x20, x0
	bl	_INIT_LIST_HEAD
LBB0_3:
	mov	x0, x23
	bl	_event_attr_init
	ldr	w1, [x24]
	add	w8, w1, #1
	str	w8, [x24]
	mov	x0, x23
	bl	_perf_evsel__new
	cbz	x0, LBB0_7
; %bb.4:
	mov	x23, x0
	str	x22, [x0, #8]
	cbz	x21, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_strdup
	str	w0, [x23, #4]
LBB0_6:
	mov	x0, x23
	mov	x1, x20
	bl	_list_add_tail
	mov	w0, #0
	str	x20, [x19]
	b	LBB0_9
LBB0_7:
	mov	x0, x20
	bl	_free
LBB0_8:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	___add_event
.subsections_via_symbols
