	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%rsi, %rbx
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	(%rbx), %rdi
	callq	_basename
	movq	_prog@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	cmpl	$3, %r14d
	jg	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_28:
	movl	$1, %ebx
	jmp	LBB0_29
LBB0_2:
	movq	8(%rbx), %r12
	movq	16(%rbx), %r13
	movq	24(%rbx), %rdx
	cmpl	$4, %r14d
	je	LBB0_4
## %bb.3:
	movq	%rdx, %r14
	movq	32(%rbx), %rdi
	callq	_atoi
	movq	%r14, %rdx
	movq	_verbose@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rdx, %r14
	movq	%rdx, %rdi
	callq	_fopen
	movq	_eventsfp@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movq	%r13, %rdx
	movq	%r12, %rcx
	callq	_sprintf
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	callq	_stat
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:
	movq	%rbx, %r14
	movl	(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_fprintf
	xorl	%eax, %eax
	callq	_get_maxfds
	movl	%eax, %ebx
	movq	_mapfile@GOTPCREL(%rip), %r12
	movq	$0, (%r12)
	movq	_preprocess_arch_std_files@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_nftw_ordered
	movq	_verbose@GOTPCREL(%rip), %r13
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	cmpq	$0, (%r13)
	je	LBB0_11
## %bb.10:
	movq	_prog@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.6(%rip), %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_pr_info
	jmp	LBB0_24
LBB0_5:
	movq	_prog@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_pr_err
	movl	$2, %ebx
	jmp	LBB0_29
LBB0_7:
	movq	%rbx, %r14
	movq	_prog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdi
	movq	%r12, %rdx
LBB0_17:
	xorl	%eax, %eax
	callq	_pr_info
	jmp	LBB0_24
LBB0_11:
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	je	LBB0_14
LBB0_24:
	movl	(%r14), %edi
	callq	_fclose
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_create_empty_mapping
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_free_arch_std_events
LBB0_29:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_31
## %bb.30:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_process_one_file@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_nftw_ordered
	testl	%eax, %eax
	je	LBB0_18
## %bb.15:
	cmpq	$0, (%r13)
	je	LBB0_18
## %bb.16:
	movq	_prog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdi
	movq	%r15, %rdx
	jmp	LBB0_17
LBB0_18:
	testl	%eax, %eax
	js	LBB0_12
## %bb.19:
	jne	LBB0_24
## %bb.20:
	movq	_close_table@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	%r14, %rbx
	je	LBB0_22
## %bb.21:
	movl	(%rbx), %edi
	callq	_print_events_table_suffix
LBB0_22:
	movq	(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_23
## %bb.25:
	movl	(%rbx), %edi
	callq	_process_mapfile
	testq	%rax, %rax
	je	LBB0_26
## %bb.27:
	movq	_prog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rdx
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	jmp	LBB0_28
LBB0_12:
	xorl	%eax, %eax
	callq	_free_arch_std_events
	jmp	LBB0_28
LBB0_23:
	movq	_prog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	jmp	LBB0_24
LBB0_26:
	xorl	%ebx, %ebx
	jmp	LBB0_29
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.comm	_prog,4,2                       ## @prog
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Usage: %s <arch> <starting_dir> <output_file>\n"

	.comm	_verbose,8,3                    ## @verbose
L_.str.1:                               ## @.str.1
	.asciz	"w"

	.comm	_eventsfp,4,2                   ## @eventsfp
L_.str.2:                               ## @.str.2
	.asciz	"%s Unable to create required file %s (%s)\n"

	.comm	_errno,4,2                      ## @errno
L_.str.3:                               ## @.str.3
	.asciz	"%s/%s"

L_.str.4:                               ## @.str.4
	.asciz	"%s: Arch %s has no PMU event lists\n"

L_.str.5:                               ## @.str.5
	.asciz	"#include \"pmu-events/pmu-events.h\"\n"

	.comm	_mapfile,8,3                    ## @mapfile
	.comm	_preprocess_arch_std_files,4,2  ## @preprocess_arch_std_files
L_.str.6:                               ## @.str.6
	.asciz	"%s: Error preprocessing arch standard files %s: %s\n"

	.comm	_process_one_file,4,2           ## @process_one_file
L_.str.7:                               ## @.str.7
	.asciz	"%s: Error walking file tree %s\n"

	.comm	_close_table,8,3                ## @close_table
L_.str.8:                               ## @.str.8
	.asciz	"%s: No CPU->JSON mapping?\n"

L_.str.9:                               ## @.str.9
	.asciz	"%s: Error processing mapfile %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x22, x1
	mov	x24, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x0, [x1]
	bl	_basename
Lloh8:
	adrp	x25, _prog@GOTPAGE
Lloh9:
	ldr	x25, [x25, _prog@GOTPAGEOFF]
	str	w0, [x25]
	cmp	w24, #3
	b.gt	LBB0_3
; %bb.1:
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_2:
	mov	w0, #1
	b	LBB0_23
LBB0_3:
	ldp	x21, x23, [x22, #8]
	ldr	x19, [x22, #24]
	cmp	w24, #4
	b.eq	LBB0_5
; %bb.4:
	ldr	x0, [x22, #32]
	bl	_atoi
Lloh12:
	adrp	x8, _verbose@GOTPAGE
Lloh13:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh14:
	str	x0, [x8]
LBB0_5:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fopen
Lloh17:
	adrp	x22, _eventsfp@GOTPAGE
Lloh18:
	ldr	x22, [x22, _eventsfp@GOTPAGEOFF]
	str	w0, [x22]
	cbz	w0, LBB0_18
; %bb.6:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	mov	x3, x21
	bl	_sprintf
	sub	x1, x29, #80
	mov	x0, x20
	bl	_stat
	tbnz	x0, #63, LBB0_19
; %bb.7:
	ldr	w0, [x22]
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
	bl	_get_maxfds
	mov	x21, x0
Lloh23:
	adrp	x23, _mapfile@GOTPAGE
Lloh24:
	ldr	x23, [x23, _mapfile@GOTPAGEOFF]
	str	xzr, [x23]
Lloh25:
	adrp	x8, _preprocess_arch_std_files@GOTPAGE
Lloh26:
	ldr	x8, [x8, _preprocess_arch_std_files@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	mov	w3, #0
	bl	_nftw_ordered
Lloh28:
	adrp	x24, _verbose@GOTPAGE
Lloh29:
	ldr	x24, [x24, _verbose@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	w0, #0
	ccmp	x8, #0, #4, ne
	b.ne	LBB0_20
; %bb.8:
	tbnz	w0, #31, LBB0_25
; %bb.9:
	cbnz	w0, LBB0_22
; %bb.10:
Lloh30:
	adrp	x8, _process_one_file@GOTPAGE
Lloh31:
	ldr	x8, [x8, _process_one_file@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	mov	w3, #0
	bl	_nftw_ordered
	ldr	x8, [x24]
	cmp	w0, #0
	ccmp	x8, #0, #4, ne
	b.ne	LBB0_26
; %bb.11:
	tbnz	w0, #31, LBB0_25
; %bb.12:
	cbnz	w0, LBB0_22
; %bb.13:
Lloh33:
	adrp	x8, _close_table@GOTPAGE
Lloh34:
	ldr	x8, [x8, _close_table@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	w0, [x22]
	bl	_print_events_table_suffix
LBB0_15:
	ldr	x1, [x23]
	cbz	x1, LBB0_27
; %bb.16:
	ldr	w0, [x22]
	bl	_process_mapfile
	cbz	x0, LBB0_23
; %bb.17:
	ldr	w1, [x25]
	ldr	x8, [x23]
	str	x8, [sp, #-16]!
Lloh36:
	adrp	x0, l_.str.9@PAGE
Lloh37:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_pr_info
	add	sp, sp, #16
	b	LBB0_2
LBB0_18:
	ldr	w20, [x25]
Lloh38:
	adrp	x8, _errno@GOTPAGE
Lloh39:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp, #-16]!
Lloh41:
	adrp	x0, l_.str.2@PAGE
Lloh42:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_pr_err
	add	sp, sp, #16
	mov	w0, #2
	b	LBB0_23
LBB0_19:
	ldr	w1, [x25]
	str	x21, [sp, #-16]!
Lloh43:
	adrp	x0, l_.str.4@PAGE
Lloh44:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_21
LBB0_20:
	ldr	w21, [x25]
Lloh45:
	adrp	x8, _errno@GOTPAGE
Lloh46:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh47:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp, #-16]!
Lloh48:
	adrp	x0, l_.str.6@PAGE
Lloh49:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x21
LBB0_21:
	bl	_pr_info
	add	sp, sp, #16
LBB0_22:
	ldr	w0, [x22]
	bl	_fclose
	mov	x0, x19
	bl	_create_empty_mapping
	bl	_free_arch_std_events
	mov	w0, #0
LBB0_23:
	ldur	x8, [x29, #-72]
Lloh50:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh51:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.24:
	sub	sp, x29, #64
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_25:
	bl	_free_arch_std_events
	b	LBB0_2
LBB0_26:
	ldr	w1, [x25]
	str	x20, [sp, #-16]!
Lloh53:
	adrp	x0, l_.str.7@PAGE
Lloh54:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_21
LBB0_27:
	ldr	w1, [x25]
Lloh55:
	adrp	x0, l_.str.8@PAGE
Lloh56:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_pr_info
	b	LBB0_22
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.comm	_prog,4,2                       ; @prog
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Usage: %s <arch> <starting_dir> <output_file>\n"

	.comm	_verbose,8,3                    ; @verbose
l_.str.1:                               ; @.str.1
	.asciz	"w"

	.comm	_eventsfp,4,2                   ; @eventsfp
l_.str.2:                               ; @.str.2
	.asciz	"%s Unable to create required file %s (%s)\n"

	.comm	_errno,4,2                      ; @errno
l_.str.3:                               ; @.str.3
	.asciz	"%s/%s"

l_.str.4:                               ; @.str.4
	.asciz	"%s: Arch %s has no PMU event lists\n"

l_.str.5:                               ; @.str.5
	.asciz	"#include \"pmu-events/pmu-events.h\"\n"

	.comm	_mapfile,8,3                    ; @mapfile
	.comm	_preprocess_arch_std_files,4,2  ; @preprocess_arch_std_files
l_.str.6:                               ; @.str.6
	.asciz	"%s: Error preprocessing arch standard files %s: %s\n"

	.comm	_process_one_file,4,2           ; @process_one_file
l_.str.7:                               ; @.str.7
	.asciz	"%s: Error walking file tree %s\n"

	.comm	_close_table,8,3                ; @close_table
l_.str.8:                               ; @.str.8
	.asciz	"%s: No CPU->JSON mapping?\n"

l_.str.9:                               ; @.str.9
	.asciz	"%s: Error processing mapfile %s\n"

.subsections_via_symbols
