#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*/ fatal_error(char *, char *);
int /*<<< orphan*/ seek_input_fd(char *);
int /*<<< orphan*/ seek_input_stdio(char *);
int /*<<< orphan*/ seek_output_fd(char *);
int /*<<< orphan*/ seek_output_stdio(char *);
int /*<<< orphan*/ setup();
int main(int argc, char *argv[]) {
  if (argc < 4)
    fatal_error("Usage: %s <input_path> <output_path_1> <output_path_2>\n",
                argv[0]);
  setup();
  seek_input_fd(argv[1]);
  seek_input_stdio(argv[1]);
  seek_output_fd(argv[2]);
  seek_output_stdio(argv[3]);
  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   $0x4,-0x8(%rbp)
jge    1193 <main+0x33>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe72(%rip),%rdi
call   1070 <fatal_error@plt>
mov    $0x0,%al
call   1080 <setup@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <seek_input_fd@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <seek_input_stdio@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <seek_output_fd@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1030 <seek_output_stdio@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x3,%edi
jg     1178 <main+0x18>
mov    (%rbx),%rsi
lea    0xe8d(%rip),%rdi
call   1070 <fatal_error@plt>
xor    %eax,%eax
call   1080 <setup@plt>
mov    0x8(%rbx),%rdi
call   1060 <seek_input_fd@plt>
mov    0x8(%rbx),%rdi
call   1050 <seek_input_stdio@plt>
mov    0x10(%rbx),%rdi
call   1040 <seek_output_fd@plt>
mov    0x18(%rbx),%rdi
call   1030 <seek_output_stdio@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"Usage: %s <input_path> <output_path_1> <output_path_2>\0A\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 slt i32 %6, 4
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @fatal_error(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %8, %2
%14 = call i32 (...) @setup()
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @seek_input_fd(i8* %17)
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @seek_input_stdio(i8* %21)
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 2
%25 = load i8*, i8** %24
%26 = call i32 @seek_output_fd(i8* %25)
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 3
%29 = load i8*, i8** %28
%30 = call i32 @seek_output_stdio(i8* %29)
ret i32 0
}

LLVM IR (-O2):
@.str = [56 x i8] c"Usage: %s <input_path> <output_path_1> <output_path_2>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 4
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @fatal_error(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %7
7: ; preds = %4, %2
%8 = tail call i32 (...) @setup()
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @seek_input_fd(i8* %10)
%12 = load i8*, i8** %9
%13 = tail call i32 @seek_input_stdio(i8* %12)
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = tail call i32 @seek_output_fd(i8* %15)
%17 = getelementptr inbounds i8*, i8** %1, i64 3
%18 = load i8*, i8** %17
%19 = tail call i32 @seek_output_stdio(i8* %18)
ret i32 0
}