#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*/ puts(char *);
int /*<<< orphan*/ stderr;
void usage(int argc, char *argv[]) {
  char *name = argv[0];
  int i;
  fprintf(stderr, "example: %s points.csv rectangle.csv\n", name);
  fprintf(stderr,
          "usage: %s OPITON FILE1 FILE2 FILE3\n"
          "FILE1 points\n FILE2 rectangle\nFILE3 output\n"
          "OPITON:\n"
          "-d direct access\n-q quad tree\n",
          name);
  for (i = 0; i < argc; i++) {
    puts(argv[i]);
  }
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xeb2(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    119e <usage+0x7e>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <puts@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1173 <usage+0x53>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %edi,%r14d
mov    (%rsi),%rbp
mov    0x2ea9(%rip),%rbx
mov    (%rbx),%edi
lea    0xec0(%rip),%rsi
mov    %rbp,%rdx
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed5(%rip),%rsi
mov    %rbp,%rdx
call   1040 <fprintf@plt>
test   %r14d,%r14d
jle    1182 <usage+0x62>
mov    %r14d,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r15,%rbx,8),%rdi
call   1030 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1170 <usage+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"example: %s points.csv rectangle.csv\0A\00"
@.str.1 = [117 x i8] c"usage: %s OPITON FILE1 FILE2 FILE3\0AFILE1 points\0A FILE2 rectangle\0AFILE3 output\0AOPITON:\0A-d direct access\0A-q quad tree\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
store i8* %9, i8** %5
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %5
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @stderr
%14 = load i8*, i8** %5
%15 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str.1, i64 0, i64 0), i8* %14)
store i32 0, i32* %6
br label %16
16: ; preds = %27, %2
%17 = load i32, i32* %6
%18 = load i32, i32* %3
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %30
20: ; preds = %16
%21 = load i8**, i8*** %4
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8*, i8** %21, i64 %23
%25 = load i8*, i8** %24
%26 = call i32 @puts(i8* %25)
br label %27
27: ; preds = %20
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %16
30: ; preds = %16
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"example: %s points.csv rectangle.csv\0A\00"
@.str.1 = [117 x i8] c"usage: %s OPITON FILE1 FILE2 FILE3\0AFILE1 points\0A FILE2 rectangle\0AFILE3 output\0AOPITON:\0A-d direct access\0A-q quad tree\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%8 = icmp sgt i32 %0, 0
br i1 %8, label %9, label %18
9: ; preds = %2
%10 = zext i32 %0 to i64
br label %11
11: ; preds = %9, %11
%12 = phi i64 [ 0, %9 ], [ %16, %11 ]
%13 = getelementptr inbounds i8*, i8** %1, i64 %12
%14 = load i8*, i8** %13
%15 = tail call i32 @puts(i8* dereferenceable(1) %14)
%16 = add nuw nsw i64 %12, 1
%17 = icmp eq i64 %16, %10
br i1 %17, label %18, label %11
18: ; preds = %11, %2
ret void
}