xunge/DecIR huggingface dataset:
unsigned xrop3_206_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;
  stk2 = D & stk3;
  stk1 = S | stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_206_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
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%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_206_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
not    %sil
movzbl %sil,%ecx
not    %eax
and    %ecx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_206_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 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %5
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_206_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %1, -1
%6 = zext i8 %5 to i32
%7 = xor i32 %4, -1
%8 = and i32 %7, %6
%9 = or i32 %8, %3
ret i32 %9
}
void ConvertCharToStringStack(char *output, const char input) {
  if (input == '\0')
    *output = 0;
  else {
    output[0] = input;
    output[1] = '\0';
  }
}


x86 assembly (clang, -O0):
<ConvertCharToStringStack>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    1127 <ConvertCharToStringStack+0x27>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    1138 <ConvertCharToStringStack+0x38>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertCharToStringStack>:
test   %sil,%sil
je     110c <ConvertCharToStringStack+0xc>
mov    %sil,(%rdi)
add    $0x1,%rdi
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @ConvertCharToStringStack(i8* nocapture writeonly %0, i8 signext %1) {
%3 = icmp eq i8 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
store i8 %1, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 1
br label %6
6: ; preds = %2, %4
%7 = phi i8* [ %5, %4 ], [ %0, %2 ]
store i8 0, i8* %7
ret void
}
/* Type definitions */
struct array_walk_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct array_walk_data *);
void array_walk_cleanup_task(void *group_data, void *task_data) {
  struct array_walk_data *data = (struct array_walk_data *)task_data;
  free(data);
}


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

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

LLVM IR (-O0):
%struct.array_walk_data = type { i32 }
define void @array_walk_cleanup_task(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.array_walk_data*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to %struct.array_walk_data*
store %struct.array_walk_data* %7, %struct.array_walk_data** %5
%8 = load %struct.array_walk_data*, %struct.array_walk_data** %5
%9 = call i32 @free(%struct.array_walk_data* %8)
ret void
}

LLVM IR (-O2):
%struct.array_walk_data = type { i32 }
define void @array_walk_cleanup_task(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to %struct.array_walk_data*
%4 = tail call i32 @free(%struct.array_walk_data* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cgincind(char *, char *, int);
void cgdec2pi(int v) { cgincind("bx", "sub", v); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"bx\00"
@.str.1 = [4 x i8] c"sub\00"
define void @cgdec2pi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cgincind(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"bx\00"
@.str.1 = [4 x i8] c"sub\00"
define void @cgdec2pi(i32 %0) {
%2 = tail call i32 @cgincind(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int safe_add(int, int);
int addi(int register2, int number) { return safe_add(register2, number); }


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

x86 assembly (clang, -O2):
<addi>:
jmp    1030 <safe_add@plt>

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

LLVM IR (-O2):
define i32 @addi(i32 %0, i32 %1) {
%3 = tail call i32 @safe_add(i32 %0, i32 %1)
ret i32 %3
}
void gtk_icon_view_set_spacing() {}


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

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

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

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

/* Variables and functions */
int __setxid(int, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int setregid(gid_t rgid, gid_t egid) { return __setxid(71, rgid, egid, 0); }


x86 assembly (clang, -O0):
<setregid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0x47,%edi
xor    %ecx,%ecx
call   1030 <__setxid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setregid>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x47,%edi
xor    %ecx,%ecx
jmp    1030 <__setxid@plt>

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

LLVM IR (-O2):
define i32 @setregid(i32 %0, i32 %1) {
%3 = tail call i32 @__setxid(i32 71, i32 %0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ magic(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int height;
  printf("Enter height:\n");
  scanf("%d", &height);
  magic(height);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1030 <magic@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecb(%rip),%rdi
call   1040 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <magic@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter height:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @magic(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [14 x i8] c"Enter height:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @magic(i32 %5)
ret i32 0
}
/* Variables and functions */
double gsl_ran_exponential_pdf(double, int);
double pdf_Exponential(double x) { return gsl_ran_exponential_pdf(x, 1); }


x86 assembly (clang, -O0):
<pdf_Exponential>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%edi
call   1030 <gsl_ran_exponential_pdf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdf_Exponential>:
mov    $0x1,%edi
jmp    1030 <gsl_ran_exponential_pdf@plt>

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

LLVM IR (-O2):
define double @pdf_Exponential(double %0) {
%2 = tail call double @gsl_ran_exponential_pdf(double %0, i32 1)
ret double %2
}
int test_imm_0Cint16_reg(short val) {
  return ((val) & (-0x0C << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_0Cint16_reg>:
test   $0xfff4,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_0Cint16_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, -12
%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_0Cint16_reg(i16 signext %0) {
%2 = and i16 %0, -12
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int int_size(int64_t value) {
  int size = 1;
  int64_t max_value = 1 << 7;
  for (max_value = 1 << 7; value >= max_value || value < -max_value;
       max_value <<= 8) {
    size++;
    if (size == 8)
      break;
  }
  return size;
}


x86 assembly (clang, -O0):
<int_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x80,-0xc(%rbp)
movl   $0x80,-0xc(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
cmp    -0xc(%rbp),%ecx
mov    %al,-0xd(%rbp)
jge    113d <int_size+0x3d>
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114d <int_size+0x4d>
jmp    1178 <int_size+0x78>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jne    1165 <int_size+0x65>
jmp    1178 <int_size+0x78>
jmp    116a <int_size+0x6a>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
jmp    111c <int_size+0x1c>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_size>:
movsbl %dil,%ecx
mov    $0x1,%eax
cmp    %edi,%ecx
je     1130 <int_size+0x30>
movswl %di,%ecx
mov    $0x2,%eax
cmp    %edi,%ecx
je     1130 <int_size+0x30>
add    $0xff800000,%edi
xor    %eax,%eax
cmp    $0xff000000,%edi
setb   %al
lea    (%rax,%rax,4),%eax
add    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @int_size(i32 %0) {
%2 = add i32 %0, -128
%3 = icmp ult i32 %2, -256
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = add i32 %0, -32768
%6 = icmp ult i32 %5, -65536
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = add i32 %0, -8388608
%9 = icmp ult i32 %8, -16777216
%10 = select i1 %9, i32 8, i32 3
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 1, %1 ], [ 2, %4 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
scalar_t__ strcmp(char *, char *);
int strEquals(char *string1, char *string2) {
  assert(string1 != NULL);
  if (!string2)
    return 0;
  return strcmp(string1, string2) == 0;
}


x86 assembly (clang, -O0):
<strEquals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
jne    1159 <strEquals+0x39>
movl   $0x0,-0x4(%rbp)
jmp    1175 <strEquals+0x55>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strEquals>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
test   %r14,%r14
je     1155 <strEquals+0x35>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
jmp    1157 <strEquals+0x37>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @strEquals(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp eq i8* %1, null
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = tail call i64 @strcmp(i8* %0, i8* %1)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %2, %7
%12 = phi i32 [ %10, %7 ], [ 0, %2 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ free(char **);
void freedirlist(char **dirlist) {
  char **dirp;
  dirp = dirlist;
  while (*dirlist) {
    free(*dirlist++);
  }
  free(dirp);
}


x86 assembly (clang, -O0):
<freedirlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114e <freedirlist+0x3e>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rdi
call   1030 <free@plt>
jmp    1124 <freedirlist+0x14>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freedirlist>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <freedirlist+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <freedirlist+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freedirlist(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %10, %4 ], [ %2, %1 ]
%6 = phi i8** [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = bitcast i8* %5 to i8**
%9 = tail call i32 @free(i8** %8)
%10 = load i8*, i8** %7
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @free(i8** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ digitalWrite(int, int);
int /*<<< orphan*/ usDelay(int);
void B(void) {
  digitalWrite(29, 1);
  usDelay(7000);
  digitalWrite(29, 0);
  usDelay(7000);
  digitalWrite(29, 1);
  usDelay(7000);
  digitalWrite(29, 0);
  usDelay(51000);
}


x86 assembly (clang, -O0):
<B>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d,%edi
mov    $0x1,%esi
call   1030 <digitalWrite@plt>
mov    $0x1b58,%edi
call   1040 <usDelay@plt>
mov    $0x1d,%edi
xor    %esi,%esi
call   1030 <digitalWrite@plt>
mov    $0x1b58,%edi
call   1040 <usDelay@plt>
mov    $0x1d,%edi
mov    $0x1,%esi
call   1030 <digitalWrite@plt>
mov    $0x1b58,%edi
call   1040 <usDelay@plt>
mov    $0x1d,%edi
xor    %esi,%esi
call   1030 <digitalWrite@plt>
mov    $0xc738,%edi
call   1040 <usDelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<B>:
push   %rax
mov    $0x1d,%edi
mov    $0x1,%esi
call   1030 <digitalWrite@plt>
mov    $0x1b58,%edi
call   1040 <usDelay@plt>
mov    $0x1d,%edi
xor    %esi,%esi
call   1030 <digitalWrite@plt>
mov    $0x1b58,%edi
call   1040 <usDelay@plt>
mov    $0x1d,%edi
mov    $0x1,%esi
call   1030 <digitalWrite@plt>
mov    $0x1b58,%edi
call   1040 <usDelay@plt>
mov    $0x1d,%edi
xor    %esi,%esi
call   1030 <digitalWrite@plt>
mov    $0xc738,%edi
pop    %rax
jmp    1040 <usDelay@plt>

LLVM IR (-O0):
define void @B() {
%1 = call i32 @digitalWrite(i32 29, i32 1)
%2 = call i32 @usDelay(i32 7000)
%3 = call i32 @digitalWrite(i32 29, i32 0)
%4 = call i32 @usDelay(i32 7000)
%5 = call i32 @digitalWrite(i32 29, i32 1)
%6 = call i32 @usDelay(i32 7000)
%7 = call i32 @digitalWrite(i32 29, i32 0)
%8 = call i32 @usDelay(i32 51000)
ret void
}

LLVM IR (-O2):
define void @B() {
%1 = tail call i32 @digitalWrite(i32 29, i32 1)
%2 = tail call i32 @usDelay(i32 7000)
%3 = tail call i32 @digitalWrite(i32 29, i32 0)
%4 = tail call i32 @usDelay(i32 7000)
%5 = tail call i32 @digitalWrite(i32 29, i32 1)
%6 = tail call i32 @usDelay(i32 7000)
%7 = tail call i32 @digitalWrite(i32 29, i32 0)
%8 = tail call i32 @usDelay(i32 51000)
ret void
}
int main() {
  char out = 0x55;
  __asm__("movb $0xFE, %%al; cmpb $0xFF, %%al; setc %%al" : "=a"(out));
  return out;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x55,-0x5(%rbp)
mov    $0xfe,%al
cmp    $0xff,%al
setb   %al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xfe,%al
cmp    $0xff,%al
setb   %al
movsbl %al,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 85, i8* %2
%3 = call i8 asm "movb $$0xFE, %al; cmpb $$0xFF, %al; setc %al", "={ax},~{dirflag},~{fpsr},~{flags}"()
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8 asm "movb $$0xFE, %al; cmpb $$0xFF, %al; setc %al", "={ax},~{dirflag},~{fpsr},~{flags}"()
%2 = sext i8 %1 to i32
ret i32 %2
}
char hextoasc11(int xxc) {
  xxc &= 0x0f;
  if (xxc < 0x0a)
    xxc += '0';
  else
    xxc += 0x37;
  return (char)xxc;
}


x86 assembly (clang, -O0):
<hextoasc11>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1128 <hextoasc11+0x28>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1131 <hextoasc11+0x31>
mov    -0x4(%rbp),%eax
add    $0x37,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hextoasc11>:
and    $0xf,%edi
lea    0x37(%rdi),%eax
lea    0x30(%rdi),%ecx
cmp    $0xa,%edi
movzbl %cl,%ecx
movzbl %al,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @hextoasc11(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 48
store i32 %9, i32* %2
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 55
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %7
%14 = load i32, i32* %2
%15 = trunc i32 %14 to i8
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @hextoasc11(i32 %0) {
%2 = and i32 %0, 15
%3 = icmp ult i32 %2, 10
%4 = or i32 %2, 48
%5 = add nuw nsw i32 %2, 55
%6 = select i1 %3, i32 %4, i32 %5
%7 = trunc i32 %6 to i8
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ ltrim(char *);
int /*<<< orphan*/ rtrim(char *);
char *trim(char c[1024]) {
  rtrim(c);
  ltrim(c);
  return c;
}


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

x86 assembly (clang, -O2):
<trim>:
push   %rbx
mov    %rdi,%rbx
call   1030 <rtrim@plt>
mov    %rbx,%rdi
call   1040 <ltrim@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @trim(i8* returned %0) {
%2 = tail call i32 @rtrim(i8* %0)
%3 = tail call i32 @ltrim(i8* %0)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void stdiologstr(char *str) { puts(str); }


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

x86 assembly (clang, -O2):
<stdiologstr>:
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
define void @stdiologstr(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
void ERR_unload_strings(void) {}


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

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

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

LLVM IR (-O2):
define void @ERR_unload_strings() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ native_irq_enable();
__attribute__((always_)) void raw_local_irq_enable(void) {
  native_irq_enable();
}


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

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

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

LLVM IR (-O2):
define void @raw_local_irq_enable() {
%1 = tail call i32 (...) @native_irq_enable()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *,
                           char *);
char *getprogname();
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "usage: %s [-s signal_name] pid ...\n"
          "       %s -l [exit_status]\n"
          "       %s -signal_name pid ...\n"
          "       %s -signal_number pid ...\n",
          getprogname(), getprogname(), getprogname(), getprogname());
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    %rax,%r9
lea    0xe7b(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x2ea2(%rip),%rax
mov    (%rax),%r14d
xor    %eax,%eax
call   1030 <getprogname@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1030 <getprogname@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1030 <getprogname@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xe93(%rip),%rsi
mov    %r14d,%edi
mov    %r15,%rdx
mov    %rbp,%rcx
mov    %rbx,%r8
mov    %rax,%r9
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [127 x i8] c"usage: %s [-s signal_name] pid ...\0A %s -l [exit_status]\0A %s -signal_name pid ...\0A %s -signal_number pid ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @getprogname()
%3 = call i8* (...) @getprogname()
%4 = call i8* (...) @getprogname()
%5 = call i8* (...) @getprogname()
%6 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %4, i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [127 x i8] c"usage: %s [-s signal_name] pid ...\0A %s -l [exit_status]\0A %s -signal_name pid ...\0A %s -signal_number pid ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @getprogname()
%3 = tail call i8* (...) @getprogname()
%4 = tail call i8* (...) @getprogname()
%5 = tail call i8* (...) @getprogname()
%6 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %4, i8* %5)
%7 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_quaddobl_multi_homogenization(int m) {
  int fail;
  int b;
  double c;
  fail = _ada_use_c2phc4c(912, &m, &b, &c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_quaddobl_multi_homogenization>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x390,%edi
lea    -0x4(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x18(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_quaddobl_multi_homogenization>:
sub    $0x18,%rsp
mov    %edi,0x8(%rsp)
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    $0x390,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @solcon_quaddobl_multi_homogenization(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %2
%6 = call i32 @_ada_use_c2phc4c(i32 912, i32* %2, i32* %4, double* %5, i32 0)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @solcon_quaddobl_multi_homogenization(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %2
%5 = bitcast i32* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = call i32 @_ada_use_c2phc4c(i32 912, i32* %2, i32* %3, double* %4, i32 0)
ret i32 %7
}
void XRayStartFrame() {}


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

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

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

LLVM IR (-O2):
define void @XRayStartFrame() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ psdes_hash_64(unsigned int *, unsigned int *);
void iran64_r(unsigned *pout0, unsigned *pout1, unsigned *pstate0,
              unsigned *pstate1) {
  *pout0 = *pstate0;
  *pout1 = *pstate1;
  psdes_hash_64(pout0, pout1);
  (*pstate1)++;
  if (*pstate1 == 0)
    (*pstate0)++;
}


x86 assembly (clang, -O0):
<iran64_r>:
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    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <psdes_hash_64@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1170 <iran64_r+0x60>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iran64_r>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdx,%r14
mov    (%rdx),%eax
mov    %eax,(%rdi)
mov    (%rcx),%eax
mov    %eax,(%rsi)
call   1030 <psdes_hash_64@plt>
addl   $0x1,(%rbx)
jne    1130 <iran64_r+0x20>
addl   $0x1,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @iran64_r(i32* %0, i32* %1, i32* nocapture %2, i32* nocapture %3) {
%5 = load i32, i32* %2
store i32 %5, i32* %0
%6 = load i32, i32* %3
store i32 %6, i32* %1
%7 = tail call i32 @psdes_hash_64(i32* %0, i32* %1)
%8 = load i32, i32* %3
%9 = add i32 %8, 1
store i32 %9, i32* %3
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i32, i32* %2
%13 = add i32 %12, 1
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void post_user() { write("msproject.xml", "</Resource>\n", NULL); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"msproject.xml\00"
@.str.1 = [13 x i8] c"</Resource>\0A\00"
define void @post_user() {
%1 = call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"msproject.xml\00"
@.str.1 = [13 x i8] c"</Resource>\0A\00"
define void @post_user() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void output_title(const char *charsetname) {
  printf("\n");
  printf("/*\n");
  printf(" * %s\n", charsetname);
  printf(" */\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<output_title>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_title>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xec2(%rip),%rdi
call   1040 <puts@plt>
lea    0xeaf(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str.2 = [7 x i8] c" * %s\0A\00"
@str = [3 x i8] c"/*\00"
@str.4 = [4 x i8] c" */\00"
define void @output_title(i8* %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_init_line(int, int);
void uart_init(void) {
  uart_init_line((0x3f8 - 0x2f8), 9600);
  uart_init_line(0, 9600);
}


x86 assembly (clang, -O0):
<uart_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100,%edi
mov    $0x2580,%esi
call   1030 <uart_init_line@plt>
xor    %edi,%edi
mov    $0x2580,%esi
call   1030 <uart_init_line@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_init>:
push   %rax
mov    $0x100,%edi
mov    $0x2580,%esi
call   1030 <uart_init_line@plt>
xor    %edi,%edi
mov    $0x2580,%esi
pop    %rax
jmp    1030 <uart_init_line@plt>

LLVM IR (-O0):
define void @uart_init() {
%1 = call i32 @uart_init_line(i32 256, i32 9600)
%2 = call i32 @uart_init_line(i32 0, i32 9600)
ret void
}

LLVM IR (-O2):
define void @uart_init() {
%1 = tail call i32 @uart_init_line(i32 256, i32 9600)
%2 = tail call i32 @uart_init_line(i32 0, i32 9600)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ script_action_install(int);
int script_action_installnext_timer_cb(void *data, int remaining_calls) {
  (void)remaining_calls;
  script_action_install((data) ? 1 : 0);
  return 0;
}


x86 assembly (clang, -O0):
<script_action_installnext_timer_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
xor    %edi,%edi
mov    $0x1,%eax
cmp    $0x0,%rcx
cmovne %eax,%edi
call   1030 <script_action_install@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<script_action_installnext_timer_cb>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
mov    %eax,%edi
call   1030 <script_action_install@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @script_action_installnext_timer_cb(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
%10 = call i32 @script_action_install(i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @script_action_installnext_timer_cb(i8* readnone %0, i32 %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @script_action_install(i32 %4)
ret i32 0
}
int dns_cache_submit(struct dns_packet *query, struct dns_cache *cache) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.dns_packet = type opaque
%struct.dns_cache = type opaque
define i32 @dns_cache_submit(%struct.dns_packet* nocapture readnone %0, %struct.dns_cache* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct varbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vbresize(struct varbuf *, int /*<<< orphan*/);
void vbclear(struct varbuf *vb) { vbresize(vb, 0); }


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

x86 assembly (clang, -O2):
<vbclear>:
xor    %esi,%esi
jmp    1030 <vbresize@plt>

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

LLVM IR (-O2):
%struct.varbuf = type { i32 }
define void @vbclear(%struct.varbuf* %0) {
%2 = tail call i32 @vbresize(%struct.varbuf* %0, i32 0)
ret void
}
void foo709() {}


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

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

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

LLVM IR (-O2):
define void @foo709() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int _open(char *name __attribute__((unused)), int flags __attribute__((unused)),
          int mode __attribute__((unused))) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<_open>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2ed3(%rip),%rax
mov    (%rax),%ecx
mov    0x2eba(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_open>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_open(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_open(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool h265hvcc_get_temporal_id_nested(const uint8_t *p) { return p[21] & 0x4; }


x86 assembly (clang, -O0):
<h265hvcc_get_temporal_id_nested>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x54(%rax),%eax
and    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h265hvcc_get_temporal_id_nested>:
mov    0x54(%rdi),%eax
and    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @h265hvcc_get_temporal_id_nested(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 21
%5 = load i32, i32* %4
%6 = and i32 %5, 4
ret i32 %6
}

LLVM IR (-O2):
define i32 @h265hvcc_get_temporal_id_nested(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 21
%3 = load i32, i32* %2
%4 = and i32 %3, 4
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void imprime_string(char *c) {
  int i;
  i = 0;
  while (c[i] != '\0') {
    printf("%c", c[i]);
    i++;
  }
}


x86 assembly (clang, -O0):
<imprime_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115e <imprime_string+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
lea    0xeb9(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <imprime_string+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprime_string>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1146 <imprime_string+0x36>
mov    %rdi,%rbx
add    $0x1,%rbx
lea    0xed8(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <imprime_string+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @imprime_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
float linear_io(float step, float max_steps, float max_val) {
  return step * max_val / max_steps;
}


x86 assembly (clang, -O0):
<linear_io>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_io>:
mulss  %xmm2,%xmm0
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @linear_io(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %6
%9 = fmul float %7, %8
%10 = load float, float* %5
%11 = fdiv float %9, %10
ret float %11
}

LLVM IR (-O2):
define float @linear_io(float %0, float %1, float %2) {
%4 = fmul float %0, %2
%5 = fdiv float %4, %1
ret float %5
}
int _read(int file, char *ptr, int len) {
  (void)file;
  (void)ptr;
  (void)len;
  return 0;
}


x86 assembly (clang, -O0):
<_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_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 i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @_read(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int unknown_handler(char *param, char *val) {
  printf("find unknown param: %s\n", param);
  return 0;
}


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

x86 assembly (clang, -O2):
<unknown_handler>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"find unknown param: %s\0A\00"
define i32 @unknown_handler(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}