#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 detect();
int /*<<< orphan*/ printf(char *);
void get_cpuconfig(void) {
  int d = detect();
  switch (d) {
  case 1:
    printf("#define ARMV8\n");
    printf("#define L1_DATA_SIZE 32768\n");
    printf("#define L1_DATA_LINESIZE 64\n");
    printf("#define L2_SIZE 262144\n");
    printf("#define L2_LINESIZE 64\n");
    printf("#define DTB_DEFAULT_ENTRIES 64\n");
    printf("#define DTB_SIZE 4096\n");
    printf("#define L2_ASSOCIATIVE 4\n");
    break;
  case 3:
    printf("#define VULCAN                        \n");
    printf("#define HAVE_VFP                      \n");
    printf("#define HAVE_VFPV3                    \n");
    printf("#define HAVE_NEON                     \n");
    printf("#define HAVE_VFPV4                    \n");
    printf("#define L1_CODE_SIZE         32768    \n");
    printf("#define L1_CODE_LINESIZE     64       \n");
    printf("#define L1_CODE_ASSOCIATIVE  8        \n");
    printf("#define L1_DATA_SIZE         32768    \n");
    printf("#define L1_DATA_LINESIZE     64       \n");
    printf("#define L1_DATA_ASSOCIATIVE  8        \n");
    printf("#define L2_SIZE              262144   \n");
    printf("#define L2_LINESIZE          64       \n");
    printf("#define L2_ASSOCIATIVE       8        \n");
    printf("#define L3_SIZE              33554432 \n");
    printf("#define L3_LINESIZE          64       \n");
    printf("#define L3_ASSOCIATIVE       32       \n");
    printf("#define DTB_DEFAULT_ENTRIES  64       \n");
    printf("#define DTB_SIZE             4096     \n");
    break;
  case 2:
    printf("#define CORTEXA57\n");
    printf("#define HAVE_VFP\n");
    printf("#define HAVE_VFPV3\n");
    printf("#define HAVE_NEON\n");
    printf("#define HAVE_VFPV4\n");
    printf("#define L1_CODE_SIZE 49152\n");
    printf("#define L1_CODE_LINESIZE 64\n");
    printf("#define L1_CODE_ASSOCIATIVE 3\n");
    printf("#define L1_DATA_SIZE 32768\n");
    printf("#define L1_DATA_LINESIZE 64\n");
    printf("#define L1_DATA_ASSOCIATIVE 2\n");
    printf("#define L2_SIZE 2097152\n");
    printf("#define L2_LINESIZE 64\n");
    printf("#define L2_ASSOCIATIVE 16\n");
    printf("#define DTB_DEFAULT_ENTRIES 64\n");
    printf("#define DTB_SIZE 4096\n");
    break;
  case 4:
    printf("#define ARMV8\n");
    printf("#define THUNDERX\n");
    printf("#define L1_DATA_SIZE 32768\n");
    printf("#define L1_DATA_LINESIZE 128\n");
    printf("#define L2_SIZE 16777216\n");
    printf("#define L2_LINESIZE 128\n");
    printf("#define DTB_DEFAULT_ENTRIES 64\n");
    printf("#define DTB_SIZE 4096\n");
    printf("#define L2_ASSOCIATIVE 16\n");
    break;
  case 5:
    printf("#define VULCAN                        \n");
    printf("#define HAVE_VFP                      \n");
    printf("#define HAVE_VFPV3                    \n");
    printf("#define HAVE_NEON                     \n");
    printf("#define HAVE_VFPV4                    \n");
    printf("#define L1_CODE_SIZE         32768    \n");
    printf("#define L1_CODE_LINESIZE     64       \n");
    printf("#define L1_CODE_ASSOCIATIVE  8        \n");
    printf("#define L1_DATA_SIZE         32768    \n");
    printf("#define L1_DATA_LINESIZE     64       \n");
    printf("#define L1_DATA_ASSOCIATIVE  8        \n");
    printf("#define L2_SIZE              262144   \n");
    printf("#define L2_LINESIZE          64       \n");
    printf("#define L2_ASSOCIATIVE       8        \n");
    printf("#define L3_SIZE              33554432 \n");
    printf("#define L3_LINESIZE          64       \n");
    printf("#define L3_ASSOCIATIVE       32       \n");
    printf("#define DTB_DEFAULT_ENTRIES  64       \n");
    printf("#define DTB_SIZE             4096     \n");
    break;
  }
}


x86 assembly (clang, -O0):
<get_cpuconfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <detect@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x4,%eax
ja     14c3 <get_cpuconfig+0x3a3>
mov    -0x10(%rbp),%rax
lea    0xeae(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
call   1030 <printf@plt>
jmp    14c3 <get_cpuconfig+0x3a3>
lea    0xf16(%rip),%rdi
call   1030 <printf@plt>
lea    0xf32(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4e(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf86(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa2(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbe(%rip),%rdi
call   1030 <printf@plt>
lea    0xfda(%rip),%rdi
call   1030 <printf@plt>
lea    0xff6(%rip),%rdi
call   1030 <printf@plt>
lea    0x1012(%rip),%rdi
call   1030 <printf@plt>
lea    0x102e(%rip),%rdi
call   1030 <printf@plt>
lea    0x104a(%rip),%rdi
call   1030 <printf@plt>
lea    0x1066(%rip),%rdi
call   1030 <printf@plt>
lea    0x1082(%rip),%rdi
call   1030 <printf@plt>
lea    0x109e(%rip),%rdi
call   1030 <printf@plt>
lea    0x10ba(%rip),%rdi
call   1030 <printf@plt>
lea    0x10d6(%rip),%rdi
call   1030 <printf@plt>
lea    0x10f2(%rip),%rdi
call   1030 <printf@plt>
lea    0x110e(%rip),%rdi
call   1030 <printf@plt>
jmp    14c3 <get_cpuconfig+0x3a3>
lea    0x1125(%rip),%rdi
call   1030 <printf@plt>
lea    0x112c(%rip),%rdi
call   1030 <printf@plt>
lea    0x1132(%rip),%rdi
call   1030 <printf@plt>
lea    0x113a(%rip),%rdi
call   1030 <printf@plt>
lea    0x1141(%rip),%rdi
call   1030 <printf@plt>
lea    0x1149(%rip),%rdi
call   1030 <printf@plt>
lea    0x1159(%rip),%rdi
call   1030 <printf@plt>
lea    0x116a(%rip),%rdi
call   1030 <printf@plt>
lea    0xd13(%rip),%rdi
call   1030 <printf@plt>
lea    0xd23(%rip),%rdi
call   1030 <printf@plt>
lea    0x1165(%rip),%rdi
call   1030 <printf@plt>
lea    0x1178(%rip),%rdi
call   1030 <printf@plt>
lea    0xd34(%rip),%rdi
call   1030 <printf@plt>
lea    0x1179(%rip),%rdi
call   1030 <printf@plt>
lea    0xd34(%rip),%rdi
call   1030 <printf@plt>
lea    0xd48(%rip),%rdi
call   1030 <printf@plt>
jmp    14c3 <get_cpuconfig+0x3a3>
lea    0xc9f(%rip),%rdi
call   1030 <printf@plt>
lea    0x115f(%rip),%rdi
call   1030 <printf@plt>
lea    0xc96(%rip),%rdi
call   1030 <printf@plt>
lea    0x1159(%rip),%rdi
call   1030 <printf@plt>
lea    0x116b(%rip),%rdi
call   1030 <printf@plt>
lea    0x1179(%rip),%rdi
call   1030 <printf@plt>
lea    0xccf(%rip),%rdi
call   1030 <printf@plt>
lea    0xce3(%rip),%rdi
call   1030 <printf@plt>
lea    0x10f0(%rip),%rdi
call   1030 <printf@plt>
jmp    14c3 <get_cpuconfig+0x3a3>
lea    0xcf7(%rip),%rdi
call   1030 <printf@plt>
lea    0xd13(%rip),%rdi
call   1030 <printf@plt>
lea    0xd2f(%rip),%rdi
call   1030 <printf@plt>
lea    0xd4b(%rip),%rdi
call   1030 <printf@plt>
lea    0xd67(%rip),%rdi
call   1030 <printf@plt>
lea    0xd83(%rip),%rdi
call   1030 <printf@plt>
lea    0xd9f(%rip),%rdi
call   1030 <printf@plt>
lea    0xdbb(%rip),%rdi
call   1030 <printf@plt>
lea    0xdd7(%rip),%rdi
call   1030 <printf@plt>
lea    0xdf3(%rip),%rdi
call   1030 <printf@plt>
lea    0xe0f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe2b(%rip),%rdi
call   1030 <printf@plt>
lea    0xe47(%rip),%rdi
call   1030 <printf@plt>
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cpuconfig>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
xor    %eax,%eax
call   1040 <detect@plt>
add    $0xffffffff,%eax
cmp    $0x4,%eax
ja     13c8 <get_cpuconfig+0x2a8>
lea    0xf13(%rip),%rcx
mov    %rcx,(%rsp)
lea    0xeef(%rip),%rcx
mov    %rcx,0x40(%rsp)
lea    0xec6(%rip),%rcx
mov    %rcx,0x38(%rsp)
lea    0xea9(%rip),%r15
lea    0xfe7(%rip),%rsi
lea    0xfc8(%rip),%r8
lea    0xfa3(%rip),%r9
lea    0xf7e(%rip),%r10
lea    0xf5b(%rip),%r11
lea    0xf39(%rip),%rcx
mov    %rcx,0x30(%rsp)
lea    0xf1a(%rip),%rcx
mov    %rcx,0x28(%rsp)
lea    0xefc(%rip),%rcx
mov    %rcx,0x20(%rsp)
lea    0xedd(%rip),%rcx
mov    %rcx,0x18(%rsp)
lea    0xe3b(%rip),%rdx
movslq (%rdx,%rax,4),%rcx
add    %rdx,%rcx
lea    0xeb2(%rip),%rdx
lea    0xe99(%rip),%rdi
lea    0x131f(%rip),%r14
lea    0x1302(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0x12d7(%rip),%r13
lea    0x12b9(%rip),%r12
lea    0x129b(%rip),%rbp
lea    0x1278(%rip),%rbx
lea    0x1256(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x123c(%rip),%rax
jmp    *%rcx
lea    0xf4e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf69(%rip),%rdi
call   1030 <puts@plt>
lea    0xf84(%rip),%rdi
call   1030 <puts@plt>
lea    0x11e8(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0x11b5(%rip),%r13
lea    0x1187(%rip),%rsi
lea    0x1159(%rip),%r12
lea    0x112b(%rip),%r8
lea    0x10fd(%rip),%r9
lea    0x10cf(%rip),%rbx
lea    0x10a1(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x106e(%rip),%r10
lea    0x1040(%rip),%r11
lea    0x1012(%rip),%rax
mov    %rax,0x30(%rsp)
lea    0xfdf(%rip),%rax
mov    %rax,0x28(%rsp)
lea    0xfac(%rip),%rax
mov    %rax,0x20(%rsp)
lea    0xf79(%rip),%rax
mov    %rax,0x18(%rsp)
lea    0xf46(%rip),%rdx
lea    0xf18(%rip),%rdi
mov    %r8,(%rsp)
mov    %rsi,0x48(%rsp)
mov    0x10(%rsp),%rax
mov    %rax,0x50(%rsp)
mov    %r13,0x10(%rsp)
mov    %r9,%r14
mov    %r10,%r15
mov    %r11,%rbp
mov    %rdx,%r13
call   1030 <puts@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    0x18(%rsp),%rdi
call   1030 <puts@plt>
mov    0x20(%rsp),%rdi
call   1030 <puts@plt>
mov    0x28(%rsp),%rdi
call   1030 <puts@plt>
mov    0x30(%rsp),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    %r15,%rax
mov    0x8(%rsp),%r15
mov    %rbx,0x8(%rsp)
mov    %r14,0x38(%rsp)
mov    (%rsp),%rcx
mov    %rcx,0x40(%rsp)
mov    %r12,(%rsp)
mov    0x48(%rsp),%r13
mov    0x50(%rsp),%rsi
mov    %rax,%rdi
mov    %rsi,%r14
call   1030 <puts@plt>
mov    %r15,%rax
mov    0x38(%rsp),%rbx
mov    0x40(%rsp),%rbp
mov    (%rsp),%r12
mov    %rax,%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    0x10(%rsp),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"#define ARMV8\0A\00"
@.str.1 = [28 x i8] c"#define L1_DATA_SIZE 32768\0A\00"
@.str.2 = [29 x i8] c"#define L1_DATA_LINESIZE 64\0A\00"
@.str.3 = [24 x i8] c"#define L2_SIZE 262144\0A\00"
@.str.4 = [24 x i8] c"#define L2_LINESIZE 64\0A\00"
@.str.5 = [32 x i8] c"#define DTB_DEFAULT_ENTRIES 64\0A\00"
@.str.6 = [23 x i8] c"#define DTB_SIZE 4096\0A\00"
@.str.7 = [26 x i8] c"#define L2_ASSOCIATIVE 4\0A\00"
@.str.8 = [40 x i8] c"#define VULCAN \0A\00"
@.str.9 = [40 x i8] c"#define HAVE_VFP \0A\00"
@.str.10 = [40 x i8] c"#define HAVE_VFPV3 \0A\00"
@.str.11 = [40 x i8] c"#define HAVE_NEON \0A\00"
@.str.12 = [40 x i8] c"#define HAVE_VFPV4 \0A\00"
@.str.13 = [40 x i8] c"#define L1_CODE_SIZE 32768 \0A\00"
@.str.14 = [40 x i8] c"#define L1_CODE_LINESIZE 64 \0A\00"
@.str.15 = [40 x i8] c"#define L1_CODE_ASSOCIATIVE 8 \0A\00"
@.str.16 = [40 x i8] c"#define L1_DATA_SIZE 32768 \0A\00"
@.str.17 = [40 x i8] c"#define L1_DATA_LINESIZE 64 \0A\00"
@.str.18 = [40 x i8] c"#define L1_DATA_ASSOCIATIVE 8 \0A\00"
@.str.19 = [40 x i8] c"#define L2_SIZE 262144 \0A\00"
@.str.20 = [40 x i8] c"#define L2_LINESIZE 64 \0A\00"
@.str.21 = [40 x i8] c"#define L2_ASSOCIATIVE 8 \0A\00"
@.str.22 = [40 x i8] c"#define L3_SIZE 33554432 \0A\00"
@.str.23 = [40 x i8] c"#define L3_LINESIZE 64 \0A\00"
@.str.24 = [40 x i8] c"#define L3_ASSOCIATIVE 32 \0A\00"
@.str.25 = [40 x i8] c"#define DTB_DEFAULT_ENTRIES 64 \0A\00"
@.str.26 = [40 x i8] c"#define DTB_SIZE 4096 \0A\00"
@.str.27 = [19 x i8] c"#define CORTEXA57\0A\00"
@.str.28 = [18 x i8] c"#define HAVE_VFP\0A\00"
@.str.29 = [20 x i8] c"#define HAVE_VFPV3\0A\00"
@.str.30 = [19 x i8] c"#define HAVE_NEON\0A\00"
@.str.31 = [20 x i8] c"#define HAVE_VFPV4\0A\00"
@.str.32 = [28 x i8] c"#define L1_CODE_SIZE 49152\0A\00"
@.str.33 = [29 x i8] c"#define L1_CODE_LINESIZE 64\0A\00"
@.str.34 = [31 x i8] c"#define L1_CODE_ASSOCIATIVE 3\0A\00"
@.str.35 = [31 x i8] c"#define L1_DATA_ASSOCIATIVE 2\0A\00"
@.str.36 = [25 x i8] c"#define L2_SIZE 2097152\0A\00"
@.str.37 = [27 x i8] c"#define L2_ASSOCIATIVE 16\0A\00"
@.str.38 = [18 x i8] c"#define THUNDERX\0A\00"
@.str.39 = [30 x i8] c"#define L1_DATA_LINESIZE 128\0A\00"
@.str.40 = [26 x i8] c"#define L2_SIZE 16777216\0A\00"
@.str.41 = [25 x i8] c"#define L2_LINESIZE 128\0A\00"
define void @get_cpuconfig() {
%1 = alloca i32
%2 = call i32 (...) @detect()
store i32 %2, i32* %1
%3 = load i32, i32* %1
switch i32 %3, label %80 [
i32 1, label %4
i32 3, label %13
i32 2, label %33
i32 4, label %50
i32 5, label %60
]
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
br label %80
13: ; preds = %0
%14 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.11, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.14, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.17, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.18, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.20, i64 0, i64 0))
%27 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.21, i64 0, i64 0))
%28 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.22, i64 0, i64 0))
%29 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0))
%30 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0))
%31 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.25, i64 0, i64 0))
%32 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.26, i64 0, i64 0))
br label %80
33: ; preds = %0
%34 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.27, i64 0, i64 0))
%35 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.28, i64 0, i64 0))
%36 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.29, i64 0, i64 0))
%37 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.30, i64 0, i64 0))
%38 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.31, i64 0, i64 0))
%39 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.32, i64 0, i64 0))
%40 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.33, i64 0, i64 0))
%41 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.34, i64 0, i64 0))
%42 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%43 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%44 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.35, i64 0, i64 0))
%45 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.36, i64 0, i64 0))
%46 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%47 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.37, i64 0, i64 0))
%48 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
%49 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
br label %80
50: ; preds = %0
%51 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%52 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.38, i64 0, i64 0))
%53 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%54 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.39, i64 0, i64 0))
%55 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.40, i64 0, i64 0))
%56 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.41, i64 0, i64 0))
%57 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
%58 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%59 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.37, i64 0, i64 0))
br label %80
60: ; preds = %0
%61 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%62 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0))
%63 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
%64 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.11, i64 0, i64 0))
%65 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0))
%66 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0))
%67 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.14, i64 0, i64 0))
%68 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
%69 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0))
%70 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.17, i64 0, i64 0))
%71 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.18, i64 0, i64 0))
%72 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
%73 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.20, i64 0, i64 0))
%74 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.21, i64 0, i64 0))
%75 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.22, i64 0, i64 0))
%76 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0))
%77 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0))
%78 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.25, i64 0, i64 0))
%79 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.26, i64 0, i64 0))
br label %80
80: ; preds = %0, %60, %50, %33, %13, %4
ret void
}

LLVM IR (-O2):
@str.61 = [17 x i8] c"#define THUNDERX\00"
@str.63 = [29 x i8] c"#define L1_DATA_LINESIZE 128\00"
@str.64 = [25 x i8] c"#define L2_SIZE 16777216\00"
@str.65 = [24 x i8] c"#define L2_LINESIZE 128\00"
@str.69 = [18 x i8] c"#define CORTEXA57\00"
@str.70 = [17 x i8] c"#define HAVE_VFP\00"
@str.71 = [19 x i8] c"#define HAVE_VFPV3\00"
@str.72 = [18 x i8] c"#define HAVE_NEON\00"
@str.73 = [19 x i8] c"#define HAVE_VFPV4\00"
@str.74 = [27 x i8] c"#define L1_CODE_SIZE 49152\00"
@str.75 = [28 x i8] c"#define L1_CODE_LINESIZE 64\00"
@str.76 = [30 x i8] c"#define L1_CODE_ASSOCIATIVE 3\00"
@str.79 = [30 x i8] c"#define L1_DATA_ASSOCIATIVE 2\00"
@str.80 = [24 x i8] c"#define L2_SIZE 2097152\00"
@str.82 = [26 x i8] c"#define L2_ASSOCIATIVE 16\00"
@str.85 = [39 x i8] c"#define VULCAN \00"
@str.86 = [39 x i8] c"#define HAVE_VFP \00"
@str.87 = [39 x i8] c"#define HAVE_VFPV3 \00"
@str.88 = [39 x i8] c"#define HAVE_NEON \00"
@str.89 = [39 x i8] c"#define HAVE_VFPV4 \00"
@str.90 = [39 x i8] c"#define L1_CODE_SIZE 32768 \00"
@str.91 = [39 x i8] c"#define L1_CODE_LINESIZE 64 \00"
@str.92 = [39 x i8] c"#define L1_CODE_ASSOCIATIVE 8 \00"
@str.93 = [39 x i8] c"#define L1_DATA_SIZE 32768 \00"
@str.94 = [39 x i8] c"#define L1_DATA_LINESIZE 64 \00"
@str.95 = [39 x i8] c"#define L1_DATA_ASSOCIATIVE 8 \00"
@str.96 = [39 x i8] c"#define L2_SIZE 262144 \00"
@str.97 = [39 x i8] c"#define L2_LINESIZE 64 \00"
@str.98 = [39 x i8] c"#define L2_ASSOCIATIVE 8 \00"
@str.99 = [39 x i8] c"#define L3_SIZE 33554432 \00"
@str.100 = [39 x i8] c"#define L3_LINESIZE 64 \00"
@str.101 = [39 x i8] c"#define L3_ASSOCIATIVE 32 \00"
@str.102 = [39 x i8] c"#define DTB_DEFAULT_ENTRIES 64 \00"
@str.103 = [39 x i8] c"#define DTB_SIZE 4096 \00"
@str.104 = [14 x i8] c"#define ARMV8\00"
@str.105 = [27 x i8] c"#define L1_DATA_SIZE 32768\00"
@str.106 = [28 x i8] c"#define L1_DATA_LINESIZE 64\00"
@str.107 = [23 x i8] c"#define L2_SIZE 262144\00"
@str.108 = [23 x i8] c"#define L2_LINESIZE 64\00"
@str.109 = [31 x i8] c"#define DTB_DEFAULT_ENTRIES 64\00"
@str.110 = [22 x i8] c"#define DTB_SIZE 4096\00"
@str.111 = [25 x i8] c"#define L2_ASSOCIATIVE 4\00"
define void @get_cpuconfig() {
%1 = tail call i32 (...) @detect()
switch i32 %1, label %78 [
i32 1, label %61
i32 3, label %3
i32 2, label %26
i32 4, label %50
i32 5, label %2
]
2: ; preds = %0
br label %3
3: ; preds = %0, %2
%4 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.85, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.85, i64 0, i64 0), %0 ]
%5 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.86, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.86, i64 0, i64 0), %0 ]
%6 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.87, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.87, i64 0, i64 0), %0 ]
%7 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.88, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.88, i64 0, i64 0), %0 ]
%8 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.89, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.89, i64 0, i64 0), %0 ]
%9 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.90, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.90, i64 0, i64 0), %0 ]
%10 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.91, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.91, i64 0, i64 0), %0 ]
%11 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.92, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.92, i64 0, i64 0), %0 ]
%12 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.93, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.93, i64 0, i64 0), %0 ]
%13 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.94, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.94, i64 0, i64 0), %0 ]
%14 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.95, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.95, i64 0, i64 0), %0 ]
%15 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.96, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.96, i64 0, i64 0), %0 ]
%16 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.97, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.97, i64 0, i64 0), %0 ]
%17 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.98, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.98, i64 0, i64 0), %0 ]
%18 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.99, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.99, i64 0, i64 0), %0 ]
%19 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.100, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.100, i64 0, i64 0), %0 ]
%20 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.101, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.101, i64 0, i64 0), %0 ]
%21 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.102, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.102, i64 0, i64 0), %0 ]
%22 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.103, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.103, i64 0, i64 0), %0 ]
%23 = tail call i32 @puts(i8* dereferenceable(1) %4)
%24 = tail call i32 @puts(i8* dereferenceable(1) %5)
%25 = tail call i32 @puts(i8* dereferenceable(1) %6)
br label %26
26: ; preds = %3, %0
%27 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.69, i64 0, i64 0), %0 ], [ %7, %3 ]
%28 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.70, i64 0, i64 0), %0 ], [ %8, %3 ]
%29 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @str.71, i64 0, i64 0), %0 ], [ %9, %3 ]
%30 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.72, i64 0, i64 0), %0 ], [ %10, %3 ]
%31 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @str.73, i64 0, i64 0), %0 ], [ %11, %3 ]
%32 = phi i8* [ getelementptr inbounds ([27 x i8], [27 x i8]* @str.74, i64 0, i64 0), %0 ], [ %12, %3 ]
%33 = phi i8* [ getelementptr inbounds ([28 x i8], [28 x i8]* @str.75, i64 0, i64 0), %0 ], [ %13, %3 ]
%34 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @str.76, i64 0, i64 0), %0 ], [ %14, %3 ]
%35 = phi i8* [ getelementptr inbounds ([27 x i8], [27 x i8]* @str.105, i64 0, i64 0), %0 ], [ %15, %3 ]
%36 = phi i8* [ getelementptr inbounds ([28 x i8], [28 x i8]* @str.106, i64 0, i64 0), %0 ], [ %16, %3 ]
%37 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @str.79, i64 0, i64 0), %0 ], [ %17, %3 ]
%38 = phi i8* [ getelementptr inbounds ([24 x i8], [24 x i8]* @str.80, i64 0, i64 0), %0 ], [ %18, %3 ]
%39 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.108, i64 0, i64 0), %0 ], [ %19, %3 ]
%40 = phi i8* [ getelementptr inbounds ([26 x i8], [26 x i8]* @str.82, i64 0, i64 0), %0 ], [ %20, %3 ]
%41 = phi i8* [ getelementptr inbounds ([31 x i8], [31 x i8]* @str.109, i64 0, i64 0), %0 ], [ %21, %3 ]
%42 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.110, i64 0, i64 0), %0 ], [ %22, %3 ]
%43 = tail call i32 @puts(i8* dereferenceable(1) %27)
%44 = tail call i32 @puts(i8* dereferenceable(1) %28)
%45 = tail call i32 @puts(i8* dereferenceable(1) %29)
%46 = tail call i32 @puts(i8* dereferenceable(1) %30)
%47 = tail call i32 @puts(i8* dereferenceable(1) %31)
%48 = tail call i32 @puts(i8* dereferenceable(1) %32)
%49 = tail call i32 @puts(i8* dereferenceable(1) %33)
br label %50
50: ; preds = %26, %0
%51 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.104, i64 0, i64 0), %0 ], [ %34, %26 ]
%52 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.61, i64 0, i64 0), %0 ], [ %35, %26 ]
%53 = phi i8* [ getelementptr inbounds ([27 x i8], [27 x i8]* @str.105, i64 0, i64 0), %0 ], [ %36, %26 ]
%54 = phi i8* [ getelementptr inbounds ([29 x i8], [29 x i8]* @str.63, i64 0, i64 0), %0 ], [ %37, %26 ]
%55 = phi i8* [ getelementptr inbounds ([25 x i8], [25 x i8]* @str.64, i64 0, i64 0), %0 ], [ %38, %26 ]
%56 = phi i8* [ getelementptr inbounds ([24 x i8], [24 x i8]* @str.65, i64 0, i64 0), %0 ], [ %39, %26 ]
%57 = phi i8* [ getelementptr inbounds ([31 x i8], [31 x i8]* @str.109, i64 0, i64 0), %0 ], [ %40, %26 ]
%58 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.110, i64 0, i64 0), %0 ], [ %41, %26 ]
%59 = phi i8* [ getelementptr inbounds ([26 x i8], [26 x i8]* @str.82, i64 0, i64 0), %0 ], [ %42, %26 ]
%60 = tail call i32 @puts(i8* dereferenceable(1) %51)
br label %61
61: ; preds = %50, %0
%62 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.104, i64 0, i64 0), %0 ], [ %52, %50 ]
%63 = phi i8* [ getelementptr inbounds ([27 x i8], [27 x i8]* @str.105, i64 0, i64 0), %0 ], [ %53, %50 ]
%64 = phi i8* [ getelementptr inbounds ([28 x i8], [28 x i8]* @str.106, i64 0, i64 0), %0 ], [ %54, %50 ]
%65 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.107, i64 0, i64 0), %0 ], [ %55, %50 ]
%66 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.108, i64 0, i64 0), %0 ], [ %56, %50 ]
%67 = phi i8* [ getelementptr inbounds ([31 x i8], [31 x i8]* @str.109, i64 0, i64 0), %0 ], [ %57, %50 ]
%68 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.110, i64 0, i64 0), %0 ], [ %58, %50 ]
%69 = phi i8* [ getelementptr inbounds ([25 x i8], [25 x i8]* @str.111, i64 0, i64 0), %0 ], [ %59, %50 ]
%70 = tail call i32 @puts(i8* dereferenceable(1) %62)
%71 = tail call i32 @puts(i8* dereferenceable(1) %63)
%72 = tail call i32 @puts(i8* dereferenceable(1) %64)
%73 = tail call i32 @puts(i8* dereferenceable(1) %65)
%74 = tail call i32 @puts(i8* dereferenceable(1) %66)
%75 = tail call i32 @puts(i8* dereferenceable(1) %67)
%76 = tail call i32 @puts(i8* dereferenceable(1) %68)
%77 = tail call i32 @puts(i8* dereferenceable(1) %69)
br label %78
78: ; preds = %61, %0
ret void
}