#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 */
typedef int /*<<< orphan*/ register_values;
typedef int /*<<< orphan*/ cpu;

/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_debug(char *);
int /*<<< orphan*/ print_debug_char(char);
int /*<<< orphan*/ print_debug_hex32(unsigned int const);
int /*<<< orphan*/ print_debug_hex8(int);
void main(void) {
  static const int cpu[] = {0, 1, 2, 3};
  int i;
  for (i = 0; i < sizeof(cpu) / sizeof(cpu[0]); i++) {
    static const unsigned int register_values[] = {
        0x0000c144, 0x0000f8f8, 0x00000000, 0x0000c14C, 0x0000f8f8, 0x00000001,
        0x0000c154, 0x0000f8f8, 0x00000002, 0x0000c15C, 0x0000f8f8, 0x00000003,
        0x0000c164, 0x0000f8f8, 0x00000004, 0x0000c16C, 0x0000f8f8, 0x00000005,
        0x0000c174, 0x0000f8f8, 0x00000006, 0x0000c17C, 0x0000f8f8, 0x00000007,
    };
    int j;
    int max = sizeof(register_values) / sizeof(register_values[0]);
    for (j = 0; j < max; j += 3) {
      print_debug("val[");
      print_debug_hex8(j);
      print_debug("]: ");
      print_debug_hex32(register_values[j]);
      print_debug_char(' ');
      print_debug_hex32(register_values[j + 1]);
      print_debug_char(' ');
      print_debug_hex32(register_values[j + 2]);
      print_debug_char('\n');
    }
  }
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rax
cmp    $0x4,%rax
jae    1229 <main+0xd9>
movl   $0x18,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1216 <main+0xc6>
lea    0xee2(%rip),%rdi
call   1060 <print_debug@plt>
mov    -0x8(%rbp),%edi
call   1030 <print_debug_hex8@plt>
lea    0xed3(%rip),%rdi
call   1060 <print_debug@plt>
movslq -0x8(%rbp),%rcx
lea    0xe5e(%rip),%rax
mov    (%rax,%rcx,4),%edi
call   1050 <print_debug_hex32@plt>
mov    $0x20,%edi
call   1070 <print_debug_char@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    0xe3c(%rip),%rax
mov    (%rax,%rcx,4),%edi
call   1050 <print_debug_hex32@plt>
mov    $0x20,%edi
call   1070 <print_debug_char@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
movslq %eax,%rcx
lea    0xe1a(%rip),%rax
mov    (%rax,%rcx,4),%edi
call   1050 <print_debug_hex32@plt>
mov    $0xa,%edi
call   1070 <print_debug_char@plt>
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
jmp    117b <main+0x2b>
jmp    121b <main+0xcb>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115f <main+0xf>
xor    %edi,%edi
call   1040 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
xor    %ebx,%ebx
lea    0xeff(%rip),%r14
lea    0xefd(%rip),%r15
lea    0xe91(%rip),%r12
nop
mov    %r14,%rdi
call   1060 <print_debug@plt>
mov    %ebx,%edi
call   1030 <print_debug_hex8@plt>
mov    %r15,%rdi
call   1060 <print_debug@plt>
mov    (%r12,%rbx,4),%edi
mov    0x4(%r12,%rbx,4),%ebp
call   1050 <print_debug_hex32@plt>
mov    $0x20,%edi
call   1070 <print_debug_char@plt>
mov    %ebp,%edi
call   1050 <print_debug_hex32@plt>
mov    $0x20,%edi
call   1070 <print_debug_char@plt>
mov    0x8(%r12,%rbx,4),%edi
call   1050 <print_debug_hex32@plt>
mov    $0xa,%edi
call   1070 <print_debug_char@plt>
lea    0x3(%rbx),%rax
cmp    $0x15,%rbx
mov    %rax,%rbx
jb     1170 <main+0x20>
xor    %ebx,%ebx
lea    0xe86(%rip),%r14
lea    0xe84(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1060 <print_debug@plt>
mov    %ebx,%edi
call   1030 <print_debug_hex8@plt>
mov    %r15,%rdi
call   1060 <print_debug@plt>
mov    (%r12,%rbx,4),%edi
mov    0x4(%r12,%rbx,4),%ebp
call   1050 <print_debug_hex32@plt>
mov    $0x20,%edi
call   1070 <print_debug_char@plt>
mov    %ebp,%edi
call   1050 <print_debug_hex32@plt>
mov    $0x20,%edi
call   1070 <print_debug_char@plt>
mov    0x8(%r12,%rbx,4),%edi
call   1050 <print_debug_hex32@plt>
mov    $0xa,%edi
call   1070 <print_debug_char@plt>
lea    0x3(%rbx),%rax
cmp    $0x15,%rbx
mov    %rax,%rbx
jb     11f0 <main+0xa0>
xor    %ebx,%ebx
lea    0xe06(%rip),%r14
lea    0xe04(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1060 <print_debug@plt>
mov    %ebx,%edi
call   1030 <print_debug_hex8@plt>
mov    %r15,%rdi
call   1060 <print_debug@plt>
mov    (%r12,%rbx,4),%edi
mov    0x4(%r12,%rbx,4),%ebp
call   1050 <print_debug_hex32@plt>
mov    $0x20,%edi
call   1070 <print_debug_char@plt>
mov    %ebp,%edi
call   1050 <print_debug_hex32@plt>
mov    $0x20,%edi
call   1070 <print_debug_char@plt>
mov    0x8(%r12,%rbx,4),%edi
call   1050 <print_debug_hex32@plt>
mov    $0xa,%edi
call   1070 <print_debug_char@plt>
lea    0x3(%rbx),%rax
cmp    $0x15,%rbx
mov    %rax,%rbx
jb     1270 <main+0x120>
xor    %ebx,%ebx
lea    0xd86(%rip),%r14
lea    0xd84(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1060 <print_debug@plt>
mov    %ebx,%edi
call   1030 <print_debug_hex8@plt>
mov    %r15,%rdi
call   1060 <print_debug@plt>
mov    (%r12,%rbx,4),%edi
mov    0x4(%r12,%rbx,4),%ebp
call   1050 <print_debug_hex32@plt>
mov    $0x20,%edi
call   1070 <print_debug_char@plt>
mov    %ebp,%edi
call   1050 <print_debug_hex32@plt>
mov    $0x20,%edi
call   1070 <print_debug_char@plt>
mov    0x8(%r12,%rbx,4),%edi
call   1050 <print_debug_hex32@plt>
mov    $0xa,%edi
call   1070 <print_debug_char@plt>
lea    0x3(%rbx),%rax
cmp    $0x15,%rbx
mov    %rax,%rbx
jb     12f0 <main+0x1a0>
xor    %edi,%edi
call   1040 <_exit@plt>

LLVM IR (-O0):
@main.cpu = internal constant [4 x i32] [i32 0, i32 1, i32 2, i32 3]
@main.register_values = internal constant [24 x i32] [i32 49476, i32 63736, i32 0, i32 49484, i32 63736, i32 1, i32 49492, i32 63736, i32 2, i32 49500, i32 63736, i32 3, i32 49508, i32 63736, i32 4, i32 49516, i32 63736, i32 5, i32 49524, i32 63736, i32 6, i32 49532, i32 63736, i32 7]
@.str = [5 x i8] c"val[\00"
@.str.1 = [4 x i8] c"]: \00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %42, %0
%5 = load i32, i32* %1
%6 = sext i32 %5 to i64
%7 = icmp ult i64 %6, 4
br i1 %7, label %8, label %45
8: ; preds = %4
store i32 24, i32* %3
store i32 0, i32* %2
br label %9
9: ; preds = %38, %8
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %41
13: ; preds = %9
%14 = call i32 @print_debug(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* %2
%16 = call i32 @print_debug_hex8(i32 %15)
%17 = call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = call i32 @print_debug_hex32(i32 %21)
%23 = call i32 @print_debug_char(i8 signext 32)
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 1
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = call i32 @print_debug_hex32(i32 %28)
%30 = call i32 @print_debug_char(i8 signext 32)
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 2
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = call i32 @print_debug_hex32(i32 %35)
%37 = call i32 @print_debug_char(i8 signext 10)
br label %38
38: ; preds = %13
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 3
store i32 %40, i32* %2
br label %9
41: ; preds = %9
br label %42
42: ; preds = %41
%43 = load i32, i32* %1
%44 = add nsw i32 %43, 1
store i32 %44, i32* %1
br label %4
45: ; preds = %4
%46 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@main.register_values = internal unnamed_addr constant [24 x i32] [i32 49476, i32 63736, i32 0, i32 49484, i32 63736, i32 1, i32 49492, i32 63736, i32 2, i32 49500, i32 63736, i32 3, i32 49508, i32 63736, i32 4, i32 49516, i32 63736, i32 5, i32 49524, i32 63736, i32 6, i32 49532, i32 63736, i32 7]
@.str = [5 x i8] c"val[\00"
@.str.1 = [4 x i8] c"]: \00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %21, %1 ]
%3 = tail call i32 @print_debug(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = trunc i64 %2 to i32
%5 = tail call i32 @print_debug_hex8(i32 %4)
%6 = tail call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %2
%8 = load i32, i32* %7
%9 = tail call i32 @print_debug_hex32(i32 %8)
%10 = tail call i32 @print_debug_char(i8 signext 32)
%11 = add nuw nsw i64 %2, 1
%12 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = tail call i32 @print_debug_hex32(i32 %13)
%15 = tail call i32 @print_debug_char(i8 signext 32)
%16 = add nuw nsw i64 %2, 2
%17 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = tail call i32 @print_debug_hex32(i32 %18)
%20 = tail call i32 @print_debug_char(i8 signext 10)
%21 = add nuw nsw i64 %2, 3
%22 = icmp ult i64 %2, 21
br i1 %22, label %1, label %23
23: ; preds = %1, %23
%24 = phi i64 [ %43, %23 ], [ 0, %1 ]
%25 = tail call i32 @print_debug(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%26 = trunc i64 %24 to i32
%27 = tail call i32 @print_debug_hex8(i32 %26)
%28 = tail call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%29 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %24
%30 = load i32, i32* %29
%31 = tail call i32 @print_debug_hex32(i32 %30)
%32 = tail call i32 @print_debug_char(i8 signext 32)
%33 = add nuw nsw i64 %24, 1
%34 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = tail call i32 @print_debug_hex32(i32 %35)
%37 = tail call i32 @print_debug_char(i8 signext 32)
%38 = add nuw nsw i64 %24, 2
%39 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %38
%40 = load i32, i32* %39
%41 = tail call i32 @print_debug_hex32(i32 %40)
%42 = tail call i32 @print_debug_char(i8 signext 10)
%43 = add nuw nsw i64 %24, 3
%44 = icmp ult i64 %24, 21
br i1 %44, label %23, label %45
45: ; preds = %23, %45
%46 = phi i64 [ %65, %45 ], [ 0, %23 ]
%47 = tail call i32 @print_debug(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%48 = trunc i64 %46 to i32
%49 = tail call i32 @print_debug_hex8(i32 %48)
%50 = tail call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%51 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %46
%52 = load i32, i32* %51
%53 = tail call i32 @print_debug_hex32(i32 %52)
%54 = tail call i32 @print_debug_char(i8 signext 32)
%55 = add nuw nsw i64 %46, 1
%56 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = tail call i32 @print_debug_hex32(i32 %57)
%59 = tail call i32 @print_debug_char(i8 signext 32)
%60 = add nuw nsw i64 %46, 2
%61 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %60
%62 = load i32, i32* %61
%63 = tail call i32 @print_debug_hex32(i32 %62)
%64 = tail call i32 @print_debug_char(i8 signext 10)
%65 = add nuw nsw i64 %46, 3
%66 = icmp ult i64 %46, 21
br i1 %66, label %45, label %67
67: ; preds = %45, %67
%68 = phi i64 [ %87, %67 ], [ 0, %45 ]
%69 = tail call i32 @print_debug(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%70 = trunc i64 %68 to i32
%71 = tail call i32 @print_debug_hex8(i32 %70)
%72 = tail call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%73 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %68
%74 = load i32, i32* %73
%75 = tail call i32 @print_debug_hex32(i32 %74)
%76 = tail call i32 @print_debug_char(i8 signext 32)
%77 = add nuw nsw i64 %68, 1
%78 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %77
%79 = load i32, i32* %78
%80 = tail call i32 @print_debug_hex32(i32 %79)
%81 = tail call i32 @print_debug_char(i8 signext 32)
%82 = add nuw nsw i64 %68, 2
%83 = getelementptr inbounds [24 x i32], [24 x i32]* @main.register_values, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = tail call i32 @print_debug_hex32(i32 %84)
%86 = tail call i32 @print_debug_char(i8 signext 10)
%87 = add nuw nsw i64 %68, 3
%88 = icmp ult i64 %68, 21
br i1 %88, label %67, label %89
89: ; preds = %67
%90 = tail call i32 @_exit(i32 0)
unreachable
}