#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 *, ...);
int /*<<< orphan*/ stderr;
void usage(int argc, char **argv) {
  int i;
  fprintf(stderr,
          "Usage: %s ndvi_file evi_file quality_file red_file nir_file "
          "blue_file mir_file view_zenith_file sun_zenith_file "
          "relative_azimuth_file day_of_year_file output_file\n",
          argv[0]);
  for (i = 0; i < argc; ++i) {
    fprintf(stderr, "Arg[%d] = '%s'\n", i, argv[i]);
  }
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xeca(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1184 <usage+0x74>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xf35(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <usage+0x34>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%r15
mov    %edi,%ebx
mov    0x2ebb(%rip),%r12
mov    (%r12),%edi
mov    (%rsi),%rdx
lea    0xecd(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
test   %ebx,%ebx
jle    116d <usage+0x5d>
mov    %ebx,%r13d
lea    0xf5c(%rip),%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r12),%edi
mov    (%r15,%rbx,8),%rcx
mov    %r14,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1150 <usage+0x40>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [164 x i8] c"Usage: %s ndvi_file evi_file quality_file red_file nir_file blue_file mir_file view_zenith_file sun_zenith_file relative_azimuth_file day_of_year_file output_file\0A\00"
@.str.1 = [16 x i8] c"Arg[%d] = '%s'\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* @stderr
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str, i64 0, i64 0), i8* %9)
store i32 0, i32* %5
br label %11
11: ; preds = %24, %2
%12 = load i32, i32* %5
%13 = load i32, i32* %3
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %27
15: ; preds = %11
%16 = load i32, i32* @stderr
%17 = load i32, i32* %5
%18 = load i8**, i8*** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %17, i8* %22)
br label %24
24: ; preds = %15
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %11
27: ; preds = %11
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [164 x i8] c"Usage: %s ndvi_file evi_file quality_file red_file nir_file blue_file mir_file view_zenith_file sun_zenith_file relative_azimuth_file day_of_year_file output_file\0A\00"
@.str.1 = [16 x i8] c"Arg[%d] = '%s'\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %18
7: ; preds = %2
%8 = zext i32 %0 to i64
br label %9
9: ; preds = %7, %9
%10 = phi i64 [ 0, %7 ], [ %16, %9 ]
%11 = load i32, i32* @stderr
%12 = getelementptr inbounds i8*, i8** %1, i64 %10
%13 = load i8*, i8** %12
%14 = trunc i64 %10 to i32
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %14, i8* %13)
%16 = add nuw nsw i64 %10, 1
%17 = icmp eq i64 %16, %8
br i1 %17, label %18, label %9
18: ; preds = %9, %2
ret void
}