#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*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
scalar_t__ t16_bit(int);
scalar_t__ t32_bit(int);
scalar_t__ t64_bit(int);
scalar_t__ t_double(int);
scalar_t__ t_float(int);
int main(int argc, char **argv) {
  int verbose = 0;
  int errors = 0;
  if (argc > 1 && strcmp(argv[1], "-v") == 0)
    verbose = 1;
  errors += t16_bit(verbose);
  errors += t32_bit(verbose);
  errors += t64_bit(verbose);
  errors += t_float(verbose);
  errors += t_double(verbose);
  if (errors) {
    fprintf(stderr, "%d errors\n", errors);
    return EXIT_FAILURE;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    11c3 <main+0x53>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe53(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11c3 <main+0x53>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1080 <t16_bit@plt>
mov    %rax,%rcx
movslq -0x18(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <t32_bit@plt>
mov    %rax,%rcx
movslq -0x18(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1090 <t64_bit@plt>
mov    %rax,%rcx
movslq -0x18(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <t_float@plt>
mov    %rax,%rcx
movslq -0x18(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <t_double@plt>
mov    %rax,%rcx
movslq -0x18(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     125f <main+0xef>
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%edx
lea    0xdba(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    126b <main+0xfb>
mov    0x2d6a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %r15d,%r15d
cmp    $0x2,%edi
jl     1199 <main+0x29>
mov    0x8(%rsi),%rdi
lea    0xe76(%rip),%rsi
call   1060 <strcmp@plt>
xor    %r15d,%r15d
test   %rax,%rax
sete   %r15b
mov    %r15d,%edi
call   1080 <t16_bit@plt>
mov    %rax,%r14
mov    %r15d,%edi
call   1040 <t32_bit@plt>
mov    %rax,%rbx
add    %r14d,%ebx
mov    %r15d,%edi
call   1090 <t64_bit@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    %r15d,%edi
call   1030 <t_float@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    %r15d,%edi
call   1050 <t_double@plt>
add    %ebx,%eax
je     11f8 <main+0x88>
mov    0x2e01(%rip),%rcx
mov    (%rcx),%edi
lea    0xe1b(%rip),%rsi
mov    %eax,%edx
call   1070 <fprintf@plt>
mov    0x2de2(%rip),%rax
jmp    11ff <main+0x8f>
mov    0x2dd1(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-v\00"
@stderr = global i32 0
@.str.1 = [11 x i8] c"%d errors\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %17
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %10
store i32 1, i32* %6
br label %17
17: ; preds = %16, %10, %2
%18 = load i32, i32* %6
%19 = call i64 @t16_bit(i32 %18)
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
%22 = add nsw i64 %21, %19
%23 = trunc i64 %22 to i32
store i32 %23, i32* %7
%24 = load i32, i32* %6
%25 = call i64 @t32_bit(i32 %24)
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = add nsw i64 %27, %25
%29 = trunc i64 %28 to i32
store i32 %29, i32* %7
%30 = load i32, i32* %6
%31 = call i64 @t64_bit(i32 %30)
%32 = load i32, i32* %7
%33 = sext i32 %32 to i64
%34 = add nsw i64 %33, %31
%35 = trunc i64 %34 to i32
store i32 %35, i32* %7
%36 = load i32, i32* %6
%37 = call i64 @t_float(i32 %36)
%38 = load i32, i32* %7
%39 = sext i32 %38 to i64
%40 = add nsw i64 %39, %37
%41 = trunc i64 %40 to i32
store i32 %41, i32* %7
%42 = load i32, i32* %6
%43 = call i64 @t_double(i32 %42)
%44 = load i32, i32* %7
%45 = sext i32 %44 to i64
%46 = add nsw i64 %45, %43
%47 = trunc i64 %46 to i32
store i32 %47, i32* %7
%48 = load i32, i32* %7
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %55
50: ; preds = %17
%51 = load i32, i32* @stderr
%52 = load i32, i32* %7
%53 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %52)
%54 = load i32, i32* @EXIT_FAILURE
store i32 %54, i32* %3
br label %57
55: ; preds = %17
%56 = load i32, i32* @EXIT_SUCCESS
store i32 %56, i32* %3
br label %57
57: ; preds = %55, %50
%58 = load i32, i32* %3
ret i32 %58
}

LLVM IR (-O2):
@.str = [3 x i8] c"-v\00"
@stderr = global i32 0
@.str.1 = [11 x i8] c"%d errors\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %2
%11 = phi i32 [ 0, %2 ], [ %9, %4 ]
%12 = tail call i64 @t16_bit(i32 %11)
%13 = tail call i64 @t32_bit(i32 %11)
%14 = add i64 %13, %12
%15 = tail call i64 @t64_bit(i32 %11)
%16 = add i64 %14, %15
%17 = tail call i64 @t_float(i32 %11)
%18 = add i64 %16, %17
%19 = tail call i64 @t_double(i32 %11)
%20 = add i64 %18, %19
%21 = trunc i64 %20 to i32
%22 = icmp eq i32 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %10
%24 = load i32, i32* @stderr
%25 = tail call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %21)
br label %26
26: ; preds = %10, %23
%27 = phi i32* [ @EXIT_FAILURE, %23 ], [ @EXIT_SUCCESS, %10 ]
%28 = load i32, i32* %27
ret i32 %28
}