int main(argc, argv)
int argc;
char *argv[];
{
  static char test[64] = {0};
  int i;
  int writeRules = 0;
  int littleEndian = 0;
  int ieee = 1, is_cray = 0;
  if (argc == 2 && 0 == strcmp(argv[1], "-r"))
    writeRules = 1;
  for (i = 0; i < 32; i++)
    test[i] = 0;
  test[0] = 0x01;
  if (0x0001 == *(int *)(&test[0]))
    littleEndian = 1;
  if (writeRules) {
    printf("# ENDIAN_FLAGS variable determined by endian.c\n");
    printf("ENDIAN_FLAGS = -DASF_%s_ENDIAN ", littleEndian ? "LIL" : "BIG");
  } else {
    printf("Computer Information:\n");
    printf("\tshort = %d bytes.\n", sizeof(short));
    printf("\tint = %d bytes.\n", sizeof(int));
    printf("\tlong = %d bytes.\n", sizeof(long));
    printf("\t-> Integers are %s-endian.\n\n", littleEndian ? "little" : "big");
    printf("\tfloat = %d bytes.\n", sizeof(float));
    printf("\tdouble = %d bytes.\n", sizeof(double));
  }
  if (sizeof(float) != 4) {
    ieee = 0;
  }
  *(float *)(&test[0]) = (float)(-9.5);
  if (!writeRules) {
    printf("\t(float)(-9.5)= 0x%x %x %x %x\n", 0x00ff & (int)test[0],
           0x00ff & (int)test[1], 0x00ff & (int)test[2], 0x00ff & (int)test[3]);
    printf("\t->Floats are ");
  }
  if ((test[0] == (char)0xC1) && (test[1] == (char)0x18) &&
      (test[2] == (char)0x00) && (test[3] == (char)0x00))
    ieee = 1, littleEndian = 0;
  else if ((test[0] == (char)0x00) && (test[1] == (char)0x00) &&
           (test[2] == (char)0x18) && (test[3] == (char)0xC1))
    ieee = 1, littleEndian = 1;
  else if ((test[0] == (char)0xC0) && (test[1] == (char)0x04) &&
           (test[2] == (char)0x98) && (test[3] == (char)0x00))
    ieee = 0, is_cray = 1;
  else
    ieee = 0;
  if (writeRules) {
    printf("%s\n", ieee ? (littleEndian ? "-DASF_LIL_IEEE" : "-DASF_BIG_IEEE")
                        : (is_cray ? "-Dcray_float" : "-Dnon_ieee "));
  } else
    printf("%s %s-endian.\n\n",
           ieee ? "IEEE standard "
                : (is_cray ? "cray proprietary" : "non-IEEE proprietary "),
           littleEndian ? "little" : "big");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1183 <main+0x63>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe99(%rip),%rsi
call   1040 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1183 <main+0x63>
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jge    11b1 <main+0x91>
movslq -0x14(%rbp),%rcx
lea    0x2ea1(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118a <main+0x6a>
movb   $0x1,0x2e88(%rip)
mov    $0x1,%eax
cmp    0x2e7d(%rip),%eax
jne    11d0 <main+0xb0>
movl   $0x1,-0x1c(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1213 <main+0xf3>
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%ecx
lea    0xe69(%rip),%rsi
lea    0xe5e(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12a6 <main+0x186>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4e(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4f(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4e(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%ecx
lea    0xe70(%rip),%rsi
lea    0xe62(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe51(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe52(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xd52(%rip),%xmm0
movss  %xmm0,0x2d8a(%rip)
cmpl   $0x0,-0x18(%rbp)
jne    1312 <main+0x1f2>
movsbl 0x2d79(%rip),%esi
and    $0xff,%esi
movsbl 0x2d6d(%rip),%edx
and    $0xff,%edx
movsbl 0x2d61(%rip),%ecx
and    $0xff,%ecx
movsbl 0x2d54(%rip),%r8d
and    $0xff,%r8d
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl 0x2d27(%rip),%eax
cmp    $0xffffffc1,%eax
jne    1365 <main+0x245>
movsbl 0x2d18(%rip),%eax
cmp    $0x18,%eax
jne    1365 <main+0x245>
movsbl 0x2d09(%rip),%eax
cmp    $0x0,%eax
jne    1365 <main+0x245>
movsbl 0x2cfa(%rip),%eax
cmp    $0x0,%eax
jne    1365 <main+0x245>
movl   $0x1,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
jmp    141c <main+0x2fc>
movsbl 0x2cd4(%rip),%eax
cmp    $0x0,%eax
jne    13b8 <main+0x298>
movsbl 0x2cc5(%rip),%eax
cmp    $0x0,%eax
jne    13b8 <main+0x298>
movsbl 0x2cb6(%rip),%eax
cmp    $0x18,%eax
jne    13b8 <main+0x298>
movsbl 0x2ca7(%rip),%eax
cmp    $0xffffffc1,%eax
jne    13b8 <main+0x298>
movl   $0x1,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
jmp    1417 <main+0x2f7>
movsbl 0x2c81(%rip),%eax
cmp    $0xffffffc0,%eax
jne    140b <main+0x2eb>
movsbl 0x2c72(%rip),%eax
cmp    $0x4,%eax
jne    140b <main+0x2eb>
movsbl 0x2c63(%rip),%eax
cmp    $0xffffff98,%eax
jne    140b <main+0x2eb>
movsbl 0x2c54(%rip),%eax
cmp    $0x0,%eax
jne    140b <main+0x2eb>
movl   $0x0,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
jmp    1412 <main+0x2f2>
movl   $0x0,-0x20(%rbp)
jmp    1417 <main+0x2f7>
jmp    141c <main+0x2fc>
cmpl   $0x0,-0x18(%rbp)
je     1484 <main+0x364>
cmpl   $0x0,-0x20(%rbp)
je     1451 <main+0x331>
mov    -0x1c(%rbp),%edx
lea    0xd08(%rip),%rax
lea    0xcf2(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x30(%rbp)
jmp    146d <main+0x34d>
mov    -0x24(%rbp),%edx
lea    0xd03(%rip),%rax
lea    0xcef(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xcb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14e4 <main+0x3c4>
cmpl   $0x0,-0x20(%rbp)
je     149e <main+0x37e>
lea    0xce5(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    14ba <main+0x39a>
mov    -0x24(%rbp),%edx
lea    0xcf2(%rip),%rax
lea    0xcda(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rsi
mov    -0x1c(%rbp),%ecx
lea    0xc0c(%rip),%rdx
lea    0xbfe(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xc8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    11c5 <main+0x95>
mov    0x8(%rsi),%rdi
lea    0xeb5(%rip),%rsi
call   1050 <strcmp@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x2ef6(%rip)
movb   $0x1,0x2eef(%rip)
mov    0x2ee9(%rip),%ebx
xor    %r15d,%r15d
cmp    $0x1,%ebx
sete   %r15b
movaps %xmm0,0x2ee8(%rip)
test   %eax,%eax
jne    11eb <main+0xbb>
lea    0xff4(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x1,%ebx
lea    0xe91(%rip),%rax
lea    0xe8e(%rip),%rsi
cmove  %rax,%rsi
lea    0xe5f(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0xc1180000,0x2e98(%rip)
mov    $0x18,%al
mov    $0xc1,%bl
xor    %esi,%esi
xor    %edi,%edi
jmp    12cb <main+0x19b>
xorps  %xmm0,%xmm0
movaps %xmm0,0x2e81(%rip)
movaps %xmm0,0x2e8a(%rip)
movb   $0x1,0x2e73(%rip)
xor    %r15d,%r15d
cmpl   $0x1,0x2e69(%rip)
sete   %r15b
lea    0xf6f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe2d(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe2e(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe2d(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe4b(%rip),%rax
lea    0xe4b(%rip),%rsi
test   %r15b,%r15b
cmovne %rax,%rsi
lea    0xe18(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe33(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe34(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0xc1180000,0x2dcd(%rip)
lea    0xe2c(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x18,%ecx
mov    $0xc1,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe2e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d9b(%rip),%dil
mov    0x2d95(%rip),%sil
mov    0x2d90(%rip),%al
mov    $0x1,%r14b
mov    0x2d88(%rip),%bl
lea    0xe3d(%rip),%rcx
lea    0xe72(%rip),%rdx
cmp    $0xc1,%dil
jne    12fc <main+0x1cc>
cmp    $0x18,%sil
jne    12fc <main+0x1cc>
test   %al,%al
jne    12fc <main+0x1cc>
xor    %ebp,%ebp
test   %bl,%bl
jne    12fc <main+0x1cc>
xor    %r15d,%r15d
test   %r14b,%r14b
je     131c <main+0x1ec>
jmp    137d <main+0x24d>
test   %dil,%dil
jne    133f <main+0x20f>
test   %sil,%sil
jne    133f <main+0x20f>
cmp    $0x18,%al
jne    133f <main+0x20f>
cmp    $0xc1,%bl
jne    133f <main+0x20f>
xor    %ebp,%ebp
mov    $0x1,%r15d
test   %r14b,%r14b
jne    137d <main+0x24d>
test   %r15d,%r15d
lea    0xdcd(%rip),%rax
lea    0xdb7(%rip),%rdi
cmove  %rax,%rdi
test   %bpl,%bpl
cmovne %rcx,%rdi
call   1030 <puts@plt>
jmp    13ae <main+0x27e>
xor    $0xc0,%dil
xor    $0x4,%sil
or     %dil,%sil
xor    $0x98,%al
or     %sil,%al
or     %bl,%al
lea    0xde2(%rip),%rax
lea    0xdec(%rip),%rdx
cmove  %rax,%rdx
lea    0xd98(%rip),%rax
lea    0xd9e(%rip),%rcx
cmove  %rax,%rcx
mov    $0x1,%bpl
test   %r14b,%r14b
je     131c <main+0x1ec>
lea    0xda7(%rip),%rsi
test   %bpl,%bpl
cmovne %rdx,%rsi
test   %r15d,%r15d
lea    0xcf4(%rip),%rax
lea    0xce6(%rip),%rdx
cmove  %rax,%rdx
lea    0xd74(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@main.test = internal global [64 x i8] zeroinitializer
@.str = [3 x i8] c"-r\00"
@.str.1 = [48 x i8] c"# ENDIAN_FLAGS variable determined by endian.c\0A\00"
@.str.2 = [32 x i8] c"ENDIAN_FLAGS = -DASF_%s_ENDIAN \00"
@.str.3 = [4 x i8] c"LIL\00"
@.str.4 = [4 x i8] c"BIG\00"
@.str.5 = [23 x i8] c"Computer Information:\0A\00"
@.str.6 = [20 x i8] c"\09short = %d bytes.\0A\00"
@.str.7 = [18 x i8] c"\09int = %d bytes.\0A\00"
@.str.8 = [19 x i8] c"\09long = %d bytes.\0A\00"
@.str.9 = [30 x i8] c"\09-> Integers are %s-endian.\0A\0A\00"
@.str.10 = [7 x i8] c"little\00"
@.str.11 = [4 x i8] c"big\00"
@.str.12 = [20 x i8] c"\09float = %d bytes.\0A\00"
@.str.13 = [21 x i8] c"\09double = %d bytes.\0A\00"
@.str.14 = [31 x i8] c"\09(float)(-9.5)= 0x%x %x %x %x\0A\00"
@.str.15 = [15 x i8] c"\09->Floats are \00"
@.str.16 = [4 x i8] c"%s\0A\00"
@.str.17 = [15 x i8] c"-DASF_LIL_IEEE\00"
@.str.18 = [15 x i8] c"-DASF_BIG_IEEE\00"
@.str.19 = [13 x i8] c"-Dcray_float\00"
@.str.20 = [12 x i8] c"-Dnon_ieee \00"
@.str.21 = [16 x i8] c"%s %s-endian.\0A\0A\00"
@.str.22 = [15 x i8] c"IEEE standard \00"
@.str.23 = [17 x i8] c"cray proprietary\00"
@.str.24 = [22 x i8] c"non-IEEE proprietary \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 0, i32* %8
store i32 1, i32* %9
store i32 0, i32* %10
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %20
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i32 0, %17
br i1 %18, label %19, label %20
19: ; preds = %13
store i32 1, i32* %7
br label %20
20: ; preds = %19, %13, %2
store i32 0, i32* %6
br label %21
21: ; preds = %28, %20
%22 = load i32, i32* %6
%23 = icmp slt i32 %22, 32
br i1 %23, label %24, label %31
24: ; preds = %21
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [64 x i8], [64 x i8]* @main.test, i64 0, i64 %26
store i8 0, i8* %27
br label %28
28: ; preds = %24
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %21
31: ; preds = %21
store i8 1, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 0)
%32 = load i32, i32* bitcast ([64 x i8]* @main.test to i32*)
%33 = icmp eq i32 1, %32
br i1 %33, label %34, label %35
34: ; preds = %31
store i32 1, i32* %8
br label %35
35: ; preds = %34, %31
%36 = load i32, i32* %7
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %45
38: ; preds = %35
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%40 = load i32, i32* %8
%41 = icmp ne i32 %40, 0
%42 = zext i1 %41 to i64
%43 = select i1 %41, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %43)
br label %57
45: ; preds = %35
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i64 2)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i64 4)
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i64 8)
%50 = load i32, i32* %8
%51 = icmp ne i32 %50, 0
%52 = zext i1 %51 to i64
%53 = select i1 %51, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0)
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i8* %53)
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i64 4)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i64 8)
br label %57
57: ; preds = %45, %38
store float -9.500000e+00, float* bitcast ([64 x i8]* @main.test to float*)
%58 = load i32, i32* %7
%59 = icmp ne i32 %58, 0
br i1 %59, label %75, label %60
60: ; preds = %57
%61 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 0)
%62 = sext i8 %61 to i32
%63 = and i32 255, %62
%64 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 1)
%65 = sext i8 %64 to i32
%66 = and i32 255, %65
%67 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 2)
%68 = sext i8 %67 to i32
%69 = and i32 255, %68
%70 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 3)
%71 = sext i8 %70 to i32
%72 = and i32 255, %71
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), i32 %63, i32 %66, i32 %69, i32 %72)
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0))
br label %75
75: ; preds = %60, %57
%76 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 0)
%77 = sext i8 %76 to i32
%78 = icmp eq i32 %77, -63
br i1 %78, label %79, label %92
79: ; preds = %75
%80 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 1)
%81 = sext i8 %80 to i32
%82 = icmp eq i32 %81, 24
br i1 %82, label %83, label %92
83: ; preds = %79
%84 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 2)
%85 = sext i8 %84 to i32
%86 = icmp eq i32 %85, 0
br i1 %86, label %87, label %92
87: ; preds = %83
%88 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 3)
%89 = sext i8 %88 to i32
%90 = icmp eq i32 %89, 0
br i1 %90, label %91, label %92
91: ; preds = %87
store i32 1, i32* %9
store i32 0, i32* %8
br label %129
92: ; preds = %87, %83, %79, %75
%93 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 0)
%94 = sext i8 %93 to i32
%95 = icmp eq i32 %94, 0
br i1 %95, label %96, label %109
96: ; preds = %92
%97 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 1)
%98 = sext i8 %97 to i32
%99 = icmp eq i32 %98, 0
br i1 %99, label %100, label %109
100: ; preds = %96
%101 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 2)
%102 = sext i8 %101 to i32
%103 = icmp eq i32 %102, 24
br i1 %103, label %104, label %109
104: ; preds = %100
%105 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 3)
%106 = sext i8 %105 to i32
%107 = icmp eq i32 %106, -63
br i1 %107, label %108, label %109
108: ; preds = %104
store i32 1, i32* %9
store i32 1, i32* %8
br label %128
109: ; preds = %104, %100, %96, %92
%110 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 0)
%111 = sext i8 %110 to i32
%112 = icmp eq i32 %111, -64
br i1 %112, label %113, label %126
113: ; preds = %109
%114 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 1)
%115 = sext i8 %114 to i32
%116 = icmp eq i32 %115, 4
br i1 %116, label %117, label %126
117: ; preds = %113
%118 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 2)
%119 = sext i8 %118 to i32
%120 = icmp eq i32 %119, -104
br i1 %120, label %121, label %126
121: ; preds = %117
%122 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 3)
%123 = sext i8 %122 to i32
%124 = icmp eq i32 %123, 0
br i1 %124, label %125, label %126
125: ; preds = %121
store i32 0, i32* %9
store i32 1, i32* %10
br label %127
126: ; preds = %121, %117, %113, %109
store i32 0, i32* %9
br label %127
127: ; preds = %126, %125
br label %128
128: ; preds = %127, %108
br label %129
129: ; preds = %128, %91
%130 = load i32, i32* %7
%131 = icmp ne i32 %130, 0
br i1 %131, label %132, label %148
132: ; preds = %129
%133 = load i32, i32* %9
%134 = icmp ne i32 %133, 0
br i1 %134, label %135, label %140
135: ; preds = %132
%136 = load i32, i32* %8
%137 = icmp ne i32 %136, 0
%138 = zext i1 %137 to i64
%139 = select i1 %137, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0)
br label %145
140: ; preds = %132
%141 = load i32, i32* %10
%142 = icmp ne i32 %141, 0
%143 = zext i1 %142 to i64
%144 = select i1 %142, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0)
br label %145
145: ; preds = %140, %135
%146 = phi i8* [ %139, %135 ], [ %144, %140 ]
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* %146)
br label %164
148: ; preds = %129
%149 = load i32, i32* %9
%150 = icmp ne i32 %149, 0
br i1 %150, label %151, label %152
151: ; preds = %148
br label %157
152: ; preds = %148
%153 = load i32, i32* %10
%154 = icmp ne i32 %153, 0
%155 = zext i1 %154 to i64
%156 = select i1 %154, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0)
br label %157
157: ; preds = %152, %151
%158 = phi i8* [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0), %151 ], [ %156, %152 ]
%159 = load i32, i32* %8
%160 = icmp ne i32 %159, 0
%161 = zext i1 %160 to i64
%162 = select i1 %160, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0)
%163 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0), i8* %158, i8* %162)
br label %164
164: ; preds = %157, %145
ret i32 0
}

LLVM IR (-O2):
@main.test = internal unnamed_addr global [64 x i8] zeroinitializer
@.str = [3 x i8] c"-r\00"
@.str.2 = [32 x i8] c"ENDIAN_FLAGS = -DASF_%s_ENDIAN \00"
@.str.3 = [4 x i8] c"LIL\00"
@.str.4 = [4 x i8] c"BIG\00"
@.str.6 = [20 x i8] c"\09short = %d bytes.\0A\00"
@.str.7 = [18 x i8] c"\09int = %d bytes.\0A\00"
@.str.8 = [19 x i8] c"\09long = %d bytes.\0A\00"
@.str.9 = [30 x i8] c"\09-> Integers are %s-endian.\0A\0A\00"
@.str.10 = [7 x i8] c"little\00"
@.str.11 = [4 x i8] c"big\00"
@.str.12 = [20 x i8] c"\09float = %d bytes.\0A\00"
@.str.13 = [21 x i8] c"\09double = %d bytes.\0A\00"
@.str.14 = [31 x i8] c"\09(float)(-9.5)= 0x%x %x %x %x\0A\00"
@.str.15 = [15 x i8] c"\09->Floats are \00"
@.str.17 = [15 x i8] c"-DASF_LIL_IEEE\00"
@.str.18 = [15 x i8] c"-DASF_BIG_IEEE\00"
@.str.19 = [13 x i8] c"-Dcray_float\00"
@.str.20 = [12 x i8] c"-Dnon_ieee \00"
@.str.21 = [16 x i8] c"%s %s-endian.\0A\0A\00"
@.str.22 = [15 x i8] c"IEEE standard \00"
@.str.23 = [17 x i8] c"cray proprietary\00"
@.str.24 = [22 x i8] c"non-IEEE proprietary \00"
@str = [22 x i8] c"Computer Information:\00"
@str.25 = [47 x i8] c"# ENDIAN_FLAGS variable determined by endian.c\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
store i8 1, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 0)
%5 = load i32, i32* bitcast ([64 x i8]* @main.test to i32*)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
br label %20
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
store i8 1, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 0)
%13 = load i32, i32* bitcast ([64 x i8]* @main.test to i32*)
%14 = icmp eq i32 %13, 1
%15 = zext i1 %14 to i32
br i1 %12, label %16, label %20
16: ; preds = %8
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.25, i64 0, i64 0))
%18 = select i1 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %18)
store float -9.500000e+00, float* bitcast ([64 x i8]* @main.test to float*)
br label %37
20: ; preds = %4, %8
%21 = phi i32 [ %7, %4 ], [ %15, %8 ]
%22 = phi i1 [ %6, %4 ], [ %14, %8 ]
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i64 2)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i64 4)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i64 8)
%27 = select i1 %22, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i8* %27)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i64 4)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i64 8)
store float -9.500000e+00, float* bitcast ([64 x i8]* @main.test to float*)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), i32 0, i32 0, i32 24, i32 193)
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0))
%33 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 0)
%34 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 1)
%35 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 2)
%36 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @main.test, i64 0, i64 3)
br label %37
37: ; preds = %16, %20
%38 = phi i32 [ %15, %16 ], [ %21, %20 ]
%39 = phi i1 [ false, %16 ], [ true, %20 ]
%40 = phi i8 [ -63, %16 ], [ %36, %20 ]
%41 = phi i8 [ 24, %16 ], [ %35, %20 ]
%42 = phi i8 [ 0, %16 ], [ %34, %20 ]
%43 = phi i8 [ 0, %16 ], [ %33, %20 ]
%44 = icmp eq i8 %43, -63
%45 = icmp eq i8 %42, 24
%46 = select i1 %44, i1 %45, i1 false
%47 = icmp eq i8 %41, 0
%48 = select i1 %46, i1 %47, i1 false
%49 = icmp eq i8 %40, 0
%50 = select i1 %48, i1 %49, i1 false
br i1 %50, label %68, label %51
51: ; preds = %37
%52 = icmp eq i8 %43, 0
%53 = icmp eq i8 %42, 0
%54 = select i1 %52, i1 %53, i1 false
%55 = icmp eq i8 %41, 24
%56 = select i1 %54, i1 %55, i1 false
%57 = icmp eq i8 %40, -63
%58 = select i1 %56, i1 %57, i1 false
br i1 %58, label %68, label %59
59: ; preds = %51
%60 = icmp eq i8 %43, -64
%61 = icmp eq i8 %42, 4
%62 = select i1 %60, i1 %61, i1 false
%63 = icmp eq i8 %41, -104
%64 = select i1 %62, i1 %63, i1 false
%65 = select i1 %64, i1 %49, i1 false
%66 = select i1 %65, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0)
%67 = select i1 %65, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0)
br label %68
68: ; preds = %59, %51, %37
%69 = phi i32 [ 0, %37 ], [ 1, %51 ], [ %38, %59 ]
%70 = phi i1 [ false, %37 ], [ false, %51 ], [ true, %59 ]
%71 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0), %37 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0), %51 ], [ %66, %59 ]
%72 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), %37 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), %51 ], [ %67, %59 ]
br i1 %39, label %78, label %73
73: ; preds = %68
%74 = icmp eq i32 %69, 0
%75 = select i1 %74, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0)
%76 = select i1 %70, i8* %72, i8* %75
%77 = tail call i32 @puts(i8* dereferenceable(1) %76)
br label %83
78: ; preds = %68
%79 = select i1 %70, i8* %71, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0)
%80 = icmp eq i32 %69, 0
%81 = select i1 %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0)
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0), i8* %79, i8* %81)
br label %83
83: ; preds = %78, %73
ret i32 0
}