xunge/DecIR huggingface dataset:
/* Variables and functions */
int _bsearchOccurLeft(int *, int /*<<< orphan*/, int, int);
int _bsearchOccurRight(int *, int /*<<< orphan*/, int, int);
int countOccurencies(int *A, int size, int val) {
  int count;
  int rightIdx = _bsearchOccurRight(A, 0, size - 1, val);
  int leftIdx = _bsearchOccurLeft(A, 0, size - 1, val);
  count = rightIdx - leftIdx;
  return count;
}


x86 assembly (clang, -O0):
<countOccurencies>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    -0x10(%rbp),%ecx
xor    %esi,%esi
call   1030 <_bsearchOccurRight@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    -0x10(%rbp),%ecx
xor    %esi,%esi
call   1040 <_bsearchOccurLeft@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countOccurencies>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rdi,%r15
lea    -0x1(%rsi),%ebp
xor    %esi,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <_bsearchOccurRight@plt>
mov    %eax,%ebx
mov    %r15,%rdi
xor    %esi,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1040 <_bsearchOccurLeft@plt>
sub    %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @countOccurencies(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = load i32, i32* %6
%14 = call i32 @_bsearchOccurRight(i32* %10, i32 0, i32 %12, i32 %13)
store i32 %14, i32* %8
%15 = load i32*, i32** %4
%16 = load i32, i32* %5
%17 = sub nsw i32 %16, 1
%18 = load i32, i32* %6
%19 = call i32 @_bsearchOccurLeft(i32* %15, i32 0, i32 %17, i32 %18)
store i32 %19, i32* %9
%20 = load i32, i32* %8
%21 = load i32, i32* %9
%22 = sub nsw i32 %20, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @countOccurencies(i32* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, -1
%5 = tail call i32 @_bsearchOccurRight(i32* %0, i32 0, i32 %4, i32 %2)
%6 = tail call i32 @_bsearchOccurLeft(i32* %0, i32 0, i32 %4, i32 %2)
%7 = sub nsw i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ handle_56(int /*<<< orphan*/);
int gen_56() { handle_56(0); }


x86 assembly (clang, -O0):
<gen_56>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <handle_56@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_56>:
xor    %edi,%edi
jmp    1030 <handle_56@plt>

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

LLVM IR (-O2):
define i32 @gen_56() {
%1 = tail call i32 @handle_56(i32 0)
ret i32 undef
}
int test_imm_A3uint16_mem(unsigned short *val) {
  return ((*val) & (-0xA3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A3uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff5d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A3uint16_mem>:
movzwl (%rdi),%eax
test   $0xff5d,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A3uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -163
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __v2di;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpeq_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_srli_epi64(int /*<<< orphan*/, int);
__v2di flipmask(__v2di outflank) {
  return _mm_cmpeq_epi32(_mm_srli_epi64(outflank, 32), outflank);
}


x86 assembly (clang, -O0):
<flipmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x20,%esi
call   1030 <_mm_srli_epi64@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
call   1040 <_mm_cmpeq_epi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flipmask>:
push   %rbx
mov    %edi,%ebx
mov    $0x20,%esi
call   1030 <_mm_srli_epi64@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <_mm_cmpeq_epi32@plt>

LLVM IR (-O0):
define i32 @flipmask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_mm_srli_epi64(i32 %3, i32 32)
%5 = load i32, i32* %2
%6 = call i32 @_mm_cmpeq_epi32(i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @flipmask(i32 %0) {
%2 = tail call i32 @_mm_srli_epi64(i32 %0, i32 32)
%3 = tail call i32 @_mm_cmpeq_epi32(i32 %2, i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand(int);
int main(int argc, char const *argv[]) {
  printf("%d\n", rand(10));
  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    $0xa,%edi
call   1040 <rand@plt>
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
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 @rand(i32 10)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @rand(i32 10)
%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*/ handle_PHONE(int /*<<< orphan*/);
int gen_PHONE(void) {
  handle_PHONE(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @gen_PHONE() {
%1 = call i32 @handle_PHONE(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_PHONE() {
%1 = tail call i32 @handle_PHONE(i32 0)
ret i32 0
}
int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry,
          unsigned int *flags, struct ebt_entry_target **target) {
  return 0;
}


x86 assembly (clang, -O0):
<parse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ebt_u_entry = type opaque
%struct.ebt_entry_target = type opaque
define i32 @parse(i32 %0, i8** %1, i32 %2, %struct.ebt_u_entry* %3, i32* %4, %struct.ebt_entry_target** %5) {
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i32
%10 = alloca %struct.ebt_u_entry*
%11 = alloca i32*
%12 = alloca %struct.ebt_entry_target**
store i32 %0, i32* %7
store i8** %1, i8*** %8
store i32 %2, i32* %9
store %struct.ebt_u_entry* %3, %struct.ebt_u_entry** %10
store i32* %4, i32** %11
store %struct.ebt_entry_target** %5, %struct.ebt_entry_target*** %12
ret i32 0
}

LLVM IR (-O2):
%struct.ebt_u_entry = type opaque
%struct.ebt_entry_target = type opaque
define i32 @parse(i32 %0, i8** nocapture readnone %1, i32 %2, %struct.ebt_u_entry* nocapture readnone %3, i32* nocapture readnone %4, %struct.ebt_entry_target** nocapture readnone %5) {
ret i32 0
}
/* Variables and functions */
int strncmp(char const *, char const *, size_t);
int htx_strncmp(const char *s1, const char *s2, size_t n) {
  return strncmp(s1, s2, n);
}


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

x86 assembly (clang, -O2):
<htx_strncmp>:
jmp    1030 <strncmp@plt>

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

LLVM IR (-O2):
define i32 @htx_strncmp(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *thread_func(void *vptr_args) {
  int i;
  for (i = 0; i < 200; i++) {
    printf("  b\n");
  }
  return NULL;
}


x86 assembly (clang, -O0):
<thread_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xc8,-0xc(%rbp)
jge    114a <thread_func+0x3a>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <thread_func+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_func>:
push   %rbp
push   %rbx
push   %rax
mov    $0xc8,%ebp
lea    0xee1(%rip),%rbx
nop
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebp
jne    1120 <thread_func+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c" b\0A\00"
define i8* @thread_func(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 200
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
ret i8* null
}

LLVM IR (-O2):
@str = [4 x i8] c" b\00"
define noalias i8* @thread_func(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %5, %2 ]
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 200
br i1 %6, label %7, label %2
7: ; preds = %2
ret i8* null
}
void RTVfsNewSymlink(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsNewSymlink() {
ret void
}
int *event_queue_size() {
  static int n = 0;
  return &n;
}


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

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

LLVM IR (-O0):
@event_queue_size.n = internal global i32 0
define i32* @event_queue_size() {
ret i32* @event_queue_size.n
}

LLVM IR (-O2):
@event_queue_size.n = internal global i32 0
define i32* @event_queue_size() {
ret i32* @event_queue_size.n
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)());
void sigint() {
  signal(SIGINT, sigint);
  printf("CHILD: I have received a SIGINT\n");
}


x86 assembly (clang, -O0):
<sigint>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    0x2ea4(%rip),%rsi
call   1040 <signal@plt>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigint>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rsi
call   1040 <signal@plt>
lea    0xec3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [33 x i8] c"CHILD: I have received a SIGINT\0A\00"
define void @sigint() {
%1 = load i32, i32* @SIGINT
%2 = call i32 @signal(i32 %1, void (...)* bitcast (void ()* @sigint to void (...)*))
%3 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@str = [32 x i8] c"CHILD: I have received a SIGINT\00"
define void @sigint() {
%1 = load i32, i32* @SIGINT
%2 = tail call i32 @signal(i32 %1, void (...)* bitcast (void ()* @sigint to void (...)*))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void system_free(void *allocator_data, void *data) {
  (void)allocator_data;
  free(data);
}


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

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

LLVM IR (-O0):
define void @system_free(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** %4
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @system_free(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(unsigned short);
__attribute__((no, noclone)) unsigned short f7(unsigned short x,
                                               unsigned short y) {
  unsigned short r = x - y;
  if (y <= r)
    foo(r);
  return r;
}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
sub    %ecx,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x4(%rbp),%eax
movzwl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jg     114d <f7+0x3d>
movzwl -0x6(%rbp),%edi
call   1030 <foo@plt>
movzwl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
push   %rbx
mov    %edi,%ebx
sub    %esi,%ebx
cmp    %si,%bx
jb     1122 <f7+0x12>
movzwl %bx,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @f7(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = load i16, i16* %4
%9 = zext i16 %8 to i32
%10 = sub nsw i32 %7, %9
%11 = trunc i32 %10 to i16
store i16 %11, i16* %5
%12 = load i16, i16* %4
%13 = zext i16 %12 to i32
%14 = load i16, i16* %5
%15 = zext i16 %14 to i32
%16 = icmp sle i32 %13, %15
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load i16, i16* %5
%19 = call i32 @foo(i16 zeroext %18)
br label %20
20: ; preds = %17, %2
%21 = load i16, i16* %5
ret i16 %21
}

LLVM IR (-O2):
define zeroext i16 @f7(i16 zeroext %0, i16 zeroext %1) {
%3 = sub i16 %0, %1
%4 = icmp ult i16 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @foo(i16 zeroext %3)
br label %7
7: ; preds = %5, %2
ret i16 %3
}
/* Type definitions */
struct sigaction {
  int dummy;
};

/* Variables and functions */
int __infer_nondet_int();
int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
  int ret = __infer_nondet_int();
  if (ret < -1 || ret > 0)
    while (1)
      ;
  return ret;
}


x86 assembly (clang, -O0):
<sigaction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jl     1141 <sigaction+0x31>
cmpl   $0x0,-0x1c(%rbp)
jle    114b <sigaction+0x3b>
jmp    1146 <sigaction+0x36>
jmp    1146 <sigaction+0x36>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigaction>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
lea    -0x1(%rax),%ecx
cmp    $0xfffffffd,%ecx
ja     1122 <sigaction+0x12>
jmp    1120 <sigaction+0x10>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sigaction = type { i32 }
define i32 @sigaction(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2) {
%4 = alloca i32
%5 = alloca %struct.sigaction*
%6 = alloca %struct.sigaction*
%7 = alloca i32
store i32 %0, i32* %4
store %struct.sigaction* %1, %struct.sigaction** %5
store %struct.sigaction* %2, %struct.sigaction** %6
%8 = call i32 (...) @__infer_nondet_int()
store i32 %8, i32* %7
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, -1
br i1 %10, label %14, label %11
11: ; preds = %3
%12 = load i32, i32* %7
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11, %3
br label %15
15: ; preds = %14, %15
br label %15
16: ; preds = %11
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
%struct.sigaction = type { i32 }
define i32 @sigaction(i32 %0, %struct.sigaction* nocapture readnone %1, %struct.sigaction* nocapture readnone %2) {
%4 = tail call i32 (...) @__infer_nondet_int()
%5 = add i32 %4, -1
%6 = icmp ult i32 %5, -2
br i1 %6, label %7, label %8
7: ; preds = %3, %7
br label %7
8: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int ds1621_read_value(int, int);
int read_counter(int dev_fd) { return (ds1621_read_value(dev_fd, 0xA8)); }


x86 assembly (clang, -O0):
<read_counter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xa8,%esi
call   1030 <ds1621_read_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_counter>:
mov    $0xa8,%esi
jmp    1030 <ds1621_read_value@plt>

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

LLVM IR (-O2):
define i32 @read_counter(i32 %0) {
%2 = tail call i32 @ds1621_read_value(i32 %0, i32 168)
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
scalar_t__ sin1(scalar_t__);
int16_t cos1(int16_t angle) {
  if (angle < 0) {
    angle += ((1 << ((8 * sizeof(int16_t)) - 1)) - 1);
    angle += 1;
  }
  return sin1(angle - (270. / 360) * ((1 << ((8 * sizeof(int16_t)) - 1)) - 1));
}


x86 assembly (clang, -O0):
<cos1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    113b <cos1+0x2b>
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <sin1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cos1>:
jmp    1030 <sin1@plt>

LLVM IR (-O0):
define i64 @cos1(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i64, i64* %2
%7 = add nsw i64 %6, poison
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = add nsw i64 %8, 1
store i64 %9, i64* %2
br label %10
10: ; preds = %5, %1
%11 = load i64, i64* %2
%12 = sitofp i64 %11 to double
%13 = fsub double %12, poison
%14 = fptosi double %13 to i64
%15 = call i64 @sin1(i64 %14)
ret i64 %15
}

LLVM IR (-O2):
define i64 @cos1(i64 %0) {
%2 = tail call i64 @sin1(i64 poison)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ TOSH_CLR_GIO1_PIN();
int /*<<< orphan*/ TOSH_MAKE_GIO1_INPUT();
int /*<<< orphan*/ TOSH_MAKE_GIO1_OUTPUT();
int /*<<< orphan*/ TOSH_uwait(int);
void writeBit(int bit) {
  if (bit) {
    TOSH_MAKE_GIO1_OUTPUT();
    TOSH_CLR_GIO1_PIN();
    TOSH_uwait(4);
    TOSH_MAKE_GIO1_INPUT();
    TOSH_uwait(50);
  } else {
    TOSH_MAKE_GIO1_OUTPUT();
    TOSH_CLR_GIO1_PIN();
    TOSH_uwait(50);
    TOSH_MAKE_GIO1_INPUT();
    TOSH_uwait(8);
  }
}


x86 assembly (clang, -O0):
<writeBit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1183 <writeBit+0x43>
mov    $0x0,%al
call   1030 <TOSH_MAKE_GIO1_OUTPUT@plt>
mov    $0x0,%al
call   1050 <TOSH_CLR_GIO1_PIN@plt>
mov    $0x4,%edi
call   1060 <TOSH_uwait@plt>
mov    $0x0,%al
call   1040 <TOSH_MAKE_GIO1_INPUT@plt>
mov    $0x32,%edi
call   1060 <TOSH_uwait@plt>
jmp    11ac <writeBit+0x6c>
mov    $0x0,%al
call   1030 <TOSH_MAKE_GIO1_OUTPUT@plt>
mov    $0x0,%al
call   1050 <TOSH_CLR_GIO1_PIN@plt>
mov    $0x32,%edi
call   1060 <TOSH_uwait@plt>
mov    $0x0,%al
call   1040 <TOSH_MAKE_GIO1_INPUT@plt>
mov    $0x8,%edi
call   1060 <TOSH_uwait@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeBit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <TOSH_MAKE_GIO1_OUTPUT@plt>
xor    %eax,%eax
call   1050 <TOSH_CLR_GIO1_PIN@plt>
test   %ebx,%ebx
mov    $0x32,%eax
mov    $0x4,%edi
cmove  %eax,%edi
mov    $0x8,%ebx
cmovne %eax,%ebx
call   1060 <TOSH_uwait@plt>
xor    %eax,%eax
call   1040 <TOSH_MAKE_GIO1_INPUT@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1060 <TOSH_uwait@plt>

LLVM IR (-O0):
define void @writeBit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = call i32 (...) @TOSH_MAKE_GIO1_OUTPUT()
%7 = call i32 (...) @TOSH_CLR_GIO1_PIN()
%8 = call i32 @TOSH_uwait(i32 4)
%9 = call i32 (...) @TOSH_MAKE_GIO1_INPUT()
%10 = call i32 @TOSH_uwait(i32 50)
br label %17
11: ; preds = %1
%12 = call i32 (...) @TOSH_MAKE_GIO1_OUTPUT()
%13 = call i32 (...) @TOSH_CLR_GIO1_PIN()
%14 = call i32 @TOSH_uwait(i32 50)
%15 = call i32 (...) @TOSH_MAKE_GIO1_INPUT()
%16 = call i32 @TOSH_uwait(i32 8)
br label %17
17: ; preds = %11, %5
ret void
}

LLVM IR (-O2):
define void @writeBit(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = tail call i32 (...) @TOSH_MAKE_GIO1_OUTPUT()
%4 = tail call i32 (...) @TOSH_CLR_GIO1_PIN()
%5 = select i1 %2, i32 50, i32 4
%6 = select i1 %2, i32 8, i32 50
%7 = tail call i32 @TOSH_uwait(i32 %5)
%8 = tail call i32 (...) @TOSH_MAKE_GIO1_INPUT()
%9 = tail call i32 @TOSH_uwait(i32 %6)
ret void
}
int msm_watchdog_suspend(struct device *dev) {}


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

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

LLVM IR (-O0):
%struct.device = type opaque
define i32 @msm_watchdog_suspend(%struct.device* %0) {
%2 = alloca i32
%3 = alloca %struct.device*
store %struct.device* %0, %struct.device** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.device = type opaque
define i32 @msm_watchdog_suspend(%struct.device* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ comprintf(char *);
void duplicate_carry(void) {
  comprintf("\tif (needed_flags&FLAG_X) duplicate_carry();\n");
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"\09if (needed_flags&FLAG_X) duplicate_carry();\0A\00"
define void @duplicate_carry() {
%1 = call i32 @comprintf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"\09if (needed_flags&FLAG_X) duplicate_carry();\0A\00"
define void @duplicate_carry() {
%1 = tail call i32 @comprintf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}
void foo_1_1_2_2_1_2_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_2_1_2_2_1_2() {
ret void
}
/* Type definitions */
struct vec4i {
  int dummy;
};
struct vec4 {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec4i_round(int /*<<< orphan*/ *, float *);
__attribute__((always_)) struct vec4i *psvec4i_round(struct vec4i *result,
                                                     struct vec4 *a) {
  vec4i_round((int32_t *)result, (float *)a);
  return result;
}


x86 assembly (clang, -O0):
<psvec4i_round>:
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 <vec4i_round@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec4i_round>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec4i_round@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec4i = type { i32 }
%struct.vec4 = type { i32 }
define %struct.vec4i* @psvec4i_round(%struct.vec4i* %0, %struct.vec4* %1) {
%3 = alloca %struct.vec4i*
%4 = alloca %struct.vec4*
store %struct.vec4i* %0, %struct.vec4i** %3
store %struct.vec4* %1, %struct.vec4** %4
%5 = load %struct.vec4i*, %struct.vec4i** %3
%6 = bitcast %struct.vec4i* %5 to i32*
%7 = load %struct.vec4*, %struct.vec4** %4
%8 = bitcast %struct.vec4* %7 to float*
%9 = call i32 @vec4i_round(i32* %6, float* %8)
%10 = load %struct.vec4i*, %struct.vec4i** %3
ret %struct.vec4i* %10
}

LLVM IR (-O2):
%struct.vec4i = type { i32 }
%struct.vec4 = type { i32 }
define %struct.vec4i* @psvec4i_round(%struct.vec4i* returned %0, %struct.vec4* %1) {
%3 = getelementptr %struct.vec4i, %struct.vec4i* %0, i64 0, i32 0
%4 = bitcast %struct.vec4* %1 to float*
%5 = tail call i32 @vec4i_round(i32* %3, float* %4)
ret %struct.vec4i* %0
}
int test_imm_A5uint8_mem(unsigned char *val) {
  return ((*val) & (0xA5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A5uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xa5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_A5uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -91
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int mkstemp(char *);
char *xstrdup(char *);
void make_temporary_file(char **name, int *fd) {
  char *tname;
  int tfd;
  tname = xstrdup("/tmp/ropgadget_XXXXXX");
  tfd = mkstemp(tname);
  *name = tname;
  *fd = tfd;
}


x86 assembly (clang, -O0):
<make_temporary_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <xstrdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <mkstemp@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_temporary_file>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xece(%rip),%rdi
call   1030 <xstrdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <mkstemp@plt>
mov    %rbx,(%r15)
mov    %eax,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [22 x i8] c"/tmp/ropgadget_XXXXXX\00"
define void @make_temporary_file(i8** %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i8** %0, i8*** %3
store i32* %1, i32** %4
%7 = call i8* @xstrdup(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = call i32 @mkstemp(i8* %8)
store i32 %9, i32* %6
%10 = load i8*, i8** %5
%11 = load i8**, i8*** %3
store i8* %10, i8** %11
%12 = load i32, i32* %6
%13 = load i32*, i32** %4
store i32 %12, i32* %13
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"/tmp/ropgadget_XXXXXX\00"
define void @make_temporary_file(i8** nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = tail call i8* @xstrdup(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @mkstemp(i8* %3)
store i8* %3, i8** %0
store i32 %4, i32* %1
ret void
}
int main(void) {
  5.0 - '5';
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
int network_start_server(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @network_start_server() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ g();
main() {
  if (0) {
    int i = 5;
    int j = 2;
    g();
  }
}


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

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

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

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

/* Variables and functions */
int __sclp_hsa_copy(struct sdias_sccb *, void *, unsigned long, unsigned long);
int /*<<< orphan*/ free_page(unsigned long);
scalar_t__ get_zeroed_page();
int sclp_hsa_copy(void *dest_addr, unsigned long first_block,
                  unsigned long nr_blocks) {
  struct sdias_sccb *sccb;
  int rc;
  sccb = (void *)get_zeroed_page();
  rc = __sclp_hsa_copy(sccb, dest_addr, first_block, nr_blocks);
  free_page((unsigned long)sccb);
  return rc;
}


x86 assembly (clang, -O0):
<sclp_hsa_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1050 <get_zeroed_page@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <__sclp_hsa_copy@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <free_page@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sclp_hsa_copy>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
xor    %eax,%eax
call   1050 <get_zeroed_page@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <__sclp_hsa_copy@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <free_page@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sdias_sccb = type { i32 }
define i32 @sclp_hsa_copy(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca %struct.sdias_sccb*
%8 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%9 = call i64 (...) @get_zeroed_page()
%10 = inttoptr i64 %9 to i8*
%11 = bitcast i8* %10 to %struct.sdias_sccb*
store %struct.sdias_sccb* %11, %struct.sdias_sccb** %7
%12 = load %struct.sdias_sccb*, %struct.sdias_sccb** %7
%13 = load i8*, i8** %4
%14 = load i64, i64* %5
%15 = load i64, i64* %6
%16 = call i32 @__sclp_hsa_copy(%struct.sdias_sccb* %12, i8* %13, i64 %14, i64 %15)
store i32 %16, i32* %8
%17 = load %struct.sdias_sccb*, %struct.sdias_sccb** %7
%18 = ptrtoint %struct.sdias_sccb* %17 to i64
%19 = call i32 @free_page(i64 %18)
%20 = load i32, i32* %8
ret i32 %20
}

LLVM IR (-O2):
%struct.sdias_sccb = type { i32 }
define i32 @sclp_hsa_copy(i8* %0, i64 %1, i64 %2) {
%4 = tail call i64 (...) @get_zeroed_page()
%5 = inttoptr i64 %4 to %struct.sdias_sccb*
%6 = tail call i32 @__sclp_hsa_copy(%struct.sdias_sccb* %5, i8* %0, i64 %1, i64 %2)
%7 = tail call i32 @free_page(i64 %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void CursorXYMemotech(int x, int y) { printf("\003%c%c", x + 31, y + 31); }


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

x86 assembly (clang, -O2):
<CursorXYMemotech>:
lea    0x1f(%rdi),%eax
lea    0x1f(%rsi),%edx
lea    0xee3(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\03%c%c\00"
define void @CursorXYMemotech(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 = add nsw i32 %5, 31
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 31
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\03%c%c\00"
define void @CursorXYMemotech(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 31
%4 = add nsw i32 %1, 31
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret void
}
void PICO_IDLE(void) {}


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

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

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

LLVM IR (-O2):
define void @PICO_IDLE() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x4_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x4_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x4_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x4_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x4_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
void gtk_tree_view_column_set_sort_order() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_set_sort_order() {
ret void
}
int calc(int a, int b, int c) { return a * b / c; }


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

x86 assembly (clang, -O2):
<calc>:
mov    %edx,%ecx
mov    %edi,%eax
imul   %esi,%eax
cltd
idiv   %ecx
ret

LLVM IR (-O0):
define i32 @calc(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 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = sdiv i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @calc(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %1, %0
%5 = sdiv i32 %4, %2
ret i32 %5
}
float floatValueFrom(unsigned char *bstr) {
  short shortVal = (short)(bstr[0]) * 256 + bstr[1];
  float floatVal;
  floatVal = shortVal + ((float)(bstr[2]) * 256.0 + bstr[3]) / 65536.0;
  return floatVal;
}


x86 assembly (clang, -O0):
<floatValueFrom>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
shl    $0x10,%eax
bswap  %eax
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
cvtsi2ss %eax,%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
cvtsi2sd %eax,%xmm2
movsd  0xec4(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0xeac(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floatValueFrom>:
movzwl (%rdi),%eax
rol    $0x8,%ax
cwtl
cvtsi2sd %eax,%xmm0
movzbl 0x2(%rdi),%eax
cvtsi2sd %eax,%xmm1
movzbl 0x3(%rdi),%eax
cvtsi2sd %eax,%xmm2
mulsd  0xedc(%rip),%xmm1
addsd  %xmm2,%xmm1
mulsd  0xed8(%rip),%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @floatValueFrom(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
%4 = alloca float
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i16
%9 = sext i16 %8 to i32
%10 = mul nsw i32 %9, 256
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = add nsw i32 %10, %14
%16 = trunc i32 %15 to i16
store i16 %16, i16* %3
%17 = load i16, i16* %3
%18 = sext i16 %17 to i32
%19 = sitofp i32 %18 to double
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 2
%22 = load i8, i8* %21
%23 = uitofp i8 %22 to float
%24 = fpext float %23 to double
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i64 3
%27 = load i8, i8* %26
%28 = zext i8 %27 to i32
%29 = sitofp i32 %28 to double
%30 = call double @llvm.fmuladd.f64(double %24, double 2.560000e+02, double %29)
%31 = fdiv double %30, 6.553600e+04
%32 = fadd double %19, %31
%33 = fptrunc double %32 to float
store float %33, float* %4
%34 = load float, float* %4
ret float %34
}

LLVM IR (-O2):
define float @floatValueFrom(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
%9 = sitofp i16 %8 to double
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = uitofp i8 %11 to double
%13 = getelementptr inbounds i8, i8* %0, i64 3
%14 = load i8, i8* %13
%15 = uitofp i8 %14 to double
%16 = tail call double @llvm.fmuladd.f64(double %12, double 2.560000e+02, double %15)
%17 = fmul double %16, 0x3EF0000000000000
%18 = fadd double %17, %9
%19 = fptrunc double %18 to float
ret float %19
}
/* Variables and functions */
int atoi(char *);
char *strchr(char *, char);
int readp1_int_withunit(char *line) {
  ;
  line = strchr(line, '(');
  line += sizeof(char);
  char *endvaluepos = strchr(line, '*');
  *endvaluepos = 0;
  return atoi(line);
}


x86 assembly (clang, -O0):
<readp1_int_withunit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x28,%esi
call   1030 <strchr@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readp1_int_withunit>:
push   %rbx
mov    $0x28,%esi
call   1030 <strchr@plt>
lea    0x1(%rax),%rbx
mov    %rbx,%rdi
mov    $0x2a,%esi
call   1030 <strchr@plt>
movb   $0x0,(%rax)
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <atoi@plt>

LLVM IR (-O0):
define i32 @readp1_int_withunit(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 40)
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8* %7, i8** %2
%8 = load i8*, i8** %2
%9 = call i8* @strchr(i8* %8, i8 signext 42)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
store i8 0, i8* %10
%11 = load i8*, i8** %2
%12 = call i32 @atoi(i8* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @readp1_int_withunit(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 40)
%3 = getelementptr inbounds i8, i8* %2, i64 1
%4 = tail call i8* @strchr(i8* %3, i8 signext 42)
store i8 0, i8* %4
%5 = tail call i32 @atoi(i8* %3)
ret i32 %5
}
int test_imm_BAint64_lowword_reg(long long val) {
  return ((val) & (0xBA << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_BAint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 186
%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_BAint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 186
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int sys_isreadablefile(const char *s) {
  struct stat statbuf;
  int mode;
  if (stat(s, &statbuf) < 0)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<sys_isreadablefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    113f <sys_isreadablefile+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1146 <sys_isreadablefile+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_isreadablefile>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @sys_isreadablefile(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = lshr i64 %4, 63
%6 = trunc i64 %5 to i32
%7 = xor i32 %6, 1
ret i32 %7
}
void inner_lib_func(void) {}


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

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

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

LLVM IR (-O2):
define void @inner_lib_func() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ run_transpose_lace_tool_pipem_callback(int, int);
void run_transpose(int in_fd, int out_fd, void *voidarg) {
  (void)voidarg;
  run_transpose_lace_tool_pipem_callback(in_fd, out_fd);
}


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

x86 assembly (clang, -O2):
<run_transpose>:
jmp    1030 <run_transpose_lace_tool_pipem_callback@plt>

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

LLVM IR (-O2):
define void @run_transpose(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @run_transpose_lace_tool_pipem_callback(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
int main() {
  char ch = '\0';
  putchar(ch);
  ch = '1';
  putchar(ch);
  printf("\n");
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <putchar@plt>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i8 signext 0)
%2 = tail call i32 @putchar(i8 signext 49)
%3 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
ret i32 0
}
void _ZTVN5javax8security4auth4x50021X500PrivateCredentialE(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @_ZTVN5javax8security4auth4x50021X500PrivateCredentialE() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void reduceCallback(int index, void *x) { printf("%c\n", index); }


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

x86 assembly (clang, -O2):
<reduceCallback>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define void @reduceCallback(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}