xunge/DecIR huggingface dataset:
/* Variables and functions */
int getInteger();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int num1;
  printf("Enter integer string (MAX 6 CHARS) > ");
  num1 = getInteger();
  printf("num1 = %d\n", num1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <getInteger@plt>
lea    0xee9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Enter integer string (MAX 6 CHARS) > \00"
@.str.1 = [11 x i8] c"num1 = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @getInteger()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"Enter integer string (MAX 6 CHARS) > \00"
@.str.1 = [11 x i8] c"num1 = %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getInteger()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int f(int *);
int main(void) {
  int x = 5;
  return f(&x) == 5;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <f@plt>
cmp    $0x5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x5,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <f@plt>
xor    %ecx,%ecx
cmp    $0x5,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%3 = call i32 @f(i32* %2)
%4 = icmp eq i32 %3, 5
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%3 = call i32 @f(i32* %1)
%4 = icmp eq i32 %3, 5
%5 = zext i1 %4 to i32
ret i32 %5
}
char *ft_afterwhites(char *s) {
  while (*s == ' ' || *s == '\n' || *s == '\t')
    s++;
  return (s);
}


x86 assembly (clang, -O0):
<ft_afterwhites>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1142 <ft_afterwhites+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x9(%rbp)
je     1142 <ft_afterwhites+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <ft_afterwhites+0x52>
jmp    1163 <ft_afterwhites+0x63>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <ft_afterwhites+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_afterwhites>:
mov    %rdi,%rax
movabs $0x100000600,%rcx
nopl   (%rax)
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1125 <ft_afterwhites+0x25>
bt     %rdx,%rcx
jae    1125 <ft_afterwhites+0x25>
add    $0x1,%rax
jmp    1110 <ft_afterwhites+0x10>
ret

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

LLVM IR (-O2):
define i8* @ft_afterwhites(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 10, label %5
i8 9, label %5
]
5: ; preds = %2, %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ L_add(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ L_msu(int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ extract_h(int /*<<< orphan*/);
int16_t msu_r(int32_t L_var3, int16_t var1, int16_t var2) {
  int16_t var_out;
  L_var3 = L_msu(L_var3, var1, var2);
  L_var3 = L_add(L_var3, (int32_t)0x00008000);
  var_out = extract_h(L_var3);
  return (var_out);
}


x86 assembly (clang, -O0):
<msu_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <L_msu@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8000,%esi
call   1050 <L_add@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <extract_h@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msu_r>:
push   %rax
call   1040 <L_msu@plt>
mov    %eax,%edi
mov    $0x8000,%esi
call   1050 <L_add@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <extract_h@plt>

LLVM IR (-O0):
define i32 @msu_r(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
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @L_msu(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = call i32 @L_add(i32 %12, i32 32768)
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = call i32 @extract_h(i32 %14)
store i32 %15, i32* %7
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
define i32 @msu_r(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @L_msu(i32 %0, i32 %1, i32 %2)
%5 = tail call i32 @L_add(i32 %4, i32 32768)
%6 = tail call i32 @extract_h(i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ send_ctrl_cmd(int);
int /*<<< orphan*/ send_data_cmd(unsigned int);
void lcm_setbacklight_ili9486l(unsigned int level) {
  if (level > 255)
    level = 255;
  send_ctrl_cmd(0x51);
  send_data_cmd(level);
}


x86 assembly (clang, -O0):
<lcm_setbacklight_ili9486l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jbe    113f <lcm_setbacklight_ili9486l+0x1f>
movl   $0xff,-0x4(%rbp)
mov    $0x51,%edi
call   1040 <send_ctrl_cmd@plt>
mov    -0x4(%rbp),%edi
call   1030 <send_data_cmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm_setbacklight_ili9486l>:
push   %rbx
mov    %edi,%ebx
cmp    $0xff,%edi
mov    $0xff,%eax
cmovae %eax,%ebx
mov    $0x51,%edi
call   1040 <send_ctrl_cmd@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <send_data_cmd@plt>

LLVM IR (-O0):
define void @lcm_setbacklight_ili9486l(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 255
br i1 %4, label %5, label %6
5: ; preds = %1
store i32 255, i32* %2
br label %6
6: ; preds = %5, %1
%7 = call i32 @send_ctrl_cmd(i32 81)
%8 = load i32, i32* %2
%9 = call i32 @send_data_cmd(i32 %8)
ret void
}

LLVM IR (-O2):
define void @lcm_setbacklight_ili9486l(i32 %0) {
%2 = icmp ult i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
%4 = tail call i32 @send_ctrl_cmd(i32 81)
%5 = tail call i32 @send_data_cmd(i32 %3)
ret void
}
void SSMR3GetStructEx(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3GetStructEx() {
ret void
}
/* Variables and functions */
int countCodePoints(char const *, int *);
int snUTF8ValidateString(const char *string) {
  int numCodePoints = 0;
  int result = countCodePoints(string, &numCodePoints);
  return result == 0;
}


x86 assembly (clang, -O0):
<snUTF8ValidateString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <countCodePoints@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snUTF8ValidateString>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <countCodePoints@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @snUTF8ValidateString(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = load i8*, i8** %2
%6 = call i32 @countCodePoints(i8* %5, i32* %3)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @snUTF8ValidateString(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @countCodePoints(i8* %0, i32* %2)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int ab8500_fg_get_inst_curr(struct ab8500_fg *di) {}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
%struct.ab8500_fg = type opaque
define i32 @ab8500_fg_get_inst_curr(%struct.ab8500_fg* %0) {
%2 = alloca i32
%3 = alloca %struct.ab8500_fg*
store %struct.ab8500_fg* %0, %struct.ab8500_fg** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.ab8500_fg = type opaque
define i32 @ab8500_fg_get_inst_curr(%struct.ab8500_fg* nocapture readnone %0) {
ret i32 undef
}
void memory_set32(char *p, char val, int num_bytes) {
  int i;
  for (i = 0; i < num_bytes; i++) {
    *p++ = val;
  }
}


x86 assembly (clang, -O0):
<memory_set32>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1146 <memory_set32+0x46>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1118 <memory_set32+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_set32>:
test   %edx,%edx
jle    1124 <memory_set32+0x14>
push   %rax
mov    %edx,%edx
movzbl %sil,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @memory_set32(i8* nocapture writeonly %0, i8 signext %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
double pow(double, int);
double p_water(double T) {
  T = T - 273.15;
  return 997.18 + 3.1439e-3 * T - 3.7574e-3 * pow(T, 2);
}


x86 assembly (clang, -O0):
<p_water>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeee(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec4(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x10(%rbp),%xmm1
movsd  0xe8f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_water>:
push   %rax
addsd  0xee7(%rip),%xmm0
movsd  0xee7(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee3(%rip),%xmm1
movsd  %xmm1,(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
mulsd  0xed4(%rip),%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @p_water(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 2.731500e+02
store double %4, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double 3.143900e-03, double %5, double 0x408F2970A3D70A3D)
%7 = load double, double* %2
%8 = call double @pow(double %7, i32 2)
%9 = call double @llvm.fmuladd.f64(double -3.757400e-03, double %8, double %6)
ret double %9
}

LLVM IR (-O2):
define double @p_water(double %0) {
%2 = fadd double %0, -2.731500e+02
%3 = tail call double @llvm.fmuladd.f64(double %2, double 3.143900e-03, double 0x408F2970A3D70A3D)
%4 = tail call double @pow(double %2, i32 2)
%5 = tail call double @llvm.fmuladd.f64(double %4, double -3.757400e-03, double %3)
ret double %5
}
void foo011() {}


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

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

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

LLVM IR (-O2):
define void @foo011() {
ret void
}
char char_fetch_ior_release(char *ptr, int value) {
  return __atomic_fetch_or(ptr, value, 3);
}


x86 assembly (clang, -O0):
<char_fetch_ior_release>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    %cl,-0xd(%rbp)
mov    -0xd(%rbp),%cl
mov    %cl,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0xf(%rbp)
mov    -0xf(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%sil
mov    %al,%dl
or     %sil,%dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xf(%rbp)
jne    114f <char_fetch_ior_release+0x4f>
jmp    1124 <char_fetch_ior_release+0x24>
mov    -0x19(%rbp),%al
mov    %al,-0xe(%rbp)
movsbl -0xe(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_fetch_ior_release>:
mov    (%rdi),%al
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
or     %sil,%cl
lock cmpxchg %cl,(%rdi)
jne    1110 <char_fetch_ior_release+0x10>
ret

LLVM IR (-O0):
define signext i8 @char_fetch_ior_release(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = trunc i32 %8 to i8
store i8 %9, i8* %5
%10 = load i8, i8* %5
%11 = atomicrmw or i8* %7, i8 %10 release
store i8 %11, i8* %6
%12 = load i8, i8* %6
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @char_fetch_ior_release(i8* nocapture %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = atomicrmw or i8* %0, i8 %3 release
ret i8 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ clean_up(char *);
int fread(char *, int, int, int /*<<< orphan*/ *);
void r_read(FILE *fp, char *buf, int n) {
  if (fread(buf, sizeof(char), n, fp) != n) {
    clean_up("Read() failed, don't know why.");
  }
}


x86 assembly (clang, -O0):
<r_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
cmp    -0x14(%rbp),%eax
je     115d <r_read+0x3d>
lea    0xea8(%rip),%rdi
call   1040 <clean_up@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_read>:
push   %rbx
mov    %edx,%ebx
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
call   1030 <fread@plt>
cmp    %ebx,%eax
jne    1139 <r_read+0x19>
pop    %rbx
ret
lea    0xec0(%rip),%rdi
pop    %rbx
jmp    1040 <clean_up@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Read() failed, don't know why.\00"
define void @r_read(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32*, i32** %4
%10 = call i32 @fread(i8* %7, i32 1, i32 %8, i32* %9)
%11 = load i32, i32* %6
%12 = icmp ne i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 @clean_up(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Read() failed, don't know why.\00"
define void @r_read(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @fread(i8* %1, i32 1, i32 %2, i32* %0)
%5 = icmp eq i32 %4, %2
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @clean_up(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret void
}
/* Type definitions */
struct vec4 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec4_negative(float *, float *);
__attribute__((always_)) struct vec4 *psvec4_negative(struct vec4 *result,
                                                      struct vec4 *a) {
  vec4_negative((float *)result, (float *)a);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec4_negative>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec4_negative@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec4 = type { i32 }
define %struct.vec4* @psvec4_negative(%struct.vec4* %0, %struct.vec4* %1) {
%3 = alloca %struct.vec4*
%4 = alloca %struct.vec4*
store %struct.vec4* %0, %struct.vec4** %3
store %struct.vec4* %1, %struct.vec4** %4
%5 = load %struct.vec4*, %struct.vec4** %3
%6 = bitcast %struct.vec4* %5 to float*
%7 = load %struct.vec4*, %struct.vec4** %4
%8 = bitcast %struct.vec4* %7 to float*
%9 = call i32 @vec4_negative(float* %6, float* %8)
%10 = load %struct.vec4*, %struct.vec4** %3
ret %struct.vec4* %10
}

LLVM IR (-O2):
%struct.vec4 = type { i32 }
define %struct.vec4* @psvec4_negative(%struct.vec4* returned %0, %struct.vec4* %1) {
%3 = bitcast %struct.vec4* %0 to float*
%4 = bitcast %struct.vec4* %1 to float*
%5 = tail call i32 @vec4_negative(float* %3, float* %4)
ret %struct.vec4* %0
}
/* Variables and functions */
int /*<<< orphan*/ rollnd(int *, int, int);
void roll(int *r) { rollnd(r, 1, 6); }


x86 assembly (clang, -O0):
<roll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x6,%edx
call   1030 <rollnd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roll>:
mov    $0x1,%esi
mov    $0x6,%edx
jmp    1030 <rollnd@plt>

LLVM IR (-O0):
define void @roll(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @rollnd(i32* %3, i32 1, i32 6)
ret void
}

LLVM IR (-O2):
define void @roll(i32* %0) {
%2 = tail call i32 @rollnd(i32* %0, i32 1, i32 6)
ret void
}
int no_return() {}


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

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

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

LLVM IR (-O2):
define i32 @no_return() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ XIMPreeditCaretCallbackStruct;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XIMPreeditCaretCallbackStruct(void *_p) {
  if (_p == NULL)
    abort();
  free((XIMPreeditCaretCallbackStruct *)_p);
}


x86 assembly (clang, -O0):
<free_XIMPreeditCaretCallbackStruct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XIMPreeditCaretCallbackStruct+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XIMPreeditCaretCallbackStruct>:
test   %rdi,%rdi
je     112a <free_XIMPreeditCaretCallbackStruct+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XIMPreeditCaretCallbackStruct(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XIMPreeditCaretCallbackStruct(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
int meta_data_load(const char *filename) {
  int result = 0;
  return result;
}


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

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

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

LLVM IR (-O2):
define i32 @meta_data_load(i8* nocapture readnone %0) {
ret i32 0
}
struct _reent *__getreent(void) {
  return 0xDEADBEEF;
}


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

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

LLVM IR (-O0):
%struct._reent = type opaque
define %struct._reent* @__getreent() {
ret %struct._reent* inttoptr (i64 3735928559 to %struct._reent*)
}

LLVM IR (-O2):
%struct._reent = type opaque
define %struct._reent* @__getreent() {
ret %struct._reent* inttoptr (i64 3735928559 to %struct._reent*)
}
unsigned xrop3_185_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T & D;
  stk2 = S | stk3;
  stk1 = D ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_185_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_185_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
or     %eax,%esi
xor    $0xffffff00,%esi
not    %eax
and    %esi,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_185_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = load i32, i32* %5
%25 = and i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %6
%27 = load i32, i32* %10
%28 = or i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %5
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = xor i32 %32, -1
store i32 %33, i32* %8
%34 = load i32, i32* %8
%35 = load i32, i32* %6
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %6
%40 = and i32 %38, %39
%41 = or i32 %37, %40
ret i32 %41
}

LLVM IR (-O2):
define i32 @xrop3_185_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = or i32 %4, %5
%7 = xor i32 %6, -256
%8 = xor i32 %4, -1
%9 = and i32 %7, %8
%10 = or i32 %9, %3
ret i32 %10
}
/* Variables and functions */
scalar_t__ __infer_nondet_int();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ nop();
void FN_useless_else_bad() {
  if (__infer_nondet_int()) {
    exit(0);
  } else {
    nop();
  }
}


x86 assembly (clang, -O0):
<FN_useless_else_bad>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <__infer_nondet_int@plt>
cmp    $0x0,%rax
je     114c <FN_useless_else_bad+0x1c>
xor    %edi,%edi
call   1050 <exit@plt>
mov    $0x0,%al
call   1030 <nop@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FN_useless_else_bad>:
push   %rax
xor    %eax,%eax
call   1040 <__infer_nondet_int@plt>
test   %rax,%rax
jne    1145 <FN_useless_else_bad+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <nop@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @FN_useless_else_bad() {
%1 = call i64 (...) @__infer_nondet_int()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @exit(i32 0)
unreachable
5: ; preds = %0
%6 = call i32 (...) @nop()
br label %7
7: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @FN_useless_else_bad() {
%1 = tail call i64 (...) @__infer_nondet_int()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 0)
unreachable
5: ; preds = %0
%6 = tail call i32 (...) @nop()
ret void
}
int squareOf(int x) { return x * x; }


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

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

LLVM IR (-O0):
define i32 @squareOf(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @squareOf(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ timerGetThreadCurrentTimestamp(struct timespec *);
void timerWatchStart(struct timespec *ts) {
  timerGetThreadCurrentTimestamp(ts);
}


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

x86 assembly (clang, -O2):
<timerWatchStart>:
jmp    1030 <timerGetThreadCurrentTimestamp@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
define void @timerWatchStart(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = call i32 @timerGetThreadCurrentTimestamp(%struct.timespec* %3)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define void @timerWatchStart(%struct.timespec* %0) {
%2 = tail call i32 @timerGetThreadCurrentTimestamp(%struct.timespec* %0)
ret void
}
void l1_symbolic_overrun2_Bad(int n) {
  int a[n];
  a[n] = 0;
}


x86 assembly (clang, -O0):
<l1_symbolic_overrun2_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
lea    0xf(,%rcx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0x18(%rbp)
movslq -0x4(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @l1_symbolic_overrun2_Bad(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i32, i64 %6
store i64 %6, i64* %4
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store i32 0, i32* %11
%12 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @l1_symbolic_overrun2_Bad(i32 %0) {
ret void
}
int test_imm_9Auint16_reg(unsigned short val) {
  return ((val) & (0x9A << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_9Auint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 154
%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_9Auint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 154
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void pmem_drain_pm_stores_cl(void) {}


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

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

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

LLVM IR (-O2):
define void @pmem_drain_pm_stores_cl() {
ret void
}
char *find_host(char *x) { return (x); }


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

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

LLVM IR (-O0):
define i8* @find_host(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret i8* %3
}

LLVM IR (-O2):
define i8* @find_host(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  char *p = malloc(1);
  *p = 'a';
  char c = *p;
  printf("\n [%c]\n", c);
  free(p);
  c = *p;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x61,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
lea    0xe9c(%rip),%rdi
movsbl -0x11(%rbp),%esi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movb   $0x61,(%rax)
lea    0xeb8(%rip),%rdi
mov    $0x61,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\0A [%c]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8
store i32 0, i32* %1
%4 = call i8* @malloc(i32 1)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
store i8 97, i8* %5
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
store i8 %7, i8* %3
%8 = load i8, i8* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext %8)
%10 = load i8*, i8** %2
%11 = call i32 @free(i8* %10)
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
store i8 %13, i8* %3
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0A [%c]\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
store i8 97, i8* %1
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext 97)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
int wps_validate_wsc_ack(const struct wpabuf *tlvs) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.wpabuf = type opaque
define i32 @wps_validate_wsc_ack(%struct.wpabuf* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ entero;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int);
int main() {
  int entero = 3;
  char c = 'c';
  printf("int\n\tvalor = %d\n\ttamaño %lu bytes \n\n", entero, sizeof(entero));
  printf("char\n\tvalor = %c\n\ttamaño %lu bytes \n\n", c, sizeof(char));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movb   $0x63,-0x9(%rbp)
mov    -0x8(%rbp),%eax
lea    0xecc(%rip),%rdi
mov    $0x4,%edx
movsbl %al,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x1,%edx
movsbl -0x9(%rbp),%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    $0x3,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
mov    $0x63,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"int\0A\09valor = %d\0A\09tama\C3\B1o %lu bytes \0A\0A\00"
@.str.1 = [39 x i8] c"char\0A\09valor = %c\0A\09tama\C3\B1o %lu bytes \0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
store i32 0, i32* %1
store i32 3, i32* %2
store i8 99, i8* %3
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
%6 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8 signext %5, i32 4)
%7 = load i8, i8* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8 signext %7, i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"int\0A\09valor = %d\0A\09tama\C3\B1o %lu bytes \0A\0A\00"
@.str.1 = [39 x i8] c"char\0A\09valor = %c\0A\09tama\C3\B1o %lu bytes \0A\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8 signext 3, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8 signext 99, i32 1)
ret i32 0
}
void INT_Excep_TPU10_TGI10B(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU10_TGI10B() {
ret void
}
/* Type definitions */
struct sockaddr {
  int sa_family;
};
typedef int ssize_t;

/* Variables and functions */
#define AF_INET 129
#define AF_INET6 128
int INET6_ADDRSTRLEN;
int INET_ADDRSTRLEN;
ssize_t sockutil_addrstrlen(struct sockaddr *a) {
  switch (a->sa_family) {
  case AF_INET:
    return INET_ADDRSTRLEN;
  case AF_INET6:
    return INET6_ADDRSTRLEN;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<sockutil_addrstrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x80,%eax
je     1145 <sockutil_addrstrlen+0x45>
jmp    1121 <sockutil_addrstrlen+0x21>
mov    -0x14(%rbp),%eax
sub    $0x81,%eax
jne    1156 <sockutil_addrstrlen+0x56>
jmp    1134 <sockutil_addrstrlen+0x34>
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <sockutil_addrstrlen+0x5d>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <sockutil_addrstrlen+0x5d>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sockutil_addrstrlen>:
mov    (%rdi),%ecx
cmp    $0x80,%ecx
je     1120 <sockutil_addrstrlen+0x20>
mov    $0xffffffff,%eax
cmp    $0x81,%ecx
jne    1129 <sockutil_addrstrlen+0x29>
mov    0x2eba(%rip),%rax
jmp    1127 <sockutil_addrstrlen+0x27>
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@INET_ADDRSTRLEN = global i32 0
@INET6_ADDRSTRLEN = global i32 0
define i32 @sockutil_addrstrlen(%struct.sockaddr* %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr*
store %struct.sockaddr* %0, %struct.sockaddr** %3
%4 = load %struct.sockaddr*, %struct.sockaddr** %3
%5 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %4, i32 0, i32 0
%6 = load i32, i32* %5
switch i32 %6, label %11 [
i32 129, label %7
i32 128, label %9
]
7: ; preds = %1
%8 = load i32, i32* @INET_ADDRSTRLEN
store i32 %8, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* @INET6_ADDRSTRLEN
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %12
12: ; preds = %11, %9, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@INET_ADDRSTRLEN = global i32 0
@INET6_ADDRSTRLEN = global i32 0
define i32 @sockutil_addrstrlen(%struct.sockaddr* nocapture %0) {
%2 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %0, i64 0, i32 0
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 129, label %4
i32 128, label %6
]
4: ; preds = %1
%5 = load i32, i32* @INET_ADDRSTRLEN
br label %8
6: ; preds = %1
%7 = load i32, i32* @INET6_ADDRSTRLEN
br label %8
8: ; preds = %1, %6, %4
%9 = phi i32 [ %7, %6 ], [ %5, %4 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
char readc(char *);
int bpa_up(void) {
  return ((readc("/tmp/bpa_info") == 'u') & (readc("/tmp/port_status") == '1'));
}


x86 assembly (clang, -O0):
<bpa_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <readc@plt>
movsbl %al,%eax
cmp    $0x75,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <readc@plt>
mov    %al,%cl
mov    -0x4(%rbp),%eax
movsbl %cl,%ecx
cmp    $0x31,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpa_up>:
push   %rbx
lea    0xee8(%rip),%rdi
call   1030 <readc@plt>
mov    %eax,%ebx
xor    $0x75,%bl
lea    0xee5(%rip),%rdi
call   1030 <readc@plt>
xor    $0x31,%al
xor    %ecx,%ecx
or     %bl,%al
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/tmp/bpa_info\00"
@.str.1 = [17 x i8] c"/tmp/port_status\00"
define i32 @bpa_up() {
%1 = call signext i8 @readc(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = sext i8 %1 to i32
%3 = icmp eq i32 %2, 117
%4 = zext i1 %3 to i32
%5 = call signext i8 @readc(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 49
%8 = zext i1 %7 to i32
%9 = and i32 %4, %8
ret i32 %9
}

LLVM IR (-O2):
@.str = [14 x i8] c"/tmp/bpa_info\00"
@.str.1 = [17 x i8] c"/tmp/port_status\00"
define i32 @bpa_up() {
%1 = tail call signext i8 @readc(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8 %1, 117
%3 = tail call signext i8 @readc(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i8 %3, 49
%5 = and i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void ABGRToUVRow_C() {}


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

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

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

LLVM IR (-O2):
define void @ABGRToUVRow_C() {
ret void
}
/* Variables and functions */
unsigned int _tty_write(char const *, unsigned int);
unsigned int _putk(const char *msg) {
  unsigned int len = 0;
  const char *tmp = msg;
  while (*tmp++)
    len++;
  return _tty_write(msg, len);
}


x86 assembly (clang, -O0):
<_putk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
cmpb   $0x0,(%rax)
je     1151 <_putk+0x41>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <_putk+0x1b>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <_tty_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_putk>:
cmpb   $0x0,(%rdi)
je     1130 <_putk+0x20>
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rsi,1)
lea    0x1(%rsi),%rsi
jne    1120 <_putk+0x10>
jmp    1030 <_tty_write@plt>
xor    %esi,%esi
jmp    1030 <_tty_write@plt>

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

LLVM IR (-O2):
define i32 @_putk(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = add i32 %6, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
%13 = tail call i32 @_tty_write(i8* %0, i32 %12)
ret i32 %13
}
/* Variables and functions */
int glbGetNumberOfSamplingPoints(int);
int glbGetNumberOfSimBins(int exp) { return glbGetNumberOfSamplingPoints(exp); }


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

x86 assembly (clang, -O2):
<glbGetNumberOfSimBins>:
jmp    1030 <glbGetNumberOfSamplingPoints@plt>

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

LLVM IR (-O2):
define i32 @glbGetNumberOfSimBins(i32 %0) {
%2 = tail call i32 @glbGetNumberOfSamplingPoints(i32 %0)
ret i32 %2
}
double alpha_red_1(double d_k_nom, double e_2, double s_2) {
  double _alpha_red_1;
  if (e_2 >= (1.5 * d_k_nom) && s_2 >= (3.0 * d_k_nom)) {
    _alpha_red_1 = 1.0;
  }
  if (e_2 <= (1.2 * d_k_nom) && s_2 <= (2.4 * d_k_nom)) {
    _alpha_red_1 = 0.67;
  }
  return (_alpha_red_1);
}


x86 assembly (clang, -O0):
<alpha_red_1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jb     1158 <alpha_red_1+0x58>
movsd  -0x18(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jb     1158 <alpha_red_1+0x58>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xeb3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     119d <alpha_red_1+0x9d>
movsd  -0x18(%rbp),%xmm1
movsd  0xe9f(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     119d <alpha_red_1+0x9d>
movsd  0xe90(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<alpha_red_1>:
movsd  0xef8(%rip),%xmm3
mulsd  %xmm0,%xmm3
mulsd  0xef4(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm2,%xmm0
setb   %al
lea    0xef4(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm2
cmpnlesd %xmm3,%xmm1
movsd  0xeda(%rip),%xmm0
andpd  %xmm1,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @alpha_red_1(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %5
%9 = load double, double* %4
%10 = fmul double 1.500000e+00, %9
%11 = fcmp oge double %8, %10
br i1 %11, label %12, label %18
12: ; preds = %3
%13 = load double, double* %6
%14 = load double, double* %4
%15 = fmul double 3.000000e+00, %14
%16 = fcmp oge double %13, %15
br i1 %16, label %17, label %18
17: ; preds = %12
store double 1.000000e+00, double* %7
br label %18
18: ; preds = %17, %12, %3
%19 = load double, double* %5
%20 = load double, double* %4
%21 = fmul double 1.200000e+00, %20
%22 = fcmp ole double %19, %21
br i1 %22, label %23, label %29
23: ; preds = %18
%24 = load double, double* %6
%25 = load double, double* %4
%26 = fmul double 2.400000e+00, %25
%27 = fcmp ole double %24, %26
br i1 %27, label %28, label %29
28: ; preds = %23
store double 6.700000e-01, double* %7
br label %29
29: ; preds = %28, %23, %18
%30 = load double, double* %7
ret double %30
}

LLVM IR (-O2):
define double @alpha_red_1(double %0, double %1, double %2) {
%4 = fmul double %0, 1.200000e+00
%5 = fcmp ult double %4, %1
%6 = fmul double %0, 2.400000e+00
%7 = fcmp ult double %6, %2
%8 = or i1 %5, %7
%9 = select i1 %8, double 1.000000e+00, double 6.700000e-01
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ stdout;
void trc_stdprint(const char *msg) {
  printf("%s", msg);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<trc_stdprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trc_stdprint>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@stdout = global i32 0
define void @trc_stdprint(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
void rgbTriggerClean(struct LSD_SceneNodeInst const *inst, void *instData) {}


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

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

LLVM IR (-O0):
%struct.LSD_SceneNodeInst = type opaque
define void @rgbTriggerClean(%struct.LSD_SceneNodeInst* %0, i8* %1) {
%3 = alloca %struct.LSD_SceneNodeInst*
%4 = alloca i8*
store %struct.LSD_SceneNodeInst* %0, %struct.LSD_SceneNodeInst** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.LSD_SceneNodeInst = type opaque
define void @rgbTriggerClean(%struct.LSD_SceneNodeInst* nocapture %0, i8* nocapture %1) {
ret void
}