	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perf_session__open
_perf_session__open:                    ## @perf_session__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	%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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	20(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	20(%r14), %edi
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	js	LBB0_4
## %bb.8:
	leaq	-56(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	js	LBB0_13
## %bb.9:
	testl	%ebx, %ebx
	jne	LBB0_14
## %bb.10:
	movq	-56(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.11:
	xorl	%eax, %eax
	callq	_geteuid
	cmpq	%rax, %rbx
	jne	LBB0_12
LBB0_14:
	movq	-48(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.16:
	movl	4(%r14), %esi
	movq	%r14, %rdi
	callq	_perf_session__read_header
	testq	%rax, %rax
	js	LBB0_17
## %bb.19:
	movl	16(%r14), %edi
	callq	_perf_evlist__valid_sample_type
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:
	movl	16(%r14), %edi
	callq	_perf_evlist__valid_sample_id_all
	testl	%eax, %eax
	je	LBB0_22
## %bb.23:
	movq	%rbx, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_1:
	movl	$1, (%r14)
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, 4(%r14)
	movq	%r14, %rdi
	callq	_perf_session__read_header
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jns	LBB0_24
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_24
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	movl	20(%r14), %r12d
	movl	%r15d, %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pr_err
	movq	_ENOENT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_7
## %bb.5:
	movl	20(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_7:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	subl	(%r13), %ebx
	jmp	LBB0_24
LBB0_15:
	movl	20(%r14), %esi
	leaq	L_.str.7(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_13
LBB0_12:
	movl	20(%r14), %esi
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_13
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_18
LBB0_20:
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_18
LBB0_22:
	leaq	L_.str.9(%rip), %rdi
LBB0_18:
	xorl	%eax, %eax
	callq	_pr_err
LBB0_13:
	movl	4(%r14), %edi
	callq	_close
	movl	$-1, 4(%r14)
	movl	$-1, %ebx
LBB0_24:
	movl	%ebx, %eax
	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	"-"

	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
L_.str.1:                               ## @.str.1
	.asciz	"incompatible file format (rerun with -v to learn more)"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"failed to open %s: %s"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.3:                               ## @.str.3
	.asciz	"perf.data"

L_.str.4:                               ## @.str.4
	.asciz	"  (try 'perf record' first)"

L_.str.5:                               ## @.str.5
	.asciz	"\n"

L_.str.6:                               ## @.str.6
	.asciz	"file %s not owned by current user or root\n"

L_.str.7:                               ## @.str.7
	.asciz	"zero-sized file (%s), nothing to do!\n"

L_.str.8:                               ## @.str.8
	.asciz	"non matching sample_type"

L_.str.9:                               ## @.str.9
	.asciz	"non matching sample_id_all"

	.no_dead_strip	_perf_session__open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perf_session__open
_perf_session__open:                    ; @perf_session__open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_11
; %bb.1:
	ldr	w0, [x19, #20]
Lloh2:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_open
	str	w0, [x19, #4]
	tbnz	w0, #31, LBB0_13
; %bb.2:
	add	x1, sp, #16
	bl	_fstat
	tbnz	x0, #63, LBB0_24
; %bb.3:
	cbnz	w20, LBB0_6
; %bb.4:
	ldr	x20, [sp, #16]
	cbz	x20, LBB0_6
; %bb.5:
	bl	_geteuid
	cmp	x20, x0
	b.ne	LBB0_19
LBB0_6:
	ldr	x20, [sp, #24]
	cbz	x20, LBB0_18
; %bb.7:
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_perf_session__read_header
	tbnz	x0, #63, LBB0_20
; %bb.8:
	ldr	w0, [x19, #16]
	bl	_perf_evlist__valid_sample_type
	cbz	w0, LBB0_21
; %bb.9:
	ldr	w0, [x19, #16]
	bl	_perf_evlist__valid_sample_id_all
	cbz	w0, LBB0_22
; %bb.10:
	mov	w0, #0
	str	x20, [x19, #8]
	b	LBB0_25
LBB0_11:
	mov	w8, #1
	str	w8, [x19]
Lloh5:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	str	w1, [x19, #4]
	mov	x0, x19
	bl	_perf_session__read_header
	tbnz	x0, #63, LBB0_17
; %bb.12:
	mov	w0, #0
	b	LBB0_25
LBB0_13:
Lloh8:
	adrp	x21, _errno@GOTPAGE
Lloh9:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w20, [x21]
	ldr	w22, [x19, #20]
	mov	x0, x20
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
Lloh12:
	adrp	x8, _ENOENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_16
; %bb.14:
	ldr	w0, [x19, #20]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_16
; %bb.15:
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
LBB0_16:
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_err
	ldr	w8, [x21]
	neg	w0, w8
	b	LBB0_25
LBB0_17:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	mov	w0, #0
	b	LBB0_25
LBB0_18:
	ldr	w1, [x19, #20]
Lloh23:
	adrp	x0, l_.str.7@PAGE
Lloh24:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_info
	b	LBB0_24
LBB0_19:
	ldr	w8, [x19, #20]
	str	x8, [sp]
Lloh25:
	adrp	x0, l_.str.6@PAGE
Lloh26:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_23
LBB0_20:
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_23
LBB0_21:
Lloh29:
	adrp	x0, l_.str.8@PAGE
Lloh30:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_23
LBB0_22:
Lloh31:
	adrp	x0, l_.str.9@PAGE
Lloh32:
	add	x0, x0, l_.str.9@PAGEOFF
LBB0_23:
	bl	_pr_err
LBB0_24:
	ldr	w0, [x19, #4]
	bl	_close
	mov	w0, #-1
	str	w0, [x19, #4]
LBB0_25:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-"

	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
l_.str.1:                               ; @.str.1
	.asciz	"incompatible file format (rerun with -v to learn more)"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"failed to open %s: %s"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.3:                               ; @.str.3
	.asciz	"perf.data"

l_.str.4:                               ; @.str.4
	.asciz	"  (try 'perf record' first)"

l_.str.5:                               ; @.str.5
	.asciz	"\n"

l_.str.6:                               ; @.str.6
	.asciz	"file %s not owned by current user or root\n"

l_.str.7:                               ; @.str.7
	.asciz	"zero-sized file (%s), nothing to do!\n"

l_.str.8:                               ; @.str.8
	.asciz	"non matching sample_type"

l_.str.9:                               ; @.str.9
	.asciz	"non matching sample_id_all"

	.no_dead_strip	_perf_session__open
.subsections_via_symbols
