	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_event_files
_read_event_files:                      ## @read_event_files
	.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	%rdi, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_get_tracing_file
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_opendir
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_die
LBB0_2:
	movq	%rbx, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r13
	xorl	%r15d, %r15d
	movq	_DT_DIR@GOTPCREL(%rip), %r12
	leaq	L_.str.2(%rip), %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_readdir
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_11
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	cmpq	(%r12), %rax
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r13), %rdi
	movq	%r14, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r13), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r13), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r13), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_system_in_tp_list
	cmpl	$1, %eax
	sbbl	$-1, %r15d
	jmp	LBB0_10
LBB0_3:
	xorl	%r15d, %r15d
LBB0_11:
	movl	%r15d, -60(%rbp)
	leaq	-60(%rbp), %rdi
	movl	$4, %esi
	callq	_write_or_die
	movq	%rbx, %rdi
	callq	_rewinddir
	movq	%rbx, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_19
## %bb.12:
	movq	%rax, %r14
	movq	_DT_DIR@GOTPCREL(%rip), %r15
	leaq	L_.str.2(%rip), %r12
	leaq	L_.str.3(%rip), %r13
	jmp	LBB0_13
LBB0_22:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	%r13, %rdi
	callq	_free
	leaq	L_.str.2(%rip), %r12
	leaq	L_.str.3(%rip), %r13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	%rbx, %rdi
	callq	_readdir
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_19
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	cmpq	(%r15), %rax
	jne	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r14), %rdi
	movq	%r12, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r14), %rdi
	movq	%r13, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r14), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r14), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_system_in_tp_list
	testl	%eax, %eax
	je	LBB0_18
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_strlen
	movl	%eax, %r13d
	movq	8(%r14), %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r13), %edi
	addl	$2, %edi
	callq	_malloc_or_die
	movq	%rax, %r13
	movq	8(%r14), %rcx
	movq	%rax, %rdi
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdx
	callq	_sprintf
	movq	%r13, %rdi
	leaq	-64(%rbp), %rsi
	callq	_stat
	testl	%eax, %eax
	js	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r14), %r14
	movq	%r14, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %esi
	movq	%r14, %rdi
	callq	_write_or_die
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_copy_event_system
	jmp	LBB0_22
LBB0_19:
	movq	%rbx, %rdi
	callq	_closedir
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_put_tracing_file
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"events"

L_.str.1:                               ## @.str.1
	.asciz	"can't read directory '%s'"

	.comm	_DT_DIR,8,3                     ## @DT_DIR
L_.str.2:                               ## @.str.2
	.asciz	"."

L_.str.3:                               ## @.str.3
	.asciz	".."

L_.str.4:                               ## @.str.4
	.asciz	"ftrace"

L_.str.5:                               ## @.str.5
	.asciz	"%s/%s"

	.no_dead_strip	_read_event_files
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_event_files
_read_event_files:                      ; @read_event_files
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_get_tracing_file
	mov	x19, x0
	bl	_opendir
	mov	x21, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_die
LBB0_2:
	mov	x0, x21
	bl	_readdir
Lloh4:
	adrp	x28, _DT_DIR@GOTPAGE
Lloh5:
	ldr	x28, [x28, _DT_DIR@GOTPAGEOFF]
	cbz	x0, LBB0_10
; %bb.3:
	mov	x25, x0
	mov	w26, #0
Lloh6:
	adrp	x22, l_.str.2@PAGE
Lloh7:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh8:
	adrp	x23, l_.str.3@PAGE
Lloh9:
	add	x23, x23, l_.str.3@PAGEOFF
Lloh10:
	adrp	x24, l_.str.4@PAGE
Lloh11:
	add	x24, x24, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_readdir
	mov	x25, x0
	cbz	x0, LBB0_11
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x25, #8]
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x25, #8]
	mov	x1, x23
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x25, #8]
	mov	x1, x24
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x25, #8]
	mov	x1, x20
	bl	_system_in_tp_list
	cmp	w0, #0
	cinc	w26, w26, ne
	b	LBB0_4
LBB0_10:
	mov	w26, #0
LBB0_11:
	str	w26, [sp, #4]
	add	x0, sp, #4
	mov	w1, #4
	bl	_write_or_die
	mov	x0, x21
	bl	_rewinddir
	mov	x0, x21
	bl	_readdir
	cbz	x0, LBB0_22
; %bb.12:
	mov	x26, x0
Lloh12:
	adrp	x22, l_.str.2@PAGE
Lloh13:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh14:
	adrp	x23, l_.str.3@PAGE
Lloh15:
	add	x23, x23, l_.str.3@PAGEOFF
Lloh16:
	adrp	x24, l_.str.4@PAGE
Lloh17:
	add	x24, x24, l_.str.4@PAGEOFF
Lloh18:
	adrp	x25, l_.str.5@PAGE
Lloh19:
	add	x25, x25, l_.str.5@PAGEOFF
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x27
	bl	_free
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x21
	bl	_readdir
	mov	x26, x0
	cbz	x0, LBB0_22
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x0, [x26, #8]
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x0, [x26, #8]
	mov	x1, x23
	bl	_strcmp
	cbz	x0, LBB0_14
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x0, [x26, #8]
	mov	x1, x24
	bl	_strcmp
	cbz	x0, LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x0, [x26, #8]
	mov	x1, x20
	bl	_system_in_tp_list
	cbz	w0, LBB0_14
; %bb.20:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x19
	bl	_strlen
	mov	x27, x0
	ldr	x0, [x26, #8]
	bl	_strlen
	add	w8, w27, w0
	add	w0, w8, #2
	bl	_malloc_or_die
	mov	x27, x0
	ldr	x3, [x26, #8]
	mov	x1, x25
	mov	x2, x19
	bl	_sprintf
	add	x1, sp, #8
	mov	x0, x27
	bl	_stat
	tbnz	w0, #31, LBB0_13
; %bb.21:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x26, [x26, #8]
	mov	x0, x26
	bl	_strlen
	add	w1, w0, #1
	mov	x0, x26
	bl	_write_or_die
	mov	x0, x27
	mov	x1, x20
	bl	_copy_event_system
	b	LBB0_13
LBB0_22:
	mov	x0, x21
	bl	_closedir
	mov	x0, x19
	bl	_put_tracing_file
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"events"

l_.str.1:                               ; @.str.1
	.asciz	"can't read directory '%s'"

	.comm	_DT_DIR,8,3                     ; @DT_DIR
l_.str.2:                               ; @.str.2
	.asciz	"."

l_.str.3:                               ; @.str.3
	.asciz	".."

l_.str.4:                               ; @.str.4
	.asciz	"ftrace"

l_.str.5:                               ; @.str.5
	.asciz	"%s/%s"

	.no_dead_strip	_read_event_files
.subsections_via_symbols
