xunge/DecIR huggingface dataset:
/* Variables and functions */
int lace_builtin_time2sec_main(unsigned int, char **, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
int lace_main_time2sec(unsigned argc, char **argv) {
  return lace_builtin_time2sec_main(argc, argv, NULL, NULL);
}


x86 assembly (clang, -O0):
<lace_main_time2sec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <lace_builtin_time2sec_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lace_main_time2sec>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <lace_builtin_time2sec_main@plt>

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

LLVM IR (-O2):
define i32 @lace_main_time2sec(i32 %0, i8** %1) {
%3 = tail call i32 @lace_builtin_time2sec_main(i32 %0, i8** %1, i32* null, i32* null)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct timespec {
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ rtl_timespecmono(struct timespec *);
time_t rtl_timemono(time_t *part) {
  struct timespec tv;
  rtl_timespecmono(&tv);
  if (part) {
    *part = tv.tv_sec;
  }
  return tv.tv_sec;
}


x86 assembly (clang, -O0):
<rtl_timemono>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <rtl_timespecmono@plt>
cmpq   $0x0,-0x8(%rbp)
je     1139 <rtl_timemono+0x29>
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtl_timemono>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
call   1030 <rtl_timespecmono@plt>
mov    0x8(%rsp),%eax
test   %rbx,%rbx
je     112d <rtl_timemono+0x1d>
mov    %eax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @rtl_timemono(i32* %0) {
%2 = alloca i32*
%3 = alloca %struct.timespec
store i32* %0, i32** %2
%4 = call i32 @rtl_timespecmono(%struct.timespec* %3)
%5 = load i32*, i32** %2
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = load i32*, i32** %2
store i32 %9, i32* %10
br label %11
11: ; preds = %7, %1
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%13 = load i32, i32* %12
ret i32 %13
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @rtl_timemono(i32* writeonly %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = call i32 @rtl_timespecmono(%struct.timespec* %2)
%5 = icmp eq i32* %0, null
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
%7 = load i32, i32* %6
br i1 %5, label %9, label %8
8: ; preds = %1
store i32 %7, i32* %0
br label %9
9: ; preds = %1, %8
ret i32 %7
}
int tokenLen(char *tok) {
  int i = 0;
  if (tok != 0)
    while (*tok != 0) {
      i++;
      tok += 1;
    }
  return i;
}


x86 assembly (clang, -O0):
<tokenLen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114e <tokenLen+0x4e>
jmp    111f <tokenLen+0x1f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <tokenLen+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111f <tokenLen+0x1f>
jmp    114e <tokenLen+0x4e>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tokenLen>:
xor    %eax,%eax
test   %rdi,%rdi
je     111b <tokenLen+0x1b>
cmpb   $0x0,(%rdi)
je     111b <tokenLen+0x1b>
xor    %eax,%eax
xchg   %ax,%ax
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <tokenLen+0x10>
ret

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

LLVM IR (-O2):
define i32 @tokenLen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = add nuw nsw i32 %7, 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i32 [ 0, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ bb_error_d(char *, char *, char *);
void show_usage(void) {
  bb_error_d(
      "%s\n%s\n",
      "Usage: [-I local_include_paths] [-dw] "
      "[-k path_for_stored_keys] [dirs]",
      "\nOptions:"
      "\n\t-I local_include_path  include paths, default: \""
      "include"
      "\""
      "\n\t-d                     don't generate depend"
      "\n\t-w                     show warning if include files not found"
      "\n\t-k include/config      default: \""
      "include"
      "/config"
      "\""
      "\n\t-c include/config.h    configs, default: \""
      "include"
      "/config.h"
      "\""
      "\n\tdirs_to_scan           default \".\"");
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xf25(%rip),%rdx
call   1030 <bb_error_d@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xf29(%rip),%rdx
jmp    1030 <bb_error_d@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [71 x i8] c"Usage: [-I local_include_paths] [-dw] [-k path_for_stored_keys] [dirs]\00"
@.str.2 = [325 x i8] c"\0AOptions:\0A\09-I local_include_path include paths, default: \22include\22\0A\09-d don't generate depend\0A\09-w show warning if include files not found\0A\09-k include/config default: \22include/config\22\0A\09-c include/config.h configs, default: \22include/config.h\22\0A\09dirs_to_scan default \22.\22\00"
define void @show_usage() {
%1 = call i32 @bb_error_d(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([325 x i8], [325 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [71 x i8] c"Usage: [-I local_include_paths] [-dw] [-k path_for_stored_keys] [dirs]\00"
@.str.2 = [325 x i8] c"\0AOptions:\0A\09-I local_include_path include paths, default: \22include\22\0A\09-d don't generate depend\0A\09-w show warning if include files not found\0A\09-k include/config default: \22include/config\22\0A\09-c include/config.h configs, default: \22include/config.h\22\0A\09dirs_to_scan default \22.\22\00"
define void @show_usage() {
%1 = tail call i32 @bb_error_d(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([325 x i8], [325 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ getpid();
pid_t setsid(void) { return getpid(); }


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

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

LLVM IR (-O0):
define i32 @setsid() {
%1 = call i32 (...) @getpid()
ret i32 %1
}

LLVM IR (-O2):
define i32 @setsid() {
%1 = tail call i32 (...) @getpid()
ret i32 %1
}
void gtk_tree_view_get_hover_expand() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_hover_expand() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ngen(char *, char *, int /*<<< orphan*/);
void cginc1ib(void) { ngen("%s\t(%%rax)", "incb", 0); }


x86 assembly (clang, -O0):
<cginc1ib>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee9(%rip),%rsi
xor    %edx,%edx
call   1030 <ngen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cginc1ib>:
lea    0xee9(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %edx,%edx
jmp    1030 <ngen@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%s\09(%%rax)\00"
@.str.1 = [5 x i8] c"incb\00"
define void @cginc1ib() {
%1 = call i32 @ngen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s\09(%%rax)\00"
@.str.1 = [5 x i8] c"incb\00"
define void @cginc1ib() {
%1 = tail call i32 @ngen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void COPY_4UBV(uint8_t dst[4], const uint8_t src[4]) {
  do {
    (dst)[0] = (src)[0];
    (dst)[1] = (src)[1];
    (dst)[2] = (src)[2];
    (dst)[3] = (src)[3];
  } while (0);
}


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

x86 assembly (clang, -O2):
<COPY_4UBV>:
mov    (%rsi),%eax
mov    %eax,(%rdi)
mov    0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
mov    0x8(%rsi),%eax
mov    %eax,0x8(%rdi)
mov    0xc(%rsi),%eax
mov    %eax,0xc(%rdi)
ret

LLVM IR (-O0):
define void @COPY_4UBV(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 = %2
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 0
store i32 %8, i32* %10
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = load i32*, i32** %3
%15 = getelementptr inbounds i32, i32* %14, i64 1
store i32 %13, i32* %15
%16 = load i32*, i32** %4
%17 = getelementptr inbounds i32, i32* %16, i64 2
%18 = load i32, i32* %17
%19 = load i32*, i32** %3
%20 = getelementptr inbounds i32, i32* %19, i64 2
store i32 %18, i32* %20
%21 = load i32*, i32** %4
%22 = getelementptr inbounds i32, i32* %21, i64 3
%23 = load i32, i32* %22
%24 = load i32*, i32** %3
%25 = getelementptr inbounds i32, i32* %24, i64 3
store i32 %23, i32* %25
br label %26
26: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @COPY_4UBV(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = getelementptr inbounds i32, i32* %1, i64 2
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
%10 = getelementptr inbounds i32, i32* %1, i64 3
%11 = load i32, i32* %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %11, i32* %12
ret void
}
int db5500_prcmu_stop_temp_sense(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @db5500_prcmu_stop_temp_sense() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
scalar_t__ WOMallocShouldFail();
int /*<<< orphan*/ errno;
void *reallocf(void *, size_t);
void *WOReallocf(void *ptr, size_t size) {
  if (WOMallocShouldFail()) {
    errno = ENOMEM;
    return NULL;
  }
  return reallocf(ptr, size);
}


x86 assembly (clang, -O0):
<WOReallocf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0x0,%al
call   1030 <WOMallocShouldFail@plt>
cmp    $0x0,%rax
je     1160 <WOReallocf+0x40>
mov    0x2e98(%rip),%rax
mov    (%rax),%ecx
mov    0x2e87(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    1171 <WOReallocf+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <reallocf@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WOReallocf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <WOMallocShouldFail@plt>
test   %rax,%rax
je     1152 <WOReallocf+0x32>
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
mov    0x2e92(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <reallocf@plt>

LLVM IR (-O0):
@ENOMEM = global i32 0
@errno = global i32 0
define i8* @WOReallocf(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = call i64 (...) @WOMallocShouldFail()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* @ENOMEM
store i32 %9, i32* @errno
store i8* null, i8** %3
br label %14
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i64, i64* %5
%13 = call i8* @reallocf(i8* %11, i64 %12)
store i8* %13, i8** %3
br label %14
14: ; preds = %10, %8
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
define noalias i8* @WOReallocf(i8* nocapture %0, i64 %1) {
%3 = tail call i64 (...) @WOMallocShouldFail()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = load i32, i32* @ENOMEM
store i32 %6, i32* @errno
br label %9
7: ; preds = %2
%8 = tail call i8* @reallocf(i8* %0, i64 %1)
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ null, %5 ], [ %8, %7 ]
ret i8* %10
}
void foo(void) { const char *s = __func__; }


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

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

LLVM IR (-O0):
@__func__.foo = [4 x i8] c"foo\00"
define void @foo() {
%1 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__func__.foo, i64 0, i64 0), i8** %1
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void option_free_string(void *p) {
  char **str = p;
  free(*str);
}


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

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

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

LLVM IR (-O2):
define void @option_free_string(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
int enum_hashbyte(char a) {
  int i, j;
  i = (int)a;
  if ((i >= 46) && (i <= 57))
    j = i - 46;
  else if ((i >= 65) && (i <= 90))
    j = i - 53;
  else if ((i >= 97) && (i <= 122))
    j = i - 59;
  return j;
}


x86 assembly (clang, -O0):
<enum_hashbyte>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x2e,-0x8(%rbp)
jl     1133 <enum_hashbyte+0x33>
cmpl   $0x39,-0x8(%rbp)
jg     1133 <enum_hashbyte+0x33>
mov    -0x8(%rbp),%eax
sub    $0x2e,%eax
mov    %eax,-0xc(%rbp)
jmp    117c <enum_hashbyte+0x7c>
cmpl   $0x41,-0x8(%rbp)
jl     1155 <enum_hashbyte+0x55>
cmpl   $0x5a,-0x8(%rbp)
jg     1155 <enum_hashbyte+0x55>
mov    -0x8(%rbp),%eax
sub    $0x35,%eax
mov    %eax,-0xc(%rbp)
jmp    1177 <enum_hashbyte+0x77>
cmpl   $0x61,-0x8(%rbp)
jl     1172 <enum_hashbyte+0x72>
cmpl   $0x7a,-0x8(%rbp)
jg     1172 <enum_hashbyte+0x72>
mov    -0x8(%rbp),%eax
sub    $0x3b,%eax
mov    %eax,-0xc(%rbp)
jmp    1177 <enum_hashbyte+0x77>
jmp    117c <enum_hashbyte+0x7c>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<enum_hashbyte>:
mov    %edi,%eax
lea    -0x2e(%rax),%ecx
cmp    $0xb,%cl
ja     110e <enum_hashbyte+0xe>
add    $0xffffffd2,%eax
ret
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     111a <enum_hashbyte+0x1a>
add    $0xffffffcb,%eax
ret
add    $0xffffffc5,%eax
ret

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

LLVM IR (-O2):
define i32 @enum_hashbyte(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -46
%4 = icmp ult i8 %3, 12
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nsw i32 %2, -46
br label %17
7: ; preds = %1
%8 = add i8 %0, -65
%9 = icmp ult i8 %8, 26
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = add nsw i32 %2, -53
br label %17
12: ; preds = %7
%13 = add i8 %0, -97
%14 = icmp ult i8 %13, 26
%15 = add nsw i32 %2, -59
%16 = select i1 %14, i32 %15, i32 undef
br label %17
17: ; preds = %12, %10, %5
%18 = phi i32 [ %6, %5 ], [ %11, %10 ], [ %16, %12 ]
ret i32 %18
}
void my_reset(void) {}


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

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

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

LLVM IR (-O2):
define void @my_reset() {
ret void
}
void clr_bit(long __bit, void *__bitmap) {
  asm volatile("btc %1,%0"
               : "+m"(*(unsigned char *)__bitmap)
               : "Ir"(__bit)
               : "memory");
}


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

x86 assembly (clang, -O2):
<clr_bit>:
btc    %rdi,(%rsi)
ret

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

LLVM IR (-O2):
define void @clr_bit(i64 %0, i8* %1) {
tail call void asm sideeffect "btc $1,$0", "=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %1, i64 %0, i8* elementtype(i8) %1)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  while (*++argv != NULL)
    printf("%s\n", *argv);
  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    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
cmpq   $0x0,0x8(%rax)
je     1158 <main+0x48>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>
mov    0x2e81(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
test   %rsi,%rsi
je     1144 <main+0x34>
add    $0x10,%rbx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1130 <main+0x20>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@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
br label %6
6: ; preds = %11, %2
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i32 1
store i8** %8, i8*** %5
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %6
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %6
15: ; preds = %6
%16 = load i32, i32* @EXIT_SUCCESS
ret i32 %16
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %2, %6
%7 = phi i8* [ %11, %6 ], [ %4, %2 ]
%8 = phi i8** [ %10, %6 ], [ %3, %2 ]
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}
char *ft_strcat(char *s1, const char *s2) {
  char *d;
  d = s1;
  while (*d++)
    ;
  d--;
  while ((*d++ = *s2++))
    ;
  return (s1);
}


x86 assembly (clang, -O0):
<ft_strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
cmpb   $0x0,(%rax)
je     1131 <ft_strcat+0x31>
jmp    1114 <ft_strcat+0x14>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     116c <ft_strcat+0x6c>
jmp    113d <ft_strcat+0x3d>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <ft_strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <ft_strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @ft_strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int wait(int /*<<< orphan*/ *);
void handle(int s) {
  pid_t cid = wait(NULL);
  printf("###child pid:%d\n", cid);
}


x86 assembly (clang, -O0):
<handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <wait@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle>:
push   %rax
xor    %edi,%edi
call   1040 <wait@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"###child pid:%d\0A\00"
define void @handle(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @wait(i32* null)
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"###child pid:%d\0A\00"
define void @handle(i32 %0) {
%2 = tail call i32 @wait(i32* null)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay_ms(int);
int /*<<< orphan*/ loop(int, int);
int main() {
  loop(300, 73);
  delay_ms(1000);
  loop(500, 291);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12c,%edi
mov    $0x49,%esi
call   1030 <loop@plt>
mov    $0x3e8,%edi
call   1040 <delay_ms@plt>
mov    $0x1f4,%edi
mov    $0x123,%esi
call   1030 <loop@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x12c,%edi
mov    $0x49,%esi
call   1030 <loop@plt>
mov    $0x3e8,%edi
call   1040 <delay_ms@plt>
mov    $0x1f4,%edi
mov    $0x123,%esi
call   1030 <loop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @loop(i32 300, i32 73)
%2 = call i32 @delay_ms(i32 1000)
%3 = call i32 @loop(i32 500, i32 291)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @loop(i32 300, i32 73)
%2 = tail call i32 @delay_ms(i32 1000)
%3 = tail call i32 @loop(i32 500, i32 291)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void ADCSequenceEnable(unsigned long ulBase, unsigned long ulSequenceNum) {
  DEBUG_ASSERT((ulBase == 0x40038000) || (ulBase == 0x40039000));
  DEBUG_ASSERT(ulSequenceNum < 4);
  (*((volatile unsigned long *)(ulBase + 0x00000000))) |= 1 << ulSequenceNum;
}


x86 assembly (clang, -O0):
<ADCSequenceEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x40038000,-0x8(%rbp)
40
mov    %al,-0x11(%rbp)
je     1141 <ADCSequenceEnable+0x31>
cmpq   $0x40039000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
cmpq   $0x4,-0x10(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rdx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
or     %rdx,%rcx
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCSequenceEnable>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40038000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x4,%rbx
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    $0x1,%eax
mov    %ebx,%ecx
shl    %cl,%eax
cltq
or     %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ADCSequenceEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1073971200
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i64, i64* %3
%9 = icmp eq i64 %8, 1073975296
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @DEBUG_ASSERT(i32 %12)
%14 = load i64, i64* %4
%15 = icmp ult i64 %14, 4
%16 = zext i1 %15 to i32
%17 = call i32 @DEBUG_ASSERT(i32 %16)
%18 = load i64, i64* %4
%19 = trunc i64 %18 to i32
%20 = shl i32 1, %19
%21 = sext i32 %20 to i64
%22 = load i64, i64* %3
%23 = add i64 %22, 0
%24 = inttoptr i64 %23 to i64*
%25 = load volatile i64, i64* %24
%26 = or i64 %25, %21
store volatile i64 %26, i64* %24
ret void
}

LLVM IR (-O2):
define void @ADCSequenceEnable(i64 %0, i64 %1) {
%3 = and i64 %0, -4097
%4 = icmp eq i64 %3, 1073971200
%5 = zext i1 %4 to i32
%6 = tail call i32 @DEBUG_ASSERT(i32 %5)
%7 = icmp ult i64 %1, 4
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = trunc i64 %1 to i32
%11 = shl nuw i32 1, %10
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %0 to i64*
%14 = load volatile i64, i64* %13
%15 = or i64 %14, %12
store volatile i64 %15, i64* %13
ret void
}
/* Type definitions */
struct quat {
  int dummy;
};

/* Variables and functions */
int quat_is_nearly_equal(float *, float *, float);
__attribute__((always_)) bool
psquat_is_nearly_equal(struct quat *a, struct quat *b, float epsilon) {
  return quat_is_nearly_equal((float *)a, (float *)b, epsilon);
}


x86 assembly (clang, -O0):
<psquat_is_nearly_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
call   1030 <quat_is_nearly_equal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psquat_is_nearly_equal>:
jmp    1030 <quat_is_nearly_equal@plt>

LLVM IR (-O0):
%struct.quat = type { i32 }
define i32 @psquat_is_nearly_equal(%struct.quat* %0, %struct.quat* %1, float %2) {
%4 = alloca %struct.quat*
%5 = alloca %struct.quat*
%6 = alloca float
store %struct.quat* %0, %struct.quat** %4
store %struct.quat* %1, %struct.quat** %5
store float %2, float* %6
%7 = load %struct.quat*, %struct.quat** %4
%8 = bitcast %struct.quat* %7 to float*
%9 = load %struct.quat*, %struct.quat** %5
%10 = bitcast %struct.quat* %9 to float*
%11 = load float, float* %6
%12 = call i32 @quat_is_nearly_equal(float* %8, float* %10, float %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.quat = type { i32 }
define i32 @psquat_is_nearly_equal(%struct.quat* %0, %struct.quat* %1, float %2) {
%4 = bitcast %struct.quat* %0 to float*
%5 = bitcast %struct.quat* %1 to float*
%6 = tail call i32 @quat_is_nearly_equal(float* %4, float* %5, float %2)
ret i32 %6
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c;
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  c = 0;
  while (x + y > 0) {
    if (x > 0) {
      x = x - 1;
    } else {
      if (y > 0) {
        y = y - 1;
      } else {
      }
    }
    c = c + 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,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    $0x0,%eax
jle    1191 <main+0x81>
cmpl   $0x0,-0xc(%rbp)
jle    1161 <main+0x51>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1183 <main+0x73>
cmpl   $0x0,-0x10(%rbp)
jle    1179 <main+0x69>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    117e <main+0x6e>
jmp    117e <main+0x6e>
jmp    1183 <main+0x73>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
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
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* %3
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %4
store i32 0, i32* %2
br label %7
7: ; preds = %26, %0
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %29
12: ; preds = %7
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %3
%17 = sub nsw i32 %16, 1
store i32 %17, i32* %3
br label %26
18: ; preds = %12
%19 = load i32, i32* %4
%20 = icmp sgt i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 1
store i32 %23, i32* %4
br label %25
24: ; preds = %18
br label %25
25: ; preds = %24, %21
br label %26
26: ; preds = %25, %15
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
br label %7
29: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int isupper(unsigned char);
int isupper_c(char c) { return isupper((unsigned char)c); }


x86 assembly (clang, -O0):
<isupper_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <isupper@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupper_c>:
movzbl %dil,%edi
jmp    1030 <isupper@plt>

LLVM IR (-O0):
define i32 @isupper_c(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @isupper(i8 zeroext %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @isupper_c(i8 signext %0) {
%2 = tail call i32 @isupper(i8 zeroext %0)
ret i32 %2
}
int scaleQuad(int maxSpeed, float coeff, float completion) {
  return maxSpeed * (-coeff * (completion * completion) + 1);
}


x86 assembly (clang, -O0):
<scaleQuad>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0xc(%rbp),%xmm2
mulss  -0xc(%rbp),%xmm2
mulss  %xmm2,%xmm1
movss  0xec2(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scaleQuad>:
cvtsi2ss %edi,%xmm2
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm1
movss  0xeec(%rip),%xmm0
subss  %xmm1,%xmm0
mulss  %xmm2,%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @scaleQuad(i32 %0, float %1, float %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store i32 %0, i32* %4
store float %1, float* %5
store float %2, float* %6
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
%9 = load float, float* %5
%10 = fneg float %9
%11 = load float, float* %6
%12 = load float, float* %6
%13 = fmul float %11, %12
%14 = call float @llvm.fmuladd.f32(float %10, float %13, float 1.000000e+00)
%15 = fmul float %8, %14
%16 = fptosi float %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @scaleQuad(i32 %0, float %1, float %2) {
%4 = sitofp i32 %0 to float
%5 = fneg float %1
%6 = fmul float %2, %2
%7 = tail call float @llvm.fmuladd.f32(float %5, float %6, float 1.000000e+00)
%8 = fmul float %7, %4
%9 = fptosi float %8 to i32
ret i32 %9
}
/* Type definitions */
struct edo_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_args(struct edo_args_info *);
int /*<<< orphan*/ clear_given(struct edo_args_info *);
int /*<<< orphan*/ init_args_info(struct edo_args_info *);
void edo_cmdline_parser_init(struct edo_args_info *args_info) {
  clear_given(args_info);
  clear_args(args_info);
  init_args_info(args_info);
}


x86 assembly (clang, -O0):
<edo_cmdline_parser_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <clear_given@plt>
mov    -0x8(%rbp),%rdi
call   1030 <clear_args@plt>
mov    -0x8(%rbp),%rdi
call   1050 <init_args_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<edo_cmdline_parser_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clear_given@plt>
mov    %rbx,%rdi
call   1030 <clear_args@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <init_args_info@plt>

LLVM IR (-O0):
%struct.edo_args_info = type { i32 }
define void @edo_cmdline_parser_init(%struct.edo_args_info* %0) {
%2 = alloca %struct.edo_args_info*
store %struct.edo_args_info* %0, %struct.edo_args_info** %2
%3 = load %struct.edo_args_info*, %struct.edo_args_info** %2
%4 = call i32 @clear_given(%struct.edo_args_info* %3)
%5 = load %struct.edo_args_info*, %struct.edo_args_info** %2
%6 = call i32 @clear_args(%struct.edo_args_info* %5)
%7 = load %struct.edo_args_info*, %struct.edo_args_info** %2
%8 = call i32 @init_args_info(%struct.edo_args_info* %7)
ret void
}

LLVM IR (-O2):
%struct.edo_args_info = type { i32 }
define void @edo_cmdline_parser_init(%struct.edo_args_info* %0) {
%2 = tail call i32 @clear_given(%struct.edo_args_info* %0)
%3 = tail call i32 @clear_args(%struct.edo_args_info* %0)
%4 = tail call i32 @init_args_info(%struct.edo_args_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Swap(int *, int *);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int x = 3, y = 5;
  Swap(&x, &y);
  printf("x=%d.....y=%d", x, y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <Swap@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x3,0x4(%rsp)
movl   $0x5,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <Swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"x=%d.....y=%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 3, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 5, i32* %2
%5 = call i32 @Swap(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
int ft_strlen(char *str) {
  int i;
  i = 0;
  while (*str != '\0') {
    str++;
    i++;
  }
  return (i);
}


x86 assembly (clang, -O0):
<ft_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1139 <ft_strlen+0x39>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ft_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strlen>:
cmpb   $0x0,(%rdi)
je     111c <ft_strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <ft_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int lineCount(FILE *fp) {
  char ch;
  int lines;
  while (!feof(fp)) {
    ch = fgetc(fp);
    if (ch == '\n') {
      lines++;
    }
  }
  rewind(fp);
  return lines;
}


x86 assembly (clang, -O0):
<lineCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    115a <lineCount+0x2a>
jmp    1181 <lineCount+0x51>
mov    -0x8(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0xa,%eax
jne    117c <lineCount+0x4c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113c <lineCount+0xc>
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lineCount>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <feof@plt>
test   %eax,%eax
jne    115d <lineCount+0x2d>
nop
mov    %rbx,%rdi
call   1040 <fgetc@plt>
xor    %ecx,%ecx
cmp    $0xa,%al
sete   %cl
add    %ecx,%ebp
mov    %rbx,%rdi
call   1050 <feof@plt>
test   %eax,%eax
je     1140 <lineCount+0x10>
mov    %rbx,%rdi
call   1030 <rewind@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @lineCount(i32* nocapture %0) {
%2 = tail call i32 @feof(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %12
4: ; preds = %1, %4
%5 = phi i32 [ %9, %4 ], [ undef, %1 ]
%6 = tail call signext i8 @fgetc(i32* %0)
%7 = icmp eq i8 %6, 10
%8 = zext i1 %7 to i32
%9 = add nsw i32 %5, %8
%10 = tail call i32 @feof(i32* %0)
%11 = icmp eq i32 %10, 0
br i1 %11, label %4, label %12
12: ; preds = %4, %1
%13 = phi i32 [ undef, %1 ], [ %9, %4 ]
%14 = tail call i32 @rewind(i32* %0)
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
long sump(int *, int *);
int main(void) {
  int marbless[10] = {20, 10, 5, 39, 4, 16, 19, 26, 31, 20};
  long answer;
  answer = sump(marbless, marbless + 10);
  printf("The total number of marbless is %ld.\n", answer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
lea    -0x30(%rbp),%rsi
add    $0x28,%rsi
call   1050 <sump@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x28(%rsp),%rsi
mov    %rsp,%rdi
call   1040 <sump@plt>
lea    0xecd(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.marbless = [10 x i32] [i32 20, i32 10, i32 5, i32 39, i32 4, i32 16, i32 19, i32 26, i32 31, i32 20]
@.str = [38 x i8] c"The total number of marbless is %ld.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i64
store i32 0, i32* %1
%4 = bitcast [10 x i32]* %2 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%7 = getelementptr inbounds i32, i32* %6, i64 10
%8 = call i64 @sump(i32* %5, i32* %7)
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.marbless = [10 x i32] [i32 20, i32 10, i32 5, i32 39, i32 4, i32 16, i32 19, i32 26, i32 31, i32 20]
@.str = [38 x i8] c"The total number of marbless is %ld.\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 10
%5 = call i64 @sump(i32* %3, i32* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write(int, char *, int);
sigpipe() {
  write(2, "pcat: caught SIGPIPE\n", 21);
  exit(1);
}


x86 assembly (clang, -O0):
<sigpipe>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xed0(%rip),%rsi
mov    $0x15,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigpipe>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x2,%edi
mov    $0x15,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"pcat: caught SIGPIPE\0A\00"
define i32 @sigpipe() {
%1 = call i32 @write(i32 2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 21)
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [22 x i8] c"pcat: caught SIGPIPE\0A\00"
define i32 @sigpipe() {
%1 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 21)
%2 = tail call i32 @exit(i32 1)
unreachable
}