#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 convert(char *, char *);
int /*<<< orphan*/ exit(int);
int main(int argc, char **argv) {
  char *outpath;
  char *inpath;
  if (argc > 1) {
    inpath = argv[1];
  } else {
    exit(2);
  }
  if (argc > 2) {
    outpath = argv[2];
  } else {
    exit(2);
  }
  int rval = convert(inpath, outpath);
  exit(rval);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1151 <main+0x31>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    115b <main+0x3b>
mov    $0x2,%edi
call   1040 <exit@plt>
cmpl   $0x2,-0x8(%rbp)
jle    1176 <main+0x56>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1180 <main+0x60>
mov    $0x2,%edi
call   1040 <exit@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <convert@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     1128 <main+0x8>
jne    1132 <main+0x12>
mov    $0x2,%edi
call   1040 <exit@plt>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1030 <convert@plt>
mov    %eax,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 1
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
store i8* %14, i8** %7
br label %17
15: ; preds = %2
%16 = call i32 @exit(i32 2)
unreachable
17: ; preds = %11
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 2
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
store i8* %23, i8** %6
br label %26
24: ; preds = %17
%25 = call i32 @exit(i32 2)
unreachable
26: ; preds = %20
%27 = load i8*, i8** %7
%28 = load i8*, i8** %6
%29 = call i32 @convert(i8* %27, i8* %28)
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = call i32 @exit(i32 %30)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = icmp eq i32 %0, 2
br i1 %5, label %15, label %8
6: ; preds = %2
%7 = tail call i32 @exit(i32 2)
unreachable
8: ; preds = %4
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32 @convert(i8* %10, i8* %12)
%14 = tail call i32 @exit(i32 %13)
unreachable
15: ; preds = %4
%16 = tail call i32 @exit(i32 2)
unreachable
}