xunge/DecIR huggingface dataset:
/* Type definitions */
struct colourSystem {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Get_XYZ_to_RGB_Matrix(struct colourSystem *, double **);
int /*<<< orphan*/ MatrixInv(double **, double **);
void GetCTransMatrix(struct colourSystem *cs, double XYZ_to_RGB_Matrix[3][3],
                     double RGB_to_XYZ_Matrix[3][3]) {
  int i, j;
  Get_XYZ_to_RGB_Matrix(cs, XYZ_to_RGB_Matrix);
  MatrixInv(XYZ_to_RGB_Matrix, RGB_to_XYZ_Matrix);
  return;
}


x86 assembly (clang, -O0):
<GetCTransMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <Get_XYZ_to_RGB_Matrix@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <MatrixInv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetCTransMatrix>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <Get_XYZ_to_RGB_Matrix@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <MatrixInv@plt>

LLVM IR (-O0):
%struct.colourSystem = type { i32 }
define void @GetCTransMatrix(%struct.colourSystem* %0, [3 x double]* %1, [3 x double]* %2) {
%4 = alloca %struct.colourSystem*
%5 = alloca [3 x double]*
%6 = alloca [3 x double]*
%7 = alloca i32
%8 = alloca i32
store %struct.colourSystem* %0, %struct.colourSystem** %4
store [3 x double]* %1, [3 x double]** %5
store [3 x double]* %2, [3 x double]** %6
%9 = load %struct.colourSystem*, %struct.colourSystem** %4
%10 = load [3 x double]*, [3 x double]** %5
%11 = bitcast [3 x double]* %10 to double**
%12 = call i32 @Get_XYZ_to_RGB_Matrix(%struct.colourSystem* %9, double** %11)
%13 = load [3 x double]*, [3 x double]** %5
%14 = bitcast [3 x double]* %13 to double**
%15 = load [3 x double]*, [3 x double]** %6
%16 = bitcast [3 x double]* %15 to double**
%17 = call i32 @MatrixInv(double** %14, double** %16)
ret void
}

LLVM IR (-O2):
%struct.colourSystem = type { i32 }
define void @GetCTransMatrix(%struct.colourSystem* %0, [3 x double]* %1, [3 x double]* %2) {
%4 = bitcast [3 x double]* %1 to double**
%5 = tail call i32 @Get_XYZ_to_RGB_Matrix(%struct.colourSystem* %0, double** %4)
%6 = bitcast [3 x double]* %2 to double**
%7 = tail call i32 @MatrixInv(double** %4, double** %6)
ret void
}
/* Type definitions */
struct magic_set {
  int dummy;
};

/* Variables and functions */
int file_printf(struct magic_set *, char *);
int print_sep(struct magic_set *ms, int firstline) {
  if (firstline)
    return 0;
  return file_printf(ms, "\n- ");
}


x86 assembly (clang, -O0):
<print_sep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1135 <print_sep+0x25>
movl   $0x0,-0x4(%rbp)
jmp    1148 <print_sep+0x38>
mov    -0x10(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1030 <file_printf@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_sep>:
test   %esi,%esi
je     1117 <print_sep+0x7>
xor    %eax,%eax
ret
lea    0xee2(%rip),%rsi
jmp    1030 <file_printf@plt>

LLVM IR (-O0):
%struct.magic_set = type { i32 }
@.str = [4 x i8] c"\0A- \00"
define i32 @print_sep(%struct.magic_set* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.magic_set*
%5 = alloca i32
store %struct.magic_set* %0, %struct.magic_set** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %12
9: ; preds = %2
%10 = load %struct.magic_set*, %struct.magic_set** %4
%11 = call i32 @file_printf(%struct.magic_set* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 %11, i32* %3
br label %12
12: ; preds = %9, %8
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
%struct.magic_set = type { i32 }
@.str = [4 x i8] c"\0A- \00"
define i32 @print_sep(%struct.magic_set* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @file_printf(%struct.magic_set* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ 0, %2 ]
ret i32 %7
}
void timeEnd() {}


x86 assembly (clang, -O0):
<timeEnd>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeEnd>:
ret

LLVM IR (-O0):
define void @timeEnd() {
ret void
}

LLVM IR (-O2):
define void @timeEnd() {
ret void
}
/* Variables and functions */
char **getActors();
scalar_t__ malloc(int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  char **q = (char **)malloc(sizeof(char *) * 20);
  q = getActors();
  puts(q[1]);
  puts(q[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa0,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getActors@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <puts@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa0,%edi
call   1050 <malloc@plt>
xor    %eax,%eax
call   1030 <getActors@plt>
mov    %rax,%rbx
mov    0x8(%rax),%rdi
call   1040 <puts@plt>
mov    0x10(%rbx),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8**
store i32 0, i32* %1
%3 = call i64 @malloc(i32 160)
%4 = inttoptr i64 %3 to i8**
store i8** %4, i8*** %2
%5 = call i8** (...) @getActors()
store i8** %5, i8*** %2
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @puts(i8* %8)
%10 = load i8**, i8*** %2
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
%13 = call i32 @puts(i8* %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 160)
%2 = tail call i8** (...) @getActors()
%3 = getelementptr inbounds i8*, i8** %2, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
%6 = getelementptr inbounds i8*, i8** %2, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}
int test_imm_21int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x21 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_21int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x21,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_21int64_highword_mem>:
testb  $0x21,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_21int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 33
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_21int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 141733920768
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int socket(int domain, int type, int protocol) { return 0; }


x86 assembly (clang, -O0):
<socket>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @socket(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @socket(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
int test_imm_82int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x82 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_82int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x82,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_82int64_highword_mem>:
testb  $0x82,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_82int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 130
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_82int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 558345748480
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage() {
  printf("\nUsage:\n   %s\n\n",
         "to_sr"
         " [-p <pixsize>] <infile> <outfile> [-license] [-version] [-help]");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeee(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\0AUsage:\0A %s\0A\0A\00"
@.str.1 = [70 x i8] c"to_sr [-p <pixsize>] <infile> <outfile> [-license] [-version] [-help]\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0AUsage:\0A %s\0A\0A\00"
@.str.1 = [70 x i8] c"to_sr [-p <pixsize>] <infile> <outfile> [-license] [-version] [-help]\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void tyan_lcdm_set_rampos(int fd, unsigned char pos) {
  char cmd_str[5] = {0xF1, 0x70, 0x00, 0x00, 0xF2};
  cmd_str[3] = pos;
  write(fd, cmd_str, 5);
}


x86 assembly (clang, -O0):
<tyan_lcdm_set_rampos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    0xed9(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xed4(%rip),%al
mov    %al,-0x6(%rbp)
mov    -0x5(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xa(%rbp),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tyan_lcdm_set_rampos>:
push   %rax
movl   $0x70f1,(%rsp)
movb   $0xf2,0x4(%rsp)
mov    %sil,0x3(%rsp)
mov    %rsp,%rsi
mov    $0x5,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.tyan_lcdm_set_rampos.cmd_str = [5 x i8] c"\F1p\00\00\F2"
define void @tyan_lcdm_set_rampos(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca [5 x i8]
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = bitcast [5 x i8]* %5 to i8*
%7 = load i8, i8* %4
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 3
store i8 %7, i8* %8
%9 = load i32, i32* %3
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%11 = call i32 @write(i32 %9, i8* %10, i32 5)
ret void
}

LLVM IR (-O2):
@__const.tyan_lcdm_set_rampos.cmd_str = [5 x i8] c"\F1p\00\00\F2"
define void @tyan_lcdm_set_rampos(i32 %0, i8 zeroext %1) {
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 3
store i8 %1, i8* %5
%6 = call i32 @write(i32 %0, i8* %4, i32 5)
ret void
}
void test_strstr() {}


x86 assembly (clang, -O0):
<test_strstr>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_strstr>:
ret

LLVM IR (-O0):
define void @test_strstr() {
ret void
}

LLVM IR (-O2):
define void @test_strstr() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_iopl;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int);
int main() {
  syscall(__NR_iopl, 3);
  syscall(__NR_iopl, -1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    $0x3,%esi
call   1030 <syscall@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
call   1030 <syscall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ed0(%rip),%rbx
mov    (%rbx),%edi
mov    $0x3,%esi
call   1030 <syscall@plt>
mov    (%rbx),%edi
mov    $0xffffffff,%esi
call   1030 <syscall@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__NR_iopl = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @__NR_iopl
%3 = call i32 @syscall(i32 %2, i32 3)
%4 = load i32, i32* @__NR_iopl
%5 = call i32 @syscall(i32 %4, i32 -1)
ret i32 0
}

LLVM IR (-O2):
@__NR_iopl = global i32 0
define i32 @main() {
%1 = load i32, i32* @__NR_iopl
%2 = tail call i32 @syscall(i32 %1, i32 3)
%3 = load i32, i32* @__NR_iopl
%4 = tail call i32 @syscall(i32 %3, i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ output_with_tab(char *);
void gen_def_storage(void) { output_with_tab(".ds "); }


x86 assembly (clang, -O0):
<gen_def_storage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <output_with_tab@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_def_storage>:
lea    0xee9(%rip),%rdi
jmp    1030 <output_with_tab@plt>

LLVM IR (-O0):
@.str = [5 x i8] c".ds \00"
define void @gen_def_storage() {
%1 = call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".ds \00"
define void @gen_def_storage() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void Warning(char *ErrorMessage) {
  fprintf(stderr, "Warning:  %s (continuing anyway)\n", ErrorMessage);
}


x86 assembly (clang, -O0):
<Warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Warning>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"Warning: %s (continuing anyway)\0A\00"
define void @Warning(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"Warning: %s (continuing anyway)\0A\00"
define void @Warning(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void fast_log_msgr_error_dump(struct fast_log_entry *fe __attribute__((unused)),
                              char *buf __attribute__((unused))) {}


x86 assembly (clang, -O0):
<fast_log_msgr_error_dump>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_log_msgr_error_dump>:
ret

LLVM IR (-O0):
%struct.fast_log_entry = type opaque
define void @fast_log_msgr_error_dump(%struct.fast_log_entry* %0, i8* %1) {
%3 = alloca %struct.fast_log_entry*
%4 = alloca i8*
store %struct.fast_log_entry* %0, %struct.fast_log_entry** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.fast_log_entry = type opaque
define void @fast_log_msgr_error_dump(%struct.fast_log_entry* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((constructor)) void Init(void) {
  printf("External library is initialized.\n");
}


x86 assembly (clang, -O0):
<Init>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"External library is initialized.\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @Init, i8* null }]
define void @Init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @Init, i8* null }]
@str = [33 x i8] c"External library is initialized.\00"
define void @Init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}
void *null_input_init(void) { return (void *)-1; }


x86 assembly (clang, -O0):
<null_input_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_input_init>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i8* @null_input_init() {
ret i8* inttoptr (i64 -1 to i8*)
}

LLVM IR (-O2):
define i8* @null_input_init() {
ret i8* inttoptr (i64 -1 to i8*)
}
/* Variables and functions */
int Sys_FunctionCheckSum(void *f1) { return 0; }


x86 assembly (clang, -O0):
<Sys_FunctionCheckSum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_FunctionCheckSum>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Sys_FunctionCheckSum(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @Sys_FunctionCheckSum(i8* nocapture readnone %0) {
ret i32 0
}
void rop3_225_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D | S;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_225_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_225_1_0>:
mov    (%rdi),%al
mov    %eax,%ecx
or     %sil,%cl
xor    %dl,%cl
or     %sil,%cl
not    %cl
and    %sil,%al
or     %cl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_225_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = and i32 %34, %36
%38 = or i32 %31, %37
%39 = trunc i32 %38 to i8
%40 = load i8*, i8** %4
store i8 %39, i8* %40
ret void
}

LLVM IR (-O2):
define void @rop3_225_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %1
%6 = xor i8 %5, %2
%7 = or i8 %6, %1
%8 = xor i8 %7, -1
%9 = and i8 %4, %1
%10 = or i8 %9, %8
store i8 %10, i8* %0
ret void
}
int func(int n) {
  if (n > 0) {
    return n;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    111c <func+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1123 <func+0x23>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
xor    %eax,%eax
test   %edi,%edi
cmovns %edi,%eax
ret

LLVM IR (-O0):
define i32 @func(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* %3
store i32 %7, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @func(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
ret i32 %3
}
void foo277(int p) {}


x86 assembly (clang, -O0):
<foo277>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo277>:
ret

LLVM IR (-O0):
define void @foo277(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo277(i32 %0) {
ret void
}
/* Variables and functions */
int fac(int);
int quadraFac(int n) { return fac(2 * n) / fac(n); }


x86 assembly (clang, -O0):
<quadraFac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
call   1030 <fac@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <fac@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadraFac>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    (%rbx,%rbx,1),%edi
call   1030 <fac@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <fac@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @quadraFac(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 2, %3
%5 = call i32 @fac(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @fac(i32 %6)
%8 = sdiv i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @quadraFac(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = tail call i32 @fac(i32 %2)
%4 = tail call i32 @fac(i32 %0)
%5 = sdiv i32 %3, %4
ret i32 %5
}
void _stp_runtime_entryfn_put_context(struct context *c
                                      __attribute__((unused))) {
  return;
}


x86 assembly (clang, -O0):
<_stp_runtime_entryfn_put_context>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stp_runtime_entryfn_put_context>:
ret

LLVM IR (-O0):
%struct.context = type opaque
define void @_stp_runtime_entryfn_put_context(%struct.context* %0) {
%2 = alloca %struct.context*
store %struct.context* %0, %struct.context** %2
ret void
}

LLVM IR (-O2):
%struct.context = type opaque
define void @_stp_runtime_entryfn_put_context(%struct.context* nocapture %0) {
ret void
}
void UARTModemControlSet(unsigned long ulBase, unsigned long ulControl) {
  unsigned long ulTemp;
  ;
  ;
  ulTemp = (*((volatile unsigned long *)(ulBase + 0x00000030)));
  ulTemp |= (ulControl & (0x00000800));
  (*((volatile unsigned long *)(ulBase + 0x00000030))) = ulTemp;
}


x86 assembly (clang, -O0):
<UARTModemControlSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0x800,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x30(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTModemControlSet>:
and    $0x800,%esi
or     %rsi,0x30(%rdi)
ret

LLVM IR (-O0):
define void @UARTModemControlSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 48
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
store i64 %9, i64* %5
%10 = load i64, i64* %4
%11 = and i64 %10, 2048
%12 = load i64, i64* %5
%13 = or i64 %12, %11
store i64 %13, i64* %5
%14 = load i64, i64* %5
%15 = load i64, i64* %3
%16 = add i64 %15, 48
%17 = inttoptr i64 %16 to i64*
store volatile i64 %14, i64* %17
ret void
}

LLVM IR (-O2):
define void @UARTModemControlSet(i64 %0, i64 %1) {
%3 = add i64 %0, 48
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %1, 2048
%7 = or i64 %5, %6
store volatile i64 %7, i64* %4
ret void
}
const char *_nl_locale_name_default(void) { return "C"; }


x86 assembly (clang, -O0):
<_nl_locale_name_default>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nl_locale_name_default>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"C\00"
define i8* @_nl_locale_name_default() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [2 x i8] c"C\00"
define i8* @_nl_locale_name_default() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int doupdate();
int wrap_doupdate(void) { return doupdate(); }


x86 assembly (clang, -O0):
<wrap_doupdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <doupdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_doupdate>:
xor    %eax,%eax
jmp    1030 <doupdate@plt>

LLVM IR (-O0):
define i32 @wrap_doupdate() {
%1 = call i32 (...) @doupdate()
ret i32 %1
}

LLVM IR (-O2):
define i32 @wrap_doupdate() {
%1 = tail call i32 (...) @doupdate()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ FileError(char *, char *);
void reprec_warning(char *s) {
  FileError("the precedence of %s has been redeclared", s);
}


x86 assembly (clang, -O0):
<reprec_warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <FileError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reprec_warning>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <FileError@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"the precedence of %s has been redeclared\00"
define void @reprec_warning(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @FileError(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"the precedence of %s has been redeclared\00"
define void @reprec_warning(i8* %0) {
%2 = tail call i32 @FileError(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_PK_PARSE_C and/or "
         "MBEDTLS_FS_IO and/or MBEDTLS_ENTROPY_C and/or "
         "MBEDTLS_CTR_DRBG_C not defined.\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [129 x i8] c"MBEDTLS_BIGNUM_C and/or MBEDTLS_PK_PARSE_C and/or MBEDTLS_FS_IO and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C not defined.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [128 x i8] c"MBEDTLS_BIGNUM_C and/or MBEDTLS_PK_PARSE_C and/or MBEDTLS_FS_IO and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C not defined.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct hdr_histogram {
  int dummy;
};
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ hdr_next_non_equivalent_value(struct hdr_histogram const *,
                                         scalar_t__);
int64_t highest_equivalent_value(const struct hdr_histogram *h, int64_t value) {
  return hdr_next_non_equivalent_value(h, value) - 1;
}


x86 assembly (clang, -O0):
<highest_equivalent_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <hdr_next_non_equivalent_value@plt>
sub    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<highest_equivalent_value>:
push   %rax
call   1030 <hdr_next_non_equivalent_value@plt>
add    $0xffffffffffffffff,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.hdr_histogram = type { i32 }
define i64 @highest_equivalent_value(%struct.hdr_histogram* %0, i64 %1) {
%3 = alloca %struct.hdr_histogram*
%4 = alloca i64
store %struct.hdr_histogram* %0, %struct.hdr_histogram** %3
store i64 %1, i64* %4
%5 = load %struct.hdr_histogram*, %struct.hdr_histogram** %3
%6 = load i64, i64* %4
%7 = call i64 @hdr_next_non_equivalent_value(%struct.hdr_histogram* %5, i64 %6)
%8 = sub nsw i64 %7, 1
ret i64 %8
}

LLVM IR (-O2):
%struct.hdr_histogram = type { i32 }
define i64 @highest_equivalent_value(%struct.hdr_histogram* %0, i64 %1) {
%3 = tail call i64 @hdr_next_non_equivalent_value(%struct.hdr_histogram* %0, i64 %1)
%4 = add nsw i64 %3, -1
ret i64 %4
}
void w4(void *x, long long y) { *(long long *)(x + 32764) = y; }


x86 assembly (clang, -O0):
<w4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x7ffc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w4>:
mov    %rsi,0x7ffc(%rdi)
ret

LLVM IR (-O0):
define void @w4(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32764
%8 = bitcast i8* %7 to i64*
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @w4(i8* nocapture writeonly %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 32764
%4 = bitcast i8* %3 to i64*
store i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bcopy(void *, void *, unsigned long);
void ovbcopy(void *src, void *dst, unsigned long nbytes) {
  bcopy(src, dst, nbytes);
}


x86 assembly (clang, -O0):
<ovbcopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <bcopy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ovbcopy>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memmove@plt>

LLVM IR (-O0):
define void @ovbcopy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @bcopy(i8* %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @ovbcopy(i8* nocapture %0, i8* nocapture writeonly %1, i64 %2) {
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 %0, i64 %2, i1 false)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(void *);
main() { "hello", f((void *)0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = call i32 @f(i8* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i8* null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(const char *argv0) {
  printf("Usage: [-d <dev>] [-i <port>] [# of MRs]\n");
  printf("  -d, --ib-dev=<dev>     use IB device <dev> (default first device "
         "found)\n");
  printf("  -i, --ib-port=<port>   use port <port> of IB device (default 1)\n");
  printf("  -s, --size=<size>      allocating size of memory region (default "
         "4096)\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf71(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
lea    0xf43(%rip),%rdi
call   1030 <puts@plt>
lea    0xf79(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Usage: [-d <dev>] [-i <port>] [# of MRs]\0A\00"
@.str.1 = [75 x i8] c" -d, --ib-dev=<dev> use IB device <dev> (default first device found)\0A\00"
@.str.2 = [67 x i8] c" -i, --ib-port=<port> use port <port> of IB device (default 1)\0A\00"
@.str.3 = [74 x i8] c" -s, --size=<size> allocating size of memory region (default 4096)\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [41 x i8] c"Usage: [-d <dev>] [-i <port>] [# of MRs]\00"
@str.4 = [74 x i8] c" -d, --ib-dev=<dev> use IB device <dev> (default first device found)\00"
@str.5 = [66 x i8] c" -i, --ib-port=<port> use port <port> of IB device (default 1)\00"
@str.6 = [73 x i8] c" -s, --size=<size> allocating size of memory region (default 4096)\00"
define void @usage(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.6, i64 0, i64 0))
ret void
}
void foo031(int p) {}


x86 assembly (clang, -O0):
<foo031>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo031>:
ret

LLVM IR (-O0):
define void @foo031(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo031(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void print_usage(const char *name, FILE *fp) {
  fprintf(fp,
          "Usage: %s [-h] [-v] [-e] FILE...\n"
          "    -h, --help:    Print this message\n"
          "    -v, --verbose: Print more information\n"
          "    -e, --extract: Extract embedded files\n"
          "    FILE:          One or more audio files to read\n",
          name);
  return;
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    %rsi,%rax
mov    %rdi,%rdx
lea    0xee3(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [207 x i8] c"Usage: %s [-h] [-v] [-e] FILE...\0A -h, --help: Print this message\0A -v, --verbose: Print more information\0A -e, --extract: Extract embedded files\0A FILE: One or more audio files to read\0A\00"
define void @print_usage(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([207 x i8], [207 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [207 x i8] c"Usage: %s [-h] [-v] [-e] FILE...\0A -h, --help: Print this message\0A -v, --verbose: Print more information\0A -e, --extract: Extract embedded files\0A FILE: One or more audio files to read\0A\00"
define void @print_usage(i8* %0, i32* nocapture %1) {
%3 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([207 x i8], [207 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cami(int const, int const, int const, int const,
                        unsigned short *);
void cam16i(const int c, const int n, const int a, const int f,
            unsigned short *d) {
  cami(c, n, a, f, d);
}


x86 assembly (clang, -O0):
<cam16i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
call   1030 <cami@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cam16i>:
jmp    1030 <cami@plt>

LLVM IR (-O0):
define void @cam16i(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i16*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i16* %4, i16** %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i16*, i16** %10
%16 = call i32 @cami(i32 %11, i32 %12, i32 %13, i32 %14, i16* %15)
ret void
}

LLVM IR (-O2):
define void @cam16i(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4) {
%6 = tail call i32 @cami(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void term_hdlr(int signo) {
  printf("Quiting\n");
  exit(0);
}


x86 assembly (clang, -O0):
<term_hdlr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<term_hdlr>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Quiting\0A\00"
define void @term_hdlr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [8 x i8] c"Quiting\00"
define void @term_hdlr(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
void grid2x_generic_output(void *data, unsigned *out_width,
                           unsigned *out_height, unsigned width,
                           unsigned height) {
  *out_width = width << 1;
  *out_height = height << 1;
}


x86 assembly (clang, -O0):
<grid2x_generic_output>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<grid2x_generic_output>:
add    %ecx,%ecx
mov    %ecx,(%rsi)
add    %r8d,%r8d
mov    %r8d,(%rdx)
ret

LLVM IR (-O0):
define void @grid2x_generic_output(i8* %0, i32* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %9
%12 = shl i32 %11, 1
%13 = load i32*, i32** %7
store i32 %12, i32* %13
%14 = load i32, i32* %10
%15 = shl i32 %14, 1
%16 = load i32*, i32** %8
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @grid2x_generic_output(i8* nocapture readnone %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32 %3, i32 %4) {
%6 = shl i32 %3, 1
store i32 %6, i32* %1
%7 = shl i32 %4, 1
store i32 %7, i32* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int removeUtmpEntry(pid_t job_pid) { return (0); }


x86 assembly (clang, -O0):
<removeUtmpEntry>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeUtmpEntry>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @removeUtmpEntry(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @removeUtmpEntry(i32 %0) {
ret i32 0
}
/* Type definitions */
struct unw_frame_info {
  int dummy;
};

/* Variables and functions */
int unw_access_gr(struct unw_frame_info *, int, unsigned long *, char *, int);
int unw_set_gr(struct unw_frame_info *i, int n, unsigned long v, char nat) {
  return unw_access_gr(i, n, &v, &nat, 1);
}


x86 assembly (clang, -O0):
<unw_set_gr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x18(%rbp),%rdx
lea    -0x19(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <unw_access_gr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unw_set_gr>:
sub    $0x18,%rsp
mov    %rdx,0x10(%rsp)
mov    %cl,0xf(%rsp)
lea    0x10(%rsp),%rdx
lea    0xf(%rsp),%rcx
mov    $0x1,%r8d
call   1030 <unw_access_gr@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.unw_frame_info = type { i32 }
define i32 @unw_set_gr(%struct.unw_frame_info* %0, i32 %1, i64 %2, i8 signext %3) {
%5 = alloca %struct.unw_frame_info*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8
store %struct.unw_frame_info* %0, %struct.unw_frame_info** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i8 %3, i8* %8
%9 = load %struct.unw_frame_info*, %struct.unw_frame_info** %5
%10 = load i32, i32* %6
%11 = call i32 @unw_access_gr(%struct.unw_frame_info* %9, i32 %10, i64* %7, i8* %8, i32 1)
ret i32 %11
}

LLVM IR (-O2):
%struct.unw_frame_info = type { i32 }
define i32 @unw_set_gr(%struct.unw_frame_info* %0, i32 %1, i64 %2, i8 signext %3) {
%5 = alloca i64
%6 = alloca i8
store i64 %2, i64* %5
store i8 %3, i8* %6
%7 = call i32 @unw_access_gr(%struct.unw_frame_info* %0, i32 %1, i64* %5, i8* %6, i32 1)
ret i32 %7
}
/* Variables and functions */
float fmaxf(float, double);
float fminf(float, double);
float saturate(float x) {
  x = fmaxf(x, 0.0);
  x = fminf(x, 1.0);
  return x;
}


x86 assembly (clang, -O0):
<saturate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
call   1040 <fmaxf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
call   1030 <fminf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saturate>:
push   %rax
xorps  %xmm1,%xmm1
call   1040 <fmaxf@plt>
movsd  0xecf(%rip),%xmm1
pop    %rax
jmp    1030 <fminf@plt>

LLVM IR (-O0):
define float @saturate(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @fmaxf(float %3, double 0.000000e+00)
store float %4, float* %2
%5 = load float, float* %2
%6 = call float @fminf(float %5, double 1.000000e+00)
store float %6, float* %2
%7 = load float, float* %2
ret float %7
}

LLVM IR (-O2):
define float @saturate(float %0) {
%2 = tail call float @fmaxf(float %0, double 0.000000e+00)
%3 = tail call float @fminf(float %2, double 1.000000e+00)
ret float %3
}
/* Variables and functions */
int strcmp(char const *, char const *);
int value_cmp_T(const void *a, const void *b) {
  const char *as = *(const char **)a;
  const char *bs = *(const char **)b;
  if (as == NULL || bs == NULL) {
    return as != bs;
  }
  return strcmp(as, bs);
}


x86 assembly (clang, -O0):
<value_cmp_T>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     114c <value_cmp_T+0x3c>
cmpq   $0x0,-0x28(%rbp)
jne    1164 <value_cmp_T+0x54>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <value_cmp_T+0x64>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<value_cmp_T>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
test   %rdi,%rdi
je     1125 <value_cmp_T+0x15>
test   %rsi,%rsi
je     1125 <value_cmp_T+0x15>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
cmp    %rsi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @value_cmp_T(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i8**
%13 = load i8*, i8** %12
store i8* %13, i8** %7
%14 = load i8*, i8** %6
%15 = icmp eq i8* %14, null
br i1 %15, label %19, label %16
16: ; preds = %2
%17 = load i8*, i8** %7
%18 = icmp eq i8* %17, null
br i1 %18, label %19, label %24
19: ; preds = %16, %2
%20 = load i8*, i8** %6
%21 = load i8*, i8** %7
%22 = icmp ne i8* %20, %21
%23 = zext i1 %22 to i32
store i32 %23, i32* %3
br label %28
24: ; preds = %16
%25 = load i8*, i8** %6
%26 = load i8*, i8** %7
%27 = call i32 @strcmp(i8* %25, i8* %26)
store i32 %27, i32* %3
br label %28
28: ; preds = %24, %19
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @value_cmp_T(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = icmp eq i8* %4, null
%8 = icmp eq i8* %6, null
%9 = select i1 %7, i1 true, i1 %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = icmp ne i8* %4, %6
%12 = zext i1 %11 to i32
br label %15
13: ; preds = %2
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
br label %15
15: ; preds = %13, %10
%16 = phi i32 [ %12, %10 ], [ %14, %13 ]
ret i32 %16
}
void animationPluginClean(struct LSD_ScenePlugin const *plugin) {}


x86 assembly (clang, -O0):
<animationPluginClean>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<animationPluginClean>:
ret

LLVM IR (-O0):
%struct.LSD_ScenePlugin = type opaque
define void @animationPluginClean(%struct.LSD_ScenePlugin* %0) {
%2 = alloca %struct.LSD_ScenePlugin*
store %struct.LSD_ScenePlugin* %0, %struct.LSD_ScenePlugin** %2
ret void
}

LLVM IR (-O2):
%struct.LSD_ScenePlugin = type opaque
define void @animationPluginClean(%struct.LSD_ScenePlugin* nocapture %0) {
ret void
}
void score_state_recv_msg(void *msg) {}


x86 assembly (clang, -O0):
<score_state_recv_msg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<score_state_recv_msg>:
ret

LLVM IR (-O0):
define void @score_state_recv_msg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @score_state_recv_msg(i8* nocapture %0) {
ret void
}