xunge/DecIR huggingface dataset:
/* Variables and functions */
int a2x(char const *, unsigned char *);
size_t strlen(char const *);
int keystring2keyblock(const char *keystring, unsigned char keyblock[]) {
  size_t l = strlen(keystring);
  if ((l & ~1) > 64)
    return -1;
  return a2x(keystring, keyblock);
}


x86 assembly (clang, -O0):
<keystring2keyblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
and    $0xfffffffffffffffe,%rax
cmp    $0x40,%rax
jbe    115b <keystring2keyblock+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <keystring2keyblock+0x4b>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <a2x@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keystring2keyblock>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
and    $0xfffffffffffffffe,%rax
cmp    $0x40,%rax
jbe    1146 <keystring2keyblock+0x26>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <a2x@plt>

LLVM IR (-O0):
define i32 @keystring2keyblock(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %6
%9 = load i64, i64* %6
%10 = and i64 %9, -2
%11 = icmp ugt i64 %10, 64
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 -1, i32* %3
br label %17
13: ; preds = %2
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = call i32 @a2x(i8* %14, i8* %15)
store i32 %16, i32* %3
br label %17
17: ; preds = %13, %12
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @keystring2keyblock(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = and i64 %3, -2
%5 = icmp ugt i64 %4, 64
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @a2x(i8* %0, i8* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ -1, %2 ]
ret i32 %9
}
/* Type definitions */
struct AMCMemUnit {
  int dummy;
};

/* Variables and functions */
int _memUnit_Free_WithLock(struct AMCMemUnit *);
int AMCMemPool_Free(struct AMCMemUnit *unit) {
  return _memUnit_Free_WithLock(unit);
}


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

x86 assembly (clang, -O2):
<AMCMemPool_Free>:
jmp    1030 <_memUnit_Free_WithLock@plt>

LLVM IR (-O0):
%struct.AMCMemUnit = type { i32 }
define i32 @AMCMemPool_Free(%struct.AMCMemUnit* %0) {
%2 = alloca %struct.AMCMemUnit*
store %struct.AMCMemUnit* %0, %struct.AMCMemUnit** %2
%3 = load %struct.AMCMemUnit*, %struct.AMCMemUnit** %2
%4 = call i32 @_memUnit_Free_WithLock(%struct.AMCMemUnit* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.AMCMemUnit = type { i32 }
define i32 @AMCMemPool_Free(%struct.AMCMemUnit* %0) {
%2 = tail call i32 @_memUnit_Free_WithLock(%struct.AMCMemUnit* %0)
ret i32 %2
}
int test_imm_6Eint8_reg(signed char val) {
  return ((val) & (-0x6E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Eint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff92,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Eint8_reg>:
test   $0x92,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_6Eint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -110
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_6Eint8_reg(i8 signext %0) {
%2 = and i8 %0, -110
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
unsigned int CLOCKS_PER_SEC;
scalar_t__ _clock();
unsigned __attribute__((weak)) sleep(unsigned seconds) {
  clock_t t0 = _clock();
  clock_t dt = seconds * CLOCKS_PER_SEC;
  while (_clock() - t0 < dt)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <_clock@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb8(%rip),%rcx
imul   (%rcx),%eax
mov    %eax,%eax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <_clock@plt>
sub    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1153 <sleep+0x43>
jmp    1139 <sleep+0x29>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
xor    %eax,%eax
call   1030 <_clock@plt>
mov    %rax,%rbx
mov    0x2ec0(%rip),%rax
imul   (%rax),%r14d
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <_clock@plt>
sub    %rbx,%rax
cmp    %r14,%rax
jl     1130 <sleep+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i32 0
define weak i32 @sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i32 %0, i32* %2
%5 = call i64 (...) @_clock()
store i64 %5, i64* %3
%6 = load i32, i32* %2
%7 = load i32, i32* @CLOCKS_PER_SEC
%8 = mul i32 %6, %7
%9 = zext i32 %8 to i64
store i64 %9, i64* %4
br label %10
10: ; preds = %16, %1
%11 = call i64 (...) @_clock()
%12 = load i64, i64* %3
%13 = sub nsw i64 %11, %12
%14 = load i64, i64* %4
%15 = icmp slt i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %10
br label %10
17: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i32 0
define weak i32 @sleep(i32 %0) {
%2 = tail call i64 (...) @_clock()
%3 = load i32, i32* @CLOCKS_PER_SEC
%4 = mul i32 %3, %0
%5 = zext i32 %4 to i64
br label %6
6: ; preds = %6, %1
%7 = tail call i64 (...) @_clock()
%8 = sub nsw i64 %7, %2
%9 = icmp slt i64 %8, %5
br i1 %9, label %6, label %10
10: ; preds = %6
ret i32 0
}
char *shortname(char *in) {
  for (char *i = in; *i; i++) {
    if (*i == '.') {
      *i = 0;
      break;
    }
  }
  return in;
}


x86 assembly (clang, -O0):
<shortname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114f <shortname+0x4f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    1139 <shortname+0x39>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    114f <shortname+0x4f>
jmp    113e <shortname+0x3e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <shortname+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shortname>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
movzbl (%rcx),%edx
test   %dl,%dl
je     1125 <shortname+0x25>
cmp    $0x2e,%dl
je     1122 <shortname+0x22>
add    $0x1,%rcx
jmp    1110 <shortname+0x10>
movb   $0x0,(%rcx)
ret

LLVM IR (-O0):
define i8* @shortname(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %17, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 46
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = load i8*, i8** %3
store i8 0, i8* %15
br label %20
16: ; preds = %9
br label %17
17: ; preds = %16
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %3
br label %5
20: ; preds = %14, %5
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @shortname(i8* returned %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 46, label %5
]
5: ; preds = %2
store i8 0, i8* %3
br label %8
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2, %5
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ execute(int /*<<< orphan*/);
int /*<<< orphan*/ gc_init();
int /*<<< orphan*/ init_constants();
int /*<<< orphan*/ init_symeval();
int main(int argc, char *argv[]) {
  gc_init();
  init_constants();
  init_symeval();
  execute(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <gc_init@plt>
mov    $0x0,%al
call   1050 <init_constants@plt>
mov    $0x0,%al
call   1060 <init_symeval@plt>
xor    %edi,%edi
call   1040 <execute@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <gc_init@plt>
xor    %eax,%eax
call   1050 <init_constants@plt>
xor    %eax,%eax
call   1060 <init_symeval@plt>
xor    %edi,%edi
call   1040 <execute@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @gc_init()
%7 = call i32 (...) @init_constants()
%8 = call i32 (...) @init_symeval()
%9 = call i32 @execute(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @gc_init()
%4 = tail call i32 (...) @init_constants()
%5 = tail call i32 (...) @init_symeval()
%6 = tail call i32 @execute(i32 0)
ret i32 0
}
int isatty(int fd) {
  (void)fd;
  return (1);
}


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

x86 assembly (clang, -O2):
<isatty>:
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @isatty(i32 %0) {
ret i32 1
}
char push(char *buff, char item, int *top, int top_max) {
  if (*top == top_max + 1)
    return -1;
  buff[(*top)++] = item;
}


x86 assembly (clang, -O0):
<push>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1132 <push+0x32>
movb   $0xff,-0x1(%rbp)
jmp    114c <push+0x4c>
mov    -0x11(%rbp),%dl
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rsi
mov    (%rsi),%ecx
mov    %ecx,%edi
add    $0x1,%edi
mov    %edi,(%rsi)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<push>:
movslq (%rdx),%rax
add    $0x1,%ecx
cmp    %ecx,%eax
je     1113 <push+0x13>
lea    0x1(%rax),%ecx
mov    %ecx,(%rdx)
mov    %sil,(%rdi,%rax,1)
mov    $0xff,%al
ret

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

LLVM IR (-O2):
define signext i8 @push(i8* nocapture writeonly %0, i8 signext %1, i32* nocapture %2, i32 %3) {
%5 = load i32, i32* %2
%6 = add nsw i32 %3, 1
%7 = icmp eq i32 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = add nsw i32 %5, 1
store i32 %9, i32* %2
%10 = sext i32 %5 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
store i8 %1, i8* %11
br label %12
12: ; preds = %4, %8
ret i8 -1
}
/* Type definitions */
struct ts_node {
  int dummy;
};
struct ts_io {
  int dummy;
};

/* Variables and functions */
int ts_text_save(struct ts_node *, struct ts_io *);
int ts_save_io(struct ts_node *tree, struct ts_io *io) {
  return ts_text_save(tree, io);
}


x86 assembly (clang, -O0):
<ts_save_io>:
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 <ts_text_save@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_save_io>:
jmp    1030 <ts_text_save@plt>

LLVM IR (-O0):
%struct.ts_node = type { i32 }
%struct.ts_io = type { i32 }
define i32 @ts_save_io(%struct.ts_node* %0, %struct.ts_io* %1) {
%3 = alloca %struct.ts_node*
%4 = alloca %struct.ts_io*
store %struct.ts_node* %0, %struct.ts_node** %3
store %struct.ts_io* %1, %struct.ts_io** %4
%5 = load %struct.ts_node*, %struct.ts_node** %3
%6 = load %struct.ts_io*, %struct.ts_io** %4
%7 = call i32 @ts_text_save(%struct.ts_node* %5, %struct.ts_io* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.ts_node = type { i32 }
%struct.ts_io = type { i32 }
define i32 @ts_save_io(%struct.ts_node* %0, %struct.ts_io* %1) {
%3 = tail call i32 @ts_text_save(%struct.ts_node* %0, %struct.ts_io* %1)
ret i32 %3
}
/* Type definitions */
struct t_node {
  int dummy;
};
struct t_list {
  int dummy;
};

/* Variables and functions */
struct t_node *get_at(struct t_list *, int);
struct t_node *get_top(struct t_list *plist) {
  return get_at(plist, 1);
}


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

x86 assembly (clang, -O2):
<get_top>:
mov    $0x1,%esi
jmp    1030 <get_at@plt>

LLVM IR (-O0):
%struct.t_node = type { i32 }
%struct.t_list = type { i32 }
define %struct.t_node* @get_top(%struct.t_list* %0) {
%2 = alloca %struct.t_list*
store %struct.t_list* %0, %struct.t_list** %2
%3 = load %struct.t_list*, %struct.t_list** %2
%4 = call %struct.t_node* @get_at(%struct.t_list* %3, i32 1)
ret %struct.t_node* %4
}

LLVM IR (-O2):
%struct.t_node = type { i32 }
%struct.t_list = type { i32 }
define %struct.t_node* @get_top(%struct.t_list* %0) {
%2 = tail call %struct.t_node* @get_at(%struct.t_list* %0, i32 1)
ret %struct.t_node* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int tribonacci(int);
int main() {
  int n;
  n = 4;
  printf("%d\n", tribonacci(n));
  n = 25;
  printf("%d\n", tribonacci(n));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1040 <tribonacci@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x19,%edi
call   1040 <tribonacci@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 4, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @tribonacci(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
store i32 25, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @tribonacci(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @tribonacci(i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @tribonacci(i32 25)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ check_vect();
int test();
int main() {
  check_vect();
  return test();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <check_vect@plt>
mov    $0x0,%al
call   1040 <test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <check_vect@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @check_vect()
%3 = call i32 (...) @test()
ret i32 %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @check_vect()
%2 = tail call i32 (...) @test()
ret i32 %2
}
char *strcpy(char *dest, const char *src) {
  char *tmp = dest;
  while ((*dest++ = *src++) != '\0')
    ;
  return tmp;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1147 <strcpy+0x47>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
br label %7
7: ; preds = %15, %2
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %4
%10 = load i8, i8* %8
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
store i8 %10, i8* %11
%13 = sext i8 %10 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %7
br label %7
16: ; preds = %7
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strcmpf(const char **a, const char **b) { return strcmp(*a, *b); }


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

x86 assembly (clang, -O2):
<strcmpf>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @strcmpf(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %7
%9 = call i32 @strcmp(i8* %6, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @strcmpf(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(1) %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_batch_context_recv_message_next_slice_peek() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_batch_context_recv_message_next_slice_peek>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_batch_context_recv_message_next_slice_peek>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_batch_context_recv_message_next_slice_peek() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_batch_context_recv_message_next_slice_peek() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
int test_imm_7Bint64_lowword_reg(long long val) {
  return ((val) & (0x7B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_7Bint64_lowword_reg>:
test   $0x7b,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_7Bint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 123
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_mutex_destroy(int /*<<< orphan*/ *);
void fthread_mutex_destroy_(pthread_mutex_t **theMutex) {
  pthread_mutex_destroy(*theMutex);
  free(*theMutex);
}


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

x86 assembly (clang, -O2):
<fthread_mutex_destroy_>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1040 <pthread_mutex_destroy@plt>
mov    (%rbx),%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @fthread_mutex_destroy_(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = tail call i32 @pthread_mutex_destroy(i32* %2)
%4 = load i32*, i32** %0
%5 = tail call i32 @free(i32* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ gettag();
int /*<<< orphan*/ luaL_check_lstr(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ lua_pushusertag(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ pushresult(int /*<<< orphan*/);
void io_open(void) {
  FILE *f =
      fopen((luaL_check_lstr((2), NULL)), (luaL_check_lstr((2 + 1), NULL)));
  if (f)
    lua_pushusertag(f, gettag());
  else
    pushresult(0);
}


x86 assembly (clang, -O0):
<io_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <luaL_check_lstr@plt>
mov    %eax,-0xc(%rbp)
mov    $0x3,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <luaL_check_lstr@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1060 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11af <io_open+0x5f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <gettag@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <lua_pushusertag@plt>
jmp    11b6 <io_open+0x66>
xor    %edi,%edi
call   1030 <pushresult@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_open>:
push   %rbx
mov    $0x2,%edi
xor    %esi,%esi
call   1070 <luaL_check_lstr@plt>
mov    %eax,%ebx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <luaL_check_lstr@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1060 <fopen@plt>
test   %rax,%rax
je     118e <io_open+0x3e>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <gettag@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <lua_pushusertag@plt>
xor    %edi,%edi
pop    %rbx
jmp    1030 <pushresult@plt>

LLVM IR (-O0):
define void @io_open() {
%1 = alloca i32*
%2 = call i32 @luaL_check_lstr(i32 2, i32* null)
%3 = call i32 @luaL_check_lstr(i32 3, i32* null)
%4 = call i32* @fopen(i32 %2, i32 %3)
store i32* %4, i32** %1
%5 = load i32*, i32** %1
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i32*, i32** %1
%9 = call i32 (...) @gettag()
%10 = call i32 @lua_pushusertag(i32* %8, i32 %9)
br label %13
11: ; preds = %0
%12 = call i32 @pushresult(i32 0)
br label %13
13: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
define void @io_open() {
%1 = tail call i32 @luaL_check_lstr(i32 2, i32* null)
%2 = tail call i32 @luaL_check_lstr(i32 3, i32* null)
%3 = tail call i32* @fopen(i32 %1, i32 %2)
%4 = icmp eq i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = tail call i32 (...) @gettag()
%7 = tail call i32 @lua_pushusertag(i32* %3, i32 %6)
br label %10
8: ; preds = %0
%9 = tail call i32 @pushresult(i32 0)
br label %10
10: ; preds = %8, %5
ret void
}
void bar4(a) {}


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

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

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

LLVM IR (-O2):
define void @bar4(i32 %0) {
ret void
}
int debugfs_dma_buf_init(const char *name) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @debugfs_dma_buf_init(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char *, int);
void KVS_CreateSocketPath(int threadNo, char *buf, int buflen) {
  snprintf((buf), (buflen), "%s.%d", "/tmp/mykvs.sock", threadNo);
}


x86 assembly (clang, -O0):
<KVS_CreateSocketPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x4(%rbp),%r8d
lea    0xecc(%rip),%rdx
lea    0xecb(%rip),%rcx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KVS_CreateSocketPath>:
mov    %edi,%r8d
lea    0xee6(%rip),%rax
lea    0xee5(%rip),%rcx
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s.%d\00"
@.str.1 = [16 x i8] c"/tmp/mykvs.sock\00"
define void @KVS_CreateSocketPath(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s.%d\00"
@.str.1 = [16 x i8] c"/tmp/mykvs.sock\00"
define void @KVS_CreateSocketPath(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
void vid_refresh(void) { return; }


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

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

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

LLVM IR (-O2):
define void @vid_refresh() {
ret void
}
/* Variables and functions */
int egetc();
int to16bit(int, int);
read16bit() {
  int c1, c2;
  c1 = egetc();
  c2 = egetc();
  return to16bit(c1, c2);
}


x86 assembly (clang, -O0):
<read16bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <egetc@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <egetc@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <to16bit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read16bit>:
push   %rbx
xor    %eax,%eax
call   1030 <egetc@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <egetc@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <to16bit@plt>

LLVM IR (-O0):
define i32 @read16bit() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @egetc()
store i32 %3, i32* %1
%4 = call i32 (...) @egetc()
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @to16bit(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @read16bit() {
%1 = tail call i32 (...) @egetc()
%2 = tail call i32 (...) @egetc()
%3 = tail call i32 @to16bit(i32 %1, i32 %2)
ret i32 %3
}
int bitOr(int x, int y) { return ~(~x & ~y); }


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

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

LLVM IR (-O0):
define i32 @bitOr(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 = xor i32 %7, -1
%9 = and i32 %6, %8
%10 = xor i32 %9, -1
ret i32 %10
}

LLVM IR (-O2):
define i32 @bitOr(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
void p18_pps_out_rst(void) {}


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

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

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

LLVM IR (-O2):
define void @p18_pps_out_rst() {
ret void
}
char getChr(int num) { return (char)(num + '0'); }


x86 assembly (clang, -O0):
<getChr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getChr>:
lea    0x30(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @getChr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 48
%5 = trunc i32 %4 to i8
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @getChr(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = add i8 %2, 48
ret i8 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned int state;
};
typedef TYPE_1__ XLeaveWindowEvent;

/* Variables and functions */
void set_XLeaveWindowEvent_state(void *_p, unsigned _v) {
  ((XLeaveWindowEvent *)_p)->state = (unsigned)_v;
}


x86 assembly (clang, -O0):
<set_XLeaveWindowEvent_state>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XLeaveWindowEvent_state>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XLeaveWindowEvent_state(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 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XLeaveWindowEvent_state(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int __mp_edit(char *f, unsigned long l) { return 0; }


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

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

LLVM IR (-O0):
define i32 @__mp_edit(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @__mp_edit(i8* nocapture readnone %0, i64 %1) {
ret i32 0
}
unsigned int power_of_2_max_u(unsigned int x) {
  x -= 1;
  x |= (x >> 1);
  x |= (x >> 2);
  x |= (x >> 4);
  x |= (x >> 8);
  x |= (x >> 16);
  return x + 1;
}


x86 assembly (clang, -O0):
<power_of_2_max_u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power_of_2_max_u>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
shr    %ecx
or     %eax,%ecx
mov    %ecx,%eax
shr    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
shr    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
shr    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @power_of_2_max_u(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = lshr i32 %5, 1
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = lshr i32 %9, 2
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = lshr i32 %13, 4
%15 = load i32, i32* %2
%16 = or i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = lshr i32 %17, 8
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = lshr i32 %21, 16
%23 = load i32, i32* %2
%24 = or i32 %23, %22
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = add i32 %25, 1
ret i32 %26
}

LLVM IR (-O2):
define i32 @power_of_2_max_u(i32 %0) {
%2 = add i32 %0, -1
%3 = lshr i32 %2, 1
%4 = or i32 %3, %2
%5 = lshr i32 %4, 2
%6 = or i32 %5, %4
%7 = lshr i32 %6, 4
%8 = or i32 %7, %6
%9 = lshr i32 %8, 8
%10 = or i32 %9, %8
%11 = lshr i32 %10, 16
%12 = or i32 %11, %10
%13 = add i32 %12, 1
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ rst(int);
void opcode_f7() { rst(0x30); }


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

x86 assembly (clang, -O2):
<opcode_f7>:
mov    $0x30,%edi
jmp    1030 <rst@plt>

LLVM IR (-O0):
define void @opcode_f7() {
%1 = call i32 @rst(i32 48)
ret void
}

LLVM IR (-O2):
define void @opcode_f7() {
%1 = tail call i32 @rst(i32 48)
ret void
}
int other_function(void) { return 3; }


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

x86 assembly (clang, -O2):
<other_function>:
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @other_function() {
ret i32 3
}

LLVM IR (-O2):
define i32 @other_function() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ test_encodeCRLDistPoints(int);
void func_encode(void) { test_encodeCRLDistPoints(0x00000001); }


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

x86 assembly (clang, -O2):
<func_encode>:
mov    $0x1,%edi
jmp    1030 <test_encodeCRLDistPoints@plt>

LLVM IR (-O0):
define void @func_encode() {
%1 = call i32 @test_encodeCRLDistPoints(i32 1)
ret void
}

LLVM IR (-O2):
define void @func_encode() {
%1 = tail call i32 @test_encodeCRLDistPoints(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TEST_ASSERT(int);
int get_incremented_value();
void pass(void) { TEST_ASSERT(get_incremented_value() == 1); }


x86 assembly (clang, -O0):
<pass>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_incremented_value@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <TEST_ASSERT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pass>:
push   %rax
xor    %eax,%eax
call   1030 <get_incremented_value@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
pop    %rax
jmp    1040 <TEST_ASSERT@plt>

LLVM IR (-O0):
define void @pass() {
%1 = call i32 (...) @get_incremented_value()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = call i32 @TEST_ASSERT(i32 %3)
ret void
}

LLVM IR (-O2):
define void @pass() {
%1 = tail call i32 (...) @get_incremented_value()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @TEST_ASSERT(i32 %3)
ret void
}
/* Variables and functions */
int renameat(int, char const *, int, char const *);
__attribute__((__weak__, __always___)) int
softboundmpx_renameat(int olddirfd, const char *oldpath, int newdirfd,
                      const char *newpath) {
  return renameat(olddirfd, oldpath, newdirfd, newpath);
}


x86 assembly (clang, -O0):
<softboundmpx_renameat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <renameat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_renameat>:
jmp    1030 <renameat@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_renameat(i32 %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @renameat(i32 %0, i8* %1, i32 %2, i8* %3)
ret i32 %5
}
void avltree_init_openmp(void) { return; }


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

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

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

LLVM IR (-O2):
define void @avltree_init_openmp() {
ret void
}
void CFGMR3QueryPtrDef(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3QueryPtrDef() {
ret void
}
unsigned TausStep(unsigned z, int S1, int S2, int S3, unsigned M) {
  unsigned b = (((z << S1) ^ z) >> S2);
  return (((z & M) << S3) ^ b);
}


x86 assembly (clang, -O0):
<TausStep>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
xor    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
and    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    %cl,%eax
xor    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TausStep>:
mov    %ecx,%r9d
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
xor    %edi,%eax
mov    %edx,%ecx
shr    %cl,%eax
and    %edi,%r8d
mov    %r9d,%ecx
shl    %cl,%r8d
xor    %r8d,%eax
ret

LLVM IR (-O0):
define i32 @TausStep(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = shl i32 %12, %13
%15 = load i32, i32* %6
%16 = xor i32 %14, %15
%17 = load i32, i32* %8
%18 = lshr i32 %16, %17
store i32 %18, i32* %11
%19 = load i32, i32* %6
%20 = load i32, i32* %10
%21 = and i32 %19, %20
%22 = load i32, i32* %9
%23 = shl i32 %21, %22
%24 = load i32, i32* %11
%25 = xor i32 %23, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @TausStep(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = shl i32 %0, %1
%7 = xor i32 %6, %0
%8 = lshr i32 %7, %2
%9 = and i32 %4, %0
%10 = shl i32 %9, %3
%11 = xor i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xe7() {
  Assert_real((isodigit(231) == 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_isodigit.c",
              1160, ("isodigit should be 0 for 0xe7"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xe7>:
push   %rax
mov    $0xe7,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x488,%edx
pop    %rax
jmp    1030 <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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xe7\00"
define void @t_isodigit_0xe7() {
%1 = call i64 @isodigit(i32 231)
%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 1160, 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xe7\00"
define void @t_isodigit_0xe7() {
%1 = tail call i64 @isodigit(i32 231)
%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 1160, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int ConvertSampleFloatTo0_MaxValue(float sample, int max_value) {
  if (-1.0f > sample) {
    sample = -1.0f;
  }
  if (1.0f < sample) {
    sample = 1.0f;
  }
  const float scale = 0.5f * max_value;
  float value = scale * sample + (scale + 0.5f);
  return (int)value;
}


x86 assembly (clang, -O0):
<ConvertSampleFloatTo0_MaxValue>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  0xeec(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    112b <ConvertSampleFloatTo0_MaxValue+0x2b>
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xecc(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    114e <ConvertSampleFloatTo0_MaxValue+0x4e>
movss  0xebb(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm1
movss  0xead(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xe92(%rip),%xmm1
addss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
cvttss2si -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertSampleFloatTo0_MaxValue>:
movss  0xef8(%rip),%xmm1
maxss  %xmm0,%xmm1
movss  0xef0(%rip),%xmm0
cvtsi2ss %edi,%xmm2
minss  %xmm1,%xmm0
movss  0xee4(%rip),%xmm1
mulss  %xmm1,%xmm2
addss  %xmm2,%xmm1
mulss  %xmm0,%xmm2
addss  %xmm1,%xmm2
cvttss2si %xmm2,%eax
ret

LLVM IR (-O0):
define i32 @ConvertSampleFloatTo0_MaxValue(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store float %0, float* %3
store i32 %1, i32* %4
%7 = load float, float* %3
%8 = fcmp ogt float -1.000000e+00, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store float -1.000000e+00, float* %3
br label %10
10: ; preds = %9, %2
%11 = load float, float* %3
%12 = fcmp olt float 1.000000e+00, %11
br i1 %12, label %13, label %14
13: ; preds = %10
store float 1.000000e+00, float* %3
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %4
%16 = sitofp i32 %15 to float
%17 = fmul float 5.000000e-01, %16
store float %17, float* %5
%18 = load float, float* %5
%19 = load float, float* %3
%20 = load float, float* %5
%21 = fadd float %20, 5.000000e-01
%22 = call float @llvm.fmuladd.f32(float %18, float %19, float %21)
store float %22, float* %6
%23 = load float, float* %6
%24 = fptosi float %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @ConvertSampleFloatTo0_MaxValue(float %0, i32 %1) {
%3 = fcmp olt float %0, -1.000000e+00
%4 = select i1 %3, float -1.000000e+00, float %0
%5 = fcmp ogt float %4, 1.000000e+00
%6 = select i1 %5, float 1.000000e+00, float %4
%7 = sitofp i32 %1 to float
%8 = fmul float %7, 5.000000e-01
%9 = fadd float %8, 5.000000e-01
%10 = tail call float @llvm.fmuladd.f32(float %8, float %6, float %9)
%11 = fptosi float %10 to i32
ret i32 %11
}
/* Type definitions */
struct bkey {
  int dummy;
};
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
struct bkey *bkey_idx(const struct bkey *k, unsigned int nr_keys) {
  __u64 *d = (void *)k;
  return (struct bkey *)(d + nr_keys);
}


x86 assembly (clang, -O0):
<bkey_idx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bkey_idx>:
mov    %esi,%eax
lea    (%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
%struct.bkey = type { i32 }
define %struct.bkey* @bkey_idx(%struct.bkey* %0, i32 %1) {
%3 = alloca %struct.bkey*
%4 = alloca i32
%5 = alloca i32*
store %struct.bkey* %0, %struct.bkey** %3
store i32 %1, i32* %4
%6 = load %struct.bkey*, %struct.bkey** %3
%7 = bitcast %struct.bkey* %6 to i8*
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = bitcast i32* %12 to %struct.bkey*
ret %struct.bkey* %13
}

LLVM IR (-O2):
%struct.bkey = type { i32 }
define %struct.bkey* @bkey_idx(%struct.bkey* readnone %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr inbounds %struct.bkey, %struct.bkey* %0, i64 %3, i32 0
%5 = bitcast i32* %4 to %struct.bkey*
ret %struct.bkey* %5
}