#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fputs("generate callgraph in graphviz format from gcc RTL dumps\n", stderr);
  fprintf(stderr,
          "usage: %s [-o foo[,bar]] [-f outfile] [-c] rtl-dump-files...\n",
          name);
  fputs("\t-c set the \"concentrate\"-option for the graph\n", stderr);
  fputs("\t-o omit-list\tcomma separtet list of function to omit in output\n",
        stderr);
  fputs("\t-f outfile\twrite output to file \"outfile\"\n", stderr);
  fputs("\trtl-dump-files\tRTL-dumps generated by gcc \"-dr\"-option, \"-\" "
        "should read stdin\n",
        stderr);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xee5(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
lea    0xf0e(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%esi
lea    0xf29(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%esi
lea    0xf55(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e40(%rip),%rax
mov    (%rax),%esi
lea    0xf6c(%rip),%rdi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2eb2(%rip),%rbx
mov    (%rbx),%esi
lea    0xec9(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%edi
lea    0xef5(%rip),%rsi
mov    %r14,%rdx
call   1040 <fprintf@plt>
mov    (%rbx),%esi
lea    0xf22(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf44(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf77(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf95(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"generate callgraph in graphviz format from gcc RTL dumps\0A\00"
@stderr = global i32 0
@.str.1 = [62 x i8] c"usage: %s [-o foo[,bar]] [-f outfile] [-c] rtl-dump-files...\0A\00"
@.str.2 = [48 x i8] c"\09-c set the \22concentrate\22-option for the graph\0A\00"
@.str.3 = [65 x i8] c"\09-o omit-list\09comma separtet list of function to omit in output\0A\00"
@.str.4 = [44 x i8] c"\09-f outfile\09write output to file \22outfile\22\0A\00"
@.str.5 = [80 x i8] c"\09rtl-dump-files\09RTL-dumps generated by gcc \22-dr\22-option, \22-\22 should read stdin\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 @fputs(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stderr
%11 = call i32 @fputs(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @stderr
%13 = call i32 @fputs(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @stderr
%15 = call i32 @fputs(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.5, i64 0, i64 0), i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [58 x i8] c"generate callgraph in graphviz format from gcc RTL dumps\0A\00"
@stderr = global i32 0
@.str.1 = [62 x i8] c"usage: %s [-o foo[,bar]] [-f outfile] [-c] rtl-dump-files...\0A\00"
@.str.2 = [48 x i8] c"\09-c set the \22concentrate\22-option for the graph\0A\00"
@.str.3 = [65 x i8] c"\09-o omit-list\09comma separtet list of function to omit in output\0A\00"
@.str.4 = [44 x i8] c"\09-f outfile\09write output to file \22outfile\22\0A\00"
@.str.5 = [80 x i8] c"\09rtl-dump-files\09RTL-dumps generated by gcc \22-dr\22-option, \22-\22 should read stdin\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stderr
%9 = tail call i32 @fputs(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stderr
%11 = tail call i32 @fputs(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @stderr
%13 = tail call i32 @fputs(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.5, i64 0, i64 0), i32 %12)
ret void
}