int main(argc, argv)
int argc;
char *argv[];
{
  if (argc != 2)
    usage();
  if (strcmp(argv[1], "-7") == 0)
    to7bit();
  else if (strcmp(argv[1], "-8") == 0)
    to8bit();
  else
    usage();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1167 <main+0x27>
mov    $0x0,%al
call   1050 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe8a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1190 <main+0x50>
mov    $0x0,%al
call   1060 <to7bit@plt>
jmp    11c5 <main+0x85>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe64(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11b9 <main+0x79>
mov    $0x0,%al
call   1040 <to8bit@plt>
jmp    11c0 <main+0x80>
mov    $0x0,%al
call   1050 <usage@plt>
jmp    11c5 <main+0x85>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
je     1150 <main+0x10>
xor    %eax,%eax
call   1050 <usage@plt>
mov    0x8(%rbx),%rbx
lea    0xea5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1183 <main+0x43>
lea    0xe95(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     118c <main+0x4c>
xor    %eax,%eax
call   1050 <usage@plt>
jmp    1193 <main+0x53>
xor    %eax,%eax
call   1060 <to7bit@plt>
jmp    1193 <main+0x53>
xor    %eax,%eax
call   1040 <to8bit@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-7\00"
@.str.1 = [3 x i8] c"-8\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @usage()
br label %10
10: ; preds = %8, %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @strcmp(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = call i32 (...) @to7bit()
br label %29
18: ; preds = %10
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @strcmp(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %18
%25 = call i32 (...) @to8bit()
br label %28
26: ; preds = %18
%27 = call i32 (...) @usage()
br label %28
28: ; preds = %26, %24
br label %29
29: ; preds = %28, %16
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-7\00"
@.str.1 = [3 x i8] c"-8\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %8, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = tail call i32 (...) @to7bit()
br label %20
13: ; preds = %6
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %8, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 (...) @to8bit()
br label %20
18: ; preds = %13
%19 = tail call i32 (...) @usage()
br label %20
20: ; preds = %16, %18, %11
ret i32 0
}