xunge/DecIR huggingface dataset:
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y, z;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  z = __VERIFIER_nondet_int();
  while (x < 0) {
    x = x + z;
    z = -2 * y;
    y = y + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1168 <main+0x58>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
imul   $0xfffffffe,-0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <main+0x2d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
char *my_alloc(int, int);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *my_strdup(const char *s) {
  char *d;
  assert(strlen(s) + 1 < 10000);
  d = my_alloc((int)strlen(s) + 1, sizeof(char));
  if (d) {
    strcpy(d, s);
  }
  return d;
}


x86 assembly (clang, -O0):
<my_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
add    $0x1,%eax
cmp    $0x2710,%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%edi
add    $0x1,%edi
mov    $0x1,%esi
call   1040 <my_alloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     119e <my_strdup+0x5e>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <strlen@plt>
xor    %edi,%edi
cmp    $0x270f,%eax
setl   %dil
call   1060 <assert@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edi
mov    $0x1,%esi
call   1040 <my_alloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1184 <my_strdup+0x44>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @my_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, 1
%7 = icmp slt i32 %6, 10000
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %2
%11 = call i32 @strlen(i8* %10)
%12 = add nsw i32 %11, 1
%13 = call i8* @my_alloc(i32 %12, i32 1)
store i8* %13, i8** %3
%14 = load i8*, i8** %3
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %20
16: ; preds = %1
%17 = load i8*, i8** %3
%18 = load i8*, i8** %2
%19 = call i32 @strcpy(i8* %17, i8* %18)
br label %20
20: ; preds = %16, %1
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
define i8* @my_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp slt i32 %2, 9999
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @strlen(i8* %0)
%7 = add nsw i32 %6, 1
%8 = tail call i8* @my_alloc(i32 %7, i32 1)
%9 = icmp eq i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = tail call i32 @strcpy(i8* %8, i8* %0)
br label %12
12: ; preds = %10, %1
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
void strcat_symbolic_dst_length_taint(char *dst) {
  scanf("%s", dst);
  strcat(dst, "1234");
  if (strlen(dst) < 4)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strcat_symbolic_dst_length_taint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeac(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x4,%eax
jge    116e <strcat_symbolic_dst_length_taint+0x3e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat_symbolic_dst_length_taint>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"1234\00"
define void @strcat_symbolic_dst_length_taint(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 @strlen(i8* %7)
%9 = icmp slt i32 %8, 4
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i8, i8* null
br label %12
12: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"1234\00"
define void @strcat_symbolic_dst_length_taint(i8* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @strlen(i8* %0)
ret void
}
void foo354() {}


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

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

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

LLVM IR (-O2):
define void @foo354() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
void f1(int **p) { *p = (int *)malloc(sizeof(int)); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @f1(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
%5 = load i32**, i32*** %2
store i32* %4, i32** %5
ret void
}

LLVM IR (-O2):
define void @f1(i32** nocapture writeonly %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %0
ret void
}
/* Variables and functions */
int fc8080_channel_select(void *, unsigned char, unsigned char);
int bbm_com_channel_select(void *handle, unsigned char subch_id,
                           unsigned char buf_id) {
  int res;
  res = fc8080_channel_select(handle, subch_id, buf_id);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_channel_select>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
movzbl %al,%esi
movzbl -0xa(%rbp),%edx
call   1030 <fc8080_channel_select@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_channel_select>:
jmp    1030 <fc8080_channel_select@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_channel_select(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i32 @fc8080_channel_select(i8* %0, i8 zeroext %1, i8 zeroext %2)
ret i32 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ init_bin();
int main(int argc, char *argv[]) {
  init_bin();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <init_bin@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <init_bin@plt>
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 (...) @init_bin()
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_bin()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
int test_imm_38uint16_reg(unsigned short val) {
  return ((val) & (0x38 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_38uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x38,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_38uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 56
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(char);
int /*<<< orphan*/ print(char *);
main() {
  char buf[20];
  outbyte('&');
  outbyte('@');
  outbyte('$');
  outbyte('%');
  print("FooBar\r\n");
  print("\r\nDone...");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x26,%edi
call   1040 <outbyte@plt>
mov    $0x40,%edi
call   1040 <outbyte@plt>
mov    $0x24,%edi
call   1040 <outbyte@plt>
mov    $0x25,%edi
call   1040 <outbyte@plt>
lea    0xea9(%rip),%rdi
call   1030 <print@plt>
lea    0xea6(%rip),%rdi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x26,%edi
call   1040 <outbyte@plt>
mov    $0x40,%edi
call   1040 <outbyte@plt>
mov    $0x24,%edi
call   1040 <outbyte@plt>
mov    $0x25,%edi
call   1040 <outbyte@plt>
lea    0xeb0(%rip),%rdi
call   1030 <print@plt>
lea    0xead(%rip),%rdi
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"FooBar\0D\0A\00"
@.str.1 = [10 x i8] c"\0D\0ADone...\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = call i32 @outbyte(i8 signext 38)
%3 = call i32 @outbyte(i8 signext 64)
%4 = call i32 @outbyte(i8 signext 36)
%5 = call i32 @outbyte(i8 signext 37)
%6 = call i32 @print(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @print(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"FooBar\0D\0A\00"
@.str.1 = [10 x i8] c"\0D\0ADone...\00"
define i32 @main() {
%1 = tail call i32 @outbyte(i8 signext 38)
%2 = tail call i32 @outbyte(i8 signext 64)
%3 = tail call i32 @outbyte(i8 signext 36)
%4 = tail call i32 @outbyte(i8 signext 37)
%5 = tail call i32 @print(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @print(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ consoleCmdSource(char *);
void consoleCmdOpen(char *path) { consoleCmdSource(path); }


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

x86 assembly (clang, -O2):
<consoleCmdOpen>:
jmp    1030 <consoleCmdSource@plt>

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

LLVM IR (-O2):
define void @consoleCmdOpen(i8* %0) {
%2 = tail call i32 @consoleCmdSource(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int print_str(char *str) {
  int printed = 0;
  while (*str) {
    write(1, str, 1);
    ++str;
    ++printed;
  }
  return printed;
}


x86 assembly (clang, -O0):
<print_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <print_str+0x4a>
mov    -0x8(%rbp),%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1030 <write@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_str+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_str>:
push   %r14
push   %rbx
push   %rax
cmpb   $0x0,(%rdi)
je     1144 <print_str+0x34>
mov    %rdi,%r14
xor    %eax,%eax
xchg   %ax,%ax
mov    %rax,%rbx
lea    (%r14,%rax,1),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0x1(%rbx),%rax
cmpb   $0x0,0x1(%r14,%rbx,1)
jne    1120 <print_str+0x10>
jmp    1146 <print_str+0x36>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @print_str(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @write(i32 1, i8* %6, i32 1)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = add nuw nsw i32 %5, 1
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = phi i32 [ 0, %1 ], [ %9, %4 ]
ret i32 %13
}
int is_variable_character(char c) {
  if (c >= 'a' && c <= 'z')
    return 1;
  if (c >= 'A' && c <= 'Z')
    return 1;
  if (c >= '0' && c <= '9')
    return 1;
  if (c == '_')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_variable_character>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1130 <is_variable_character+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1130 <is_variable_character+0x30>
movl   $0x1,-0x4(%rbp)
jmp    119c <is_variable_character+0x9c>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1156 <is_variable_character+0x56>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1156 <is_variable_character+0x56>
movl   $0x1,-0x4(%rbp)
jmp    119c <is_variable_character+0x9c>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     117c <is_variable_character+0x7c>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     117c <is_variable_character+0x7c>
movl   $0x1,-0x4(%rbp)
jmp    119c <is_variable_character+0x9c>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
jne    1195 <is_variable_character+0x95>
movl   $0x1,-0x4(%rbp)
jmp    119c <is_variable_character+0x9c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_variable_character>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
lea    -0x30(%rdi),%ecx
cmp    $0xa,%cl
setb   %cl
cmp    $0x5f,%dil
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @is_variable_character(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %36
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 65
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 90
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %2
br label %36
21: ; preds = %16, %12
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp sge i32 %23, 48
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 57
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 1, i32* %2
br label %36
30: ; preds = %25, %21
%31 = load i8, i8* %3
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 95
br i1 %33, label %34, label %35
34: ; preds = %30
store i32 1, i32* %2
br label %36
35: ; preds = %30
store i32 0, i32* %2
br label %36
36: ; preds = %35, %34, %29, %20, %11
%37 = load i32, i32* %2
ret i32 %37
}

LLVM IR (-O2):
define i32 @is_variable_character(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = add i8 %0, -48
%6 = icmp ult i8 %5, 10
%7 = or i1 %6, %4
%8 = icmp eq i8 %0, 95
%9 = or i1 %8, %7
%10 = zext i1 %9 to i32
ret i32 %10
}
void __VERIFIER_assume(_Bool arg) {
  {
    while (!arg) {
      {}
    }
  }
}


x86 assembly (clang, -O0):
<__VERIFIER_assume>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
xor    $0xff,%al
test   $0x1,%al
jne    111e <__VERIFIER_assume+0x1e>
jmp    1123 <__VERIFIER_assume+0x23>
jmp    110c <__VERIFIER_assume+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__VERIFIER_assume>:
test   %edi,%edi
je     1110 <__VERIFIER_assume+0x10>
ret
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1110 <__VERIFIER_assume+0x10>

LLVM IR (-O0):
define void @__VERIFIER_assume(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
br label %4
4: ; preds = %8, %1
%5 = load i8, i8* %2
%6 = trunc i8 %5 to i1
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @__VERIFIER_assume(i1 zeroext %0) {
br i1 %0, label %3, label %2
2: ; preds = %1, %2
br label %2
3: ; preds = %1
ret void
}
int divisible(int a, int b) {
  while (a >= b) {
    a -= b;
  }
  return (a == 0);
}


x86 assembly (clang, -O0):
<divisible>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1126 <divisible+0x26>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    110a <divisible+0xa>
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<divisible>:
add    %esi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
sub    %esi,%edi
cmp    %esi,%edi
jge    1110 <divisible+0x10>
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @divisible(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp sge i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, %10
store i32 %12, i32* %3
br label %5
13: ; preds = %5
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @divisible(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %6, %3 ]
%5 = icmp slt i32 %4, %1
%6 = sub nsw i32 %4, %1
br i1 %5, label %7, label %3
7: ; preds = %3
%8 = icmp eq i32 %4, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
float getcoord(unsigned char *pp, int *pj) {
  int c, d;
  c = pp[(*pj)++];
  d = pp[(*pj)++];
  return ((float)((d << 8) | c));
}


x86 assembly (clang, -O0):
<getcoord>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
mov    (%rdx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,(%rdx)
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
mov    (%rdx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,(%rdx)
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
shl    $0x8,%eax
or     -0x14(%rbp),%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcoord>:
movslq (%rsi),%rax
lea    0x1(%rax),%rcx
mov    %ecx,(%rsi)
movzbl (%rdi,%rax,1),%ecx
lea    0x2(%rax),%edx
mov    %edx,(%rsi)
movzbl 0x1(%rdi,%rax,1),%eax
shl    $0x8,%eax
or     %ecx,%eax
cvtsi2ss %eax,%xmm0
ret

LLVM IR (-O0):
define float @getcoord(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%7 = load i8*, i8** %3
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds i8, i8* %7, i64 %11
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
store i32 %14, i32* %5
%15 = load i8*, i8** %3
%16 = load i32*, i32** %4
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 1
store i32 %18, i32* %16
%19 = sext i32 %17 to i64
%20 = getelementptr inbounds i8, i8* %15, i64 %19
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = shl i32 %23, 8
%25 = load i32, i32* %5
%26 = or i32 %24, %25
%27 = sitofp i32 %26 to float
ret float %27
}

LLVM IR (-O2):
define float @getcoord(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = add nsw i32 %3, 2
store i32 %9, i32* %1
%10 = sext i32 %4 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = or i32 %14, %8
%16 = sitofp i32 %15 to float
ret float %16
}
main() {
  int x, y;
  x = 0;
  y = 1;
  if (x == 1) {
    y++;
    printf(y);
  } else {
    y++;
    printf(y);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1150 <main+0x40>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1164 <main+0x54>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 2 to i8*))
ret i32 0
}
/* Variables and functions */
float fabsf(float);
float fmodf(float, float);
float fabsloop(float a, float b, float modl) {
  float fa = fabsf(a - b);
  fa = fmodf(fa, modl);
  if (fa > modl / 2.0) {
    fa = modl - fa;
  }
  return fa;
}


x86 assembly (clang, -O0):
<fabsloop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movaps 0xed8(%rip),%xmm1
pand   %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <fmodf@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe91(%rip),%xmm2
divsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    118c <fabsloop+0x7c>
movss  -0xc(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabsloop>:
push   %rax
movss  %xmm2,0x4(%rsp)
subss  %xmm1,%xmm0
andps  0xede(%rip),%xmm0
movaps %xmm2,%xmm1
call   1030 <fmodf@plt>
movss  0x4(%rsp),%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm3,%xmm2
mulsd  0xeca(%rip),%xmm2
ucomisd %xmm2,%xmm1
jbe    1153 <fabsloop+0x43>
subss  %xmm0,%xmm3
movaps %xmm3,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fabsloop(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fsub float %8, %9
%11 = call float @llvm.fabs.f32(float %10)
store float %11, float* %7
%12 = load float, float* %7
%13 = load float, float* %6
%14 = call float @fmodf(float %12, float %13)
store float %14, float* %7
%15 = load float, float* %7
%16 = fpext float %15 to double
%17 = load float, float* %6
%18 = fpext float %17 to double
%19 = fdiv double %18, 2.000000e+00
%20 = fcmp ogt double %16, %19
br i1 %20, label %21, label %25
21: ; preds = %3
%22 = load float, float* %6
%23 = load float, float* %7
%24 = fsub float %22, %23
store float %24, float* %7
br label %25
25: ; preds = %21, %3
%26 = load float, float* %7
ret float %26
}

LLVM IR (-O2):
define float @fabsloop(float %0, float %1, float %2) {
%4 = fsub float %0, %1
%5 = tail call float @llvm.fabs.f32(float %4)
%6 = tail call float @fmodf(float %5, float %2)
%7 = fpext float %6 to double
%8 = fpext float %2 to double
%9 = fmul double %8, 5.000000e-01
%10 = fcmp olt double %9, %7
%11 = fsub float %2, %6
%12 = select i1 %10, float %11, float %6
ret float %12
}
void g_list_insert_before() {}


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

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

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

LLVM IR (-O2):
define void @g_list_insert_before() {
ret void
}
unsigned int vsub4(unsigned int a, unsigned int b) {
  unsigned int r, s, t;
  s = a ^ ~b;
  r = a | 0x80808080;
  t = b & 0x7f7f7f7f;
  s = s & 0x80808080;
  r = r - t;
  r = r ^ s;
  return r;
}


x86 assembly (clang, -O0):
<vsub4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
or     $0x80808080,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7f7f7f7f,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
and    $0x80808080,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsub4>:
mov    %esi,%eax
xor    %edi,%eax
or     $0x80808080,%edi
and    $0x7f7f7f7f,%esi
sub    %esi,%edi
and    $0x80808080,%eax
xor    %edi,%eax
xor    $0x80808080,%eax
ret

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

LLVM IR (-O2):
define i32 @vsub4(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = or i32 %0, -2139062144
%5 = and i32 %1, 2139062143
%6 = and i32 %3, -2139062144
%7 = sub nuw i32 %4, %5
%8 = xor i32 %7, %6
%9 = xor i32 %8, -2139062144
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
scalar_t__ nrf_802154_rssi_sample_temp_corr_value_get();
uint8_t nrf_802154_rssi_ed_corrected_get(uint8_t ed) {
  return ed - nrf_802154_rssi_sample_temp_corr_value_get();
}


x86 assembly (clang, -O0):
<nrf_802154_rssi_ed_corrected_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <nrf_802154_rssi_sample_temp_corr_value_get@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_802154_rssi_ed_corrected_get>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <nrf_802154_rssi_sample_temp_corr_value_get@plt>
sub    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @nrf_802154_rssi_ed_corrected_get(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 (...) @nrf_802154_rssi_sample_temp_corr_value_get()
%5 = sub nsw i64 %3, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @nrf_802154_rssi_ed_corrected_get(i64 %0) {
%2 = tail call i64 (...) @nrf_802154_rssi_sample_temp_corr_value_get()
%3 = sub nsw i64 %0, %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ halt();
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ print_color(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ print_hex(unsigned int);
void panic(char *str, unsigned int data) {
  print_color("\r\nKERNEL PANIC: ", 4, 0);
  print(str);
  print("\r\nDATA: ");
  print_hex(data);
  halt();
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x4,%esi
xor    %edx,%edx
call   1060 <print_color@plt>
mov    -0x8(%rbp),%rdi
call   1030 <print@plt>
lea    0xe9f(%rip),%rdi
call   1030 <print@plt>
mov    -0xc(%rbp),%edi
call   1040 <print_hex@plt>
mov    $0x0,%al
call   1050 <halt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<panic>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xeb1(%rip),%rdi
mov    $0x4,%esi
xor    %edx,%edx
call   1060 <print_color@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
lea    0xea7(%rip),%rdi
call   1030 <print@plt>
mov    %ebp,%edi
call   1040 <print_hex@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <halt@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"\0D\0AKERNEL PANIC: \00"
@.str.1 = [9 x i8] c"\0D\0ADATA: \00"
define void @panic(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @print_color(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 4, i32 0)
%6 = load i8*, i8** %3
%7 = call i32 @print(i8* %6)
%8 = call i32 @print(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* %4
%10 = call i32 @print_hex(i32 %9)
%11 = call i32 (...) @halt()
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"\0D\0AKERNEL PANIC: \00"
@.str.1 = [9 x i8] c"\0D\0ADATA: \00"
define void @panic(i8* %0, i32 %1) {
%3 = tail call i32 @print_color(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 4, i32 0)
%4 = tail call i32 @print(i8* %0)
%5 = tail call i32 @print(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @print_hex(i32 %1)
%7 = tail call i32 (...) @halt()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
yyerror(char *s) { printf("%s\n", s); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @yyerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
void dd_pbl_ios_chartboost_start(const char *app_id,
                                 const char *app_signature) {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_chartboost_start(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void grib_set_bit_off(unsigned char *p, long *bitp) {
  p += *bitp / 8;
  *p &= ~(1u << (7 - ((*bitp) % 8)));
  (*bitp)++;
}


x86 assembly (clang, -O0):
<grib_set_bit_off>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    $0x8,%ecx
cqto
idiv   %rcx
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    $0x8,%ecx
cqto
idiv   %rcx
mov    $0x7,%eax
sub    %rdx,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
and    %edx,%ecx
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<grib_set_bit_off>:
mov    (%rsi),%rax
lea    0x7(%rax),%rdx
test   %rax,%rax
cmovns %rax,%rdx
sar    $0x3,%rdx
lea    0x0(,%rdx,8),%ecx
sub    %ecx,%eax
mov    $0x7,%cl
sub    %al,%cl
mov    $0x1,%eax
shl    %cl,%eax
not    %al
and    %al,(%rdi,%rdx,1)
addq   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @grib_set_bit_off(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
store i8* %0, i8** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i64, i64* %5
%7 = sdiv i64 %6, 8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 %7
store i8* %9, i8** %3
%10 = load i64*, i64** %4
%11 = load i64, i64* %10
%12 = srem i64 %11, 8
%13 = sub nsw i64 7, %12
%14 = trunc i64 %13 to i32
%15 = shl i32 1, %14
%16 = xor i32 %15, -1
%17 = load i8*, i8** %3
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = and i32 %19, %16
%21 = trunc i32 %20 to i8
store i8 %21, i8* %17
%22 = load i64*, i64** %4
%23 = load i64, i64* %22
%24 = add nsw i64 %23, 1
store i64 %24, i64* %22
ret void
}

LLVM IR (-O2):
define void @grib_set_bit_off(i8* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = sdiv i64 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = srem i64 %3, 8
%7 = trunc i64 %6 to i32
%8 = sub nsw i32 7, %7
%9 = shl nuw nsw i32 1, %8
%10 = load i8, i8* %5
%11 = trunc i32 %9 to i8
%12 = xor i8 %11, -1
%13 = and i8 %10, %12
store i8 %13, i8* %5
%14 = load i64, i64* %1
%15 = add nsw i64 %14, 1
store i64 %15, i64* %1
ret void
}
__attribute__((no, noclone)) unsigned __int128 t146_3sub(unsigned __int128 y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow(
          (signed __int128)((
              (signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1))),
          y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t146_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
xor    %edx,%edx
mov    %edx,%r9d
movabs $0x7fffffffffffffff,%rdx
ff ff 7f
sub    %rax,%rdx
mov    %r9,%r8
sbb    %r8,%r8
sbb    %r9,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
not    %rcx
or     %rsi,%rax
setne  %al
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    118b <t146_3sub+0x7b>
jmp    1192 <t146_3sub+0x82>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t146_3sub>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movabs $0x7fffffffffffffff,%r14
ff ff 7f
sub    %rsi,%r14
not    %rbx
test   %rsi,%rsi
jns    1133 <t146_3sub+0x23>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t146_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = zext i128 %11 to i129
%13 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 170141183460469231731687303715884105727, i129 %12)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t146_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = sub nsw i129 170141183460469231731687303715884105727, %7
%9 = icmp slt i128 %6, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
scalar_t__ random();
double rand_value_double_nonzero(void) {
  double a = (double)random();
  if (a == 0.0)
    a = 1.0;
  return a;
}


x86 assembly (clang, -O0):
<rand_value_double_nonzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <random@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    114e <rand_value_double_nonzero+0x3e>
jp     114e <rand_value_double_nonzero+0x3e>
movsd  0xeb7(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_value_double_nonzero>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
test   %rax,%rax
je     1124 <rand_value_double_nonzero+0x14>
cvtsi2sd %rax,%xmm0
pop    %rax
ret
movsd  0xed4(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rand_value_double_nonzero() {
%1 = alloca double
%2 = call i64 (...) @random()
%3 = sitofp i64 %2 to double
store double %3, double* %1
%4 = load double, double* %1
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %0
store double 1.000000e+00, double* %1
br label %7
7: ; preds = %6, %0
%8 = load double, double* %1
ret double %8
}

LLVM IR (-O2):
define double @rand_value_double_nonzero() {
%1 = tail call i64 (...) @random()
%2 = sitofp i64 %1 to double
%3 = icmp eq i64 %1, 0
%4 = select i1 %3, double 1.000000e+00, double %2
ret double %4
}
int __attribute__((nomips16)) f3(unsigned long long y) {
  return (char)((char)(y >> 32) + 1);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x20,%rax
movsbl %al,%eax
add    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
shr    $0x8,%rdi
lea    0x1000000(%rdi),%eax
sar    $0x18,%eax
ret

LLVM IR (-O0):
define i32 @f3(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = trunc i64 %4 to i8
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, 1
%8 = trunc i32 %7 to i8
%9 = sext i8 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f3(i64 %0) {
%2 = lshr i64 %0, 8
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 16777216
%5 = ashr i32 %4, 24
ret i32 %5
}
int tdefault_supports_stopped_by_hw_breakpoint(struct target_ops *self) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.target_ops = type opaque
define i32 @tdefault_supports_stopped_by_hw_breakpoint(%struct.target_ops* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_image(void *img) { free(img); }


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

x86 assembly (clang, -O2):
<free_image>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_image(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int main(int arvc, char **argv) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void HalfFloatRow_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @HalfFloatRow_SSE2() {
ret void
}
/* Variables and functions */
double powInt(int, int);
float fixedDelta(int l) { return 1.0 / powInt(2, l); }


x86 assembly (clang, -O0):
<fixedDelta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1030 <powInt@plt>
movaps %xmm0,%xmm1
movsd  0xecd(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixedDelta>:
push   %rax
mov    %edi,%esi
mov    $0x2,%edi
call   1030 <powInt@plt>
movsd  0xedb(%rip),%xmm1
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fixedDelta(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call double @powInt(i32 2, i32 %3)
%5 = fdiv double 1.000000e+00, %4
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @fixedDelta(i32 %0) {
%2 = tail call double @powInt(i32 2, i32 %0)
%3 = fdiv double 1.000000e+00, %2
%4 = fptrunc double %3 to float
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ useconds_t;
struct RStream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ usleep(int /*<<< orphan*/);
void RStream__scheduleUpdateNotification(struct RStream *rs,
                                         useconds_t sleepUsec) {
  usleep(sleepUsec);
}


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

x86 assembly (clang, -O2):
<RStream__scheduleUpdateNotification>:
mov    %esi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
%struct.RStream = type { i32 }
define void @RStream__scheduleUpdateNotification(%struct.RStream* %0, i32 %1) {
%3 = alloca %struct.RStream*
%4 = alloca i32
store %struct.RStream* %0, %struct.RStream** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @usleep(i32 %5)
ret void
}

LLVM IR (-O2):
%struct.RStream = type { i32 }
define void @RStream__scheduleUpdateNotification(%struct.RStream* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @usleep(i32 %1)
ret void
}
/* Variables and functions */
float fabsf(float);
int is_float_near(float expected, float actual, float epsilon) {
  float diff = fabsf(expected - actual);
  return (diff <= epsilon) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_float_near>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movaps 0xedc(%rip),%xmm1
pand   %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
xor    %eax,%eax
mov    $0x1,%ecx
ucomiss %xmm1,%xmm0
cmovae %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_float_near>:
subss  %xmm1,%xmm0
andps  0xef5(%rip),%xmm0
xor    %eax,%eax
ucomiss %xmm0,%xmm2
setae  %al
ret

LLVM IR (-O0):
define i32 @is_float_near(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fsub float %8, %9
%11 = call float @llvm.fabs.f32(float %10)
store float %11, float* %7
%12 = load float, float* %7
%13 = load float, float* %6
%14 = fcmp ole float %12, %13
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 1, i32 0
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_float_near(float %0, float %1, float %2) {
%4 = fsub float %0, %1
%5 = tail call float @llvm.fabs.f32(float %4)
%6 = fcmp ole float %5, %2
%7 = zext i1 %6 to i32
ret i32 %7
}