	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_perf_session__read_header      ## -- Begin function perf_session__read_header
	.p2align	4, 0x90
_perf_session__read_header:             ## @perf_session__read_header
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_perf_evlist__new
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	cmpq	$0, 16(%r15)
	je	LBB0_3
## %bb.29:
	movq	%r15, %rdi
	movl	%r14d, %esi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_perf_header__read_pipe         ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_3:
	leaq	24(%r15), %rsi
	leaq	-88(%rbp), %rdi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, %edx
	callq	_perf_file_header__read
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	movl	-76(%rbp), %eax
	movl	-72(%rbp), %esi
	cltd
	idivl	-88(%rbp)
	movl	%eax, %ebx
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	callq	_lseek
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	jle	LBB0_17
## %bb.6:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_7
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	callq	_lseek
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_17
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movl	%r14d, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	leaq	-104(%rbp), %rdx
	callq	_read_attr
	testq	%rax, %rax
	js	LBB0_23
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, 32(%r15)
	leaq	-96(%rbp), %rbx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_perf_event__attr_swap
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_lseek
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_perf_evsel__new
	testq	%rax, %rax
	je	LBB0_24
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %r12
	movq	32(%r15), %rax
	movq	%rax, (%r12)
	movq	(%r15), %rdi
	movq	%r12, %rsi
	callq	_perf_evlist__add
	movl	-104(%rbp), %ebx
	movl	%ebx, %r13d
	sarl	$2, %r13d
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%r13d, %edx
	callq	_perf_evsel__alloc_id
	testq	%rax, %rax
	jne	LBB0_24
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	-100(%rbp), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	callq	_lseek
	cmpl	$4, %ebx
	jl	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$2, %r13d
	movl	$1, %eax
	cmovll	%eax, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	leaq	-68(%rbp), %rdx
	movl	$4, %ecx
	callq	_perf_header__getbuffer64
	testq	%rax, %rax
	jne	LBB0_23
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	(%r15), %rdi
	movl	-68(%rbp), %r8d
	movq	%r12, %rsi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	callq	_perf_evlist__id_add
	incl	%ebx
	cmpl	%ebx, %r13d
	jne	LBB0_14
	jmp	LBB0_16
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_17:
	movq	_symbol_conf@GOTPCREL(%rip), %rax
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	cmpl	$0, -84(%rbp)
	je	LBB0_21
## %bb.18:
	movl	-80(%rbp), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	callq	_lseek
	movl	-84(%rbp), %edi
	callq	_malloc
	movq	_trace_events@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_25
## %bb.19:
	movl	-84(%rbp), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	%rax, %rdx
	callq	_perf_header__getbuffer64
	testq	%rax, %rax
	je	LBB0_20
LBB0_23:
	movq	_errno@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_20:
	movl	-84(%rbp), %eax
	sarl	$2, %eax
	movq	_trace_event_count@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_21:
	leaq	8(%r15), %rdx
	movq	_perf_file_section__process@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_perf_header__process_sections
	movl	28(%r15), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	callq	_lseek
	movq	(%r15), %rdi
	movl	8(%r15), %esi
	callq	_perf_evlist__prepare_tracepoint_events
	testq	%rax, %rax
	je	LBB0_22
LBB0_24:
	movq	(%r15), %rdi
	callq	_perf_evlist__delete
	movq	$0, (%r15)
LBB0_25:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_26:
	xorl	%ebx, %ebx
LBB0_27:
	subl	(%rax), %ebx
LBB0_28:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_symbol_conf,4,2                ## @symbol_conf
	.comm	_trace_events,8,3               ## @trace_events
	.comm	_trace_event_count,4,2          ## @trace_event_count
	.comm	_perf_file_section__process,4,2 ## @perf_file_section__process
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_perf_session__read_header      ; -- Begin function perf_session__read_header
	.p2align	2
_perf_session__read_header:             ; @perf_session__read_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x21, x1
	mov	x19, x0
	mov	x0, #0
	mov	x1, #0
	bl	_perf_evlist__new
	mov	x20, x19
	str	x0, [x20], #24
	cbz	x0, LBB0_24
; %bb.1:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_perf_header__read_pipe
LBB0_3:
	add	x0, sp, #24
	mov	x1, x20
	mov	x2, x21
	bl	_perf_file_header__read
	tbnz	x0, #63, LBB0_16
; %bb.4:
	ldp	w8, w1, [sp, #36]
	ldr	w9, [sp, #24]
Lloh0:
	adrp	x10, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x10, [x10, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x10]
	sdiv	w28, w8, w9
	mov	x0, x21
	bl	_lseek
	cmp	w28, #1
	b.lt	LBB0_17
; %bb.5:
	mov	w22, #0
	add	x8, sp, #8
	add	x23, x8, #8
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x24
	bl	_lseek
	add	w22, w22, #1
	cmp	w22, w28
	b.eq	LBB0_17
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x20
	bl	_read_attr
	tbnz	x0, #63, LBB0_20
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_perf_event__attr_swap
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh6:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #0
	bl	_lseek
	mov	x24, x0
	mov	x0, x23
	mov	x1, x22
	bl	_perf_evsel__new
	cbz	x0, LBB0_23
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x25, x0
	ldr	x8, [x19, #32]
	str	x8, [x0]
	ldr	x0, [x19]
	mov	x1, x25
	bl	_perf_evlist__add
	ldr	w26, [sp, #8]
	asr	w27, w26, #2
	mov	x0, x25
	mov	w1, #1
	mov	x2, x27
	bl	_perf_evsel__alloc_id
	cbnz	x0, LBB0_23
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [sp, #12]
Lloh9:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_lseek
	cmp	w26, #4
	b.lt	LBB0_6
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	w26, #0
	cmp	w27, #1
	csinc	w27, w27, wzr, gt
LBB0_14:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x2, sp, #4
	mov	x0, x20
	mov	x1, x21
	mov	w3, #4
	bl	_perf_header__getbuffer64
	cbnz	x0, LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	x0, [x19]
	ldr	w4, [sp, #4]
	mov	x1, x25
	mov	w2, #0
	mov	x3, x26
	bl	_perf_evlist__id_add
	add	w26, w26, #1
	cmp	w27, w26
	b.ne	LBB0_14
	b	LBB0_6
LBB0_16:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_25
LBB0_17:
Lloh14:
	adrp	x8, _symbol_conf@GOTPAGE
Lloh15:
	ldr	x8, [x8, _symbol_conf@GOTPAGEOFF]
Lloh16:
	str	w28, [x8]
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_22
; %bb.18:
	ldr	w1, [sp, #32]
Lloh17:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_lseek
	ldr	w0, [sp, #28]
	bl	_malloc
Lloh20:
	adrp	x8, _trace_events@GOTPAGE
Lloh21:
	ldr	x8, [x8, _trace_events@GOTPAGEOFF]
Lloh22:
	str	x0, [x8]
	cbz	x0, LBB0_24
; %bb.19:
	mov	x2, x0
	ldr	w3, [sp, #28]
	mov	x0, x20
	mov	x1, x21
	bl	_perf_header__getbuffer64
	cbz	x0, LBB0_21
LBB0_20:
Lloh23:
	adrp	x8, _errno@GOTPAGE
Lloh24:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	b	LBB0_25
LBB0_21:
	ldr	w8, [sp, #28]
	asr	w8, w8, #2
Lloh25:
	adrp	x9, _trace_event_count@GOTPAGE
Lloh26:
	ldr	x9, [x9, _trace_event_count@GOTPAGEOFF]
Lloh27:
	str	w8, [x9]
LBB0_22:
	add	x2, x19, #8
Lloh28:
	adrp	x8, _perf_file_section__process@GOTPAGE
Lloh29:
	ldr	x8, [x8, _perf_file_section__process@GOTPAGEOFF]
Lloh30:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_perf_header__process_sections
	ldr	w1, [x19, #28]
Lloh31:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_lseek
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
	bl	_perf_evlist__prepare_tracepoint_events
	cbz	x0, LBB0_27
LBB0_23:
	ldr	x0, [x19]
	bl	_perf_evlist__delete
	str	xzr, [x19]
LBB0_24:
Lloh34:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_26:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_27:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_26
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_symbol_conf,4,2                ; @symbol_conf
	.comm	_trace_events,8,3               ; @trace_events
	.comm	_trace_event_count,4,2          ; @trace_event_count
	.comm	_perf_file_section__process,4,2 ; @perf_file_section__process
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
