#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ excess(long, int, char *);
float fromIEEESingle(char *);
int /*<<< orphan*/ onesComplement(long, int, char *);
int /*<<< orphan*/ printf(char *, ...);
float reverseExcess(int, char *);
float reverseOnesComplement(int, char *);
float reverseSignedMagnitude(int, char *);
float reverseTwosComplement(int, char *);
int /*<<< orphan*/ signedMagnitude(long, int, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int /*<<< orphan*/ toIEEESingle(long, char *);
int /*<<< orphan*/ twosComplement(long, int, char *);
int /*<<< orphan*/ useArgs(int, char **, int *, long *, float *, int *,
                           char **);
int main(int argc, char *argv[]) {
  int l, mode;
  long n;
  float f = 0;
  char *binaryIn;
  if (!useArgs(argc, argv, &l, &n, &f, &mode, &binaryIn))
    return EXIT_FAILURE;
  if (mode) {
    char result[l + 1];
    if (f) {
      toIEEESingle(f, result);
      printf("IEEE-754 Single: %s\n", result);
    } else {
      signedMagnitude(n, l, result);
      printf("Signed Magnitude: %s\n", result);
      onesComplement(n, l, result);
      printf("One's Complement: %s\n", result);
      twosComplement(n, l, result);
      printf("Two's Complement: %s\n", result);
      excess(n, l, result);
      printf("Excess Representation: %s\n", result);
      if (l == 32) {
        toIEEESingle(n, result);
        printf("IEEE-754 Single: %s\n", result);
      }
    }
    return EXIT_SUCCESS;
  }
  printf("Signed Magnitude: %li\n", reverseSignedMagnitude(l, binaryIn));
  printf("One's Complement: %li\n", reverseOnesComplement(l, binaryIn));
  printf("Two's Complement: %li\n", reverseTwosComplement(l, binaryIn));
  printf("Excess Representation: %li\n", reverseExcess(l, binaryIn));
  if (l == 32) {
    if (!strncmp(&binaryIn[1], "1111111", 7) &&
        strcmp(&binaryIn[8], "00000000000000000000000")) {
      printf("IEEE-754 Single: NaN");
    } else {
      float result = fromIEEESingle(binaryIn);
      if ((result < 0.00001 && result > 0) ||
          (result < -0.0 && result > -0.00001))
        printf("IEEE-754 Single: %.60lf\n", result);
      else
        printf("IEEE-754 Single: %lf\n", result);
    }
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x24(%rbp),%r8
lea    -0x18(%rbp),%r9
lea    -0x30(%rbp),%rax
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   1030 <useArgs@plt>
add    $0x10,%rsp
cmp    $0x0,%eax
jne    1244 <main+0x64>
mov    0x2da6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1515 <main+0x335>
cmpl   $0x0,-0x18(%rbp)
je     1387 <main+0x1a7>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
movss  -0x24(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1293 <main+0xb3>
jp     1293 <main+0xb3>
jmp    12b9 <main+0xd9>
mov    -0x50(%rbp),%rsi
cvttss2si -0x24(%rbp),%rdi
call   1070 <toIEEESingle@plt>
mov    -0x50(%rbp),%rsi
lea    0xd6b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    136f <main+0x18f>
mov    -0x50(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1090 <signedMagnitude@plt>
mov    -0x50(%rbp),%rsi
lea    0xd59(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <onesComplement@plt>
mov    -0x50(%rbp),%rsi
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   10b0 <twosComplement@plt>
mov    -0x50(%rbp),%rsi
lea    0xd41(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   10e0 <excess@plt>
mov    -0x50(%rbp),%rsi
lea    0xd35(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x20,-0x14(%rbp)
jne    136a <main+0x18a>
mov    -0x50(%rbp),%rsi
mov    -0x20(%rbp),%rdi
call   1070 <toIEEESingle@plt>
mov    -0x50(%rbp),%rsi
lea    0xcb5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    136f <main+0x18f>
mov    0x2c62(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
jmp    1515 <main+0x335>
mov    -0x14(%rbp),%edi
mov    -0x30(%rbp),%rsi
call   1100 <reverseSignedMagnitude@plt>
cvtss2sd %xmm0,%xmm0
lea    0xcec(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%edi
mov    -0x30(%rbp),%rsi
call   1080 <reverseOnesComplement@plt>
cvtss2sd %xmm0,%xmm0
lea    0xce5(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%edi
mov    -0x30(%rbp),%rsi
call   10d0 <reverseTwosComplement@plt>
cvtss2sd %xmm0,%xmm0
lea    0xcde(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%edi
mov    -0x30(%rbp),%rsi
call   10c0 <reverseExcess@plt>
cvtss2sd %xmm0,%xmm0
lea    0xcd7(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmpl   $0x20,-0x14(%rbp)
jne    1509 <main+0x329>
mov    -0x30(%rbp),%rdi
add    $0x1,%rdi
lea    0xcd3(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    145c <main+0x27c>
mov    -0x30(%rbp),%rdi
add    $0x8,%rdi
lea    0xcb9(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     145c <main+0x27c>
lea    0xcbb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1504 <main+0x324>
mov    -0x30(%rbp),%rdi
call   10f0 <fromIEEESingle@plt>
movss  %xmm0,-0x44(%rbp)
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xb85(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1496 <main+0x2b6>
movss  -0x44(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
ja     14cc <main+0x2ec>
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xb61(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    14e8 <main+0x308>
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xb4e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14e8 <main+0x308>
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc44(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    14ff <main+0x31f>
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc41(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    1504 <main+0x324>
jmp    1509 <main+0x329>
mov    0x2ac8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
movl   $0x0,-0x2c(%rbp)
sub    $0x8,%rsp
lea    -0x20(%rbp),%rax
lea    -0x14(%rbp),%rdx
lea    -0x28(%rbp),%rcx
lea    -0x2c(%rbp),%r8
lea    -0x30(%rbp),%r9
push   %rax
call   1030 <useArgs@plt>
add    $0x10,%rsp
test   %eax,%eax
je     1255 <main+0x75>
cmpl   $0x0,-0x30(%rbp)
mov    -0x14(%rbp),%edi
je     1261 <main+0x81>
mov    %rsp,%r14
add    $0x1,%edi
mov    %rsp,%rbx
add    $0xf,%rdi
and    $0xfffffffffffffff0,%rdi
sub    %rdi,%rbx
mov    %rbx,%rsp
movss  -0x2c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    124b <main+0x6b>
jnp    134a <main+0x16a>
cvttss2si %xmm0,%rdi
jmp    13d4 <main+0x1f4>
mov    0x2d84(%rip),%rax
jmp    143d <main+0x25d>
mov    -0x20(%rbp),%rsi
call   1100 <reverseSignedMagnitude@plt>
cvtss2sd %xmm0,%xmm0
lea    0xe0d(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1080 <reverseOnesComplement@plt>
cvtss2sd %xmm0,%xmm0
lea    0xe06(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   10d0 <reverseTwosComplement@plt>
cvtss2sd %xmm0,%xmm0
lea    0xdff(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   10c0 <reverseExcess@plt>
cvtss2sd %xmm0,%xmm0
lea    0xdf8(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
cmpl   $0x20,-0x14(%rbp)
jne    1436 <main+0x256>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
lea    0xdf4(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     13fb <main+0x21b>
mov    -0x20(%rbp),%rdi
call   10f0 <fromIEEESingle@plt>
movaps %xmm0,%xmm1
cvtss2sd %xmm0,%xmm0
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm1
jbe    1327 <main+0x147>
movsd  0xcdf(%rip),%xmm3
ucomisd %xmm0,%xmm3
ja     133e <main+0x15e>
ucomiss %xmm1,%xmm2
jbe    1428 <main+0x248>
ucomisd 0xcd0(%rip),%xmm0
jbe    1428 <main+0x248>
lea    0xdd3(%rip),%rdi
jmp    142f <main+0x24f>
mov    -0x28(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %rbx,%rdx
call   1090 <signedMagnitude@plt>
lea    0xcc5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %rbx,%rdx
call   1050 <onesComplement@plt>
lea    0xcbb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %rbx,%rdx
call   10b0 <twosComplement@plt>
lea    0xcb1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %rbx,%rdx
call   10e0 <excess@plt>
lea    0xca7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
cmpl   $0x20,-0x14(%rbp)
jne    13ed <main+0x20d>
mov    -0x28(%rbp),%rdi
mov    %rbx,%rsi
call   1070 <toIEEESingle@plt>
lea    0xc2d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2be4(%rip),%rax
mov    (%rax),%eax
mov    %r14,%rsp
jmp    143f <main+0x25f>
mov    -0x20(%rbp),%rdi
add    $0x8,%rdi
lea    0xce1(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1301 <main+0x121>
lea    0xce4(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1436 <main+0x256>
lea    0xd02(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x2b9b(%rip),%rax
mov    (%rax),%eax
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [21 x i8] c"IEEE-754 Single: %s\0A\00"
@.str.1 = [22 x i8] c"Signed Magnitude: %s\0A\00"
@.str.2 = [22 x i8] c"One's Complement: %s\0A\00"
@.str.3 = [22 x i8] c"Two's Complement: %s\0A\00"
@.str.4 = [27 x i8] c"Excess Representation: %s\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.5 = [23 x i8] c"Signed Magnitude: %li\0A\00"
@.str.6 = [23 x i8] c"One's Complement: %li\0A\00"
@.str.7 = [23 x i8] c"Two's Complement: %li\0A\00"
@.str.8 = [28 x i8] c"Excess Representation: %li\0A\00"
@.str.9 = [8 x i8] c"1111111\00"
@.str.10 = [24 x i8] c"00000000000000000000000\00"
@.str.11 = [21 x i8] c"IEEE-754 Single: NaN\00"
@.str.12 = [25 x i8] c"IEEE-754 Single: %.60lf\0A\00"
@.str.13 = [22 x i8] c"IEEE-754 Single: %lf\0A\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 i64
%9 = alloca float
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0.000000e+00, float* %9
%14 = load i32, i32* %4
%15 = load i8**, i8*** %5
%16 = call i32 @useArgs(i32 %14, i8** %15, i32* %6, i64* %8, float* %9, i32* %7, i8** %10)
%17 = icmp ne i32 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %2
%19 = load i32, i32* @EXIT_FAILURE
store i32 %19, i32* %3
br label %127
20: ; preds = %2
%21 = load i32, i32* %7
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %63
23: ; preds = %20
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
%26 = zext i32 %25 to i64
%27 = call i8* @llvm.stacksave()
store i8* %27, i8** %11
%28 = alloca i8, i64 %26
store i64 %26, i64* %12
%29 = load float, float* %9
%30 = fcmp une float %29, 0.000000e+00
br i1 %30, label %31, label %36
31: ; preds = %23
%32 = load float, float* %9
%33 = fptosi float %32 to i64
%34 = call i32 @toIEEESingle(i64 %33, i8* %28)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %28)
br label %60
36: ; preds = %23
%37 = load i64, i64* %8
%38 = load i32, i32* %6
%39 = call i32 @signedMagnitude(i64 %37, i32 %38, i8* %28)
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %28)
%41 = load i64, i64* %8
%42 = load i32, i32* %6
%43 = call i32 @onesComplement(i64 %41, i32 %42, i8* %28)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %28)
%45 = load i64, i64* %8
%46 = load i32, i32* %6
%47 = call i32 @twosComplement(i64 %45, i32 %46, i8* %28)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %28)
%49 = load i64, i64* %8
%50 = load i32, i32* %6
%51 = call i32 @excess(i64 %49, i32 %50, i8* %28)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %28)
%53 = load i32, i32* %6
%54 = icmp eq i32 %53, 32
br i1 %54, label %55, label %59
55: ; preds = %36
%56 = load i64, i64* %8
%57 = call i32 @toIEEESingle(i64 %56, i8* %28)
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %28)
br label %59
59: ; preds = %55, %36
br label %60
60: ; preds = %59, %31
%61 = load i32, i32* @EXIT_SUCCESS
store i32 %61, i32* %3
%62 = load i8*, i8** %11
br label %127
63: ; preds = %20
%64 = load i32, i32* %6
%65 = load i8*, i8** %10
%66 = call float @reverseSignedMagnitude(i32 %64, i8* %65)
%67 = fpext float %66 to double
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), double %67)
%69 = load i32, i32* %6
%70 = load i8*, i8** %10
%71 = call float @reverseOnesComplement(i32 %69, i8* %70)
%72 = fpext float %71 to double
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), double %72)
%74 = load i32, i32* %6
%75 = load i8*, i8** %10
%76 = call float @reverseTwosComplement(i32 %74, i8* %75)
%77 = fpext float %76 to double
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), double %77)
%79 = load i32, i32* %6
%80 = load i8*, i8** %10
%81 = call float @reverseExcess(i32 %79, i8* %80)
%82 = fpext float %81 to double
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), double %82)
%84 = load i32, i32* %6
%85 = icmp eq i32 %84, 32
br i1 %85, label %86, label %125
86: ; preds = %63
%87 = load i8*, i8** %10
%88 = getelementptr inbounds i8, i8* %87, i64 1
%89 = call i32 @strncmp(i8* %88, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 7)
%90 = icmp ne i32 %89, 0
br i1 %90, label %98, label %91
91: ; preds = %86
%92 = load i8*, i8** %10
%93 = getelementptr inbounds i8, i8* %92, i64 8
%94 = call i64 @strcmp(i8* %93, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%95 = icmp ne i64 %94, 0
br i1 %95, label %96, label %98
96: ; preds = %91
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
br label %124
98: ; preds = %91, %86
%99 = load i8*, i8** %10
%100 = call float @fromIEEESingle(i8* %99)
store float %100, float* %13
%101 = load float, float* %13
%102 = fpext float %101 to double
%103 = fcmp olt double %102, 1.000000e-05
br i1 %103, label %104, label %107
104: ; preds = %98
%105 = load float, float* %13
%106 = fcmp ogt float %105, 0.000000e+00
br i1 %106, label %115, label %107
107: ; preds = %104, %98
%108 = load float, float* %13
%109 = fpext float %108 to double
%110 = fcmp olt double %109, -0.000000e+00
br i1 %110, label %111, label %119
111: ; preds = %107
%112 = load float, float* %13
%113 = fpext float %112 to double
%114 = fcmp ogt double %113, -1.000000e-05
br i1 %114, label %115, label %119
115: ; preds = %111, %104
%116 = load float, float* %13
%117 = fpext float %116 to double
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), double %117)
br label %123
119: ; preds = %111, %107
%120 = load float, float* %13
%121 = fpext float %120 to double
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), double %121)
br label %123
123: ; preds = %119, %115
br label %124
124: ; preds = %123, %96
br label %125
125: ; preds = %124, %63
%126 = load i32, i32* @EXIT_SUCCESS
store i32 %126, i32* %3
br label %127
127: ; preds = %125, %60, %18
%128 = load i32, i32* %3
ret i32 %128
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [21 x i8] c"IEEE-754 Single: %s\0A\00"
@.str.1 = [22 x i8] c"Signed Magnitude: %s\0A\00"
@.str.2 = [22 x i8] c"One's Complement: %s\0A\00"
@.str.3 = [22 x i8] c"Two's Complement: %s\0A\00"
@.str.4 = [27 x i8] c"Excess Representation: %s\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.5 = [23 x i8] c"Signed Magnitude: %li\0A\00"
@.str.6 = [23 x i8] c"One's Complement: %li\0A\00"
@.str.7 = [23 x i8] c"Two's Complement: %li\0A\00"
@.str.8 = [28 x i8] c"Excess Representation: %li\0A\00"
@.str.9 = [8 x i8] c"1111111\00"
@.str.10 = [24 x i8] c"00000000000000000000000\00"
@.str.11 = [21 x i8] c"IEEE-754 Single: NaN\00"
@.str.12 = [25 x i8] c"IEEE-754 Single: %.60lf\0A\00"
@.str.13 = [22 x i8] c"IEEE-754 Single: %lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca float
%7 = alloca i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i64* %5 to i8*
%11 = bitcast float* %6 to i8*
store float 0.000000e+00, float* %6
%12 = bitcast i8** %7 to i8*
%13 = call i32 @useArgs(i32 %0, i8** %1, i32* %3, i64* %5, float* %6, i32* %4, i8** %7)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i32, i32* @EXIT_FAILURE
br label %108
17: ; preds = %2
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 0
%20 = load i32, i32* %3
br i1 %19, label %57, label %21
21: ; preds = %17
%22 = add nsw i32 %20, 1
%23 = zext i32 %22 to i64
%24 = call i8* @llvm.stacksave()
%25 = alloca i8, i64 %23
%26 = load float, float* %6
%27 = fcmp une float %26, 0.000000e+00
br i1 %27, label %28, label %30
28: ; preds = %21
%29 = fptosi float %26 to i64
br label %51
30: ; preds = %21
%31 = load i64, i64* %5
%32 = load i32, i32* %3
%33 = call i32 @signedMagnitude(i64 %31, i32 %32, i8* %25)
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %25)
%35 = load i64, i64* %5
%36 = load i32, i32* %3
%37 = call i32 @onesComplement(i64 %35, i32 %36, i8* %25)
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %25)
%39 = load i64, i64* %5
%40 = load i32, i32* %3
%41 = call i32 @twosComplement(i64 %39, i32 %40, i8* %25)
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %25)
%43 = load i64, i64* %5
%44 = load i32, i32* %3
%45 = call i32 @excess(i64 %43, i32 %44, i8* %25)
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %25)
%47 = load i32, i32* %3
%48 = icmp eq i32 %47, 32
br i1 %48, label %49, label %55
49: ; preds = %30
%50 = load i64, i64* %5
br label %51
51: ; preds = %28, %49
%52 = phi i64 [ %50, %49 ], [ %29, %28 ]
%53 = call i32 @toIEEESingle(i64 %52, i8* %25)
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %25)
br label %55
55: ; preds = %51, %30
%56 = load i32, i32* @EXIT_SUCCESS
br label %108
57: ; preds = %17
%58 = load i8*, i8** %7
%59 = call float @reverseSignedMagnitude(i32 %20, i8* %58)
%60 = fpext float %59 to double
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), double %60)
%62 = load i32, i32* %3
%63 = load i8*, i8** %7
%64 = call float @reverseOnesComplement(i32 %62, i8* %63)
%65 = fpext float %64 to double
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), double %65)
%67 = load i32, i32* %3
%68 = load i8*, i8** %7
%69 = call float @reverseTwosComplement(i32 %67, i8* %68)
%70 = fpext float %69 to double
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), double %70)
%72 = load i32, i32* %3
%73 = load i8*, i8** %7
%74 = call float @reverseExcess(i32 %72, i8* %73)
%75 = fpext float %74 to double
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), double %75)
%77 = load i32, i32* %3
%78 = icmp eq i32 %77, 32
br i1 %78, label %79, label %106
79: ; preds = %57
%80 = load i8*, i8** %7
%81 = getelementptr inbounds i8, i8* %80, i64 1
%82 = call i32 @strncmp(i8* %81, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 7)
%83 = icmp eq i32 %82, 0
br i1 %83, label %84, label %91
84: ; preds = %79
%85 = load i8*, i8** %7
%86 = getelementptr inbounds i8, i8* %85, i64 8
%87 = call i64 @strcmp(i8* %86, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%88 = icmp eq i64 %87, 0
br i1 %88, label %91, label %89
89: ; preds = %84
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
br label %106
91: ; preds = %84, %79
%92 = load i8*, i8** %7
%93 = call float @fromIEEESingle(i8* %92)
%94 = fpext float %93 to double
%95 = fcmp olt double %94, 1.000000e-05
%96 = fcmp ogt float %93, 0.000000e+00
%97 = and i1 %96, %95
br i1 %97, label %102, label %98
98: ; preds = %91
%99 = fcmp olt float %93, 0.000000e+00
%100 = fcmp ogt double %94, -1.000000e-05
%101 = and i1 %99, %100
br i1 %101, label %102, label %104
102: ; preds = %98, %91
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), double %94)
br label %106
104: ; preds = %98
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), double %94)
br label %106
106: ; preds = %102, %104, %89, %57
%107 = load i32, i32* @EXIT_SUCCESS
br label %108
108: ; preds = %106, %55, %15
%109 = phi i32 [ %56, %55 ], [ %107, %106 ], [ %16, %15 ]
ret i32 %109
}