xunge/DecIR huggingface dataset:
int dcmplt(double a, double b) { return a < b; }


x86 assembly (clang, -O0):
<dcmplt>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcmplt>:
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @dcmplt(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @dcmplt(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int cos(double);
double sec(double n) {
  if (cos(n) == 0) {
    return 0. / 0.;
  }
  return 1 / cos(n);
}


x86 assembly (clang, -O0):
<sec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <cos@plt>
cmp    $0x0,%eax
jne    1142 <sec+0x32>
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <sec+0x4f>
movsd  -0x10(%rbp),%xmm0
call   1030 <cos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sec>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <cos@plt>
test   %eax,%eax
je     113d <sec+0x2d>
movsd  (%rsp),%xmm0
call   1030 <cos@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovb  %eax,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret
movsd  0xebb(%rip),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @sec(double %0) {
%2 = tail call i32 @cos(double %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = tail call i32 @cos(double %0)
%6 = add i32 %5, 1
%7 = icmp ult i32 %6, 3
%8 = select i1 %7, i32 %5, i32 0
%9 = sitofp i32 %8 to double
br label %10
10: ; preds = %1, %4
%11 = phi double [ %9, %4 ], [ 0x7FF8000000000000, %1 ]
ret double %11
}
int calculate_line(void *data, int size) {
  int line = 0;
  char *str, *ptr;
  for (str = (char *)data, ptr = (char *)data + size; str < ptr; str++)
    if (*ptr == '\n')
      ++line;
  return (line);
}


x86 assembly (clang, -O0):
<calculate_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1166 <calculate_line+0x66>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1150 <calculate_line+0x50>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <calculate_line+0x55>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1129 <calculate_line+0x29>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_line>:
test   %esi,%esi
jle    1122 <calculate_line+0x22>
movslq %esi,%rcx
lea    (%rdi,%rcx,1),%rax
lea    0x1(%rdi),%rdx
cmp    %rdx,%rax
cmova  %rax,%rdx
sub    %edi,%edx
xor    %eax,%eax
cmpb   $0xa,(%rdi,%rcx,1)
cmove  %edx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @calculate_line(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = sext i32 %1 to i64
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %17
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %0, i64 %4
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 10
%10 = add i64 %3, %4
%11 = add i64 %3, 1
%12 = call i64 @llvm.umax.i64(i64 %10, i64 %11)
%13 = trunc i64 %12 to i32
%14 = trunc i64 %3 to i32
%15 = sub i32 %13, %14
%16 = select i1 %9, i32 %15, i32 0
br label %17
17: ; preds = %6, %2
%18 = phi i32 [ 0, %2 ], [ %16, %6 ]
ret i32 %18
}
/* Variables and functions */
size_t xsum(size_t, size_t);
size_t __attribute__((__pure__))
xsum3(size_t size1, size_t size2, size_t size3) {
  return xsum(xsum(size1, size2), size3);
}


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

x86 assembly (clang, -O2):
<xsum3>:
push   %rbx
mov    %rdx,%rbx
call   1030 <xsum@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <xsum@plt>

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

LLVM IR (-O2):
define i64 @xsum3(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 @xsum(i64 %0, i64 %1)
%5 = tail call i64 @xsum(i64 %4, i64 %2)
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ bswap_32(int /*<<< orphan*/);
uint32_t ntohl(uint32_t n) {
  union {
    int i;
    char c;
  } u = {1};
  return u.c ? bswap_32(n) : n;
}


x86 assembly (clang, -O0):
<ntohl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x8(%rbp)
movsbl -0x8(%rbp),%eax
cmp    $0x0,%eax
je     1141 <ntohl+0x31>
mov    -0x4(%rbp),%edi
call   1030 <bswap_32@plt>
mov    %eax,-0xc(%rbp)
jmp    1147 <ntohl+0x37>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntohl>:
jmp    1030 <bswap_32@plt>

LLVM IR (-O0):
%union.anon = type { i32 }
@__const.ntohl.u = %union.anon { i32 1 }
define i32 @ntohl(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = bitcast %union.anon* %3 to i8*
%5 = bitcast %union.anon* %3 to i8*
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 @bswap_32(i32 %10)
br label %14
12: ; preds = %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %12, %9
%15 = phi i32 [ %11, %9 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @ntohl(i32 %0) {
%2 = tail call i32 @bswap_32(i32 %0)
ret i32 %2
}
void EVP_CIPHER_CTX_clear_flags(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CIPHER_CTX_clear_flags() {
ret void
}
int os_setbinmode(fd, mode)
int fd, mode;
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @os_setbinmode(i32 %0, i32 %1) {
ret i32 0
}
struct event *event_new(struct event_base *base, int sock, short what,
                        void (*cb)(int, short, void *), void *arg) {
  return 0;
}


x86 assembly (clang, -O0):
<event_new>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.event = type opaque
%struct.event_base = type opaque
define %struct.event* @event_new(%struct.event_base* %0, i32 %1, i16 signext %2, void (i32, i16, i8*)* %3, i8* %4) {
%6 = alloca %struct.event_base*
%7 = alloca i32
%8 = alloca i16
%9 = alloca void (i32, i16, i8*)*
%10 = alloca i8*
store %struct.event_base* %0, %struct.event_base** %6
store i32 %1, i32* %7
store i16 %2, i16* %8
store void (i32, i16, i8*)* %3, void (i32, i16, i8*)** %9
store i8* %4, i8** %10
ret %struct.event* null
}

LLVM IR (-O2):
%struct.event = type opaque
%struct.event_base = type opaque
define noalias %struct.event* @event_new(%struct.event_base* nocapture readnone %0, i32 %1, i16 signext %2, void (i32, i16, i8*)* nocapture readnone %3, i8* nocapture readnone %4) {
ret %struct.event* null
}
/* Variables and functions */
char req_swa_char(char *, char const *, char const *, char const *);
char switch_toggle(const char *hostname, const char *session_id,
                   const char *ain) {
  return req_swa_char("setswitchtoggle", hostname, session_id, ain);
}


x86 assembly (clang, -O0):
<switch_toggle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rdi
call   1030 <req_swa_char@plt>
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch_toggle>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
jmp    1030 <req_swa_char@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"setswitchtoggle\00"
define signext i8 @switch_toggle(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call signext i8 @req_swa_char(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %9)
ret i8 %10
}

LLVM IR (-O2):
@.str = [16 x i8] c"setswitchtoggle\00"
define signext i8 @switch_toggle(i8* %0, i8* %1, i8* %2) {
%4 = tail call signext i8 @req_swa_char(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
ret i8 %4
}
/* Variables and functions */
scalar_t__ getline_(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
int main() {
  char line[1000];
  while (getline_(line, 1000) > 0) {
    reverse(line);
    printf("%s\n", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getline_@plt>
cmp    $0x0,%rax
jle    1181 <main+0x51>
lea    -0x3f0(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getline_@plt>
test   %rax,%rax
jle    1185 <main+0x55>
mov    %rsp,%rbx
lea    0xeaa(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getline_@plt>
test   %rax,%rax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i64 @getline_(i8* %4, i32 1000)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%9 = call i32 @reverse(i8* %8)
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i64 @getline_(i8* %2, i32 1000)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = call i32 @reverse(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i64 @getline_(i8* %2, i32 1000)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double const *, int);
void glmCopyMatrix2d(const double source[4], double target[4]) {
  memcpy(target, source, 4 * sizeof(double));
}


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

x86 assembly (clang, -O2):
<glmCopyMatrix2d>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x20,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @glmCopyMatrix2d(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = load double*, double** %3
%7 = call i32 @memcpy(double* %5, double* %6, i32 32)
ret void
}

LLVM IR (-O2):
define void @glmCopyMatrix2d(double* %0, double* %1) {
%3 = tail call i32 @memcpy(double* %1, double* %0, i32 32)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t set_byte(uint32_t word, uint8_t byte, int loc) {
  uint32_t mask = 0xFF000000;
  mask >>= (loc * 8);
  mask = ~mask;
  word = word & mask;
  return word | (byte << (24 - (loc * 8)));
}


x86 assembly (clang, -O0):
<set_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0xff000000,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
shl    $0x3,%ecx
mov    -0x10(%rbp),%eax
sar    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%esi
shl    $0x3,%esi
mov    $0x18,%ecx
sub    %esi,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_byte>:
mov    %edx,%ecx
shl    $0x3,%ecx
mov    $0xffffff,%eax
shr    %cl,%eax
and    %edi,%eax
mov    $0x18,%dl
sub    %cl,%dl
mov    %edx,%ecx
shl    %cl,%esi
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @set_byte(i32 %0, i32 %1, i32 %2) {
%4 = shl nsw i32 %2, 3
%5 = lshr i32 16777215, %4
%6 = and i32 %5, %0
%7 = sub nsw i32 24, %4
%8 = shl i32 %1, %7
%9 = or i32 %6, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ far_cf_read();
void testBug(void) { far_cf_read(); }


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

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

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

LLVM IR (-O2):
define void @testBug() {
%1 = tail call i32 (...) @far_cf_read()
ret void
}
/* Type definitions */
struct VectorNumBase {
  int dummy;
};

/* Variables and functions */
double const *KeywordExtractorNum(struct VectorNumBase *);
const double *keyword_num(struct VectorNumBase *basev) {
  return KeywordExtractorNum(basev);
}


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

x86 assembly (clang, -O2):
<keyword_num>:
jmp    1030 <KeywordExtractorNum@plt>

LLVM IR (-O0):
%struct.VectorNumBase = type { i32 }
define double* @keyword_num(%struct.VectorNumBase* %0) {
%2 = alloca %struct.VectorNumBase*
store %struct.VectorNumBase* %0, %struct.VectorNumBase** %2
%3 = load %struct.VectorNumBase*, %struct.VectorNumBase** %2
%4 = call double* @KeywordExtractorNum(%struct.VectorNumBase* %3)
ret double* %4
}

LLVM IR (-O2):
%struct.VectorNumBase = type { i32 }
define double* @keyword_num(%struct.VectorNumBase* %0) {
%2 = tail call double* @KeywordExtractorNum(%struct.VectorNumBase* %0)
ret double* %2
}
/* Variables and functions */
int EXIT_FAILURE;
scalar_t__ EXIT_SUCCESS;
scalar_t__ ft_putchar_fd(char, int);
int ft_putmemchar_fd(void *, size_t, int);
int ft_putmemcharl_fd(void *ptr, size_t n, int fd) {
  int ret;
  ret = ft_putmemchar_fd(ptr, n, fd);
  ret = ft_putchar_fd('\n', fd) == EXIT_SUCCESS ? ret : EXIT_FAILURE;
  return (ret);
}


x86 assembly (clang, -O0):
<ft_putmemcharl_fd>:
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 <ft_putmemchar_fd@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    $0xa,%edi
call   1040 <ft_putchar_fd@plt>
mov    0x2e7e(%rip),%rcx
cmp    (%rcx),%rax
jne    116e <ft_putmemcharl_fd+0x4e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    117a <ft_putmemcharl_fd+0x5a>
mov    0x2e6b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putmemcharl_fd>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
call   1030 <ft_putmemchar_fd@plt>
mov    %eax,%ebx
mov    $0xa,%edi
mov    %ebp,%esi
call   1040 <ft_putchar_fd@plt>
mov    0x2e99(%rip),%rcx
cmp    (%rcx),%rax
je     114d <ft_putmemcharl_fd+0x2d>
mov    0x2e95(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putmemcharl_fd(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = load i32, i32* %6
%11 = call i32 @ft_putmemchar_fd(i8* %8, i64 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = call i64 @ft_putchar_fd(i8 signext 10, i32 %12)
%14 = load i64, i64* @EXIT_SUCCESS
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = load i32, i32* %7
br label %20
18: ; preds = %3
%19 = load i32, i32* @EXIT_FAILURE
br label %20
20: ; preds = %18, %16
%21 = phi i32 [ %17, %16 ], [ %19, %18 ]
store i32 %21, i32* %7
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putmemcharl_fd(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @ft_putmemchar_fd(i8* %0, i64 %1, i32 %2)
%5 = tail call i64 @ft_putchar_fd(i8 signext 10, i32 %2)
%6 = load i64, i64* @EXIT_SUCCESS
%7 = icmp eq i64 %5, %6
%8 = load i32, i32* @EXIT_FAILURE
%9 = select i1 %7, i32 %4, i32 %8
ret i32 %9
}
void mesh_graph_dev_cleanup(struct mesh *m) {}


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

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

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

LLVM IR (-O2):
%struct.mesh = type opaque
define void @mesh_graph_dev_cleanup(%struct.mesh* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f0(int);
int main(int argc, char **argv) {
  f0(argc);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @f0(i32 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("MOCKNAME:MOCKREVNO\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"MOCKNAME:MOCKREVNO\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ brainfuck_main();
int main(int argc, char **argv) {
  brainfuck_main();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @brainfuck_main()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, int);
int foo(int a) {
  if (a++ > 0)
    bar(a, 3);
  foo(7);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    114c <foo+0x2c>
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
call   1030 <bar@plt>
mov    $0x7,%edi
call   1040 <foo@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
mov    $0x7,%ebx
test   %edi,%edi
jle    1120 <foo+0x10>
add    $0x1,%edi
mov    $0x3,%esi
call   1030 <bar@plt>
jmp    1120 <foo+0x10>

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i32 [ %0, %1 ], [ 7, %8 ]
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = add nuw nsw i32 %3, 1
%7 = tail call i32 @bar(i32 %6, i32 3)
br label %8
8: ; preds = %5, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int i = 2;
  while (i <= i * i) {
    if (i % 2 == 0)
      printf("%d,", i);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1169 <main+0x59>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115b <main+0x4b>
mov    -0x8(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
jmp    113c <main+0x2c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x2,%ebx
imul   %ebx,%ebx
cmp    %ebx,%ebp
mov    %ebp,%ebx
jae    1151 <main+0x41>
lea    0x1(%rbx),%ebp
test   $0x1,%bpl
jne    1130 <main+0x20>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d,\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
br label %3
3: ; preds = %16, %0
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = mul nsw i32 %5, %6
%8 = icmp sle i32 %4, %7
br i1 %8, label %9, label %19
9: ; preds = %3
%10 = load i32, i32* %2
%11 = srem i32 %10, 2
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %13, %9
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %3
19: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d,\00"
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 2, %0 ], [ %8, %7 ]
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %7
7: ; preds = %5, %1
%8 = add nuw nsw i32 %2, 1
%9 = mul nsw i32 %8, %8
%10 = icmp ult i32 %2, %9
br i1 %10, label %1, label %11
11: ; preds = %7
ret i32 0
}
void gtk_tree_view_column_set_reorderable() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_set_reorderable() {
ret void
}
int abs(int n) {
  if (n < 0)
    return (-n);
  return n;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <abs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @abs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %11
9: ; preds = %1
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
void HPLUSART0M$HPLI2CInterrupt$fired(void) {
  HPLUSART0M$HPLI2CInterrupt$default$fired();
}


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

x86 assembly (clang, -O2):
<HPLUSART0M$HPLI2CInterrupt$fired>:
xor    %eax,%eax
jmp    1030 <HPLUSART0M$HPLI2CInterrupt$default$fired@plt>

LLVM IR (-O0):
define void @"HPLUSART0M$HPLI2CInterrupt$fired"() {
%1 = call i32 (...) @"HPLUSART0M$HPLI2CInterrupt$default$fired"()
ret void
}

LLVM IR (-O2):
define void @"HPLUSART0M$HPLI2CInterrupt$fired"() {
%1 = tail call i32 (...) @"HPLUSART0M$HPLI2CInterrupt$default$fired"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itoa_impl(int, char *, int);
scalar_t__ log10(int);
void itoa(int number, char str[]) {
  itoa_impl(number, str, (int)log10(number > 0 ? number : -number));
}


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1152 <itoa+0x32>
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    115a <itoa+0x3a>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edi
call   1040 <log10@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <itoa_impl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
neg    %edi
cmovs  %ebp,%edi
call   1040 <log10@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <itoa_impl@plt>

LLVM IR (-O0):
define void @itoa(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 = load i32, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %3
br label %14
11: ; preds = %2
%12 = load i32, i32* %3
%13 = sub nsw i32 0, %12
br label %14
14: ; preds = %11, %9
%15 = phi i32 [ %10, %9 ], [ %13, %11 ]
%16 = call i64 @log10(i32 %15)
%17 = trunc i64 %16 to i32
%18 = call i32 @itoa_impl(i32 %5, i8* %6, i32 %17)
ret void
}

LLVM IR (-O2):
define void @itoa(i32 %0, i8* %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = tail call i64 @log10(i32 %3)
%5 = trunc i64 %4 to i32
%6 = tail call i32 @itoa_impl(i32 %0, i8* %1, i32 %5)
ret void
}
/* Type definitions */
struct gs_cb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ store_gs_cb(struct gs_cb *);
void save_gs_cb(struct gs_cb *gs_cb) {
  if (gs_cb)
    store_gs_cb(gs_cb);
}


x86 assembly (clang, -O0):
<save_gs_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <save_gs_cb+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <store_gs_cb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_gs_cb>:
test   %rdi,%rdi
je     111a <save_gs_cb+0xa>
jmp    1030 <store_gs_cb@plt>
ret

LLVM IR (-O0):
%struct.gs_cb = type { i32 }
define void @save_gs_cb(%struct.gs_cb* %0) {
%2 = alloca %struct.gs_cb*
store %struct.gs_cb* %0, %struct.gs_cb** %2
%3 = load %struct.gs_cb*, %struct.gs_cb** %2
%4 = icmp ne %struct.gs_cb* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.gs_cb*, %struct.gs_cb** %2
%7 = call i32 @store_gs_cb(%struct.gs_cb* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.gs_cb = type { i32 }
define void @save_gs_cb(%struct.gs_cb* %0) {
%2 = icmp eq %struct.gs_cb* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @store_gs_cb(%struct.gs_cb* %0)
br label %5
5: ; preds = %3, %1
ret void
}
int toe_enslave(struct net_device *bond_dev, struct net_device *slave_dev) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.net_device = type opaque
define i32 @toe_enslave(%struct.net_device* nocapture readnone %0, %struct.net_device* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: twrite aname infile outfile\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"Usage: twrite aname infile outfile\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"Usage: twrite aname infile outfile\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void pollen_interfaces_Gpio_set__E() {}


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

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

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

LLVM IR (-O2):
define void @pollen_interfaces_Gpio_set__E() {
ret void
}
void proc_call_6(int p0, int p1, int p2, int p3, int p4, int p5) {}


x86 assembly (clang, -O0):
<proc_call_6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @proc_call_6(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
ret void
}

LLVM IR (-O2):
define void @proc_call_6(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
ret void
}
unsigned long fliplong(unsigned long v) {
  unsigned long rv;
  char buf[4], t;
  int iter;
  rv = 1;
  memcpy(&buf, &rv, 1);
  if (buf[0])
    return v;
  memcpy(&buf, &v, 4);
  for (iter = 0; iter < 2; ++iter) {
    t = buf[iter];
    buf[iter] = buf[3 - iter];
    buf[3 - iter] = t;
  }
  memcpy(&rv, &buf, 4);
  return rv;
}


x86 assembly (clang, -O0):
<fliplong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%al
mov    %al,-0x1c(%rbp)
cmpb   $0x0,-0x1c(%rbp)
je     112d <fliplong+0x2d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1192 <fliplong+0x92>
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x2,-0x24(%rbp)
jge    1184 <fliplong+0x84>
movslq -0x24(%rbp),%rax
mov    -0x1c(%rbp,%rax,1),%al
mov    %al,-0x1d(%rbp)
mov    $0x3,%eax
sub    -0x24(%rbp),%eax
cltq
mov    -0x1c(%rbp,%rax,1),%cl
movslq -0x24(%rbp),%rax
mov    %cl,-0x1c(%rbp,%rax,1)
mov    -0x1d(%rbp),%cl
mov    $0x3,%eax
sub    -0x24(%rbp),%eax
cltq
mov    %cl,-0x1c(%rbp,%rax,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    113a <fliplong+0x3a>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fliplong>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @fliplong(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca [4 x i8]
%6 = alloca i8
%7 = alloca i32
store i64 %0, i64* %3
store i64 1, i64* %4
%8 = bitcast [4 x i8]* %5 to i8*
%9 = bitcast i64* %4 to i8*
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = load i64, i64* %3
store i64 %14, i64* %2
br label %46
15: ; preds = %1
%16 = bitcast [4 x i8]* %5 to i8*
%17 = bitcast i64* %3 to i8*
store i32 0, i32* %7
br label %18
18: ; preds = %39, %15
%19 = load i32, i32* %7
%20 = icmp slt i32 %19, 2
br i1 %20, label %21, label %42
21: ; preds = %18
%22 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 %23
%25 = load i8, i8* %24
store i8 %25, i8* %6
%26 = load i32, i32* %7
%27 = sub nsw i32 3, %26
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = load i32, i32* %7
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 %32
store i8 %30, i8* %33
%34 = load i8, i8* %6
%35 = load i32, i32* %7
%36 = sub nsw i32 3, %35
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 %37
store i8 %34, i8* %38
br label %39
39: ; preds = %21
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %18
42: ; preds = %18
%43 = bitcast i64* %4 to i8*
%44 = bitcast [4 x i8]* %5 to i8*
%45 = load i64, i64* %4
store i64 %45, i64* %2
br label %46
46: ; preds = %42, %13
%47 = load i64, i64* %2
ret i64 %47
}

LLVM IR (-O2):
define i64 @fliplong(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int writemend();
int writemsg(int);
int writemnull(int msg) {
  int x;
  x = writemsg(msg);
  if (x == (1))
    x = writemend();
  return (x);
}


x86 assembly (clang, -O0):
<writemnull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <writemsg@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    114a <writemnull+0x2a>
mov    $0x0,%al
call   1030 <writemend@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writemnull>:
push   %rax
call   1040 <writemsg@plt>
cmp    $0x1,%eax
jne    1133 <writemnull+0x13>
xor    %eax,%eax
pop    %rcx
jmp    1030 <writemend@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @writemnull(i32 %0) {
%2 = tail call i32 @writemsg(i32 %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @writemend()
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ %5, %4 ], [ %2, %1 ]
ret i32 %7
}
void free_3dim_contig(void ***a) {
  free(a[0][0]);
  free(a[0]);
  free(a);
  return;
}


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

x86 assembly (clang, -O2):
<free_3dim_contig>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_3dim_contig(i8*** %0) {
%2 = alloca i8***
store i8*** %0, i8**** %2
%3 = load i8***, i8**** %2
%4 = getelementptr inbounds i8**, i8*** %3, i64 0
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = load i8***, i8**** %2
%9 = getelementptr inbounds i8**, i8*** %8, i64 0
%10 = load i8**, i8*** %9
%11 = bitcast i8** %10 to i8*
%12 = load i8***, i8**** %2
%13 = bitcast i8*** %12 to i8*
ret void
}

LLVM IR (-O2):
define void @free_3dim_contig(i8*** nocapture %0) {
%2 = load i8**, i8*** %0
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast i8*** %0 to i8**
%5 = load i8*, i8** %4
tail call void @free(i8* %5)
%6 = bitcast i8*** %0 to i8*
tail call void @free(i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Value of (1 > 0) && (10 < 12): %d\n", ((1 > 0) && (10 < 12)));
  printf("Value of (1 > 0) || (10 > 12): %d\n", ((1 > 0) || (10 > 12)));
  printf("Value of !((1 > 0) && (10 < 12)): %d\n", !(((1 > 0) && (10 < 12))));
  printf("Value of !((1 > 0) || (10 > 12)): %d\n", !(((1 > 0) || (10 > 12))));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"Value of (1 > 0) && (10 < 12): %d\0A\00"
@.str.1 = [35 x i8] c"Value of (1 > 0) || (10 > 12): %d\0A\00"
@.str.2 = [38 x i8] c"Value of !((1 > 0) && (10 < 12)): %d\0A\00"
@.str.3 = [38 x i8] c"Value of !((1 > 0) || (10 > 12)): %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"Value of (1 > 0) && (10 < 12): %d\0A\00"
@.str.1 = [35 x i8] c"Value of (1 > 0) || (10 > 12): %d\0A\00"
@.str.2 = [38 x i8] c"Value of !((1 > 0) && (10 < 12)): %d\0A\00"
@.str.3 = [38 x i8] c"Value of !((1 > 0) || (10 > 12)): %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int initRessources(int *array, int arrayLength) {
  if (array == NULL || arrayLength <= 0) {
    return 0;
  }
  int i;
  for (i = 0; i < arrayLength; i++) {
    array[i] = -1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<initRessources>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1120 <initRessources+0x20>
cmpl   $0x0,-0x14(%rbp)
jg     112c <initRessources+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1163 <initRessources+0x63>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115c <initRessources+0x5c>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1133 <initRessources+0x33>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<initRessources>:
xor    %eax,%eax
test   %rdi,%rdi
je     1135 <initRessources+0x25>
test   %esi,%esi
jle    1135 <initRessources+0x25>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
mov    $0xff,%esi
call   1030 <memset@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @initRessources(i32* writeonly %0, i32 %1) {
%3 = icmp eq i32* %0, null
%4 = icmp slt i32 %1, 1
%5 = or i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = bitcast i32* %0 to i8*
%8 = zext i32 %1 to i64
%9 = shl nuw nsw i64 %8, 2
br label %10
10: ; preds = %6, %2
%11 = phi i32 [ 0, %2 ], [ 1, %6 ]
ret i32 %11
}
void ktsan_init(void) {}


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

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

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

LLVM IR (-O2):
define void @ktsan_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int /*<<< orphan*/);
void io_wait() { outb(0x80, 0); }


x86 assembly (clang, -O0):
<io_wait>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%edi
xor    %esi,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_wait>:
mov    $0x80,%edi
xor    %esi,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @io_wait() {
%1 = call i32 @outb(i32 128, i32 0)
ret void
}

LLVM IR (-O2):
define void @io_wait() {
%1 = tail call i32 @outb(i32 128, i32 0)
ret void
}
int retval(void) { return 43; }


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

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

LLVM IR (-O0):
define i32 @retval() {
ret i32 43
}

LLVM IR (-O2):
define i32 @retval() {
ret i32 43
}