xunge/DecIR huggingface dataset:
/* Variables and functions */
#define EACCES 129
#define ENODEV 128
char const *strerror(int);
const char *sense_strerror(int err) {
  switch (err) {
  case EACCES:
    return "Cannot memory map framebuffer device, make sure you have "
           "permission for the device (usually /dev/fb1)";
  case ENODEV:
    return "Can't find Sense HAT framebuffer";
  default:
    return strerror(err);
  }
}


x86 assembly (clang, -O0):
<sense_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x80,%eax
je     1154 <sense_strerror+0x44>
jmp    1131 <sense_strerror+0x21>
mov    -0x10(%rbp),%eax
sub    $0x81,%eax
jne    1164 <sense_strerror+0x54>
jmp    1144 <sense_strerror+0x34>
lea    0xeb5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1170 <sense_strerror+0x60>
lea    0xf0b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1170 <sense_strerror+0x60>
mov    -0xc(%rbp),%edi
call   1030 <strerror@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sense_strerror>:
cmp    $0x81,%edi
je     1128 <sense_strerror+0x18>
cmp    $0x80,%edi
jne    1130 <sense_strerror+0x20>
lea    0xf3f(%rip),%rax
ret
lea    0xed1(%rip),%rax
ret
jmp    1030 <strerror@plt>

LLVM IR (-O0):
@.str = [102 x i8] c"Cannot memory map framebuffer device, make sure you have permission for the device (usually /dev/fb1)\00"
@.str.1 = [33 x i8] c"Can't find Sense HAT framebuffer\00"
define i8* @sense_strerror(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 129, label %5
i32 128, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
6: ; preds = %1
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i8* @strerror(i32 %8)
store i8* %9, i8** %2
br label %10
10: ; preds = %7, %6, %5
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [102 x i8] c"Cannot memory map framebuffer device, make sure you have permission for the device (usually /dev/fb1)\00"
@.str.1 = [33 x i8] c"Can't find Sense HAT framebuffer\00"
define i8* @sense_strerror(i32 %0) {
switch i32 %0, label %3 [
i32 129, label %5
i32 128, label %2
]
2: ; preds = %1
br label %5
3: ; preds = %1
%4 = tail call i8* @strerror(i32 %0)
br label %5
5: ; preds = %1, %3, %2
%6 = phi i8* [ %4, %3 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %6
}
/* Variables and functions */
int listen(int, int);
int g_sck_listen(int sck) { return listen(sck, 2); }


x86 assembly (clang, -O0):
<g_sck_listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <listen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_sck_listen>:
mov    $0x2,%esi
jmp    1030 <listen@plt>

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

LLVM IR (-O2):
define i32 @g_sck_listen(i32 %0) {
%2 = tail call i32 @listen(i32 %0, i32 2)
ret i32 %2
}
unsigned int csum_fold(unsigned int sum) {
  __asm__("addl %1, %0		;\n"
          "adcl $0xffff, %0	;\n"
          : "=r"(sum)
          : "r"(sum << 16), "0"(sum & 0xffff0000));
  return (~sum) >> 16;
}


x86 assembly (clang, -O0):
<csum_fold>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x10,%ecx
mov    -0x4(%rbp),%eax
and    $0xffff0000,%eax
add    %ecx,%eax
adc    $0xffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
shr    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum_fold>:
mov    %edi,%eax
mov    %edi,%ecx
shl    $0x10,%ecx
and    $0xffff0000,%eax
add    %ecx,%eax
adc    $0xffff,%eax
not    %eax
shr    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @csum_fold(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 16
%5 = load i32, i32* %2
%6 = and i32 %5, -65536
%7 = call i32 asm "addl $1, $0\09\09;\0Aadcl $$0xffff, $0\09;\0A", "=r,r,0,~{dirflag},~{fpsr},~{flags}"(i32 %4, i32 %6)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = xor i32 %8, -1
%10 = lshr i32 %9, 16
ret i32 %10
}

LLVM IR (-O2):
define i32 @csum_fold(i32 %0) {
%2 = shl i32 %0, 16
%3 = and i32 %0, -65536
%4 = tail call i32 asm "addl $1, $0\09\09;\0Aadcl $$0xffff, $0\09;\0A", "=r,r,0,~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 %3)
%5 = xor i32 %4, -1
%6 = lshr i32 %5, 16
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
void envcpy(char *ptr, const char *var, const char *dir, const char *file) {
  strcpy(ptr, var);
  strcat(ptr, dir);
  strcat(ptr, file);
}


x86 assembly (clang, -O0):
<envcpy>:
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    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<envcpy>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rdi,%rbx
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <strcat@plt>

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

LLVM IR (-O2):
define void @envcpy(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @strcpy(i8* %0, i8* %1)
%6 = tail call i32 @strcat(i8* %0, i8* %2)
%7 = tail call i32 @strcat(i8* %0, i8* %3)
ret void
}
int func3(int(fn)()) { return fn(); }


x86 assembly (clang, -O0):
<func3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func3>:
xor    %eax,%eax
jmp    *%rdi

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

LLVM IR (-O2):
define i32 @func3(i32 (...)* nocapture %0) {
%2 = tail call i32 (...) %0()
ret i32 %2
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, void const *, int);
int osrp2(const void *p) {
  uint16_t tmp;
  memcpy(&tmp, p, 2);
  return tmp;
}


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

x86 assembly (clang, -O2):
<osrp2>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x2,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @osrp2(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 2)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int mystery();
int libcall_int(int uno, int dos) {
  if (uno == 0) {
    return 1;
  }
  if (uno == 1) {
    return 2;
  }
  if (uno == 2) {
    return 3;
  }
  return mystery() % (uno + dos);
}


x86 assembly (clang, -O0):
<libcall_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1134 <libcall_int+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1173 <libcall_int+0x63>
cmpl   $0x1,-0x8(%rbp)
jne    114a <libcall_int+0x3a>
movl   $0x2,-0x4(%rbp)
jmp    1173 <libcall_int+0x63>
cmpl   $0x2,-0x8(%rbp)
jne    1160 <libcall_int+0x50>
movl   $0x3,-0x4(%rbp)
jmp    1173 <libcall_int+0x63>
mov    $0x0,%al
call   1030 <mystery@plt>
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libcall_int>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    $0x3,%edi
jae    111f <libcall_int+0xf>
add    $0x1,%ebx
jmp    112f <libcall_int+0x1f>
mov    %esi,%ebp
xor    %eax,%eax
call   1030 <mystery@plt>
add    %ebx,%ebp
cltd
idiv   %ebp
mov    %edx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @libcall_int(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* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %23
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 2, i32* %3
br label %23
13: ; preds = %9
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 3, i32* %3
br label %23
17: ; preds = %13
%18 = call i32 (...) @mystery()
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = add nsw i32 %19, %20
%22 = srem i32 %18, %21
store i32 %22, i32* %3
br label %23
23: ; preds = %17, %16, %12, %8
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @libcall_int(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, 3
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i32 (...) @mystery()
%6 = add nsw i32 %1, %0
%7 = srem i32 %5, %6
br label %10
8: ; preds = %2
%9 = add i32 %0, 1
br label %10
10: ; preds = %8, %4
%11 = phi i32 [ %7, %4 ], [ %9, %8 ]
ret i32 %11
}
int stdin_init(struct aa_context *context, int mode) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.aa_context = type opaque
define i32 @stdin_init(%struct.aa_context* nocapture readnone %0, i32 %1) {
ret i32 1
}
int foo_ten() { return 10; }


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

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

LLVM IR (-O0):
define i32 @foo_ten() {
ret i32 10
}

LLVM IR (-O2):
define i32 @foo_ten() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ outsw(unsigned int, void *, unsigned long);
void nsp_multi_write_2(unsigned int BaseAddr, unsigned int Register, void *buf,
                       unsigned long count) {
  outsw(BaseAddr + Register, buf, count);
}


x86 assembly (clang, -O0):
<nsp_multi_write_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
add    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <outsw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsp_multi_write_2>:
add    %esi,%edi
mov    %rdx,%rsi
mov    %rcx,%rdx
jmp    1030 <outsw@plt>

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

LLVM IR (-O2):
define void @nsp_multi_write_2(i32 %0, i32 %1, i8* %2, i64 %3) {
%5 = add i32 %1, %0
%6 = tail call i32 @outsw(i32 %5, i8* %2, i64 %3)
ret void
}
/* Variables and functions */
void *malloc(unsigned int);
void *HoloStor_QuickAlloc(unsigned int size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<HoloStor_QuickAlloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @HoloStor_QuickAlloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *realloc(void *, size_t);
void *xRealloc(void *ptr, size_t size) {
  void *data = realloc(ptr, size);
  if (!data && size > 0) {
    assert(0);
  }
  return data;
}


x86 assembly (clang, -O0):
<xRealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115e <xRealloc+0x3e>
cmpq   $0x0,-0x10(%rbp)
jbe    115e <xRealloc+0x3e>
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xRealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <realloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1140 <xRealloc+0x20>
test   %r14,%r14
jne    1140 <xRealloc+0x20>
xor    %edi,%edi
call   1030 <assert@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xRealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load i64, i64* %4
%13 = icmp ugt i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @assert(i32 0)
br label %16
16: ; preds = %14, %11, %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define noalias i8* @xRealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
%5 = icmp ne i64 %1, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @assert(i32 0)
br label %9
9: ; preds = %7, %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int ts_urand();
int32_t ts_rand(void) { return (int32_t)(ts_urand() / 2); }


x86 assembly (clang, -O0):
<ts_rand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ts_urand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_rand>:
push   %rax
xor    %eax,%eax
call   1030 <ts_urand@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
sar    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ts_rand() {
%1 = call i32 (...) @ts_urand()
%2 = sdiv i32 %1, 2
ret i32 %2
}

LLVM IR (-O2):
define i32 @ts_rand() {
%1 = tail call i32 (...) @ts_urand()
%2 = sdiv i32 %1, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ gui_bar_create_default_input();
int /*<<< orphan*/ gui_bar_create_default_nicklist();
int /*<<< orphan*/ gui_bar_create_default_status();
int /*<<< orphan*/ gui_bar_create_default_title();
void gui_bar_create_default() {
  gui_bar_create_default_input();
  gui_bar_create_default_title();
  gui_bar_create_default_status();
  gui_bar_create_default_nicklist();
}


x86 assembly (clang, -O0):
<gui_bar_create_default>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <gui_bar_create_default_input@plt>
mov    $0x0,%al
call   1030 <gui_bar_create_default_title@plt>
mov    $0x0,%al
call   1040 <gui_bar_create_default_status@plt>
mov    $0x0,%al
call   1060 <gui_bar_create_default_nicklist@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_bar_create_default>:
push   %rax
xor    %eax,%eax
call   1050 <gui_bar_create_default_input@plt>
xor    %eax,%eax
call   1030 <gui_bar_create_default_title@plt>
xor    %eax,%eax
call   1040 <gui_bar_create_default_status@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <gui_bar_create_default_nicklist@plt>

LLVM IR (-O0):
define void @gui_bar_create_default() {
%1 = call i32 (...) @gui_bar_create_default_input()
%2 = call i32 (...) @gui_bar_create_default_title()
%3 = call i32 (...) @gui_bar_create_default_status()
%4 = call i32 (...) @gui_bar_create_default_nicklist()
ret void
}

LLVM IR (-O2):
define void @gui_bar_create_default() {
%1 = tail call i32 (...) @gui_bar_create_default_input()
%2 = tail call i32 (...) @gui_bar_create_default_title()
%3 = tail call i32 (...) @gui_bar_create_default_status()
%4 = tail call i32 (...) @gui_bar_create_default_nicklist()
ret void
}
int test_imm_33int64_lowword_reg(long long val) {
  return ((val) & (0x33 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_33int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x33,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_33int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 51
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char *argv[]) {
  int actual, total;
#pragma omp parallel private(total, actual)
  {
    actual = omp_get_thread_num();
    total = omp_get_num_threads();
    printf("HOLA MUNDO: proceso %d de %d\n", actual, total);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"HOLA MUNDO: proceso %d de %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (...) @omp_get_thread_num()
store i32 %8, i32* %6
%9 = call i32 (...) @omp_get_num_threads()
store i32 %9, i32* %7
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"HOLA MUNDO: proceso %d de %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @omp_get_thread_num()
%4 = tail call i32 (...) @omp_get_num_threads()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret i32 0
}
long long max3ll(long long x, long long y, long long z) {
  return (z > y) ? ((z > x) ? z : x) : ((y > x) ? y : x);
}


x86 assembly (clang, -O0):
<max3ll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    114e <max3ll+0x4e>
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jle    1139 <max3ll+0x39>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1141 <max3ll+0x41>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1179 <max3ll+0x79>
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jle    1169 <max3ll+0x69>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1171 <max3ll+0x71>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max3ll>:
mov    %rdi,%rax
cmp    %rdi,%rdx
cmovg  %rdx,%rax
cmp    %rsi,%rax
cmovle %rsi,%rax
ret

LLVM IR (-O0):
define i64 @max3ll(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* %6
%8 = load i64, i64* %5
%9 = icmp sgt i64 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %3
%11 = load i64, i64* %6
%12 = load i64, i64* %4
%13 = icmp sgt i64 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i64, i64* %6
br label %18
16: ; preds = %10
%17 = load i64, i64* %4
br label %18
18: ; preds = %16, %14
%19 = phi i64 [ %15, %14 ], [ %17, %16 ]
br label %30
20: ; preds = %3
%21 = load i64, i64* %5
%22 = load i64, i64* %4
%23 = icmp sgt i64 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = load i64, i64* %5
br label %28
26: ; preds = %20
%27 = load i64, i64* %4
br label %28
28: ; preds = %26, %24
%29 = phi i64 [ %25, %24 ], [ %27, %26 ]
br label %30
30: ; preds = %28, %18
%31 = phi i64 [ %19, %18 ], [ %29, %28 ]
ret i64 %31
}

LLVM IR (-O2):
define i64 @max3ll(i64 %0, i64 %1, i64 %2) {
%4 = icmp sgt i64 %2, %0
%5 = select i1 %4, i64 %2, i64 %0
%6 = icmp sgt i64 %5, %1
%7 = select i1 %6, i64 %5, i64 %1
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void check_fail(bool cond, const char *f, const char *msg) {
  if (cond) {
    printf("check_fail:\n");
    printf("  %s: %s\n", f, msg);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<check_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     116f <check_fail+0x4f>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_fail>:
test   %edi,%edi
jne    1135 <check_fail+0x5>
ret
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
lea    0xeae(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"check_fail:\0A\00"
@.str.1 = [10 x i8] c" %s: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @check_fail(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c" %s: %s\0A\00"
@EXIT_FAILURE = global i32 0
@str = [12 x i8] c"check_fail:\00"
define void @check_fail(i32 %0, i8* %1, i8* %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %2)
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %3
ret void
}
int fpe_fn(void) {
  volatile int i = 0;
  return 1 / i;
}


x86 assembly (clang, -O0):
<fpe_fn>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpe_fn>:
movl   $0x0,-0x4(%rsp)
mov    -0x4(%rsp),%ecx
lea    0x1(%rcx),%edx
xor    %eax,%eax
cmp    $0x3,%edx
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fpe_fn() {
%1 = alloca i32
store volatile i32 0, i32* %1
%2 = load volatile i32, i32* %1
%3 = sdiv i32 1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @fpe_fn() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
%3 = load volatile i32, i32* %1
%4 = add i32 %3, 1
%5 = icmp ult i32 %4, 3
%6 = select i1 %5, i32 %3, i32 0
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
long file_size(FILE *fp) {
  long size;
  fseek(fp, 0L, SEEK_END);
  size = ftell(fp);
  rewind(fp);
  return size;
}


x86 assembly (clang, -O0):
<file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1050 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_size>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <rewind@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
define i64 @file_size(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i64 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i64 @ftell(i32* %7)
store i64 %8, i64* %3
%9 = load i32*, i32** %2
%10 = call i32 @rewind(i32* %9)
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i64 @file_size(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i64 0, i32 %2)
%4 = tail call i64 @ftell(i32* %0)
%5 = tail call i32 @rewind(i32* %0)
ret i64 %4
}
__attribute__((__no__, __noclone__)) void g(int *at, int val) {
  asm("");
  __sync_fetch_and_add(at, val);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
lock add %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
lock add %esi,(%rdi)
ret

LLVM IR (-O0):
define void @g(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 = atomicrmw add i32* %5, i32 %6 seq_cst
ret void
}

LLVM IR (-O2):
define void @g(i32* nocapture %0, i32 %1) {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
%3 = atomicrmw add i32* %0, i32 %1 seq_cst
ret void
}
long map2check_non_det_long() { return 0; }


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

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

LLVM IR (-O0):
define i64 @map2check_non_det_long() {
ret i64 0
}

LLVM IR (-O2):
define i64 @map2check_non_det_long() {
ret i64 0
}
void foo393(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo393(i32 %0) {
ret void
}
signed char signed_int_to_signed_char(signed int src) { return src; }


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

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

LLVM IR (-O0):
define signext i8 @signed_int_to_signed_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @signed_int_to_signed_char(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
void audiohw_switch_normal_call(int in_call) {}


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

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

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

LLVM IR (-O2):
define void @audiohw_switch_normal_call(i32 %0) {
ret void
}
/* Variables and functions */
int connectsock(char *, int);
int popNumber();
char *popString();
int /*<<< orphan*/ pushNumber(int);
void basConnectSock() {
  int port;
  char *servername;
  int ret;
  port = popNumber();
  servername = popString();
  ret = connectsock(servername, port);
  pushNumber(ret);
}


x86 assembly (clang, -O0):
<basConnectSock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1060 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <popString@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <connectsock@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <pushNumber@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basConnectSock>:
push   %rbx
xor    %eax,%eax
call   1060 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <popString@plt>
mov    %rax,%rdi
mov    %ebx,%esi
call   1030 <connectsock@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <pushNumber@plt>

LLVM IR (-O0):
define void @basConnectSock() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = call i32 (...) @popNumber()
store i32 %4, i32* %1
%5 = call i8* (...) @popString()
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = load i32, i32* %1
%8 = call i32 @connectsock(i8* %6, i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @pushNumber(i32 %9)
ret void
}

LLVM IR (-O2):
define void @basConnectSock() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i8* (...) @popString()
%3 = tail call i32 @connectsock(i8* %2, i32 %1)
%4 = tail call i32 @pushNumber(i32 %3)
ret void
}
int f(int *p, int n) {
  int(*a)[n] = (int(*)[n])p;
  int *q = &(*a)[0];
  return q[1];
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x4(%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = load i32*, i32** %3
store i32* %11, i32** %5
%12 = load i32*, i32** %5
%13 = getelementptr inbounds i32, i32* %12, i64 0
store i32* %13, i32** %6
%14 = load i32*, i32** %6
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = load i32, i32* %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @f(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
ret i32 %4
}
void print_m32() {}


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

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

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

LLVM IR (-O2):
define void @print_m32() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mpb_log_in();
int /*<<< orphan*/ mpb_menu_choose();
int /*<<< orphan*/ mpb_read_data();
int /*<<< orphan*/ mpb_write_data();
int main(int argc, char *argv[]) {
  mpb_log_in();
  mpb_read_data();
  mpb_menu_choose();
  mpb_write_data();
  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   1040 <mpb_log_in@plt>
mov    $0x0,%al
call   1050 <mpb_read_data@plt>
mov    $0x0,%al
call   1060 <mpb_menu_choose@plt>
mov    $0x0,%al
call   1030 <mpb_write_data@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <mpb_log_in@plt>
xor    %eax,%eax
call   1050 <mpb_read_data@plt>
xor    %eax,%eax
call   1060 <mpb_menu_choose@plt>
xor    %eax,%eax
call   1030 <mpb_write_data@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 (...) @mpb_log_in()
%7 = call i32 (...) @mpb_read_data()
%8 = call i32 (...) @mpb_menu_choose()
%9 = call i32 (...) @mpb_write_data()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @mpb_log_in()
%4 = tail call i32 (...) @mpb_read_data()
%5 = tail call i32 (...) @mpb_menu_choose()
%6 = tail call i32 (...) @mpb_write_data()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ setup_uart(int, int);
int /*<<< orphan*/ uart_puts(char *);
int main(int argc, char const *argv[]) {
  setup_uart(10, 1);
  uart_puts("Node started");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
mov    $0x1,%esi
call   1030 <setup_uart@plt>
lea    0xebb(%rip),%rdi
call   1040 <uart_puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x1,%esi
call   1030 <setup_uart@plt>
lea    0xec9(%rip),%rdi
call   1040 <uart_puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Node started\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @setup_uart(i32 10, i32 1)
%6 = call i32 @uart_puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Node started\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @setup_uart(i32 10, i32 1)
%4 = tail call i32 @uart_puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XFocusOutEvent;

/* Variables and functions */
unsigned long get_XFocusOutEvent_serial(void *_p) {
  return (unsigned long)((XFocusOutEvent *)_p)->serial;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XFocusOutEvent_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XFocusOutEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ __CPROVER_precondition(int /*<<< orphan*/, char *);
int /*<<< orphan*/ __CPROVER_r_ok(void const *, size_t);
int nondet_int();
int memcmp(const void *s1, const void *s2, size_t n) {
  __CPROVER_precondition(__CPROVER_r_ok(s1, n), "memcmp region 1 readable");
  __CPROVER_precondition(__CPROVER_r_ok(s2, n), "memcpy region 2 readable");
  return nondet_int();
}


x86 assembly (clang, -O0):
<memcmp>:
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    -0x18(%rbp),%rsi
call   1040 <__CPROVER_r_ok@plt>
mov    %eax,%edi
lea    0xea6(%rip),%rsi
call   1050 <__CPROVER_precondition@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <__CPROVER_r_ok@plt>
mov    %eax,%edi
lea    0xea4(%rip),%rsi
call   1050 <__CPROVER_precondition@plt>
mov    $0x0,%al
call   1030 <nondet_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcmp>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdx,%rsi
call   1040 <__CPROVER_r_ok@plt>
lea    0xeb7(%rip),%rsi
mov    %eax,%edi
call   1050 <__CPROVER_precondition@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <__CPROVER_r_ok@plt>
lea    0xeb7(%rip),%rsi
mov    %eax,%edi
call   1050 <__CPROVER_precondition@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <nondet_int@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"memcmp region 1 readable\00"
@.str.1 = [25 x i8] c"memcpy region 2 readable\00"
define i32 @memcmp(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %6
%9 = call i32 @__CPROVER_r_ok(i8* %7, i64 %8)
%10 = call i32 @__CPROVER_precondition(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = call i32 @__CPROVER_r_ok(i8* %11, i64 %12)
%14 = call i32 @__CPROVER_precondition(i32 %13, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 (...) @nondet_int()
ret i32 %15
}

LLVM IR (-O2):
@.str = [25 x i8] c"memcmp region 1 readable\00"
@.str.1 = [25 x i8] c"memcpy region 2 readable\00"
define i32 @memcmp(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @__CPROVER_r_ok(i8* %0, i64 %2)
%5 = tail call i32 @__CPROVER_precondition(i32 %4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @__CPROVER_r_ok(i8* %1, i64 %2)
%7 = tail call i32 @__CPROVER_precondition(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 (...) @nondet_int()
ret i32 %8
}
int test_imm_61int16_reg(short val) {
  return ((val) & (0x61 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_61int16_reg(i16 signext %0) {
%2 = and i16 %0, 97
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct i2c {
  int dummy;
};

/* Variables and functions */
long getByte(struct i2c *, int, int);
long getVersion(struct i2c *i2c) { return getByte(i2c, 0x6b, 0x00); }


x86 assembly (clang, -O0):
<getVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6b,%esi
xor    %edx,%edx
call   1030 <getByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getVersion>:
mov    $0x6b,%esi
xor    %edx,%edx
jmp    1030 <getByte@plt>

LLVM IR (-O0):
%struct.i2c = type { i32 }
define i64 @getVersion(%struct.i2c* %0) {
%2 = alloca %struct.i2c*
store %struct.i2c* %0, %struct.i2c** %2
%3 = load %struct.i2c*, %struct.i2c** %2
%4 = call i64 @getByte(%struct.i2c* %3, i32 107, i32 0)
ret i64 %4
}

LLVM IR (-O2):
%struct.i2c = type { i32 }
define i64 @getVersion(%struct.i2c* %0) {
%2 = tail call i64 @getByte(%struct.i2c* %0, i32 107, i32 0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main() { f(3); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @f(i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 3)
ret i32 0
}
int a_twist_u_on_corner(corner)
int corner;
{
  int temp_arr[8];
  a_corner_unpack(corner, temp_arr);
  four_cycle(temp_arr, 0, 1, 2, 3);
  return a_corner_pack(temp_arr);
}


x86 assembly (clang, -O0):
<a_twist_u_on_corner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1030 <a_corner_unpack@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
mov    $0x0,%al
call   1040 <four_cycle@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1050 <a_corner_pack@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_twist_u_on_corner>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <a_corner_unpack@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
xor    %eax,%eax
call   1040 <four_cycle@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <a_corner_pack@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @a_twist_u_on_corner(i32 %0) {
%2 = alloca i32
%3 = alloca [8 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_corner_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %7, i32 0, i32 1, i32 2, i32 3)
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @a_corner_pack to i32 (i32*, ...)*)(i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @a_twist_u_on_corner(i32 %0) {
%2 = alloca [8 x i32]
%3 = bitcast [8 x i32]* %2 to i8*
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_corner_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 0, i32 1, i32 2, i32 3)
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @a_corner_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgcalr(void) { gen("call\tax"); }


x86 assembly (clang, -O0):
<cgcalr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <gen@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"call\09ax\00"
define void @cgcalr() {
%1 = call i32 @gen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"call\09ax\00"
define void @cgcalr() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
void nosuchfunctionname(void) { return; }


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

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

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

LLVM IR (-O2):
define void @nosuchfunctionname() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cursorOn(void) { printf("\x01B[?25h"); }


x86 assembly (clang, -O0):
<cursorOn>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[?25h\00"
define void @cursorOn() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[?25h\00"
define void @cursorOn() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hi,OpenWRT!\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 = [13 x i8] c"Hi,OpenWRT!\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 ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hi,OpenWRT!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int intel_ich_gpio_set(int, int);
int intel_ich_gpio38_raise(void) { return intel_ich_gpio_set(38, 1); }


x86 assembly (clang, -O0):
<intel_ich_gpio38_raise>:
push   %rbp
mov    %rsp,%rbp
mov    $0x26,%edi
mov    $0x1,%esi
call   1030 <intel_ich_gpio_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intel_ich_gpio38_raise>:
mov    $0x26,%edi
mov    $0x1,%esi
jmp    1030 <intel_ich_gpio_set@plt>

LLVM IR (-O0):
define i32 @intel_ich_gpio38_raise() {
%1 = call i32 @intel_ich_gpio_set(i32 38, i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @intel_ich_gpio38_raise() {
%1 = tail call i32 @intel_ich_gpio_set(i32 38, i32 1)
ret i32 %1
}
/* Type definitions */
struct mntent {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
struct mntent *getmntent(FILE *f) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
%struct.mntent = type { i32 }
define noalias %struct.mntent* @getmntent(i32* nocapture readnone %0) {
ret %struct.mntent* null
}