#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;
char *strrchr(char *, char);
void usage(char *toolname) {
  char *p = strrchr(toolname, '/');
  if (p)
    p++;
  else
    p = toolname;
  fprintf(stderr,
          "USAGE: %s -f <parameter file name> -r <x0(S)/x1(N)/y0(W)/y1(E)> -i "
          "<dx/dy>\n",
          p);
  fprintf(stderr, "          -z <zobs> -o <output component>\n");
  fprintf(stderr, "          [ -v -h ]\n");
  fprintf(stderr, "-f:  gives input parameter file name.\n");
  fprintf(stderr,
          "-r:  specifies the min/max coordinates of region of interest.\n");
  fprintf(stderr, "-i:  gives grid increments.\n");
  fprintf(stderr, "-z:  gives z-coordinates of observation point (< 0).\n");
  fprintf(stderr,
          "-o:  specifies output magnetic component (0=F,1=X,2=Y,3=Z).\n");
  fprintf(stderr, "=== optional ===\n");
  fprintf(stderr, "-v:  verbos mode.\n");
  fprintf(stderr, "-h:  show this message.\n\n");
  fprintf(stderr, "The seismomagnetic field is calculated on the grid "
                  "x=[x0:dx:x1], y=[y0:dy:y1], z=zobs.\n\n");
  return;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115a <usage+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1162 <usage+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe8a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%edi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e00(%rip),%rax
mov    (%rax),%edi
lea    0xf09(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
lea    0xf0f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2dd2(%rip),%rax
mov    (%rax),%edi
lea    0xf2e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2dbb(%rip),%rax
mov    (%rax),%edi
lea    0xf54(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2da4(%rip),%rax
mov    (%rax),%edi
lea    0xf4f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
lea    0xf4b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
lea    0xf4e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rdx
test   %rax,%rax
cmove  %rbx,%rdx
mov    0x2ea0(%rip),%rbx
mov    (%rbx),%edi
lea    0xeb7(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef3(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0e(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf13(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf2a(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf59(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf66(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf8c(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfb9(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfbb(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfbe(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfc8(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [76 x i8] c"USAGE: %s -f <parameter file name> -r <x0(S)/x1(N)/y0(W)/y1(E)> -i <dx/dy>\0A\00"
@.str.1 = [43 x i8] c" -z <zobs> -o <output component>\0A\00"
@.str.2 = [21 x i8] c" [ -v -h ]\0A\00"
@.str.3 = [39 x i8] c"-f: gives input parameter file name.\0A\00"
@.str.4 = [63 x i8] c"-r: specifies the min/max coordinates of region of interest.\0A\00"
@.str.5 = [29 x i8] c"-i: gives grid increments.\0A\00"
@.str.6 = [54 x i8] c"-z: gives z-coordinates of observation point (< 0).\0A\00"
@.str.7 = [61 x i8] c"-o: specifies output magnetic component (0=F,1=X,2=Y,3=Z).\0A\00"
@.str.8 = [18 x i8] c"=== optional ===\0A\00"
@.str.9 = [19 x i8] c"-v: verbos mode.\0A\00"
@.str.10 = [26 x i8] c"-h: show this message.\0A\0A\00"
@.str.11 = [89 x i8] c"The seismomagnetic field is calculated on the grid x=[x0:dx:x1], y=[y0:dy:y1], z=zobs.\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
store i8* %12, i8** %3
br label %13
13: ; preds = %11, %8
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %3
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0))
%29 = load i32, i32* @stderr
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0))
%31 = load i32, i32* @stderr
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
%33 = load i32, i32* @stderr
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%35 = load i32, i32* @stderr
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%37 = load i32, i32* @stderr
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [76 x i8] c"USAGE: %s -f <parameter file name> -r <x0(S)/x1(N)/y0(W)/y1(E)> -i <dx/dy>\0A\00"
@.str.1 = [43 x i8] c" -z <zobs> -o <output component>\0A\00"
@.str.2 = [21 x i8] c" [ -v -h ]\0A\00"
@.str.3 = [39 x i8] c"-f: gives input parameter file name.\0A\00"
@.str.4 = [63 x i8] c"-r: specifies the min/max coordinates of region of interest.\0A\00"
@.str.5 = [29 x i8] c"-i: gives grid increments.\0A\00"
@.str.6 = [54 x i8] c"-z: gives z-coordinates of observation point (< 0).\0A\00"
@.str.7 = [61 x i8] c"-o: specifies output magnetic component (0=F,1=X,2=Y,3=Z).\0A\00"
@.str.8 = [18 x i8] c"=== optional ===\0A\00"
@.str.9 = [19 x i8] c"-v: verbos mode.\0A\00"
@.str.10 = [26 x i8] c"-h: show this message.\0A\0A\00"
@.str.11 = [89 x i8] c"The seismomagnetic field is calculated on the grid x=[x0:dx:x1], y=[y0:dy:y1], z=zobs.\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0))
%22 = load i32, i32* @stderr
%23 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
%24 = load i32, i32* @stderr
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%26 = load i32, i32* @stderr
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%28 = load i32, i32* @stderr
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.11, i64 0, i64 0))
ret void
}