xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
size_t __VERIFIER_nondet_size_t() {
  size_t initialValue;
  int byteOffset = 0;
  uint8_t *initialValueAsByte = (uint8_t *)&initialValue;
  for (; byteOffset < sizeof(size_t); ++byteOffset) {
    initialValueAsByte[byteOffset] = 0;
  }
  return initialValue;
}


x86 assembly (clang, -O0):
<__VERIFIER_nondet_size_t>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x8,%rax
jae    113f <__VERIFIER_nondet_size_t+0x3f>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1113 <__VERIFIER_nondet_size_t+0x13>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @__VERIFIER_nondet_size_t() {
ret i64 0
}
/* Type definitions */
struct BSTreeNode {
  int dummy;
};

/* Variables and functions */
int get_max_distance(struct BSTreeNode *);
int /*<<< orphan*/ printf(char *, ...);
void case011(struct BSTreeNode *root) {
  int max_distance;
  printf("case011===>>>get_max_distance start!\n");
  max_distance = get_max_distance(root);
  printf("case011===>>>max distance:%d\n", max_distance);
  printf("case011===>>>get_max_distance end!\n");
}


x86 assembly (clang, -O0):
<case011>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <get_max_distance@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<case011>:
push   %rbx
mov    %rdi,%rbx
lea    0xee3(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <get_max_distance@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee4(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
%struct.BSTreeNode = type { i32 }
@.str = [38 x i8] c"case011===>>>get_max_distance start!\0A\00"
@.str.1 = [30 x i8] c"case011===>>>max distance:%d\0A\00"
@.str.2 = [36 x i8] c"case011===>>>get_max_distance end!\0A\00"
define void @case011(%struct.BSTreeNode* %0) {
%2 = alloca %struct.BSTreeNode*
%3 = alloca i32
store %struct.BSTreeNode* %0, %struct.BSTreeNode** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%5 = load %struct.BSTreeNode*, %struct.BSTreeNode** %2
%6 = call i32 @get_max_distance(%struct.BSTreeNode* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.BSTreeNode = type { i32 }
@.str.1 = [30 x i8] c"case011===>>>max distance:%d\0A\00"
@str = [37 x i8] c"case011===>>>get_max_distance start!\00"
@str.3 = [35 x i8] c"case011===>>>get_max_distance end!\00"
define void @case011(%struct.BSTreeNode* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @get_max_distance(%struct.BSTreeNode* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
struct card {
  int dummy;
};

/* Variables and functions */
int cmp_int_arr(int *, int *, int);
int /*<<< orphan*/ get_op_cmp_point(struct card *, int *);
int cmp_one_pair(struct card *c1, struct card *c2) {
  int point1[4];
  int point2[4];
  get_op_cmp_point(c1, point1);
  get_op_cmp_point(c2, point2);
  return cmp_int_arr(point1, point2, 4);
}


x86 assembly (clang, -O0):
<cmp_one_pair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <get_op_cmp_point@plt>
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <get_op_cmp_point@plt>
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x4,%edx
call   1040 <cmp_int_arr@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_one_pair>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%rbx
lea    0x10(%rsp),%r14
mov    %r14,%rsi
call   1030 <get_op_cmp_point@plt>
mov    %rsp,%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <get_op_cmp_point@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
call   1040 <cmp_int_arr@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.card = type { i32 }
define i32 @cmp_one_pair(%struct.card* %0, %struct.card* %1) {
%3 = alloca %struct.card*
%4 = alloca %struct.card*
%5 = alloca [4 x i32]
%6 = alloca [4 x i32]
store %struct.card* %0, %struct.card** %3
store %struct.card* %1, %struct.card** %4
%7 = load %struct.card*, %struct.card** %3
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%9 = call i32 @get_op_cmp_point(%struct.card* %7, i32* %8)
%10 = load %struct.card*, %struct.card** %4
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%12 = call i32 @get_op_cmp_point(%struct.card* %10, i32* %11)
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%15 = call i32 @cmp_int_arr(i32* %13, i32* %14, i32 4)
ret i32 %15
}

LLVM IR (-O2):
%struct.card = type { i32 }
define i32 @cmp_one_pair(%struct.card* %0, %struct.card* %1) {
%3 = alloca [4 x i32]
%4 = alloca [4 x i32]
%5 = bitcast [4 x i32]* %3 to i8*
%6 = bitcast [4 x i32]* %4 to i8*
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%8 = call i32 @get_op_cmp_point(%struct.card* %0, i32* %7)
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
%10 = call i32 @get_op_cmp_point(%struct.card* %1, i32* %9)
%11 = call i32 @cmp_int_arr(i32* %7, i32* %9, i32 4)
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ MSN_EndChat(char *);
void cMSN_TermChat(char *handle) { MSN_EndChat(handle); }


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

x86 assembly (clang, -O2):
<cMSN_TermChat>:
jmp    1030 <MSN_EndChat@plt>

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

LLVM IR (-O2):
define void @cMSN_TermChat(i8* %0) {
%2 = tail call i32 @MSN_EndChat(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_setscl_val(int);
int /*<<< orphan*/ gpio_setsda_val(int);
void iic_stop(void) {
  gpio_setsda_val(0);
  gpio_setscl_val(1);
  gpio_setsda_val(1);
}


x86 assembly (clang, -O0):
<iic_stop>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <gpio_setsda_val@plt>
mov    $0x1,%edi
call   1040 <gpio_setscl_val@plt>
mov    $0x1,%edi
call   1030 <gpio_setsda_val@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<iic_stop>:
push   %rax
xor    %edi,%edi
call   1030 <gpio_setsda_val@plt>
mov    $0x1,%edi
call   1040 <gpio_setscl_val@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <gpio_setsda_val@plt>

LLVM IR (-O0):
define void @iic_stop() {
%1 = call i32 @gpio_setsda_val(i32 0)
%2 = call i32 @gpio_setscl_val(i32 1)
%3 = call i32 @gpio_setsda_val(i32 1)
ret void
}

LLVM IR (-O2):
define void @iic_stop() {
%1 = tail call i32 @gpio_setsda_val(i32 0)
%2 = tail call i32 @gpio_setscl_val(i32 1)
%3 = tail call i32 @gpio_setsda_val(i32 1)
ret void
}
void main() {
  int x, y;
  x++;
  if (x / 2) {
  L0:
    if (x <= 0)
      goto L3;
    x--;
    goto L1;
  } else {
  L1:
    y++;
    goto L0;
  }
L3:
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     1143 <main+0x43>
jmp    1126 <main+0x26>
cmpl   $0x0,-0x4(%rbp)
jg     1135 <main+0x35>
jmp    1156 <main+0x56>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <main+0x48>
jmp    1148 <main+0x48>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x26>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int print() { printf("Hola Munro\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hola Munro\0A\00"
define i32 @print() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [11 x i8] c"Hola Munro\00"
define i32 @print() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void bookNameNotFound(char bookName[]) {
  printf("\nThe book with name <%s> is not in the bookstore inventory.\n",
         bookName);
}


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

x86 assembly (clang, -O2):
<bookNameNotFound>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"\0AThe book with name <%s> is not in the bookstore inventory.\0A\00"
define void @bookNameNotFound(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [61 x i8] c"\0AThe book with name <%s> is not in the bookstore inventory.\0A\00"
define void @bookNameNotFound(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int depsError();
int /*<<< orphan*/ exit(int);
void depsOK(void) {
  int error = depsError();
  if (error)
    exit(error);
}


x86 assembly (clang, -O0):
<depsOK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <depsError@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <depsOK+0x24>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<depsOK>:
push   %rax
xor    %eax,%eax
call   1030 <depsError@plt>
test   %eax,%eax
jne    112e <depsOK+0xe>
pop    %rax
ret
mov    %eax,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @depsOK() {
%1 = alloca i32
%2 = call i32 (...) @depsError()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i32 @exit(i32 %6)
unreachable
8: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @depsOK() {
%1 = tail call i32 (...) @depsError()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 %1)
unreachable
5: ; preds = %0
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ strreverse(char *, char *);
void modp_uitoa10(uint32_t value, char *str) {
  char *wstr = str;
  do
    *wstr++ = 48 + (value % 10);
  while (value /= 10);
  *wstr = '\0';
  strreverse(str, wstr - 1);
}


x86 assembly (clang, -O0):
<modp_uitoa10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jne    1127 <modp_uitoa10+0x17>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0xffffffffffffffff,%rsi
call   1030 <strreverse@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modp_uitoa10>:
mov    %rsi,%r8
add    $0xffffffffffffffff,%rsi
nopw   0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%eax
sub    %edx,%eax
add    $0x30,%al
mov    %al,0x1(%rsi)
add    $0x1,%rsi
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1120 <modp_uitoa10+0x10>
movb   $0x0,0x1(%rsi)
mov    %r8,%rdi
jmp    1030 <strreverse@plt>

LLVM IR (-O0):
define void @modp_uitoa10(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
store i8* %6, i8** %5
br label %7
7: ; preds = %14, %2
%8 = load i32, i32* %3
%9 = srem i32 %8, 10
%10 = add nsw i32 48, %9
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %5
store i8 %11, i8* %12
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = sdiv i32 %15, 10
store i32 %16, i32* %3
%17 = icmp ne i32 %16, 0
br i1 %17, label %7, label %18
18: ; preds = %14
%19 = load i8*, i8** %5
store i8 0, i8* %19
%20 = load i8*, i8** %4
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i64 -1
%23 = call i32 @strreverse(i8* %20, i8* %22)
ret void
}

LLVM IR (-O2):
define void @modp_uitoa10(i32 %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %10, %3 ]
%5 = phi i8* [ %1, %2 ], [ %9, %3 ]
%6 = srem i32 %4, 10
%7 = trunc i32 %6 to i8
%8 = add nsw i8 %7, 48
%9 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %8, i8* %5
%10 = sdiv i32 %4, 10
%11 = add i32 %4, 9
%12 = icmp ult i32 %11, 19
br i1 %12, label %13, label %3
13: ; preds = %3
store i8 0, i8* %9
%14 = tail call i32 @strreverse(i8* %1, i8* %5)
ret void
}
void odp_cpu_pause(void) {
  __asm__ __volatile__("nop");
  __asm__ __volatile__("nop");
  __asm__ __volatile__("nop");
  __asm__ __volatile__("nop");
}


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

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

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

LLVM IR (-O2):
define void @odp_cpu_pause() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int sungetch(int _ignored, int _str_p) {
  const char **str_p = (const char **)_str_p;
  const char *str = *str_p;
  int c;
  str--;
  c = (unsigned char)(*str);
  *str_p = str;
  return c;
}


x86 assembly (clang, -O0):
<sungetch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sungetch>:
movslq %esi,%rcx
mov    (%rcx),%rdx
movzbl -0x1(%rdx),%eax
add    $0xffffffffffffffff,%rdx
mov    %rdx,(%rcx)
ret

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

LLVM IR (-O2):
define i32 @sungetch(i32 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = inttoptr i64 %3 to i8**
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 -1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
store i8* %6, i8** %4
ret i32 %8
}
void gtk_list_store_insert_before() {}


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

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

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

LLVM IR (-O2):
define void @gtk_list_store_insert_before() {
ret void
}
/* Variables and functions */
int close(int);
int mpath_disconnect(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<mpath_disconnect>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @mpath_disconnect(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ net_send(int, char *);
void net_close(int fd) {
  net_send(fd, "QUIT");
  close(fd);
}


x86 assembly (clang, -O0):
<net_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xecb(%rip),%rsi
call   1030 <net_send@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_close>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rsi
call   1030 <net_send@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"QUIT\00"
define void @net_close(i32 %0) {
%2 = tail call i32 @net_send(i32 %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @close(i32 %0)
ret void
}
void UI_dup_input_string(void) {}


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

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

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

LLVM IR (-O2):
define void @UI_dup_input_string() {
ret void
}
void _Get_eh_data(void) {}


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

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

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

LLVM IR (-O2):
define void @_Get_eh_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: fm [-act] <src_mod> [dest_mod] \n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Usage: fm [-act] <src_mod> [dest_mod] \0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [39 x i8] c"Usage: fm [-act] <src_mod> [dest_mod] \00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char);
void writeHexByte(unsigned char b) { printf("%.2hhX", b); }


x86 assembly (clang, -O0):
<writeHexByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
movzbl -0x1(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeHexByte>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%.2hhX\00"
define void @writeHexByte(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 zeroext %3)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.2hhX\00"
define void @writeHexByte(i8 zeroext %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
ret void
}
int load_xtcline(char *line) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @load_xtcline(i8* nocapture readnone %0) {
ret i32 0
}
int a_dec(volatile int *x) { return __sync_fetch_and_sub(x, 1); }


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

x86 assembly (clang, -O2):
<a_dec>:
mov    $0xffffffff,%eax
lock xadd %eax,(%rdi)
ret

LLVM IR (-O0):
define i32 @a_dec(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = atomicrmw sub i32* %3, i32 1 seq_cst
ret i32 %4
}

LLVM IR (-O2):
define i32 @a_dec(i32* nocapture %0) {
%2 = atomicrmw sub i32* %0, i32 1 seq_cst
ret i32 %2
}
/* Variables and functions */
int strlen(char const *);
int write(int, char const *, int);
int serialport_write(int fd, const char *str) {
  int len = strlen(str);
  int n = write(fd, str, len);
  if (n != len) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<serialport_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1165 <serialport_write+0x45>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <serialport_write+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialport_write>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
xor    %ecx,%ecx
cmp    %ebp,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @serialport_write(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
%5 = icmp ne i32 %4, %3
%6 = sext i1 %5 to i32
ret i32 %6
}
long extract_ds(insn, invalid)
unsigned long insn;
int *invalid;
{
  if ((insn & 0x8000) != 0)
    return (insn & 0xfffc) - 0x10000;
  else
    return insn & 0xfffc;
}


x86 assembly (clang, -O0):
<extract_ds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0x8000,%rax
cmp    $0x0,%rax
je     1139 <extract_ds+0x39>
mov    -0x10(%rbp),%rax
and    $0xfffc,%rax
sub    $0x10000,%rax
mov    %rax,-0x8(%rbp)
jmp    1147 <extract_ds+0x47>
mov    -0x10(%rbp),%rax
and    $0xfffc,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_ds>:
mov    %edi,%ecx
and    $0xfffc,%ecx
lea    -0x10000(%rcx),%rax
test   $0x8000,%edi
cmove  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @extract_ds(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32*
store i64 %0, i64* %4
store i32* %1, i32** %5
%6 = load i64, i64* %4
%7 = and i64 %6, 32768
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i64, i64* %4
%11 = and i64 %10, 65532
%12 = sub i64 %11, 65536
store i64 %12, i64* %3
br label %16
13: ; preds = %2
%14 = load i64, i64* %4
%15 = and i64 %14, 65532
store i64 %15, i64* %3
br label %16
16: ; preds = %13, %9
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @extract_ds(i64 %0, i32* nocapture readnone %1) {
%3 = and i64 %0, 32768
%4 = icmp eq i64 %3, 0
%5 = and i64 %0, 65532
%6 = or i64 %5, -65536
%7 = select i1 %4, i64 %5, i64 %6
ret i64 %7
}
void RTSemXRoadsCreate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemXRoadsCreate() {
ret void
}
/* Variables and functions */
char *doubleToString(int);
int parseNum(char *, int);
char *wum_div(char *a, char *b) {
  return doubleToString((parseNum(a, 10) / parseNum(b, 10)));
}


x86 assembly (clang, -O0):
<wum_div>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <parseNum@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1030 <parseNum@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <doubleToString@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wum_div>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    $0xa,%esi
call   1030 <parseNum@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <parseNum@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <doubleToString@plt>

LLVM IR (-O0):
define i8* @wum_div(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 @parseNum(i8* %5, i32 10)
%7 = load i8*, i8** %4
%8 = call i32 @parseNum(i8* %7, i32 10)
%9 = sdiv i32 %6, %8
%10 = call i8* @doubleToString(i32 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @wum_div(i8* %0, i8* %1) {
%3 = tail call i32 @parseNum(i8* %0, i32 10)
%4 = tail call i32 @parseNum(i8* %1, i32 10)
%5 = sdiv i32 %3, %4
%6 = tail call i8* @doubleToString(i32 %5)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ system(char *);
main() {
  char ch = 'A';
  printf("+-------+\n");
  printf("|%7c|\n", ch);
  printf("|%-7c|\n", ch);
  printf("+-------+\n");
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x41,-0x1(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsbl -0x1(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsbl -0x1(%rbp),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea7(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedd(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xe9a(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"+-------+\0A\00"
@.str.1 = [7 x i8] c"|%7c|\0A\00"
@.str.2 = [8 x i8] c"|%-7c|\0A\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i8
store i8 65, i8* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"|%7c|\0A\00"
@.str.2 = [8 x i8] c"|%-7c|\0A\00"
@.str.3 = [6 x i8] c"pause\00"
@str.4 = [10 x i8] c"+-------+\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 65)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 65)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
int belongsToFibonacciSerie(unsigned number) {
  int term1 = 1, term2 = 1, lastTerm;
  do {
    lastTerm = term1 + term2;
    term2 = term1;
    term1 = lastTerm;
  } while (lastTerm < number);
  return lastTerm == number;
}


x86 assembly (clang, -O0):
<belongsToFibonacciSerie>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jb     1115 <belongsToFibonacciSerie+0x15>
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<belongsToFibonacciSerie>:
mov    $0x1,%eax
mov    $0x1,%ecx
nopw   0x0(%rax,%rax,1)
mov    %eax,%edx
add    %ecx,%edx
mov    %ecx,%eax
mov    %edx,%ecx
cmp    %edi,%edx
jb     1110 <belongsToFibonacciSerie+0x10>
sete   %al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @belongsToFibonacciSerie(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %4, %2 ]
%4 = phi i32 [ 1, %1 ], [ %5, %2 ]
%5 = add nsw i32 %4, %3
%6 = icmp ult i32 %5, %0
br i1 %6, label %2, label %7
7: ; preds = %2
%8 = icmp eq i32 %5, %0
%9 = zext i1 %8 to i32
ret i32 %9
}
int samuel_adams(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @samuel_adams(i32 returned %0) {
ret i32 %0
}
void VecSet3iv(int v[3], int x, int y, int z) {
  v[0] = x;
  v[1] = y;
  v[2] = z;
}


x86 assembly (clang, -O0):
<VecSet3iv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecSet3iv>:
mov    %esi,(%rdi)
mov    %edx,0x4(%rdi)
mov    %ecx,0x8(%rdi)
ret

LLVM IR (-O0):
define void @VecSet3iv(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* %6
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32, i32* %7
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
%15 = load i32, i32* %8
%16 = load i32*, i32** %5
%17 = getelementptr inbounds i32, i32* %16, i64 2
store i32 %15, i32* %17
ret void
}

LLVM IR (-O2):
define void @VecSet3iv(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
store i32 %1, i32* %0
%5 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %2, i32* %5
%6 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %3, i32* %6
ret void
}
/* Variables and functions */
scalar_t__ finite(float);
float limat_number_validate(float value) {
  if (finite(value))
    return value;
  return 0.0f;
}


x86 assembly (clang, -O0):
<limat_number_validate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <finite@plt>
cmp    $0x0,%rax
je     1140 <limat_number_validate+0x30>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1148 <limat_number_validate+0x38>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<limat_number_validate>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <finite@plt>
xorps  %xmm0,%xmm0
test   %rax,%rax
je     112a <limat_number_validate+0x1a>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @limat_number_validate(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = call i64 @finite(float %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load float, float* %3
store float %8, float* %2
br label %10
9: ; preds = %1
store float 0.000000e+00, float* %2
br label %10
10: ; preds = %9, %7
%11 = load float, float* %2
ret float %11
}

LLVM IR (-O2):
define float @limat_number_validate(float %0) {
%2 = tail call i64 @finite(float %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, float 0.000000e+00, float %0
ret float %4
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int /*<<< orphan*/ insertion_sort(scalar_t__ *, scalar_t__);
int /*<<< orphan*/ quick_sort4var(scalar_t__ *, scalar_t__, scalar_t__);
void quick_sort4var_aux(int32_t *a, int32_t low, int32_t high) {
  if (high <= low + 12) {
    insertion_sort(a + low, high - low);
  } else {
    quick_sort4var(a, low, high);
  }
}


x86 assembly (clang, -O0):
<quick_sort4var_aux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    $0xc,%rcx
cmp    %rcx,%rax
jg     116a <quick_sort4var_aux+0x4a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
sub    -0x10(%rbp),%rsi
call   1040 <insertion_sort@plt>
jmp    117b <quick_sort4var_aux+0x5b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <quick_sort4var@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_sort4var_aux>:
lea    0xc(%rsi),%rax
cmp    %rdx,%rax
jge    112e <quick_sort4var_aux+0xe>
jmp    1030 <quick_sort4var@plt>
lea    (%rdi,%rsi,8),%rdi
sub    %rsi,%rdx
mov    %rdx,%rsi
jmp    1040 <insertion_sort@plt>

LLVM IR (-O0):
define void @quick_sort4var_aux(i64* %0, i64 %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = load i64, i64* %5
%9 = add nsw i64 %8, 12
%10 = icmp sle i64 %7, %9
br i1 %10, label %11, label %19
11: ; preds = %3
%12 = load i64*, i64** %4
%13 = load i64, i64* %5
%14 = getelementptr inbounds i64, i64* %12, i64 %13
%15 = load i64, i64* %6
%16 = load i64, i64* %5
%17 = sub nsw i64 %15, %16
%18 = call i32 @insertion_sort(i64* %14, i64 %17)
br label %24
19: ; preds = %3
%20 = load i64*, i64** %4
%21 = load i64, i64* %5
%22 = load i64, i64* %6
%23 = call i32 @quick_sort4var(i64* %20, i64 %21, i64 %22)
br label %24
24: ; preds = %19, %11
ret void
}

LLVM IR (-O2):
define void @quick_sort4var_aux(i64* %0, i64 %1, i64 %2) {
%4 = add nsw i64 %1, 12
%5 = icmp slt i64 %4, %2
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = getelementptr inbounds i64, i64* %0, i64 %1
%8 = sub nsw i64 %2, %1
%9 = tail call i32 @insertion_sort(i64* %7, i64 %8)
br label %12
10: ; preds = %3
%11 = tail call i32 @quick_sort4var(i64* %0, i64 %1, i64 %2)
br label %12
12: ; preds = %10, %6
ret void
}
int fun695() { return 695; }


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

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

LLVM IR (-O0):
define i32 @fun695() {
ret i32 695
}

LLVM IR (-O2):
define i32 @fun695() {
ret i32 695
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void pmu_set_sleep_low() {
  mbus_remote_register_write(
      0x6, 0x17, ((3 << 14) | (0 << 13) | (0xF << 9) | (0xC << 5) | (1)));
  delay(100);
  mbus_remote_register_write(
      0x6, 0x17, ((3 << 14) | (0 << 13) | (0xF << 9) | (0xC << 5) | (1)));
  delay(100);
  mbus_remote_register_write(0x6, 0x15,
                             ((0 << 19) | (0 << 18) | (0 << 17) | (3 << 14) |
                              (0 << 13) | (0xF << 9) | (0xC << 5) | (1)));
  delay(100);
}


x86 assembly (clang, -O0):
<pmu_set_sleep_low>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xdf81,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xdf81,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x15,%esi
mov    $0xdf81,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_set_sleep_low>:
push   %rax
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xdf81,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xdf81,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x15,%esi
mov    $0xdf81,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @pmu_set_sleep_low() {
%1 = call i32 @mbus_remote_register_write(i32 6, i32 23, i32 57217)
%2 = call i32 @delay(i32 100)
%3 = call i32 @mbus_remote_register_write(i32 6, i32 23, i32 57217)
%4 = call i32 @delay(i32 100)
%5 = call i32 @mbus_remote_register_write(i32 6, i32 21, i32 57217)
%6 = call i32 @delay(i32 100)
ret void
}

LLVM IR (-O2):
define void @pmu_set_sleep_low() {
%1 = tail call i32 @mbus_remote_register_write(i32 6, i32 23, i32 57217)
%2 = tail call i32 @delay(i32 100)
%3 = tail call i32 @mbus_remote_register_write(i32 6, i32 23, i32 57217)
%4 = tail call i32 @delay(i32 100)
%5 = tail call i32 @mbus_remote_register_write(i32 6, i32 21, i32 57217)
%6 = tail call i32 @delay(i32 100)
ret void
}
/* Type definitions */
struct option {
  int dummy;
};

/* Variables and functions */
int _gnu_getopt_internal(int, char *const *, char const *,
                         struct option const *, int *, int);
int gnu_getopt_long_only(int argc, char *const *argv, const char *options,
                         const struct option *long_options, int *opt_index) {
  return _gnu_getopt_internal(argc, argv, options, long_options, opt_index, 1);
}


x86 assembly (clang, -O0):
<gnu_getopt_long_only>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x1,%r9d
call   1030 <_gnu_getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gnu_getopt_long_only>:
mov    $0x1,%r9d
jmp    1030 <_gnu_getopt_internal@plt>

LLVM IR (-O0):
%struct.option = type { i32 }
define i32 @gnu_getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option* %3, %struct.option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.option*, %struct.option** %9
%15 = load i32*, i32** %10
%16 = call i32 @_gnu_getopt_internal(i32 %11, i8** %12, i8* %13, %struct.option* %14, i32* %15, i32 1)
ret i32 %16
}

LLVM IR (-O2):
%struct.option = type { i32 }
define i32 @gnu_getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = tail call i32 @_gnu_getopt_internal(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ handle_tekshow(void *, int /*<<< orphan*/);
void do_tekonoff(void *gw, void *closure, void *data) { handle_tekshow(gw, 0); }


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

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

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

LLVM IR (-O2):
define void @do_tekonoff(i8* %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @handle_tekshow(i8* %0, i32 0)
ret void
}
void XkbToControl() {}


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

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

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

LLVM IR (-O2):
define void @XkbToControl() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void hello() { puts("moshi mosh"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"moshi mosh\00"
define void @hello() {
%1 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"moshi mosh\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
int minimum(int a, int b) {
  if (a < b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<minimum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <minimum+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <minimum+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minimum>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @minimum(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}