xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void printhelp(const char *argv0) {
  printf("Usage: %s <database>\n"
         "Guess which trips are the same for comparing\n",
         argv0);
}


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

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

LLVM IR (-O0):
@.str = [67 x i8] c"Usage: %s <database>\0AGuess which trips are the same for comparing\0A\00"
define void @printhelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [67 x i8] c"Usage: %s <database>\0AGuess which trips are the same for comparing\0A\00"
define void @printhelp(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_drawcircle(int, int, int, int);
void j_drawcircle(int arg0, int arg1, int arg2, int arg3) {
  japi_drawcircle(arg0, arg1, arg2, arg3);
}


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

x86 assembly (clang, -O2):
<j_drawcircle>:
jmp    1030 <japi_drawcircle@plt>

LLVM IR (-O0):
define void @j_drawcircle(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @japi_drawcircle(i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @j_drawcircle(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @japi_drawcircle(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
int dbg_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len,
                   int dtype) {
  return 0;
}


x86 assembly (clang, -O0):
<dbg_leb_change>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ubifs_info = type opaque
define i32 @dbg_leb_change(%struct.ubifs_info* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca %struct.ubifs_info*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store %struct.ubifs_info* %0, %struct.ubifs_info** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
%struct.ubifs_info = type opaque
define i32 @dbg_leb_change(%struct.ubifs_info* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3, i32 %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ p_sat(char *);
int /*<<< orphan*/ register_row_num(int);
void col_test_iter_0(void) {
  register_row_num(3);
  p_sat("AAo");
  p_sat("A o");
  p_sat("LGGoo");
}


x86 assembly (clang, -O0):
<col_test_iter_0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <register_row_num@plt>
lea    0xecb(%rip),%rdi
call   1030 <p_sat@plt>
lea    0xec3(%rip),%rdi
call   1030 <p_sat@plt>
lea    0xebb(%rip),%rdi
call   1030 <p_sat@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<col_test_iter_0>:
push   %rax
mov    $0x3,%edi
call   1040 <register_row_num@plt>
lea    0xece(%rip),%rdi
call   1030 <p_sat@plt>
lea    0xec6(%rip),%rdi
call   1030 <p_sat@plt>
lea    0xebe(%rip),%rdi
pop    %rax
jmp    1030 <p_sat@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"AAo\00"
@.str.1 = [4 x i8] c"A o\00"
@.str.2 = [6 x i8] c"LGGoo\00"
define void @col_test_iter_0() {
%1 = call i32 @register_row_num(i32 3)
%2 = call i32 @p_sat(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @p_sat(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @p_sat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"AAo\00"
@.str.1 = [4 x i8] c"A o\00"
@.str.2 = [6 x i8] c"LGGoo\00"
define void @col_test_iter_0() {
%1 = tail call i32 @register_row_num(i32 3)
%2 = tail call i32 @p_sat(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @p_sat(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @p_sat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
char *getenv(char const *);
int /*<<< orphan*/ perror(char *);
char *std_getenv(const char *name) {
  char *ret;
  if ((ret = getenv(name)) == NULL) {
    perror("getenv");
    exit(1);
  }
  return ret;
}


x86 assembly (clang, -O0):
<std_getenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1169 <std_getenv+0x39>
lea    0xea6(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_getenv>:
push   %rax
call   1030 <getenv@plt>
test   %rax,%rax
je     113d <std_getenv+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"getenv\00"
define i8* @std_getenv(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @getenv(i8* %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"getenv\00"
define i8* @std_getenv(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) { fprintf(stderr, "Usage: newduptest [file]\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Usage: newduptest [file]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Usage: newduptest [file]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
int bang(int x) {
  int sign = x >> 31 & 0x1;
  int neg_sign = (~x + 1) >> 31 & 0x1;
  return ~((sign ^ neg_sign) | x >> 31) & 0x1;
}


x86 assembly (clang, -O0):
<bang>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
add    $0x1,%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
or     %ecx,%eax
xor    $0xffffffff,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bang>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @bang(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 31
%7 = and i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = xor i32 %8, -1
%10 = add nsw i32 %9, 1
%11 = ashr i32 %10, 31
%12 = and i32 %11, 1
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = xor i32 %13, %14
%16 = load i32, i32* %2
%17 = ashr i32 %16, 31
%18 = or i32 %15, %17
%19 = xor i32 %18, -1
%20 = and i32 %19, 1
ret i32 %20
}

LLVM IR (-O2):
define i32 @bang(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ BASIC_CONSTRAINTS;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ BASIC_CONSTRAINTS_it;
BASIC_CONSTRAINTS *BASIC_CONSTRAINTS_new(void) {
  return (BASIC_CONSTRAINTS *)ASN1_item_new(&BASIC_CONSTRAINTS_it);
}


x86 assembly (clang, -O0):
<BASIC_CONSTRAINTS_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<BASIC_CONSTRAINTS_new>:
mov    0x2ec9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@BASIC_CONSTRAINTS_it = global i32 0
define i32* @BASIC_CONSTRAINTS_new() {
%1 = call i64 @ASN1_item_new(i32* @BASIC_CONSTRAINTS_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@BASIC_CONSTRAINTS_it = global i32 0
define i32* @BASIC_CONSTRAINTS_new() {
%1 = tail call i64 @ASN1_item_new(i32* @BASIC_CONSTRAINTS_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ writedata(int /*<<< orphan*/);
void pushColor(uint16_t color) {
  writedata((uint8_t)(color >> 8));
  writedata((uint8_t)color);
}


x86 assembly (clang, -O0):
<pushColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
call   1030 <writedata@plt>
mov    -0x4(%rbp),%edi
call   1030 <writedata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushColor>:
push   %rbx
mov    %edi,%ebx
sar    $0x8,%edi
call   1030 <writedata@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <writedata@plt>

LLVM IR (-O0):
define void @pushColor(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = call i32 @writedata(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @writedata(i32 %6)
ret void
}

LLVM IR (-O2):
define void @pushColor(i32 %0) {
%2 = ashr i32 %0, 8
%3 = tail call i32 @writedata(i32 %2)
%4 = tail call i32 @writedata(i32 %0)
ret void
}
int isAlsoNumber(int c) {
  return c == '.' || c == 'x' || c == 'a' || c == 'b' || c == 'c' || c == 'd' ||
         c == 'e' || c == 'f';
}


x86 assembly (clang, -O0):
<isAlsoNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x2e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117a <isAlsoNumber+0x7a>
mov    $0x1,%al
cmpl   $0x78,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117a <isAlsoNumber+0x7a>
mov    $0x1,%al
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117a <isAlsoNumber+0x7a>
mov    $0x1,%al
cmpl   $0x62,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117a <isAlsoNumber+0x7a>
mov    $0x1,%al
cmpl   $0x63,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117a <isAlsoNumber+0x7a>
mov    $0x1,%al
cmpl   $0x64,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117a <isAlsoNumber+0x7a>
mov    $0x1,%al
cmpl   $0x65,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     117a <isAlsoNumber+0x7a>
cmpl   $0x66,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAlsoNumber>:
mov    $0x1,%eax
lea    -0x61(%rdi),%ecx
cmp    $0x17,%ecx
ja     1118 <isAlsoNumber+0x18>
mov    $0x80001f,%edx
bt     %ecx,%edx
jae    1118 <isAlsoNumber+0x18>
ret
cmp    $0x2e,%edi
je     1117 <isAlsoNumber+0x17>
xor    %eax,%eax
cmp    $0x66,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isAlsoNumber(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 46
br i1 %4, label %26, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 120
br i1 %7, label %26, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 97
br i1 %10, label %26, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 98
br i1 %13, label %26, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 99
br i1 %16, label %26, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 100
br i1 %19, label %26, label %20
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 101
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 102
br label %26
26: ; preds = %23, %20, %17, %14, %11, %8, %5, %1
%27 = phi i1 [ true, %20 ], [ true, %17 ], [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %25, %23 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @isAlsoNumber(i32 %0) {
switch i32 %0, label %2 [
i32 120, label %5
i32 101, label %5
i32 100, label %5
i32 99, label %5
i32 98, label %5
i32 97, label %5
i32 46, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 102
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
scalar_t__ is_id_start_char(char);
scalar_t__ is_num_char(char);
int is_id_char(char c) { return is_id_start_char(c) || is_num_char(c); }


x86 assembly (clang, -O0):
<is_id_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_id_start_char@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <is_id_char+0x3c>
movsbl -0x1(%rbp),%edi
call   1040 <is_num_char@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_id_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_id_start_char@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <is_id_char+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1040 <is_num_char@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_id_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @is_id_start_char(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @is_num_char(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_id_char(i8 signext %0) {
%2 = tail call i64 @is_id_start_char(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @is_num_char(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
int khugepaged_fork(struct mm_struct *mm, struct mm_struct *oldmm) { return 0; }


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

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

LLVM IR (-O0):
%struct.mm_struct = type opaque
define i32 @khugepaged_fork(%struct.mm_struct* %0, %struct.mm_struct* %1) {
%3 = alloca %struct.mm_struct*
%4 = alloca %struct.mm_struct*
store %struct.mm_struct* %0, %struct.mm_struct** %3
store %struct.mm_struct* %1, %struct.mm_struct** %4
ret i32 0
}

LLVM IR (-O2):
%struct.mm_struct = type opaque
define i32 @khugepaged_fork(%struct.mm_struct* nocapture readnone %0, %struct.mm_struct* nocapture readnone %1) {
ret i32 0
}
void pcp_def_memory_metrics(struct activity *a) {}


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

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

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

LLVM IR (-O2):
%struct.activity = type opaque
define void @pcp_def_memory_metrics(%struct.activity* nocapture %0) {
ret void
}
int valida_posicao(char posicao) {
  if (posicao == ' ' || posicao == 'C')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<valida_posicao>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1124 <valida_posicao+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x43,%eax
jne    1130 <valida_posicao+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <valida_posicao+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valida_posicao>:
cmp    $0x43,%dil
sete   %al
cmp    $0x20,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @valida_posicao(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 67
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @valida_posicao(i8 signext %0) {
%2 = icmp eq i8 %0, 67
%3 = icmp eq i8 %0, 32
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int defined1(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @defined1() {
ret i32 0
}

LLVM IR (-O2):
define i32 @defined1() {
ret i32 0
}
void foo154(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo154(i32 %0) {
ret void
}
void handle_57(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_57(i32 %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int util_rnd64();
void util_rndBuf(uint8_t *buf, size_t sz) {
  for (size_t i = 0; i < sz; i++) {
    buf[i] = (uint8_t)((util_rnd64() & 0xFF0000) >> 16);
  }
}


x86 assembly (clang, -O0):
<util_rndBuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1165 <util_rndBuf+0x55>
mov    $0x0,%al
call   1030 <util_rnd64@plt>
and    $0xff0000,%eax
sar    $0x10,%eax
movslq %eax,%rdx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <util_rndBuf+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_rndBuf>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     114a <util_rndBuf+0x3a>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <util_rnd64@plt>
shr    $0x10,%eax
movzbl %al,%eax
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <util_rndBuf+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @util_rndBuf(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %18, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = call i32 (...) @util_rnd64()
%12 = and i32 %11, 16711680
%13 = ashr i32 %12, 16
%14 = sext i32 %13 to i64
%15 = load i64*, i64** %3
%16 = load i64, i64* %5
%17 = getelementptr inbounds i64, i64* %15, i64 %16
store i64 %14, i64* %17
br label %18
18: ; preds = %10
%19 = load i64, i64* %5
%20 = add i64 %19, 1
store i64 %20, i64* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @util_rndBuf(i64* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i64 [ %12, %5 ], [ 0, %2 ]
%7 = tail call i32 (...) @util_rnd64()
%8 = lshr i32 %7, 16
%9 = and i32 %8, 255
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i64, i64* %0, i64 %6
store i64 %10, i64* %11
%12 = add nuw i64 %6, 1
%13 = icmp eq i64 %12, %1
br i1 %13, label %4, label %5
}
int bitInvertOrwith(int sourceWord, int destinationWord) {
  return (~sourceWord) | destinationWord;
}


x86 assembly (clang, -O0):
<bitInvertOrwith>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
or     -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitInvertOrwith>:
mov    %edi,%eax
not    %eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @bitInvertOrwith(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = xor i32 %5, -1
%7 = load i32, i32* %4
%8 = or i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @bitInvertOrwith(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
%4 = or i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ SBC_(int);
int /*<<< orphan*/ c64_memZeroX();
void SBC_zpx(void) {
  c64_memZeroX();
  SBC_(1);
}


x86 assembly (clang, -O0):
<SBC_zpx>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <c64_memZeroX@plt>
mov    $0x1,%edi
call   1030 <SBC_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SBC_zpx>:
push   %rax
xor    %eax,%eax
call   1040 <c64_memZeroX@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <SBC_@plt>

LLVM IR (-O0):
define void @SBC_zpx() {
%1 = call i32 (...) @c64_memZeroX()
%2 = call i32 @SBC_(i32 1)
ret void
}

LLVM IR (-O2):
define void @SBC_zpx() {
%1 = tail call i32 (...) @c64_memZeroX()
%2 = tail call i32 @SBC_(i32 1)
ret void
}
void br_multicast_enable_port(struct net_bridge_port *port) {}


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

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

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

LLVM IR (-O2):
%struct.net_bridge_port = type opaque
define void @br_multicast_enable_port(%struct.net_bridge_port* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int dDumpLine(FILE *fp) {
  register int c;
  while ((c = fgetc(fp)) != '\n')
    ;
  return 0;
}


x86 assembly (clang, -O0):
<dDumpLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xa,%eax
je     1136 <dDumpLine+0x26>
jmp    111c <dDumpLine+0xc>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dDumpLine>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    $0xa,%eax
jne    1120 <dDumpLine+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @dDumpLine(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = icmp eq i32 %3, 10
br i1 %4, label %5, label %2
5: ; preds = %2
ret i32 0
}
/* Type definitions */
struct uio_info_t {
  int dummy;
};

/* Variables and functions */
int show_map(struct uio_info_t *, int);
void show_maps(struct uio_info_t *info) {
  int ret;
  int mi = 0;
  do {
    ret = show_map(info, mi);
    mi++;
  } while ((ret == 0) && (mi < 5));
}


x86 assembly (clang, -O0):
<show_maps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <show_map@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x11(%rbp)
jne    1154 <show_maps+0x44>
cmpl   $0x5,-0x10(%rbp)
setl   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1123 <show_maps+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_maps>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <show_map@plt>
cmp    $0x3,%ebp
ja     1136 <show_maps+0x26>
add    $0x1,%ebp
test   %eax,%eax
je     1120 <show_maps+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.uio_info_t = type { i32 }
define void @show_maps(%struct.uio_info_t* %0) {
%2 = alloca %struct.uio_info_t*
%3 = alloca i32
%4 = alloca i32
store %struct.uio_info_t* %0, %struct.uio_info_t** %2
store i32 0, i32* %4
br label %5
5: ; preds = %17, %1
%6 = load %struct.uio_info_t*, %struct.uio_info_t** %2
%7 = load i32, i32* %4
%8 = call i32 @show_map(%struct.uio_info_t* %6, i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
store i32 %10, i32* %4
br label %11
11: ; preds = %5
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 5
br label %17
17: ; preds = %14, %11
%18 = phi i1 [ false, %11 ], [ %16, %14 ]
br i1 %18, label %5, label %19
19: ; preds = %17
ret void
}

LLVM IR (-O2):
%struct.uio_info_t = type { i32 }
define void @show_maps(%struct.uio_info_t* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %5, %2 ]
%4 = tail call i32 @show_map(%struct.uio_info_t* %0, i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %4, 0
%7 = icmp ult i32 %3, 4
%8 = and i1 %7, %6
br i1 %8, label %2, label %9
9: ; preds = %2
ret void
}
int func() {
  static int i = 0;
  return i++;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0f(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
mov    0x2f1e(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f15(%rip)
ret

LLVM IR (-O0):
@func.i = internal global i32 0
define i32 @func() {
%1 = load i32, i32* @func.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @func.i
ret i32 %1
}

LLVM IR (-O2):
@func.i = internal unnamed_addr global i32 0
define i32 @func() {
%1 = load i32, i32* @func.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @func.i
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ doZip(char *);
void test_DFextZipODF(void) { doZip("test.odt"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"test.odt\00"
define void @test_DFextZipODF() {
%1 = call i32 @doZip(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"test.odt\00"
define void @test_DFextZipODF() {
%1 = tail call i32 @doZip(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ oops(char *);
FILE *fwopen(const char *fn) {
  FILE *f = fopen(fn, "w");
  if (!f)
    oops("fopen");
  return f;
}


x86 assembly (clang, -O0):
<fwopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1157 <fwopen+0x37>
lea    0xeb0(%rip),%rdi
call   1030 <oops@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fwopen>:
push   %rbx
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1141 <fwopen+0x21>
lea    0xec6(%rip),%rdi
call   1030 <oops@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [6 x i8] c"fopen\00"
define noalias i32* @fwopen(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @oops(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32* %2
}
char *getFilename(char *ptr, int n) {
  int i = n;
  ptr += n;
  while (i-- > 0) {
    if ((*ptr--) == '/') {
      ptr += 2;
      break;
    }
  }
  return ptr;
}


x86 assembly (clang, -O0):
<getFilename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x10(%rbp)
cmp    $0x0,%eax
jle    1167 <getFilename+0x67>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1162 <getFilename+0x62>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    1167 <getFilename+0x67>
jmp    1122 <getFilename+0x22>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFilename>:
movslq %esi,%rax
add    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
test   %esi,%esi
jle    112a <getFilename+0x2a>
add    $0xffffffff,%esi
lea    -0x1(%rax),%rcx
cmpb   $0x2f,(%rax)
mov    %rcx,%rax
jne    1110 <getFilename+0x10>
add    $0x2,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i8* @getFilename(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = load i32, i32* %4
%8 = load i8*, i8** %3
%9 = sext i32 %7 to i64
%10 = getelementptr inbounds i8, i8* %8, i64 %9
store i8* %10, i8** %3
br label %11
11: ; preds = %24, %2
%12 = load i32, i32* %5
%13 = add nsw i32 %12, -1
store i32 %13, i32* %5
%14 = icmp sgt i32 %12, 0
br i1 %14, label %15, label %25
15: ; preds = %11
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 -1
store i8* %17, i8** %3
%18 = load i8, i8* %16
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 47
br i1 %20, label %21, label %24
21: ; preds = %15
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 2
store i8* %23, i8** %3
br label %25
24: ; preds = %15
br label %11
25: ; preds = %21, %11
%26 = load i8*, i8** %3
ret i8* %26
}

LLVM IR (-O2):
define i8* @getFilename(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
br label %5
5: ; preds = %9, %2
%6 = phi i8* [ %4, %2 ], [ %11, %9 ]
%7 = phi i32 [ %1, %2 ], [ %10, %9 ]
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = add nsw i32 %7, -1
%11 = getelementptr inbounds i8, i8* %6, i64 -1
%12 = load i8, i8* %6
%13 = icmp eq i8 %12, 47
br i1 %13, label %14, label %5
14: ; preds = %9
%15 = getelementptr inbounds i8, i8* %6, i64 1
br label %16
16: ; preds = %5, %14
%17 = phi i8* [ %15, %14 ], [ %6, %5 ]
ret i8* %17
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void do_DrIC(uint8_t *p, uint8_t *max, int is_up) {
  printf("RDPDR: I/O-Completion\n");
}


x86 assembly (clang, -O0):
<do_DrIC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [23 x i8] c"RDPDR: I/O-Completion\0A\00"
define void @do_DrIC(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
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [22 x i8] c"RDPDR: I/O-Completion\00"
define void @do_DrIC(i32* nocapture readnone %0, i32* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void Bar(int a, int b, int c, int d) {
  printf("Bar: %d, %d, %d, %d\n", a, b, c, d);
}


x86 assembly (clang, -O0):
<Bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bar>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Bar: %d, %d, %d, %d\0A\00"
define void @Bar(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Bar: %d, %d, %d, %d\0A\00"
define void @Bar(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
int __attribute__((no)) bar(void) {}


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

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

LLVM IR (-O0):
define i32 @bar() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 undef
}
unsigned long insert_spr(insn, value, errmsg)
unsigned long insn;
long value;
const char **errmsg;
{ return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6); }


x86 assembly (clang, -O0):
<insert_spr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
and    $0x1f,%rcx
shl    $0x10,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%rcx
and    $0x3e0,%rcx
shl    $0x6,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_spr>:
mov    %esi,%eax
and    $0x1f,%eax
shl    $0x10,%rax
or     %rdi,%rax
shl    $0x6,%esi
and    $0xf800,%esi
or     %rsi,%rax
ret

LLVM IR (-O0):
define i64 @insert_spr(i64 %0, i64 %1, i8** %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8**
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8** %2, i8*** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = and i64 %8, 31
%10 = shl i64 %9, 16
%11 = or i64 %7, %10
%12 = load i64, i64* %5
%13 = and i64 %12, 992
%14 = shl i64 %13, 6
%15 = or i64 %11, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @insert_spr(i64 %0, i64 %1, i8** nocapture readnone %2) {
%4 = shl i64 %1, 16
%5 = and i64 %4, 2031616
%6 = or i64 %5, %0
%7 = shl i64 %1, 6
%8 = and i64 %7, 63488
%9 = or i64 %6, %8
ret i64 %9
}
/* Variables and functions */
int barriereNatif32(int);
scalar_t__ systemeBigEndian();
int natif32VersBig(int natif) {
  if (systemeBigEndian()) {
    return natif;
  } else {
    return barriereNatif32(natif);
  }
}


x86 assembly (clang, -O0):
<natif32VersBig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <systemeBigEndian@plt>
cmp    $0x0,%rax
je     1147 <natif32VersBig+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <natif32VersBig+0x32>
mov    -0x8(%rbp),%edi
call   1040 <barriereNatif32@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<natif32VersBig>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <systemeBigEndian@plt>
test   %rax,%rax
je     1133 <natif32VersBig+0x13>
mov    %ebx,%eax
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1040 <barriereNatif32@plt>

LLVM IR (-O0):
define i32 @natif32VersBig(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i64 (...) @systemeBigEndian()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* %3
store i32 %7, i32* %2
br label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @barriereNatif32(i32 %9)
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @natif32VersBig(i32 %0) {
%2 = tail call i64 (...) @systemeBigEndian()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @barriereNatif32(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
void Speed2() { delay(40); }


x86 assembly (clang, -O0):
<Speed2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x28,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Speed2>:
mov    $0x28,%edi
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @Speed2() {
%1 = call i32 @delay(i32 40)
ret void
}

LLVM IR (-O2):
define void @Speed2() {
%1 = tail call i32 @delay(i32 40)
ret void
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzUnaryFunc_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN_DELAYED(int /*<<< orphan*/, int /*<<< orphan*/);
void BrzUnaryFunc_ackdown(struct comp *comp, int port) {
  struct BrzUnaryFunc_ *c = (struct BrzUnaryFunc_ *)comp;
  SEND_ACKDOWN_DELAYED(0, 0);
}


x86 assembly (clang, -O0):
<BrzUnaryFunc_ackdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <SEND_ACKDOWN_DELAYED@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzUnaryFunc_ackdown>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <SEND_ACKDOWN_DELAYED@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzUnaryFunc_ = type { i32 }
define void @BrzUnaryFunc_ackdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzUnaryFunc_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzUnaryFunc_*
store %struct.BrzUnaryFunc_* %7, %struct.BrzUnaryFunc_** %5
%8 = call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzUnaryFunc_ackdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
ret void
}
/* Variables and functions */
int f301(int *);
int f302(int *p) { return f301(p); }


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

x86 assembly (clang, -O2):
<f302>:
jmp    1030 <f301@plt>

LLVM IR (-O0):
define i32 @f302(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @f301(i32* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @f302(i32* %0) {
%2 = tail call i32 @f301(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xfe() {
  Assert_real((isxdigit(254) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              1275, ("isxdigit should be 0 for 0xfe"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0xfe>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfe,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4fb,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0xfe>:
push   %rax
mov    $0xfe,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x4fb,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xfe\00"
define void @t_isxdigit_0xfe() {
%1 = call i64 @isxdigit(i32 254)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1275, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xfe\00"
define void @t_isxdigit_0xfe() {
%1 = tail call i64 @isxdigit(i32 254)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1275, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void setFileName(char *fileName, int argc, char *argv[]) {
  if (argc > 1) {
    strcpy(fileName, argv[1]);
  } else {
    strcpy(fileName, "C:\\dev\\temp\\students.csv");
  }
}


x86 assembly (clang, -O0):
<setFileName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    1143 <setFileName+0x33>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
jmp    1153 <setFileName+0x43>
mov    -0x8(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setFileName>:
cmp    $0x2,%esi
jl     111e <setFileName+0xe>
mov    0x8(%rdx),%rsi
jmp    1030 <strcpy@plt>
lea    0xedb(%rip),%rsi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"C:\\dev\\temp\\students.csv\00"
define void @setFileName(i8* %0, i32 %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8**
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32, i32* %5
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load i8*, i8** %4
%11 = load i8**, i8*** %6
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @strcpy(i8* %10, i8* %13)
br label %18
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %15, %9
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"C:\\dev\\temp\\students.csv\00"
define void @setFileName(i8* %0, i32 %1, i8** nocapture %2) {
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = getelementptr inbounds i8*, i8** %2, i64 1
%7 = load i8*, i8** %6
br label %8
8: ; preds = %3, %5
%9 = phi i8* [ %7, %5 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), %3 ]
%10 = tail call i32 @strcpy(i8* %0, i8* %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void DisplayView_printUserPrivilegeMenu() {
  printf("GRADING BOOK USER ROLE\n");
  printf("  1) ADMIN\n");
  printf("  2) TEACHER\n");
  printf("  3) STUDENT\n");
  return;
}


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

x86 assembly (clang, -O2):
<DisplayView_printUserPrivilegeMenu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"GRADING BOOK USER ROLE\0A\00"
@.str.1 = [12 x i8] c" 1) ADMIN\0A\00"
@.str.2 = [14 x i8] c" 2) TEACHER\0A\00"
@.str.3 = [14 x i8] c" 3) STUDENT\0A\00"
define void @DisplayView_printUserPrivilegeMenu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"GRADING BOOK USER ROLE\00"
@str.4 = [11 x i8] c" 1) ADMIN\00"
@str.5 = [13 x i8] c" 2) TEACHER\00"
@str.6 = [13 x i8] c" 3) STUDENT\00"
define void @DisplayView_printUserPrivilegeMenu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0))
ret void
}
int test5() {
  const int s[5];
  int t[5];
  return &s == &t;
}


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
lea    -0x20(%rbp),%rax
lea    -0x40(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test5() {
%1 = alloca [5 x i32]
%2 = alloca [5 x i32]
%3 = icmp eq [5 x i32]* %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @test5() {
ret i32 0
}