xunge/DecIR huggingface dataset:
int test_imm_53int8_mem(signed char *val) {
  return ((*val) & (-0x53 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_53int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -83
%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_53int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -83
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ outl(unsigned int, unsigned long);
void sunxi_io_write(void *base, int offset, unsigned int value) {
  outl(value, (unsigned long)(base + offset));
}


x86 assembly (clang, -O0):
<sunxi_io_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
call   1030 <outl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sunxi_io_write>:
movslq %esi,%rsi
add    %rdi,%rsi
mov    %edx,%edi
jmp    1030 <outl@plt>

LLVM IR (-O0):
define void @sunxi_io_write(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr i8, i8* %8, i64 %10
%12 = ptrtoint i8* %11 to i64
%13 = call i32 @outl(i32 %7, i64 %12)
ret void
}

LLVM IR (-O2):
define void @sunxi_io_write(i8* %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr i8, i8* %0, i64 %4
%6 = ptrtoint i8* %5 to i64
%7 = tail call i32 @outl(i32 %2, i64 %6)
ret void
}
void load_db(void) {}


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

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

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

LLVM IR (-O2):
define void @load_db() {
ret void
}
char *skipname(char *s) {
  if (*s == 0)
    return s + 1;
  if ((*s & 0xc0) == 0xc0)
    return s + 2;
  return skipname(s + (*s + 1));
}


x86 assembly (clang, -O0):
<skipname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113d <skipname+0x2d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1181 <skipname+0x71>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
and    $0xc0,%eax
cmp    $0xc0,%eax
jne    1165 <skipname+0x55>
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    1181 <skipname+0x71>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
add    $0x1,%eax
cltq
add    %rax,%rdi
call   1030 <skipname@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipname>:
mov    (%rdi),%cl
test   %cl,%cl
je     1136 <skipname+0x36>
cs nopw 0x0(%rax,%rax,1)
movzbl %cl,%eax
not    %eax
test   $0xc0,%al
je     113e <skipname+0x3e>
movsbq %cl,%rcx
lea    (%rcx,%rdi,1),%rax
add    $0x1,%rax
movzbl 0x1(%rcx,%rdi,1),%ecx
mov    %rax,%rdi
test   %cl,%cl
jne    1110 <skipname+0x10>
add    $0x1,%rax
ret
mov    %rdi,%rax
add    $0x1,%rax
ret
add    $0x2,%rdi
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @skipname(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %15, %1
%5 = phi i8* [ %0, %1 ], [ %18, %15 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
br label %21
7: ; preds = %1, %15
%8 = phi i8 [ %19, %15 ], [ %2, %1 ]
%9 = phi i8* [ %18, %15 ], [ %0, %1 ]
%10 = sext i8 %8 to i32
%11 = and i32 %10, 192
%12 = icmp eq i32 %11, 192
br i1 %12, label %13, label %15
13: ; preds = %7
%14 = getelementptr inbounds i8, i8* %9, i64 2
br label %21
15: ; preds = %7
%16 = add nsw i32 %10, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %9, i64 %17
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 0
br i1 %20, label %4, label %7
21: ; preds = %13, %4
%22 = phi i8* [ %6, %4 ], [ %14, %13 ]
ret i8* %22
}
/* Variables and functions */
int INT_MIN;
int test7(int x) {
  int y = INT_MIN;
  int z = 0x1234;
  return (x ^ y) ^ z;
}


x86 assembly (clang, -O0):
<test7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
movl   $0x1234,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test7>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
xor    (%rcx),%eax
xor    $0x1234,%eax
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define i32 @test7(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* @INT_MIN
store i32 %5, i32* %3
store i32 4660, i32* %4
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = xor i32 %6, %7
%9 = load i32, i32* %4
%10 = xor i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define i32 @test7(i32 %0) {
%2 = load i32, i32* @INT_MIN
%3 = xor i32 %2, %0
%4 = xor i32 %3, 4660
ret i32 %4
}
int *restrict f8(void) {
  extern int i, *p, *r;
  int *q = (void *)0;
  r = (int *restrict)q;
  for (i = 0; i < 100; i++)
    *(int *restrict)p++ = r[i];
  return p;
}


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    0x2eb9(%rip),%rax
mov    %rcx,(%rax)
mov    0x2ec7(%rip),%rax
movl   $0x0,(%rax)
mov    0x2eba(%rip),%rax
cmpl   $0x64,(%rax)
jge    1185 <f8+0x85>
mov    0x2e92(%rip),%rax
mov    (%rax),%rax
mov    0x2ea0(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%ecx
mov    0x2e83(%rip),%rax
mov    (%rax),%rax
mov    %rax,%rsi
add    $0x4,%rsi
mov    0x2e72(%rip),%rdx
mov    %rsi,(%rdx)
mov    %ecx,(%rax)
mov    0x2e76(%rip),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    0x2e6a(%rip),%rax
mov    %ecx,(%rax)
jmp    1127 <f8+0x27>
mov    0x2e4c(%rip),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@r = external global i32*
@i = external global i32
@p = external global i32*
define i32* @f8() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
store i32* %2, i32** @r
store i32 0, i32* @i
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* @i
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32*, i32** @r
%8 = load i32, i32* @i
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = load i32, i32* %10
%12 = load i32*, i32** @p
%13 = getelementptr inbounds i32, i32* %12, i32 1
store i32* %13, i32** @p
store i32 %11, i32* %12
br label %14
14: ; preds = %6
%15 = load i32, i32* @i
%16 = add nsw i32 %15, 1
store i32 %16, i32* @i
br label %3
17: ; preds = %3
%18 = load i32*, i32** @p
ret i32* %18
}

LLVM IR (-O2):
/* Type definitions */
struct Node {
  int dummy;
};

/* Variables and functions */
void initQueue() { struct Node *top = NULL; }


x86 assembly (clang, -O0):
<initQueue>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Node = type { i32 }
define void @initQueue() {
%1 = alloca %struct.Node*
store %struct.Node* null, %struct.Node** %1
ret void
}

LLVM IR (-O2):
%struct.Node = type { i32 }
define void @initQueue() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
void nocrash_fgets() {
  FILE *f;
  char str[60];
  f = fopen("this_file_doesnt_exist", "r");
  if (f) {
    fgets(str, 60, f);
    fclose(f);
  }
}


x86 assembly (clang, -O0):
<nocrash_fgets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xec1(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1175 <nocrash_fgets+0x45>
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x3c,%esi
call   1040 <fgets@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nocrash_fgets>:
push   %rbx
sub    $0x40,%rsp
lea    0xec4(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1168 <nocrash_fgets+0x38>
mov    %rax,%rbx
mov    %rsp,%rdi
mov    $0x3c,%esi
mov    %rax,%rdx
call   1040 <fgets@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
add    $0x40,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
define void @nocrash_fgets() {
%1 = alloca [60 x i8]
%2 = getelementptr inbounds [60 x i8], [60 x i8]* %1, i64 0, i64 0
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = call i32 @fgets(i8* %2, i32 60, i32* %3)
%7 = call i32 @fclose(i32* %3)
br label %8
8: ; preds = %5, %0
ret void
}
long checkArray(long id_current, long n_sample, long *id_sample) {
  long i;
  for (i = 0; i < n_sample; i++) {
    if (id_current == id_sample[i])
      return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<checkArray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    115f <checkArray+0x5f>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
jne    1149 <checkArray+0x49>
movq   $0x1,-0x8(%rbp)
jmp    1167 <checkArray+0x67>
jmp    114e <checkArray+0x4e>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1118 <checkArray+0x18>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkArray>:
xor    %eax,%eax
test   %rsi,%rsi
jle    111f <checkArray+0x1f>
xor    %ecx,%ecx
nopl   0x0(%rax)
cmp    %rdi,(%rdx,%rcx,8)
je     1120 <checkArray+0x20>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1110 <checkArray+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i64 @checkArray(i64 %0, i64 %1, i64* nocapture %2) {
%4 = icmp sgt i64 %1, 0
br i1 %4, label %7, label %13
5: ; preds = %7
%6 = icmp eq i64 %12, %1
br i1 %6, label %13, label %7
7: ; preds = %3, %5
%8 = phi i64 [ %12, %5 ], [ 0, %3 ]
%9 = getelementptr inbounds i64, i64* %2, i64 %8
%10 = load i64, i64* %9
%11 = icmp eq i64 %10, %0
%12 = add nuw nsw i64 %8, 1
br i1 %11, label %13, label %5
13: ; preds = %7, %5, %3
%14 = phi i64 [ 0, %3 ], [ 0, %5 ], [ 1, %7 ]
ret i64 %14
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *);
void handler(int sig) { printf("\n%s", getenv("PS1")); }


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rax
lea    0xedc(%rip),%rdi
call   1030 <getenv@plt>
lea    0xecc(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%s\00"
@.str.1 = [4 x i8] c"PS1\00"
define void @handler(i32 %0) {
%2 = tail call i8* @getenv(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
void Rename_IntegrityResetAllObjectsModified() { ; }


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

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

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

LLVM IR (-O2):
define void @Rename_IntegrityResetAllObjectsModified() {
ret void
}
/* Variables and functions */
double __ocml_sqrt_rtz_f64(double);
double __dsqrt_rz(double x) { return __ocml_sqrt_rtz_f64(x); }


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

x86 assembly (clang, -O2):
<__dsqrt_rz>:
jmp    1030 <__ocml_sqrt_rtz_f64@plt>

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

LLVM IR (-O2):
define double @__dsqrt_rz(double %0) {
%2 = tail call double @__ocml_sqrt_rtz_f64(double %0)
ret double %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t _wyrot(uint64_t x) { return (x >> 32) | (x << 32); }


x86 assembly (clang, -O0):
<_wyrot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_wyrot(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 32
%5 = load i32, i32* %2
%6 = shl i32 %5, 32
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @_wyrot(i32 %0) {
ret i32 poison
}
int fun648() { return 648; }


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

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

LLVM IR (-O0):
define i32 @fun648() {
ret i32 648
}

LLVM IR (-O2):
define i32 @fun648() {
ret i32 648
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ endwin();
void end() {
  clear();
  endwin();
}


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

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

LLVM IR (-O0):
define void @end() {
%1 = call i32 (...) @clear()
%2 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @end() {
%1 = tail call i32 (...) @clear()
%2 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("A new C file for the branch...\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"A new C file for the branch...\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [31 x i8] c"A new C file for the branch...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hfp_subevent_network_operator_changed_get_network_operator_name(
    const uint8_t *event) {
  return event[5];
}


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

x86 assembly (clang, -O2):
<hfp_subevent_network_operator_changed_get_network_operator_name>:
mov    0x14(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hfp_subevent_network_operator_changed_get_network_operator_name(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 5
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hfp_subevent_network_operator_changed_get_network_operator_name(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
int main() {
  char str[] = "hello";
  printf("%s\n", str);
  reverse(str);
  printf("%s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xa(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    -0xa(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0xa(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movw   $0x6f,0x4(%rsp)
movl   $0x6c6c6568,(%rsp)
lea    0xecd(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@__const.main.str = [6 x i8] c"hello\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @reverse(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int Cnd_IsIn();
int Cnd_IsNotIn(void) { return (1 - Cnd_IsIn()); }


x86 assembly (clang, -O0):
<Cnd_IsNotIn>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Cnd_IsIn@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cnd_IsNotIn>:
push   %rax
xor    %eax,%eax
call   1030 <Cnd_IsIn@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Cnd_IsNotIn() {
%1 = call i32 (...) @Cnd_IsIn()
%2 = sub nsw i32 1, %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @Cnd_IsNotIn() {
%1 = tail call i32 (...) @Cnd_IsIn()
%2 = sub nsw i32 1, %1
ret i32 %2
}
/* Variables and functions */
int aslr_test();
int nx_test();
int sectests(void) {
  int secflags = 0;
  int aslr, nx;
  if ((aslr = aslr_test()) < 0)
    return aslr;
  else if ((nx = nx_test()) < 0)
    return nx;
  secflags = (aslr | nx);
  return secflags;
}


x86 assembly (clang, -O0):
<sectests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <aslr_test@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    114d <sectests+0x2d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117f <sectests+0x5f>
mov    $0x0,%al
call   1040 <nx_test@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    116b <sectests+0x4b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117f <sectests+0x5f>
jmp    1170 <sectests+0x50>
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sectests>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <aslr_test@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1140 <sectests+0x20>
xor    %eax,%eax
call   1040 <nx_test@plt>
test   %eax,%eax
cmovs  %ebp,%ebx
or     %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sectests() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %2
%5 = call i32 (...) @aslr_test()
store i32 %5, i32* %3
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i32, i32* %3
store i32 %8, i32* %1
br label %20
9: ; preds = %0
%10 = call i32 (...) @nx_test()
store i32 %10, i32* %4
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i32, i32* %4
store i32 %13, i32* %1
br label %20
14: ; preds = %9
br label %15
15: ; preds = %14
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = or i32 %16, %17
store i32 %18, i32* %2
%19 = load i32, i32* %2
store i32 %19, i32* %1
br label %20
20: ; preds = %15, %12, %7
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
define i32 @sectests() {
%1 = tail call i32 (...) @aslr_test()
%2 = icmp slt i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 (...) @nx_test()
%5 = icmp slt i32 %4, 0
%6 = select i1 %5, i32 0, i32 %1
%7 = or i32 %6, %4
br label %8
8: ; preds = %3, %0
%9 = phi i32 [ %1, %0 ], [ %7, %3 ]
ret i32 %9
}
void ft_get_values(char **data, char **s1, char **s2, char **result) {
  *s1 = data[0];
  *s2 = data[1];
  *result = data[2];
}


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

x86 assembly (clang, -O2):
<ft_get_values>:
mov    (%rdi),%rax
mov    %rax,(%rsi)
mov    0x8(%rdi),%rax
mov    %rax,(%rdx)
mov    0x10(%rdi),%rax
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @ft_get_values(i8** %0, i8** %1, i8** %2, i8** %3) {
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i8**
store i8** %0, i8*** %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i8** %3, i8*** %8
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %6
store i8* %11, i8** %12
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = load i8**, i8*** %7
store i8* %15, i8** %16
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = load i8**, i8*** %8
store i8* %19, i8** %20
ret void
}

LLVM IR (-O2):
define void @ft_get_values(i8** nocapture %0, i8** nocapture writeonly %1, i8** nocapture writeonly %2, i8** nocapture writeonly %3) {
%5 = load i8*, i8** %0
store i8* %5, i8** %1
%6 = getelementptr inbounds i8*, i8** %0, i64 1
%7 = load i8*, i8** %6
store i8* %7, i8** %2
%8 = getelementptr inbounds i8*, i8** %0, i64 2
%9 = load i8*, i8** %8
store i8* %9, i8** %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdout;
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vprintf(const char *restrict fmt, va_list ap) {
  return vfprintf(stdout, fmt, ap);
}


x86 assembly (clang, -O0):
<vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vprintf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @vprintf(i8* noalias %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vfprintf(i32 %5, i8* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @vprintf(i8* noalias %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ getuid();
int /*<<< orphan*/ printf(char *, int, int, int);
int rand();
int /*<<< orphan*/ srandom(unsigned int);
scalar_t__ unique();
int main(void) {
  srandom((unsigned int)(unique() + getuid()));
  printf("%d%d%d\n", rand(), rand(), rand());
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <unique@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %eax,%edi
call   1030 <srandom@plt>
mov    $0x0,%al
call   1080 <rand@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    %eax,%ecx
lea    0xe44(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <unique@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <getuid@plt>
add    %eax,%ebx
mov    %ebx,%edi
call   1030 <srandom@plt>
xor    %eax,%eax
call   1080 <rand@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <rand@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1080 <rand@plt>
lea    0xe63(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1050 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%d%d%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @unique()
%3 = call i64 (...) @getuid()
%4 = add nsw i64 %2, %3
%5 = trunc i64 %4 to i32
%6 = call i32 @srandom(i32 %5)
%7 = call i32 (...) @rand()
%8 = call i32 (...) @rand()
%9 = call i32 (...) @rand()
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d%d%d\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @unique()
%2 = tail call i64 (...) @getuid()
%3 = add nsw i64 %2, %1
%4 = trunc i64 %3 to i32
%5 = tail call i32 @srandom(i32 %4)
%6 = tail call i32 (...) @rand()
%7 = tail call i32 (...) @rand()
%8 = tail call i32 (...) @rand()
%9 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7, i32 %8)
%10 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int x = 43;
  int y;
  y = x - 1;
  printf("Hello, world! y=%d x=%d\n", y, x);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2a,%esi
mov    $0x2b,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [25 x i8] c"Hello, world! y=%d x=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 42, i32 43)
ret i32 0
}
int test_imm_80uint8_mem(unsigned char *val) {
  return ((*val) & (0x80 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_80uint8_mem>:
cmpb   $0x0,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_80uint8_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, 128
%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_80uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp sgt i8 %2, -1
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char test21(void) { return 'c'; }


x86 assembly (clang, -O0):
<test21>:
push   %rbp
mov    %rsp,%rbp
mov    $0x63,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test21>:
mov    $0x63,%al
ret

LLVM IR (-O0):
define signext i8 @test21() {
ret i8 99
}

LLVM IR (-O2):
define signext i8 @test21() {
ret i8 99
}
int ft_isspace(int c) { return (('\t' <= c && c <= '\r') || (c == ' ')); }


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x9,%eax
cmp    -0x4(%rbp),%eax
jg     1124 <ft_isspace+0x24>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    112e <ft_isspace+0x2e>
cmpl   $0x20,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isspace>:
lea    -0x9(%rdi),%eax
cmp    $0x5,%eax
setb   %al
cmp    $0x20,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ft_isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 9, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 13
br i1 %7, label %11, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 32
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ true, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @ft_isspace(i32 %0) {
%2 = add i32 %0, -9
%3 = icmp ult i32 %2, 5
%4 = icmp eq i32 %0, 32
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
void RAND_bytes(void) {}


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

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

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

LLVM IR (-O2):
define void @RAND_bytes() {
ret void
}
void tf_exit_tcp(void) { ; }


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

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

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

LLVM IR (-O2):
define void @tf_exit_tcp() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
unsigned long __infer_nondet_unsigned_long_int();
unsigned long int wcstoul(const wchar_t *nptr, wchar_t **endptr, int base) {
  return __infer_nondet_unsigned_long_int();
}


x86 assembly (clang, -O0):
<wcstoul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_unsigned_long_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @wcstoul(i32* %0, i32** %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32**
%6 = alloca i32
store i32* %0, i32** %4
store i32** %1, i32*** %5
store i32 %2, i32* %6
%7 = call i64 (...) @__infer_nondet_unsigned_long_int()
ret i64 %7
}

LLVM IR (-O2):
define i64 @wcstoul(i32* nocapture readnone %0, i32** nocapture readnone %1, i32 %2) {
%4 = tail call i64 (...) @__infer_nondet_unsigned_long_int()
ret i64 %4
}
int fs450_set_tv_cc_enable(int enable) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @fs450_set_tv_cc_enable(i32 %0) {
ret i32 0
}
int hvc_getTemperature(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @hvc_getTemperature() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @hvc_getTemperature() {
ret i32 -1
}
void katana_parser_resume_error_logging() {}


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

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

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

LLVM IR (-O2):
define void @katana_parser_resume_error_logging() {
ret void
}
int constrain(int amt, int low, int high) {
  if (amt < low)
    return low;
  else if (amt > high)
    return high;
  else
    return amt;
}


x86 assembly (clang, -O0):
<constrain>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <constrain+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <constrain+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <constrain+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <constrain+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<constrain>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

LLVM IR (-O0):
define i32 @constrain(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load i32, i32* %6
store i32 %12, i32* %4
br label %21
13: ; preds = %3
%14 = load i32, i32* %5
%15 = load i32, i32* %7
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load i32, i32* %7
store i32 %18, i32* %4
br label %21
19: ; preds = %13
%20 = load i32, i32* %5
store i32 %20, i32* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @constrain(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
/* Variables and functions */
int pathconN_nm2_f0(double const **, double **, int *, double *, int);
int pathconN_nm2(const double **arg, double **res, int *iw, double *w,
                 int mem) {
  return pathconN_nm2_f0(arg, res, iw, w, mem);
}


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

x86 assembly (clang, -O2):
<pathconN_nm2>:
jmp    1030 <pathconN_nm2_f0@plt>

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

LLVM IR (-O2):
define i32 @pathconN_nm2(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @pathconN_nm2_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strlen(char *);
void GetNameFromPath(char *lpOut, const char *szPath, const char *szName) {
  memset(lpOut, 0, strlen(lpOut));
  strcat(lpOut, szPath);
  strcat(lpOut, szName);
}


x86 assembly (clang, -O0):
<GetNameFromPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetNameFromPath>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <strcat@plt>

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

LLVM IR (-O2):
define void @GetNameFromPath(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @memset(i8* %0, i32 0, i32 %4)
%6 = tail call i32 @strcat(i8* %0, i8* %1)
%7 = tail call i32 @strcat(i8* %0, i8* %2)
ret void
}
/* Variables and functions */
unsigned int echo_int_1_marshal_outputs__camkes_ret_fn_349(unsigned int, int *);
unsigned int echo_int_1_marshal_outputs(int *_camkes_return_353) {
  unsigned int _camkes_length_354 = 0;
  _camkes_length_354 = echo_int_1_marshal_outputs__camkes_ret_fn_349(
      _camkes_length_354, _camkes_return_353);
  if (_camkes_length_354 == 0xffffffffU) {
    return 0xffffffffU;
  }
  (void)0;
  return _camkes_length_354;
}


x86 assembly (clang, -O0):
<echo_int_1_marshal_outputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <echo_int_1_marshal_outputs__camkes_ret_fn_349@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1148 <echo_int_1_marshal_outputs+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    114e <echo_int_1_marshal_outputs+0x3e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_int_1_marshal_outputs>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <echo_int_1_marshal_outputs__camkes_ret_fn_349@plt>

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

LLVM IR (-O2):
define i32 @echo_int_1_marshal_outputs(i32* %0) {
%2 = tail call i32 @echo_int_1_marshal_outputs__camkes_ret_fn_349(i32 0, i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ atomic_postsub_int16_t(int /*<<< orphan*/ *, int);
int16_t atomic_postdec_int16_t(int16_t *var) {
  return atomic_postsub_int16_t(var, 1);
}


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

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

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

LLVM IR (-O2):
define i32 @atomic_postdec_int16_t(i32* %0) {
%2 = tail call i32 @atomic_postsub_int16_t(i32* %0, i32 1)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int /*<<< orphan*/ ERR_DEADCAFE_error(int, int, char *, int);
int deadcafe_ctrl(ENGINE *e __attribute__((unused)), int cmd,
                  long i __attribute__((unused)),
                  void *p __attribute__((unused)),
                  void (*f)(void) __attribute__((unused))) {
  int ret = 1;
  switch (cmd) {
  default:
    ERR_DEADCAFE_error((100), (100),
                       "/scratch/repos/new/home/jordi_armengol_estape/"
                       "c-scraper/outputs/2022-01-22/02-19-57/repos/deadcafe/"
                       "EngineGMP/refs/heads/master/deadcafe.c",
                       372);
    ret = 0;
    break;
  }
  return ret;
}


x86 assembly (clang, -O0):
<deadcafe_ctrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    $0x64,%esi
lea    0xec2(%rip),%rdx
mov    $0x174,%ecx
mov    %esi,%edi
call   1030 <ERR_DEADCAFE_error@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deadcafe_ctrl>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0x64,%edi
mov    $0x64,%esi
mov    $0x174,%ecx
call   1030 <ERR_DEADCAFE_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/deadcafe/EngineGMP/refs/heads/master/deadcafe.c\00"
define i32 @deadcafe_ctrl(i32* %0, i32 %1, i64 %2, i8* %3, void ()* %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i64
%9 = alloca i8*
%10 = alloca void ()*
%11 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store void ()* %4, void ()** %10
store i32 1, i32* %11
%12 = load i32, i32* %7
switch i32 %12, label %13 [
]
13: ; preds = %5
%14 = call i32 @ERR_DEADCAFE_error(i32 100, i32 100, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 372)
store i32 0, i32* %11
br label %15
15: ; preds = %13
%16 = load i32, i32* %11
ret i32 %16
}

LLVM IR (-O2):
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/deadcafe/EngineGMP/refs/heads/master/deadcafe.c\00"
define i32 @deadcafe_ctrl(i32* nocapture readnone %0, i32 %1, i64 %2, i8* nocapture readnone %3, void ()* nocapture readnone %4) {
%6 = tail call i32 @ERR_DEADCAFE_error(i32 100, i32 100, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 372)
ret i32 0
}