	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_magic_endian
_check_magic_endian:                    ## @check_magic_endian
	.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	%rcx, %r14
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, -32(%rbp)
	movq	___perf_magic1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdi
	movl	$8, %edx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	movq	-32(%rbp), %rcx
	movq	___perf_magic2@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_7
## %bb.5:
	movq	___perf_magic2_sw@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.6:
	movl	$1, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movl	%r15d, %edi
	movq	%r14, %rsi
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	callq	_try_all_pipe_abis
	jmp	LBB0_7
LBB0_3:
	callq	_try_all_file_abis
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___perf_magic1,4,2              ## @__perf_magic1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"legacy perf.data format\n"

	.comm	___perf_magic2,8,3              ## @__perf_magic2
	.comm	___perf_magic2_sw,8,3           ## @__perf_magic2_sw
	.no_dead_strip	_check_magic_endian
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_magic_endian
_check_magic_endian:                    ; @check_magic_endian
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	str	x0, [sp, #8]
Lloh0:
	adrp	x8, ___perf_magic1@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___perf_magic1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #8
	bl	_memcmp
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x8, [sp, #8]
Lloh3:
	adrp	x9, ___perf_magic2@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___perf_magic2@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	mov	w0, #0
	b	LBB0_9
LBB0_3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	x0, x20
	mov	x1, x19
	cbz	w21, LBB0_7
; %bb.4:
	bl	_try_all_pipe_abis
	b	LBB0_9
LBB0_5:
Lloh8:
	adrp	x9, ___perf_magic2_sw@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___perf_magic2_sw@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_9
LBB0_7:
	bl	_try_all_file_abis
	b	LBB0_9
LBB0_8:
	mov	w0, #-1
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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	___perf_magic1,4,2              ; @__perf_magic1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"legacy perf.data format\n"

	.comm	___perf_magic2,8,3              ; @__perf_magic2
	.comm	___perf_magic2_sw,8,3           ; @__perf_magic2_sw
	.no_dead_strip	_check_magic_endian
.subsections_via_symbols
