#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int get_args(int argc, char *argv[], char **fat_path, char **data_path) {
  if (argc != 3) {
    fprintf(stderr, "Usage: %s fat_file data_file\n", argv[0]);
    return 0;
  }
  *fat_path = argv[1];
  *data_path = argv[2];
  return 1;
}


x86 assembly (clang, -O0):
<get_args>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1159 <get_args+0x49>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    117e <get_args+0x6e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_args>:
push   %rax
cmp    $0x3,%edi
jne    112b <get_args+0x1b>
mov    0x8(%rsi),%rax
mov    %rax,(%rdx)
mov    0x10(%rsi),%rax
mov    %rax,(%rcx)
mov    $0x1,%eax
pop    %rcx
ret
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Usage: %s fat_file data_file\0A\00"
define i32 @get_args(i32 %0, i8** nocapture %1, i8** nocapture writeonly %2, i8** nocapture writeonly %3) {
%5 = icmp eq i32 %0, 3
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %15
10: ; preds = %4
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
store i8* %12, i8** %2
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
store i8* %14, i8** %3
br label %15
15: ; preds = %10, %6
%16 = phi i32 [ 0, %6 ], [ 1, %10 ]
ret i32 %16
}