xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fortchartocfield(char *, int);
int /*<<< orphan*/ gmvwrite_general_cell_type(int /*<<< orphan*/, int *, int,
                                              char *);
void fgmvwrite_general_cell_type_(char cell_type[], int nverts[], int *nfaces,
                                  char *nodeids) {
  gmvwrite_general_cell_type(fortchartocfield(cell_type, 8), nverts, *nfaces,
                             nodeids);
}


x86 assembly (clang, -O0):
<fgmvwrite_general_cell_type_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1030 <fortchartocfield@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rcx
call   1040 <gmvwrite_general_cell_type@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_general_cell_type_>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
mov    $0x8,%esi
call   1030 <fortchartocfield@plt>
mov    (%rbx),%edx
mov    %eax,%edi
mov    %r15,%rsi
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <gmvwrite_general_cell_type@plt>

LLVM IR (-O0):
define void @fgmvwrite_general_cell_type_(i8* %0, i32* %1, i32* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i8*
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = call i32 @fortchartocfield(i8* %9, i32 8)
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32, i32* %12
%14 = load i8*, i8** %8
%15 = call i32 @gmvwrite_general_cell_type(i32 %10, i32* %11, i32 %13, i8* %14)
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_general_cell_type_(i8* %0, i32* %1, i32* nocapture %2, i8* %3) {
%5 = tail call i32 @fortchartocfield(i8* %0, i32 8)
%6 = load i32, i32* %2
%7 = tail call i32 @gmvwrite_general_cell_type(i32 %5, i32* %1, i32 %6, i8* %3)
ret void
}
int addition(int m, int n) {
  if (n == 0) {
    return m;
  }
  if (n > 0) {
    return addition(m + 1, n - 1);
  }
  if (n < 0) {
    return addition(m - 1, n + 1);
  }
}


x86 assembly (clang, -O0):
<addition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1133 <addition+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <addition+0x64>
cmpl   $0x0,-0xc(%rbp)
jle    1156 <addition+0x46>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <addition@plt>
mov    %eax,-0x4(%rbp)
jmp    1174 <addition+0x64>
cmpl   $0x0,-0xc(%rbp)
jge    1174 <addition+0x64>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
call   1030 <addition@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addition>:
mov    %edi,%eax
test   %esi,%esi
je     112a <addition+0x2a>
cs nopw 0x0(%rax,%rax,1)
xor    %ecx,%ecx
xor    %edx,%edx
test   %esi,%esi
setle  %cl
setg   %dl
lea    (%rax,%rdx,2),%eax
add    $0xffffffff,%eax
lea    (%rsi,%rcx,2),%esi
add    $0xffffffff,%esi
jne    1110 <addition+0x10>
ret

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

LLVM IR (-O2):
define i32 @addition(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ %1, %2 ]
%6 = phi i32 [ %9, %4 ], [ %0, %2 ]
%7 = icmp sgt i32 %5, 0
%8 = select i1 %7, i32 1, i32 -1
%9 = add nsw i32 %6, %8
%10 = select i1 %7, i32 -1, i32 1
%11 = add nsw i32 %5, %10
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = phi i32 [ %0, %2 ], [ %9, %4 ]
ret i32 %14
}
/* Variables and functions */
const char *read_logo(void) {
  static char logo[] = {
      0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a,
      0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0xa0,
      0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab,
      0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xc0, 0xc1,
      0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc,
      0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0};
  return logo;
}


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

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

LLVM IR (-O0):
@read_logo.logo = internal global [64 x i8] c"\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F\90\91\92\93\94\A0\A1\A2\A3\A4\A5\A6\A7\A8\A9\AA\AB\AC\AD\AE\AF\B0\B1\B2\B3\B4\C0\C1\C2\C3\C4\C5\C6\C7\C8\C9\CA\CB\CC\CD\CE\CF\D0\D1\D2\D3\D4\00"
define i8* @read_logo() {
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @read_logo.logo, i64 0, i64 0)
}

LLVM IR (-O2):
@read_logo.logo = internal global [64 x i8] c"\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F\90\91\92\93\94\A0\A1\A2\A3\A4\A5\A6\A7\A8\A9\AA\AB\AC\AD\AE\AF\B0\B1\B2\B3\B4\C0\C1\C2\C3\C4\C5\C6\C7\C8\C9\CA\CB\CC\CD\CE\CF\D0\D1\D2\D3\D4\00"
define i8* @read_logo() {
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @read_logo.logo, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
void msg_term(void) { closelog(); }


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

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

LLVM IR (-O0):
define void @msg_term() {
%1 = call i32 (...) @closelog()
ret void
}

LLVM IR (-O2):
define void @msg_term() {
%1 = tail call i32 (...) @closelog()
ret void
}
int ddc_resume(struct device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @ddc_resume(%struct.device* nocapture readnone %0) {
ret i32 0
}
void apm_poweroff(void) {}


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

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

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

LLVM IR (-O2):
define void @apm_poweroff() {
ret void
}
void Prepare_DH_buffers() {}


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

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

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

LLVM IR (-O2):
define void @Prepare_DH_buffers() {
ret void
}
void __DELETE_java_lang_ThreadGroup_ChildrenGroupsLock(void *me,
                                                       void *client_data) {}


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

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

LLVM IR (-O0):
define void @__DELETE_java_lang_ThreadGroup_ChildrenGroupsLock(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 @__DELETE_java_lang_ThreadGroup_ChildrenGroupsLock(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ bla();
scalar_t__ foo();
void test1(void) {
  unsigned i;
  i = 0;
  while (1) {
    i++;
    if (i == 100)
      break;
    if (foo())
      bla();
    else
      bar();
  }
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jne    1157 <test1+0x27>
jmp    1180 <test1+0x50>
mov    $0x0,%al
call   1050 <foo@plt>
cmp    $0x0,%rax
je     1174 <test1+0x44>
mov    $0x0,%al
call   1040 <bla@plt>
jmp    117b <test1+0x4b>
mov    $0x0,%al
call   1030 <bar@plt>
jmp    113f <test1+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
push   %rbx
mov    $0x63,%ebx
jmp    114c <test1+0x1c>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <bar@plt>
add    $0xffffffff,%ebx
je     1164 <test1+0x34>
xor    %eax,%eax
call   1050 <foo@plt>
test   %rax,%rax
je     1140 <test1+0x10>
xor    %eax,%eax
call   1040 <bla@plt>
add    $0xffffffff,%ebx
jne    114c <test1+0x1c>
pop    %rbx
ret

LLVM IR (-O0):
define void @test1() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %15
%3 = load i32, i32* %1
%4 = add i32 %3, 1
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 100
br i1 %6, label %7, label %8
7: ; preds = %2
br label %16
8: ; preds = %2
%9 = call i64 (...) @foo()
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @bla()
br label %15
13: ; preds = %8
%14 = call i32 (...) @bar()
br label %15
15: ; preds = %13, %11
br label %2
16: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @test1() {
br label %1
1: ; preds = %0, %9
%2 = phi i32 [ 1, %0 ], [ %10, %9 ]
%3 = tail call i64 (...) @foo()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @bla()
br label %9
7: ; preds = %1
%8 = tail call i32 (...) @bar()
br label %9
9: ; preds = %7, %5
%10 = add nuw nsw i32 %2, 1
%11 = icmp eq i32 %10, 100
br i1 %11, label %12, label %1
12: ; preds = %9
ret void
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ completetm(struct tm *);
scalar_t__ readrtc(struct tm *);
int getrtctm(struct tm *tm) {
  if (readrtc(tm) < 0)
    return -1;
  completetm(tm);
  return 0;
}


x86 assembly (clang, -O0):
<getrtctm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <readrtc@plt>
cmp    $0x0,%rax
jge    114b <getrtctm+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <getrtctm+0x3b>
mov    -0x10(%rbp),%rdi
call   1030 <completetm@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getrtctm>:
push   %rbx
mov    %rdi,%rbx
call   1040 <readrtc@plt>
test   %rax,%rax
js     113a <getrtctm+0x1a>
mov    %rbx,%rdi
call   1030 <completetm@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @getrtctm(%struct.tm* %0) {
%2 = tail call i64 @readrtc(%struct.tm* %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @completetm(%struct.tm* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %7
}
void gdk_draw_lines() {}


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

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

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

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

/* Variables and functions */
int sigtimedwait(int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                 int /*<<< orphan*/ *);
int sigwaitinfo(const sigset_t *set, siginfo_t *info) {
  return sigtimedwait(set, info, NULL);
}


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

x86 assembly (clang, -O2):
<sigwaitinfo>:
xor    %edx,%edx
jmp    1030 <sigtimedwait@plt>

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

LLVM IR (-O2):
define i32 @sigwaitinfo(i32* %0, i32* %1) {
%3 = tail call i32 @sigtimedwait(i32* %0, i32* %1, i32* null)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void submit(char *s, size_t l) {
  putchar('{');
  while (l--)
    putchar(*s++);
  putchar('}');
}


x86 assembly (clang, -O0):
<submit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x7b,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     115f <submit+0x4f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    112a <submit+0x1a>
mov    $0x7d,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<submit>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    $0x7b,%edi
call   1030 <putchar@plt>
test   %r15,%r15
je     1143 <submit+0x33>
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <submit+0x20>
mov    $0x7d,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @submit(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @putchar(i8 signext 123)
%4 = icmp eq i64 %1, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %8, %5 ], [ %1, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = add i64 %6, -1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %7
%11 = tail call i32 @putchar(i8 signext %10)
%12 = icmp eq i64 %8, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = tail call i32 @putchar(i8 signext 125)
ret void
}
/* Variables and functions */
int NLMSG_ALIGN(int /*<<< orphan*/);
int /*<<< orphan*/ genlmsg_msg_size(int);
int genlmsg_total_size(int payload) {
  return NLMSG_ALIGN(genlmsg_msg_size(payload));
}


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

x86 assembly (clang, -O2):
<genlmsg_total_size>:
push   %rax
call   1040 <genlmsg_msg_size@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <NLMSG_ALIGN@plt>

LLVM IR (-O0):
define i32 @genlmsg_total_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @genlmsg_msg_size(i32 %3)
%5 = call i32 @NLMSG_ALIGN(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @genlmsg_total_size(i32 %0) {
%2 = tail call i32 @genlmsg_msg_size(i32 %0)
%3 = tail call i32 @NLMSG_ALIGN(i32 %2)
ret i32 %3
}
void xputs(const char *s, void (*xputc)(unsigned n, void *cookie),
           void *cookie) {
  while (*s) {
    xputc(*s++, cookie);
  }
}


x86 assembly (clang, -O0):
<xputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <xputs+0x42>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%edi
mov    -0x18(%rbp),%rsi
call   *%rax
jmp    1114 <xputs+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xputs>:
push   %r15
push   %r14
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1134 <xputs+0x34>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
add    $0x1,%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
mov    %r14,%rsi
call   *%r15
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <xputs+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @xputs(i8* nocapture %0, void (i32, i8*)* nocapture %1, i8* %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %11, %6 ], [ %4, %3 ]
%8 = phi i8* [ %9, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = sext i8 %7 to i32
tail call void %1(i32 %10, i8* %2)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int8_t rfid_read(uint8_t *id, int32_t bloc, uint8_t *data) {}


x86 assembly (clang, -O0):
<rfid_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rfid_read(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @rfid_read(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
ret i32 undef
}
const char *Vokaturi_versionAndLicense() {
  return "OpenVokaturi version 2.1 for open-source projects, 2017-01-13\n"
         "Distributed under the GNU General Public License, version 3 or later";
}


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

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

LLVM IR (-O0):
@.str = [131 x i8] c"OpenVokaturi version 2.1 for open-source projects, 2017-01-13\0ADistributed under the GNU General Public License, version 3 or later\00"
define i8* @Vokaturi_versionAndLicense() {
ret i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [131 x i8] c"OpenVokaturi version 2.1 for open-source projects, 2017-01-13\0ADistributed under the GNU General Public License, version 3 or later\00"
define i8* @Vokaturi_versionAndLicense() {
ret i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0)
}
void ttm_dma_page_alloc_fini(void) {}


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

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

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

LLVM IR (-O2):
define void @ttm_dma_page_alloc_fini() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_4814() {
  Assert_real((isqrt(4814) == 69),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              1370, ("Integer square root of 4814 should be 69"));
}


x86 assembly (clang, -O0):
<t_sqrt_4814>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12ce,%edi
call   1030 <isqrt@plt>
cmp    $0x45,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x55a,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_4814>:
push   %rax
mov    $0x12ce,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x45,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x55a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 4814 should be 69\00"
define void @t_sqrt_4814() {
%1 = call i32 @isqrt(i32 4814)
%2 = icmp eq i32 %1, 69
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1370, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 4814 should be 69\00"
define void @t_sqrt_4814() {
%1 = tail call i32 @isqrt(i32 4814)
%2 = icmp eq i32 %1, 69
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1370, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int __infer_nondet_int();
int vswprintf(wchar_t *s, size_t n, const wchar_t *format, va_list arg) {
  int res;
  res = __infer_nondet_int();
  if (res < 0)
    while (1)
      ;
  return res;
}


x86 assembly (clang, -O0):
<vswprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    1145 <vswprintf+0x35>
jmp    1140 <vswprintf+0x30>
jmp    1140 <vswprintf+0x30>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vswprintf>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %eax,%eax
js     1120 <vswprintf+0x10>
pop    %rcx
ret
xchg   %ax,%ax
jmp    1120 <vswprintf+0x10>

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

LLVM IR (-O2):
define i32 @vswprintf(i32* nocapture readnone %0, i64 %1, i32* nocapture readnone %2, i32 %3) {
%5 = tail call i32 (...) @__infer_nondet_int()
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4, %7
br label %7
8: ; preds = %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_REVOKEDINFO;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_REVOKEDINFO_it;
OCSP_REVOKEDINFO *OCSP_REVOKEDINFO_new(void) {
  return (OCSP_REVOKEDINFO *)ASN1_item_new(&OCSP_REVOKEDINFO_it);
}


x86 assembly (clang, -O0):
<OCSP_REVOKEDINFO_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OCSP_REVOKEDINFO_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@OCSP_REVOKEDINFO_it = global i32 0
define i32* @OCSP_REVOKEDINFO_new() {
%1 = call i64 @ASN1_item_new(i32* @OCSP_REVOKEDINFO_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@OCSP_REVOKEDINFO_it = global i32 0
define i32* @OCSP_REVOKEDINFO_new() {
%1 = tail call i64 @ASN1_item_new(i32* @OCSP_REVOKEDINFO_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
float ANTweenTimingFunctionExpoIn(float, int /*<<< orphan*/, int, float);
float ANTweenProgressTimingFunctionExpoIn(float time, float duration) {
  return ANTweenTimingFunctionExpoIn(time, 0, 1, duration);
}


x86 assembly (clang, -O0):
<ANTweenProgressTimingFunctionExpoIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <ANTweenTimingFunctionExpoIn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenProgressTimingFunctionExpoIn>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <ANTweenTimingFunctionExpoIn@plt>

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

LLVM IR (-O2):
define float @ANTweenProgressTimingFunctionExpoIn(float %0, float %1) {
%3 = tail call float @ANTweenTimingFunctionExpoIn(float %0, i32 0, i32 1, float %1)
ret float %3
}
int l3mdev_master_ifindex_by_index(struct net *net, int ifindex) { return 0; }


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

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

LLVM IR (-O0):
%struct.net = type opaque
define i32 @l3mdev_master_ifindex_by_index(%struct.net* %0, i32 %1) {
%3 = alloca %struct.net*
%4 = alloca i32
store %struct.net* %0, %struct.net** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.net = type opaque
define i32 @l3mdev_master_ifindex_by_index(%struct.net* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vasprintf(char **, char *, int /*<<< orphan*/);
int lha_arch_vasprintf(char **result, char *fmt, va_list args) {
  return vasprintf(result, fmt, args);
}


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

x86 assembly (clang, -O2):
<lha_arch_vasprintf>:
jmp    1030 <vasprintf@plt>

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

LLVM IR (-O2):
define i32 @lha_arch_vasprintf(i8** %0, i8* %1, i32 %2) {
%4 = tail call i32 @vasprintf(i8** %0, i8* %1, i32 %2)
ret i32 %4
}
void _infix_operator_div_i8_i8(signed char lhs, signed char rhs,
                               signed char *__rval_1) {
  *__rval_1 = lhs / rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_div_i8_i8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_infix_operator_div_i8_i8>:
mov    %rdx,%rcx
mov    %edi,%eax
cwtd
idiv   %si
mov    %al,(%rcx)
ret

LLVM IR (-O0):
define void @_infix_operator_div_i8_i8(i8 signext %0, i8 signext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = sdiv i32 %8, %10
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %6
store i8 %12, i8* %13
ret void
}

LLVM IR (-O2):
define void @_infix_operator_div_i8_i8(i8 signext %0, i8 signext %1, i8* nocapture writeonly %2) {
%4 = sext i8 %0 to i16
%5 = sext i8 %1 to i16
%6 = sdiv i16 %4, %5
%7 = trunc i16 %6 to i8
store i8 %7, i8* %2
ret void
}
/* Variables and functions */
int uwsgi_run();
int /*<<< orphan*/ uwsgi_start(void *);
int uwsgi_ns_start(void *v_argv) {
  uwsgi_start(v_argv);
  return uwsgi_run();
}


x86 assembly (clang, -O0):
<uwsgi_ns_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <uwsgi_start@plt>
mov    $0x0,%al
call   1040 <uwsgi_run@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @uwsgi_ns_start(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @uwsgi_start(i8* %3)
%5 = call i32 (...) @uwsgi_run()
ret i32 %5
}

LLVM IR (-O2):
define i32 @uwsgi_ns_start(i8* %0) {
%2 = tail call i32 @uwsgi_start(i8* %0)
%3 = tail call i32 (...) @uwsgi_run()
ret i32 %3
}
double pin(double value, double min, double max) {
  if (value < min)
    return min;
  else if (value > max)
    return max;
  else
    return value;
}


x86 assembly (clang, -O0):
<pin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <pin+0x36>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <pin+0x5f>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1155 <pin+0x55>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <pin+0x5f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pin>:
minsd  %xmm0,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm3
andnpd %xmm2,%xmm3
andpd  %xmm1,%xmm0
orpd   %xmm3,%xmm0
ret

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

LLVM IR (-O2):
define double @pin(double %0, double %1, double %2) {
%4 = fcmp olt double %0, %1
%5 = fcmp ogt double %0, %2
%6 = select i1 %5, double %2, double %0
%7 = select i1 %4, double %1, double %6
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double *, int);
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, int);
double __attribute__((no)) stress_funcret_double1(double a) {
  double b;
  (void)memcpy(&b, &a, sizeof(a));
  (void)memset(&a, 0, sizeof(a));
  return b;
}


x86 assembly (clang, -O0):
<stress_funcret_double1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_funcret_double1>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rsp,%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
movsd  (%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @stress_funcret_double1(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = call i32 @memcpy(double* %3, double* %2, i32 8)
%5 = call i32 @memset(double* %2, i32 0, i32 8)
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @stress_funcret_double1(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = bitcast double* %3 to i8*
%5 = call i32 @memcpy(double* %3, double* %2, i32 8)
%6 = call i32 @memset(double* %2, i32 0, i32 8)
%7 = load double, double* %3
ret double %7
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
time_t _time(time_t *t) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @_time(i32* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ ngen(char *, char *, int);
void cginc2pi(int v) { ngen("%s\t$%d,(%%rdx)", "addq", v); }


x86 assembly (clang, -O0):
<cginc2pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <ngen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cginc2pi>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xeef(%rip),%rsi
jmp    1030 <ngen@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s\09$%d,(%%rdx)\00"
@.str.1 = [5 x i8] c"addq\00"
define void @cginc2pi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ngen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s\09$%d,(%%rdx)\00"
@.str.1 = [5 x i8] c"addq\00"
define void @cginc2pi(i32 %0) {
%2 = tail call i32 @ngen(i8* getelementptr inbounds ([15 x i8], [15 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
}
int spacescount(char line[], int tabpos) {
  int nb;
  for (nb = 0; line[nb + tabpos] == ' '; ++nb)
    ;
  return nb;
}


x86 assembly (clang, -O0):
<spacescount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    113f <spacescount+0x3f>
jmp    1131 <spacescount+0x31>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <spacescount+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spacescount>:
movslq %esi,%rcx
add    %rdi,%rcx
mov    $0xffffffff,%eax
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0x20,(%rcx)
lea    0x1(%rcx),%rcx
je     1110 <spacescount+0x10>
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ *stdout;
FILE *open_output_file(int std, char *filename) {
  if (std)
    return stdout;
  else if (filename[0] != '\0')
    return fopen(filename, "w");
  else
    return NULL;
}


x86 assembly (clang, -O0):
<open_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113c <open_output_file+0x2c>
mov    0x2eb0(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    116d <open_output_file+0x5d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1165 <open_output_file+0x55>
mov    -0x18(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x8(%rbp)
jmp    116d <open_output_file+0x5d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_output_file>:
test   %edi,%edi
je     111f <open_output_file+0xf>
mov    0x2ec5(%rip),%rax
mov    (%rax),%rax
ret
cmpb   $0x0,(%rsi)
je     1136 <open_output_file+0x26>
lea    0xed5(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <fopen@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
@stdout = global i32* null
@.str = [2 x i8] c"w\00"
define i32* @open_output_file(i32 %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32*, i32** @stdout
store i32* %9, i32** %3
br label %20
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %10
%17 = load i8*, i8** %5
%18 = call i32* @fopen(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %18, i32** %3
br label %20
19: ; preds = %10
store i32* null, i32** %3
br label %20
20: ; preds = %19, %16, %8
%21 = load i32*, i32** %3
ret i32* %21
}

LLVM IR (-O2):
@stdout = global i32* null
@.str = [2 x i8] c"w\00"
define i32* @open_output_file(i32 %0, i8* nocapture %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = load i32*, i32** @stdout
br label %11
6: ; preds = %2
%7 = load i8, i8* %1
%8 = icmp eq i8 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %6, %9, %4
%12 = phi i32* [ %5, %4 ], [ %10, %9 ], [ null, %6 ]
ret i32* %12
}
int main(int argc, char *argv[]) {
  unsigned long a = 1;
  while (1) {
    a = a + a + 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    %rax,-0x18(%rbp)
jmp    111a <main+0x1a>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 1, i64* %6
br label %7
7: ; preds = %2, %7
%8 = load i64, i64* %6
%9 = load i64, i64* %6
%10 = add i64 %8, %9
%11 = add i64 %10, 1
store i64 %11, i64* %6
br label %7
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int Command_IsExit(char *command) { return strcmp(command, "exit") == 0; }


x86 assembly (clang, -O0):
<Command_IsExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Command_IsExit>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"exit\00"
define i32 @Command_IsExit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [5 x i8] c"exit\00"
define i32 @Command_IsExit(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ folder(int, int);
int main(void) {
  int tabwidth = 4;
  int linewidth = 80;
  folder(tabwidth, linewidth);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x50,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <folder@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x50,%esi
call   1030 <folder@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 4, i32* %2
store i32 80, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @folder(i32 %4, i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @folder(i32 4, i32 80)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GetDateTime(unsigned long *);
int /*<<< orphan*/ Randomize(unsigned long);
void RandomizeByTime() {
  unsigned long time;
  GetDateTime(&time);
  Randomize(time);
}


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

x86 assembly (clang, -O2):
<RandomizeByTime>:
push   %rax
mov    %rsp,%rdi
call   1040 <GetDateTime@plt>
mov    (%rsp),%rdi
call   1030 <Randomize@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @RandomizeByTime() {
%1 = alloca i64
%2 = call i32 @GetDateTime(i64* %1)
%3 = load i64, i64* %1
%4 = call i32 @Randomize(i64 %3)
ret void
}

LLVM IR (-O2):
define void @RandomizeByTime() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @GetDateTime(i64* %1)
%4 = load i64, i64* %1
%5 = call i32 @Randomize(i64 %4)
ret void
}
void sh_mobile_setup_cpuidle(void) {}


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

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

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

LLVM IR (-O2):
define void @sh_mobile_setup_cpuidle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C_WriteByte(int, unsigned char, unsigned char *);
void AT24C02_WriteByte(unsigned char regAddr, unsigned char byte) {
  I2C_WriteByte(0x50, regAddr, &byte);
}


x86 assembly (clang, -O0):
<AT24C02_WriteByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x50,%edi
lea    -0x2(%rbp),%rdx
movzbl -0x1(%rbp),%esi
call   1030 <I2C_WriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AT24C02_WriteByte>:
push   %rax
mov    %edi,%eax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rdx
mov    $0x50,%edi
mov    %eax,%esi
call   1030 <I2C_WriteByte@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @AT24C02_WriteByte(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = call i32 @I2C_WriteByte(i32 80, i8 zeroext %5, i8* %4)
ret void
}

LLVM IR (-O2):
define void @AT24C02_WriteByte(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @I2C_WriteByte(i32 80, i8 zeroext %0, i8* %3)
ret void
}
/* Variables and functions */
int close(int);
int stream_close_fd(void *cookie) {
  int fd, ret;
  fd = *(int *)cookie;
  ret = close(fd);
  return (ret);
}


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

x86 assembly (clang, -O2):
<stream_close_fd>:
mov    (%rdi),%edi
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @stream_close_fd(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @close(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usermode_des(int argc, char **argv) { printf("des \n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"des \00"
define void @usermode_des(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}