#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 *, ...);
int main(void) {
  char a = 1, a1 = 1, a2 = 1;
  short b = 1, b1;
  int c = 1, c1, x = 1;
  long d = 1, d1;
  float e = 1, e1 = 1, e2 = 1, g = 1, g1;
  double f = 1, f1 = 1, f2 = 1, h = 1, h1;
  int i = 0, j = 0, k = 0, l = 0, m = 0, n = 0, o = 0, p = 0;
  char *y = (char *)&x;
  while (a1 > 0) {
    a = a1;
    a1 = a * 2;
    a2 = a1 / 2;
    i++;
  }
  if (a2 != 0)
    printf("char is signed\n");
  else
    printf("char is unsigned\n");
  if (y[0] == 0)
    printf("This machine is BIG endian\n");
  else
    printf("This machine is little endian\n");
  while (b > 0) {
    b = b * 2;
    b1 = b / 2;
    j++;
  }
  while (c > 0) {
    c = c * 2;
    c1 = c / 2;
    k++;
  }
  while (d > 0) {
    d = d * 2;
    d1 = d / 2;
    l++;
  }
  while (e == e2) {
    e = e1;
    e1 = e * 2;
    e2 = e1 / 2;
    m++;
  }
  while (g > 0) {
    g = g / 2;
    g1 = g * 2;
    o++;
  }
  while (f == f2) {
    f = f1;
    f1 = f * 2;
    f2 = f1 / 2;
    n++;
  }
  while (h > 0) {
    h = h / 2;
    h1 = h * 2;
    p++;
  }
  i = i - 1;
  j = j - 1;
  k = k - 1;
  l = l - 1;
  m = m - 1;
  n = n - 1;
  o = o - 1;
  p = p - 1;
  printf("The largest positive power of 2 represented with char  is %d\n", i);
  printf("The largest positive power of 2 represented with short is %d\n", j);
  printf("The largest positive power of 2 represented with int is %d\n", k);
  printf("The largest positive power of 2 represented with long is %d\n", l);
  printf("The largest positive and negative powers of 2 represented with float "
         "are %d and %d respectively\n",
         m, o);
  printf("The largest positive and negative powers of 2 represented with "
         "double are %d and %d respectively\n",
         n, p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x1,-0x5(%rbp)
movb   $0x1,-0x6(%rbp)
movb   $0x1,-0x7(%rbp)
movw   $0x1,-0xa(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
movss  0xebe(%rip),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xeb1(%rip),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  0xea4(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  0xe97(%rip),%xmm0
movss  %xmm0,-0x38(%rbp)
movsd  0xe7a(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe60(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe53(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
movl   $0x0,-0x80(%rbp)
movl   $0x0,-0x84(%rbp)
movl   $0x0,-0x88(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x90(%rbp)
movsbl -0x6(%rbp),%eax
cmp    $0x0,%eax
jle    1235 <main+0x125>
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11fb <main+0xeb>
movsbl -0x7(%rbp),%eax
cmp    $0x0,%eax
je     1255 <main+0x145>
lea    0xdcf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1263 <main+0x153>
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x90(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1289 <main+0x179>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1297 <main+0x187>
lea    0xdc6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    129c <main+0x18c>
movswl -0xa(%rbp),%eax
cmp    $0x0,%eax
jle    12d2 <main+0x1c2>
movswl -0xa(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %ax,-0xc(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    129c <main+0x18c>
jmp    12d7 <main+0x1c7>
cmpl   $0x0,-0x10(%rbp)
jle    1306 <main+0x1f6>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    12d7 <main+0x1c7>
jmp    130b <main+0x1fb>
cmpq   $0x0,-0x20(%rbp)
jle    1342 <main+0x232>
mov    -0x20(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x28(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    130b <main+0x1fb>
jmp    1347 <main+0x237>
movss  -0x2c(%rbp),%xmm0
ucomiss -0x34(%rbp),%xmm0
jne    139c <main+0x28c>
jp     139c <main+0x28c>
movss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xca6(%rip),%xmm0
mulss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm0
movss  0xc8f(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1347 <main+0x237>
jmp    13a1 <main+0x291>
movss  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    13ee <main+0x2de>
movss  -0x38(%rbp),%xmm0
movss  0xc55(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  0xc44(%rip),%xmm0
mulss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    13a1 <main+0x291>
jmp    13f3 <main+0x2e3>
movsd  -0x48(%rbp),%xmm0
ucomisd -0x58(%rbp),%xmm0
jne    1449 <main+0x339>
jp     1449 <main+0x339>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xbed(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xbd6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    13f3 <main+0x2e3>
jmp    144e <main+0x33e>
movsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    149c <main+0x38c>
movsd  -0x60(%rbp),%xmm0
movsd  0xb9b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xb8a(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    144e <main+0x33e>
mov    -0x6c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x70(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x78(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x80(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x80(%rbp)
mov    -0x84(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x84(%rbp)
mov    -0x88(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x88(%rbp)
mov    -0x6c(%rbp),%esi
lea    0xb7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x70(%rbp),%esi
lea    0xba8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x74(%rbp),%esi
lea    0xbd5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x78(%rbp),%esi
lea    0xc00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x7c(%rbp),%esi
mov    -0x84(%rbp),%edx
lea    0xc26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x80(%rbp),%esi
mov    -0x88(%rbp),%edx
lea    0xc70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"char is signed\0A\00"
@.str.1 = [18 x i8] c"char is unsigned\0A\00"
@.str.2 = [28 x i8] c"This machine is BIG endian\0A\00"
@.str.3 = [31 x i8] c"This machine is little endian\0A\00"
@.str.4 = [62 x i8] c"The largest positive power of 2 represented with char is %d\0A\00"
@.str.5 = [62 x i8] c"The largest positive power of 2 represented with short is %d\0A\00"
@.str.6 = [60 x i8] c"The largest positive power of 2 represented with int is %d\0A\00"
@.str.7 = [61 x i8] c"The largest positive power of 2 represented with long is %d\0A\00"
@.str.8 = [97 x i8] c"The largest positive and negative powers of 2 represented with float are %d and %d respectively\0A\00"
@.str.9 = [98 x i8] c"The largest positive and negative powers of 2 represented with double are %d and %d respectively\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i16
%6 = alloca i16
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
%11 = alloca i64
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i8*
store i32 0, i32* %1
store i8 1, i8* %2
store i8 1, i8* %3
store i8 1, i8* %4
store i16 1, i16* %5
store i32 1, i32* %7
store i32 1, i32* %9
store i64 1, i64* %10
store float 1.000000e+00, float* %12
store float 1.000000e+00, float* %13
store float 1.000000e+00, float* %14
store float 1.000000e+00, float* %15
store double 1.000000e+00, double* %17
store double 1.000000e+00, double* %18
store double 1.000000e+00, double* %19
store double 1.000000e+00, double* %20
store i32 0, i32* %22
store i32 0, i32* %23
store i32 0, i32* %24
store i32 0, i32* %25
store i32 0, i32* %26
store i32 0, i32* %27
store i32 0, i32* %28
store i32 0, i32* %29
%31 = bitcast i32* %9 to i8*
store i8* %31, i8** %30
br label %32
32: ; preds = %36, %0
%33 = load i8, i8* %3
%34 = sext i8 %33 to i32
%35 = icmp sgt i32 %34, 0
br i1 %35, label %36, label %48
36: ; preds = %32
%37 = load i8, i8* %3
store i8 %37, i8* %2
%38 = load i8, i8* %2
%39 = sext i8 %38 to i32
%40 = mul nsw i32 %39, 2
%41 = trunc i32 %40 to i8
store i8 %41, i8* %3
%42 = load i8, i8* %3
%43 = sext i8 %42 to i32
%44 = sdiv i32 %43, 2
%45 = trunc i32 %44 to i8
store i8 %45, i8* %4
%46 = load i32, i32* %22
%47 = add nsw i32 %46, 1
store i32 %47, i32* %22
br label %32
48: ; preds = %32
%49 = load i8, i8* %4
%50 = sext i8 %49 to i32
%51 = icmp ne i32 %50, 0
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %56
54: ; preds = %48
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %56
56: ; preds = %54, %52
%57 = load i8*, i8** %30
%58 = getelementptr inbounds i8, i8* %57, i64 0
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %56
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %66
64: ; preds = %56
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %66
66: ; preds = %64, %62
br label %67
67: ; preds = %71, %66
%68 = load i16, i16* %5
%69 = sext i16 %68 to i32
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %82
71: ; preds = %67
%72 = load i16, i16* %5
%73 = sext i16 %72 to i32
%74 = mul nsw i32 %73, 2
%75 = trunc i32 %74 to i16
store i16 %75, i16* %5
%76 = load i16, i16* %5
%77 = sext i16 %76 to i32
%78 = sdiv i32 %77, 2
%79 = trunc i32 %78 to i16
store i16 %79, i16* %6
%80 = load i32, i32* %23
%81 = add nsw i32 %80, 1
store i32 %81, i32* %23
br label %67
82: ; preds = %67
br label %83
83: ; preds = %86, %82
%84 = load i32, i32* %7
%85 = icmp sgt i32 %84, 0
br i1 %85, label %86, label %93
86: ; preds = %83
%87 = load i32, i32* %7
%88 = mul nsw i32 %87, 2
store i32 %88, i32* %7
%89 = load i32, i32* %7
%90 = sdiv i32 %89, 2
store i32 %90, i32* %8
%91 = load i32, i32* %24
%92 = add nsw i32 %91, 1
store i32 %92, i32* %24
br label %83
93: ; preds = %83
br label %94
94: ; preds = %97, %93
%95 = load i64, i64* %10
%96 = icmp sgt i64 %95, 0
br i1 %96, label %97, label %104
97: ; preds = %94
%98 = load i64, i64* %10
%99 = mul nsw i64 %98, 2
store i64 %99, i64* %10
%100 = load i64, i64* %10
%101 = sdiv i64 %100, 2
store i64 %101, i64* %11
%102 = load i32, i32* %25
%103 = add nsw i32 %102, 1
store i32 %103, i32* %25
br label %94
104: ; preds = %94
br label %105
105: ; preds = %109, %104
%106 = load float, float* %12
%107 = load float, float* %14
%108 = fcmp oeq float %106, %107
br i1 %108, label %109, label %117
109: ; preds = %105
%110 = load float, float* %13
store float %110, float* %12
%111 = load float, float* %12
%112 = fmul float %111, 2.000000e+00
store float %112, float* %13
%113 = load float, float* %13
%114 = fdiv float %113, 2.000000e+00
store float %114, float* %14
%115 = load i32, i32* %26
%116 = add nsw i32 %115, 1
store i32 %116, i32* %26
br label %105
117: ; preds = %105
br label %118
118: ; preds = %121, %117
%119 = load float, float* %15
%120 = fcmp ogt float %119, 0.000000e+00
br i1 %120, label %121, label %128
121: ; preds = %118
%122 = load float, float* %15
%123 = fdiv float %122, 2.000000e+00
store float %123, float* %15
%124 = load float, float* %15
%125 = fmul float %124, 2.000000e+00
store float %125, float* %16
%126 = load i32, i32* %28
%127 = add nsw i32 %126, 1
store i32 %127, i32* %28
br label %118
128: ; preds = %118
br label %129
129: ; preds = %133, %128
%130 = load double, double* %17
%131 = load double, double* %19
%132 = fcmp oeq double %130, %131
br i1 %132, label %133, label %141
133: ; preds = %129
%134 = load double, double* %18
store double %134, double* %17
%135 = load double, double* %17
%136 = fmul double %135, 2.000000e+00
store double %136, double* %18
%137 = load double, double* %18
%138 = fdiv double %137, 2.000000e+00
store double %138, double* %19
%139 = load i32, i32* %27
%140 = add nsw i32 %139, 1
store i32 %140, i32* %27
br label %129
141: ; preds = %129
br label %142
142: ; preds = %145, %141
%143 = load double, double* %20
%144 = fcmp ogt double %143, 0.000000e+00
br i1 %144, label %145, label %152
145: ; preds = %142
%146 = load double, double* %20
%147 = fdiv double %146, 2.000000e+00
store double %147, double* %20
%148 = load double, double* %20
%149 = fmul double %148, 2.000000e+00
store double %149, double* %21
%150 = load i32, i32* %29
%151 = add nsw i32 %150, 1
store i32 %151, i32* %29
br label %142
152: ; preds = %142
%153 = load i32, i32* %22
%154 = sub nsw i32 %153, 1
store i32 %154, i32* %22
%155 = load i32, i32* %23
%156 = sub nsw i32 %155, 1
store i32 %156, i32* %23
%157 = load i32, i32* %24
%158 = sub nsw i32 %157, 1
store i32 %158, i32* %24
%159 = load i32, i32* %25
%160 = sub nsw i32 %159, 1
store i32 %160, i32* %25
%161 = load i32, i32* %26
%162 = sub nsw i32 %161, 1
store i32 %162, i32* %26
%163 = load i32, i32* %27
%164 = sub nsw i32 %163, 1
store i32 %164, i32* %27
%165 = load i32, i32* %28
%166 = sub nsw i32 %165, 1
store i32 %166, i32* %28
%167 = load i32, i32* %29
%168 = sub nsw i32 %167, 1
store i32 %168, i32* %29
%169 = load i32, i32* %22
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.4, i64 0, i64 0), i32 %169)
%171 = load i32, i32* %23
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0), i32 %171)
%173 = load i32, i32* %24
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.6, i64 0, i64 0), i32 %173)
%175 = load i32, i32* %25
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0), i32 %175)
%177 = load i32, i32* %26
%178 = load i32, i32* %28
%179 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.8, i64 0, i64 0), i32 %177, i32 %178)
%180 = load i32, i32* %27
%181 = load i32, i32* %29
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.9, i64 0, i64 0), i32 %180, i32 %181)
ret i32 0
}

LLVM IR (-O2):
@str.10 = [30 x i8] c"This machine is little endian\00"
@str.11 = [15 x i8] c"char is signed\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.11, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.10, i64 0, i64 0))
unreachable
}