#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void show_counters_help(void) {
  int i = 1;
  printf("cpu counter type can be one of the below, make sure no error is "
         "recieved\n");
  printf("for example: tcc 11 2 1 4\n");
  printf("%d: MV_CPU_CNTRS_CYCLES\n", i++);
  printf("%d: MV_CPU_CNTRS_ICACHE_READ_MISS\n", i++);
  printf("%d: MV_CPU_CNTRS_DCACHE_ACCESS\n", i++);
  printf("%d: MV_CPU_CNTRS_DCACHE_READ_MISS\n", i++);
  printf("%d: MV_CPU_CNTRS_DCACHE_READ_HIT\n", i++);
  printf("%d: MV_CPU_CNTRS_DCACHE_WRITE_MISS\n", i++);
  printf("%d: MV_CPU_CNTRS_DCACHE_WRITE_HIT\n", i++);
  printf("%d: MV_CPU_CNTRS_DTLB_MISS\n", i++);
  printf("%d: MV_CPU_CNTRS_TLB_MISS\n", i++);
  printf("%d: MV_CPU_CNTRS_ITLB_MISS\n", i++);
  printf("%d: MV_CPU_CNTRS_INSTRUCTIONS\n", i++);
  printf("%d: MV_CPU_CNTRS_SINGLE_ISSUE\n", i++);
  printf("%d: MV_CPU_CNTRS_MMU_READ_LATENCY\n", i++);
  printf("%d: MV_CPU_CNTRS_MMU_READ_BEAT\n", i++);
  printf("%d: MV_CPU_CNTRS_BRANCH_RETIRED\n", i++);
  printf("%d: MV_CPU_CNTRS_BRANCH_TAKEN\n", i++);
  printf("%d: MV_CPU_CNTRS_BRANCH_PREDICT_MISS\n", i++);
  printf("%d: MV_CPU_CNTRS_BRANCH_PREDICT_COUNT\n", i++);
  printf("%d: MV_CPU_CNTRS_WB_FULL_CYCLES\n", i++);
  printf("%d: MV_CPU_CNTRS_WB_WRITE_LATENCY\n", i++);
  printf("%d: MV_CPU_CNTRS_WB_WRITE_BEAT\n", i++);
  printf("%d: MV_CPU_CNTRS_ICACHE_READ_LATENCY\n", i++);
  printf("%d: MV_CPU_CNTRS_ICACHE_READ_BEAT\n", i++);
  printf("%d: MV_CPU_CNTRS_DCACHE_READ_LATENCY\n", i++);
  printf("%d: MV_CPU_CNTRS_DCACHE_READ_BEAT\n", i++);
  printf("%d: MV_CPU_CNTRS_DCACHE_WRITE_LATENCY\n", i++);
  printf("%d: MV_CPU_CNTRS_DCACHE_WRITE_BEAT\n", i++);
  printf("%d: MV_CPU_CNTRS_LDM_STM_HOLD\n", i++);
  printf("%d: MV_CPU_CNTRS_IS_HOLD\n", i++);
  printf("%d: MV_CPU_CNTRS_DATA_WRITE_ACCESS\n", i++);
  printf("%d: MV_CPU_CNTRS_DATA_READ_ACCESS\n", i++);
  printf("%d: MV_CPU_CNTRS_BIU_SIMULT_ACCESS\n", i++);
  printf("%d: MV_CPU_CNTRS_BIU_ANY_ACCESS\n", i++);
}


x86 assembly (clang, -O0):
<show_counters_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xfa7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xfb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xfb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xfc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xfcf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xfdc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xfe6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xff4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xfff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0x1005(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0x1006(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0x1011(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0x101b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0x1026(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_counters_help>:
push   %rax
lea    0x1327(%rip),%rdi
call   1030 <puts@plt>
lea    0x1364(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf02(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf13(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf23(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf2c(%rip),%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf34(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf3d(%rip),%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf49(%rip),%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf55(%rip),%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf65(%rip),%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf72(%rip),%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf80(%rip),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf8c(%rip),%rdi
mov    $0x11,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf9f(%rip),%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfb3(%rip),%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfc1(%rip),%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfd1(%rip),%rdi
mov    $0x15,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfde(%rip),%rdi
mov    $0x16,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xff1(%rip),%rdi
mov    $0x17,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1001(%rip),%rdi
mov    $0x18,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1014(%rip),%rdi
mov    $0x19,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1024(%rip),%rdi
mov    $0x1a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1038(%rip),%rdi
mov    $0x1b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1049(%rip),%rdi
mov    $0x1c,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1055(%rip),%rdi
mov    $0x1d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x105c(%rip),%rdi
mov    $0x1e,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x106d(%rip),%rdi
mov    $0x1f,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x107d(%rip),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x108e(%rip),%rdi
mov    $0x21,%esi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [74 x i8] c"cpu counter type can be one of the below, make sure no error is recieved\0A\00"
@.str.1 = [27 x i8] c"for example: tcc 11 2 1 4\0A\00"
@.str.2 = [25 x i8] c"%d: MV_CPU_CNTRS_CYCLES\0A\00"
@.str.3 = [35 x i8] c"%d: MV_CPU_CNTRS_ICACHE_READ_MISS\0A\00"
@.str.4 = [32 x i8] c"%d: MV_CPU_CNTRS_DCACHE_ACCESS\0A\00"
@.str.5 = [35 x i8] c"%d: MV_CPU_CNTRS_DCACHE_READ_MISS\0A\00"
@.str.6 = [34 x i8] c"%d: MV_CPU_CNTRS_DCACHE_READ_HIT\0A\00"
@.str.7 = [36 x i8] c"%d: MV_CPU_CNTRS_DCACHE_WRITE_MISS\0A\00"
@.str.8 = [35 x i8] c"%d: MV_CPU_CNTRS_DCACHE_WRITE_HIT\0A\00"
@.str.9 = [28 x i8] c"%d: MV_CPU_CNTRS_DTLB_MISS\0A\00"
@.str.10 = [27 x i8] c"%d: MV_CPU_CNTRS_TLB_MISS\0A\00"
@.str.11 = [28 x i8] c"%d: MV_CPU_CNTRS_ITLB_MISS\0A\00"
@.str.12 = [31 x i8] c"%d: MV_CPU_CNTRS_INSTRUCTIONS\0A\00"
@.str.13 = [31 x i8] c"%d: MV_CPU_CNTRS_SINGLE_ISSUE\0A\00"
@.str.14 = [35 x i8] c"%d: MV_CPU_CNTRS_MMU_READ_LATENCY\0A\00"
@.str.15 = [32 x i8] c"%d: MV_CPU_CNTRS_MMU_READ_BEAT\0A\00"
@.str.16 = [33 x i8] c"%d: MV_CPU_CNTRS_BRANCH_RETIRED\0A\00"
@.str.17 = [31 x i8] c"%d: MV_CPU_CNTRS_BRANCH_TAKEN\0A\00"
@.str.18 = [38 x i8] c"%d: MV_CPU_CNTRS_BRANCH_PREDICT_MISS\0A\00"
@.str.19 = [39 x i8] c"%d: MV_CPU_CNTRS_BRANCH_PREDICT_COUNT\0A\00"
@.str.20 = [33 x i8] c"%d: MV_CPU_CNTRS_WB_FULL_CYCLES\0A\00"
@.str.21 = [35 x i8] c"%d: MV_CPU_CNTRS_WB_WRITE_LATENCY\0A\00"
@.str.22 = [32 x i8] c"%d: MV_CPU_CNTRS_WB_WRITE_BEAT\0A\00"
@.str.23 = [38 x i8] c"%d: MV_CPU_CNTRS_ICACHE_READ_LATENCY\0A\00"
@.str.24 = [35 x i8] c"%d: MV_CPU_CNTRS_ICACHE_READ_BEAT\0A\00"
@.str.25 = [38 x i8] c"%d: MV_CPU_CNTRS_DCACHE_READ_LATENCY\0A\00"
@.str.26 = [35 x i8] c"%d: MV_CPU_CNTRS_DCACHE_READ_BEAT\0A\00"
@.str.27 = [39 x i8] c"%d: MV_CPU_CNTRS_DCACHE_WRITE_LATENCY\0A\00"
@.str.28 = [36 x i8] c"%d: MV_CPU_CNTRS_DCACHE_WRITE_BEAT\0A\00"
@.str.29 = [31 x i8] c"%d: MV_CPU_CNTRS_LDM_STM_HOLD\0A\00"
@.str.30 = [26 x i8] c"%d: MV_CPU_CNTRS_IS_HOLD\0A\00"
@.str.31 = [36 x i8] c"%d: MV_CPU_CNTRS_DATA_WRITE_ACCESS\0A\00"
@.str.32 = [35 x i8] c"%d: MV_CPU_CNTRS_DATA_READ_ACCESS\0A\00"
@.str.33 = [36 x i8] c"%d: MV_CPU_CNTRS_BIU_SIMULT_ACCESS\0A\00"
@.str.34 = [33 x i8] c"%d: MV_CPU_CNTRS_BIU_ANY_ACCESS\0A\00"
define void @show_counters_help() {
%1 = alloca i32
store i32 1, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %13)
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %16)
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i32 %19)
%22 = load i32, i32* %1
%23 = add nsw i32 %22, 1
store i32 %23, i32* %1
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %22)
%25 = load i32, i32* %1
%26 = add nsw i32 %25, 1
store i32 %26, i32* %1
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i32 %25)
%28 = load i32, i32* %1
%29 = add nsw i32 %28, 1
store i32 %29, i32* %1
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0), i32 %28)
%31 = load i32, i32* %1
%32 = add nsw i32 %31, 1
store i32 %32, i32* %1
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i32 %31)
%34 = load i32, i32* %1
%35 = add nsw i32 %34, 1
store i32 %35, i32* %1
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0), i32 %34)
%37 = load i32, i32* %1
%38 = add nsw i32 %37, 1
store i32 %38, i32* %1
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0), i32 %37)
%40 = load i32, i32* %1
%41 = add nsw i32 %40, 1
store i32 %41, i32* %1
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), i32 %40)
%43 = load i32, i32* %1
%44 = add nsw i32 %43, 1
store i32 %44, i32* %1
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i32 %43)
%46 = load i32, i32* %1
%47 = add nsw i32 %46, 1
store i32 %47, i32* %1
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0), i32 %46)
%49 = load i32, i32* %1
%50 = add nsw i32 %49, 1
store i32 %50, i32* %1
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0), i32 %49)
%52 = load i32, i32* %1
%53 = add nsw i32 %52, 1
store i32 %53, i32* %1
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.18, i64 0, i64 0), i32 %52)
%55 = load i32, i32* %1
%56 = add nsw i32 %55, 1
store i32 %56, i32* %1
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.19, i64 0, i64 0), i32 %55)
%58 = load i32, i32* %1
%59 = add nsw i32 %58, 1
store i32 %59, i32* %1
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.20, i64 0, i64 0), i32 %58)
%61 = load i32, i32* %1
%62 = add nsw i32 %61, 1
store i32 %62, i32* %1
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.21, i64 0, i64 0), i32 %61)
%64 = load i32, i32* %1
%65 = add nsw i32 %64, 1
store i32 %65, i32* %1
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.22, i64 0, i64 0), i32 %64)
%67 = load i32, i32* %1
%68 = add nsw i32 %67, 1
store i32 %68, i32* %1
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.23, i64 0, i64 0), i32 %67)
%70 = load i32, i32* %1
%71 = add nsw i32 %70, 1
store i32 %71, i32* %1
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0), i32 %70)
%73 = load i32, i32* %1
%74 = add nsw i32 %73, 1
store i32 %74, i32* %1
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.25, i64 0, i64 0), i32 %73)
%76 = load i32, i32* %1
%77 = add nsw i32 %76, 1
store i32 %77, i32* %1
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.26, i64 0, i64 0), i32 %76)
%79 = load i32, i32* %1
%80 = add nsw i32 %79, 1
store i32 %80, i32* %1
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.27, i64 0, i64 0), i32 %79)
%82 = load i32, i32* %1
%83 = add nsw i32 %82, 1
store i32 %83, i32* %1
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.28, i64 0, i64 0), i32 %82)
%85 = load i32, i32* %1
%86 = add nsw i32 %85, 1
store i32 %86, i32* %1
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.29, i64 0, i64 0), i32 %85)
%88 = load i32, i32* %1
%89 = add nsw i32 %88, 1
store i32 %89, i32* %1
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.30, i64 0, i64 0), i32 %88)
%91 = load i32, i32* %1
%92 = add nsw i32 %91, 1
store i32 %92, i32* %1
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.31, i64 0, i64 0), i32 %91)
%94 = load i32, i32* %1
%95 = add nsw i32 %94, 1
store i32 %95, i32* %1
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.32, i64 0, i64 0), i32 %94)
%97 = load i32, i32* %1
%98 = add nsw i32 %97, 1
store i32 %98, i32* %1
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0), i32 %97)
%100 = load i32, i32* %1
%101 = add nsw i32 %100, 1
store i32 %101, i32* %1
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.34, i64 0, i64 0), i32 %100)
ret void
}

LLVM IR (-O2):
@.str.2 = [25 x i8] c"%d: MV_CPU_CNTRS_CYCLES\0A\00"
@.str.3 = [35 x i8] c"%d: MV_CPU_CNTRS_ICACHE_READ_MISS\0A\00"
@.str.4 = [32 x i8] c"%d: MV_CPU_CNTRS_DCACHE_ACCESS\0A\00"
@.str.5 = [35 x i8] c"%d: MV_CPU_CNTRS_DCACHE_READ_MISS\0A\00"
@.str.6 = [34 x i8] c"%d: MV_CPU_CNTRS_DCACHE_READ_HIT\0A\00"
@.str.7 = [36 x i8] c"%d: MV_CPU_CNTRS_DCACHE_WRITE_MISS\0A\00"
@.str.8 = [35 x i8] c"%d: MV_CPU_CNTRS_DCACHE_WRITE_HIT\0A\00"
@.str.9 = [28 x i8] c"%d: MV_CPU_CNTRS_DTLB_MISS\0A\00"
@.str.10 = [27 x i8] c"%d: MV_CPU_CNTRS_TLB_MISS\0A\00"
@.str.11 = [28 x i8] c"%d: MV_CPU_CNTRS_ITLB_MISS\0A\00"
@.str.12 = [31 x i8] c"%d: MV_CPU_CNTRS_INSTRUCTIONS\0A\00"
@.str.13 = [31 x i8] c"%d: MV_CPU_CNTRS_SINGLE_ISSUE\0A\00"
@.str.14 = [35 x i8] c"%d: MV_CPU_CNTRS_MMU_READ_LATENCY\0A\00"
@.str.15 = [32 x i8] c"%d: MV_CPU_CNTRS_MMU_READ_BEAT\0A\00"
@.str.16 = [33 x i8] c"%d: MV_CPU_CNTRS_BRANCH_RETIRED\0A\00"
@.str.17 = [31 x i8] c"%d: MV_CPU_CNTRS_BRANCH_TAKEN\0A\00"
@.str.18 = [38 x i8] c"%d: MV_CPU_CNTRS_BRANCH_PREDICT_MISS\0A\00"
@.str.19 = [39 x i8] c"%d: MV_CPU_CNTRS_BRANCH_PREDICT_COUNT\0A\00"
@.str.20 = [33 x i8] c"%d: MV_CPU_CNTRS_WB_FULL_CYCLES\0A\00"
@.str.21 = [35 x i8] c"%d: MV_CPU_CNTRS_WB_WRITE_LATENCY\0A\00"
@.str.22 = [32 x i8] c"%d: MV_CPU_CNTRS_WB_WRITE_BEAT\0A\00"
@.str.23 = [38 x i8] c"%d: MV_CPU_CNTRS_ICACHE_READ_LATENCY\0A\00"
@.str.24 = [35 x i8] c"%d: MV_CPU_CNTRS_ICACHE_READ_BEAT\0A\00"
@.str.25 = [38 x i8] c"%d: MV_CPU_CNTRS_DCACHE_READ_LATENCY\0A\00"
@.str.26 = [35 x i8] c"%d: MV_CPU_CNTRS_DCACHE_READ_BEAT\0A\00"
@.str.27 = [39 x i8] c"%d: MV_CPU_CNTRS_DCACHE_WRITE_LATENCY\0A\00"
@.str.28 = [36 x i8] c"%d: MV_CPU_CNTRS_DCACHE_WRITE_BEAT\0A\00"
@.str.29 = [31 x i8] c"%d: MV_CPU_CNTRS_LDM_STM_HOLD\0A\00"
@.str.30 = [26 x i8] c"%d: MV_CPU_CNTRS_IS_HOLD\0A\00"
@.str.31 = [36 x i8] c"%d: MV_CPU_CNTRS_DATA_WRITE_ACCESS\0A\00"
@.str.32 = [35 x i8] c"%d: MV_CPU_CNTRS_DATA_READ_ACCESS\0A\00"
@.str.33 = [36 x i8] c"%d: MV_CPU_CNTRS_BIU_SIMULT_ACCESS\0A\00"
@.str.34 = [33 x i8] c"%d: MV_CPU_CNTRS_BIU_ANY_ACCESS\0A\00"
@str = [73 x i8] c"cpu counter type can be one of the below, make sure no error is recieved\00"
@str.35 = [26 x i8] c"for example: tcc 11 2 1 4\00"
define void @show_counters_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.35, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 2)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 3)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 4)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 5)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i32 6)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 7)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i32 8)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0), i32 9)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i32 10)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0), i32 11)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0), i32 12)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), i32 13)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i32 14)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0), i32 15)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0), i32 16)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.18, i64 0, i64 0), i32 17)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.19, i64 0, i64 0), i32 18)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.20, i64 0, i64 0), i32 19)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.21, i64 0, i64 0), i32 20)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.22, i64 0, i64 0), i32 21)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.23, i64 0, i64 0), i32 22)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0), i32 23)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.25, i64 0, i64 0), i32 24)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.26, i64 0, i64 0), i32 25)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.27, i64 0, i64 0), i32 26)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.28, i64 0, i64 0), i32 27)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.29, i64 0, i64 0), i32 28)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.30, i64 0, i64 0), i32 29)
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.31, i64 0, i64 0), i32 30)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.32, i64 0, i64 0), i32 31)
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0), i32 32)
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.34, i64 0, i64 0), i32 33)
ret void
}