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

/* Variables and functions */
uint8_t char_toNum(char sv) {
  switch (sv) {
  case '0':
    return 0;
  case '1':
    return 1;
  case '2':
    return 2;
  case '3':
    return 3;
  case '4':
    return 4;
  case '5':
    return 5;
  case '6':
    return 6;
  case '7':
    return 7;
  case '8':
    return 8;
  case '9':
    return 9;
  }
}


x86 assembly (clang, -O0):
<char_toNum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x9,%eax
ja     11a7 <char_toNum+0xa7>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    11a7 <char_toNum+0xa7>
movl   $0x1,-0x4(%rbp)
jmp    11a7 <char_toNum+0xa7>
movl   $0x2,-0x4(%rbp)
jmp    11a7 <char_toNum+0xa7>
movl   $0x3,-0x4(%rbp)
jmp    11a7 <char_toNum+0xa7>
movl   $0x4,-0x4(%rbp)
jmp    11a7 <char_toNum+0xa7>
movl   $0x5,-0x4(%rbp)
jmp    11a7 <char_toNum+0xa7>
movl   $0x6,-0x4(%rbp)
jmp    11a7 <char_toNum+0xa7>
movl   $0x7,-0x4(%rbp)
jmp    11a7 <char_toNum+0xa7>
movl   $0x8,-0x4(%rbp)
jmp    11a7 <char_toNum+0xa7>
movl   $0x9,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_toNum>:
lea    -0x31(%rdi),%ecx
lea    -0x30(%rdi),%edx
xor    %eax,%eax
cmp    $0x9,%ecx
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define i32 @char_toNum(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %16 [
i32 48, label %6
i32 49, label %7
i32 50, label %8
i32 51, label %9
i32 52, label %10
i32 53, label %11
i32 54, label %12
i32 55, label %13
i32 56, label %14
i32 57, label %15
]
6: ; preds = %1
store i32 0, i32* %2
br label %16
7: ; preds = %1
store i32 1, i32* %2
br label %16
8: ; preds = %1
store i32 2, i32* %2
br label %16
9: ; preds = %1
store i32 3, i32* %2
br label %16
10: ; preds = %1
store i32 4, i32* %2
br label %16
11: ; preds = %1
store i32 5, i32* %2
br label %16
12: ; preds = %1
store i32 6, i32* %2
br label %16
13: ; preds = %1
store i32 7, i32* %2
br label %16
14: ; preds = %1
store i32 8, i32* %2
br label %16
15: ; preds = %1
store i32 9, i32* %2
br label %16
16: ; preds = %6, %7, %8, %9, %10, %11, %12, %13, %14, %15, %1
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @char_toNum(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -49
%4 = icmp ult i32 %3, 9
%5 = add nsw i32 %2, -48
%6 = select i1 %4, i32 %5, i32 0
ret i32 %6
}
int str_length(char *string) {
  int i;
  for (i = 0; string[i] != '\0'; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<str_length>:
push   %rbp
mov    %rsp,%rbp
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     1137 <str_length+0x37>
jmp    1129 <str_length+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <str_length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_length>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <str_length+0x10>
ret

LLVM IR (-O0):
define i32 @str_length(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %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 %16
12: ; preds = %4
br label %13
13: ; preds = %12
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @str_length(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int value_as_float(unsigned int);
unsigned int value_as_int(int);
unsigned int mul_func(unsigned int param1, unsigned int param2) {
  return value_as_int(value_as_float(param1) * value_as_float(param2));
}


x86 assembly (clang, -O0):
<mul_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <value_as_float@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <value_as_float@plt>
mov    -0xc(%rbp),%edi
imul   %eax,%edi
call   1040 <value_as_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul_func>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <value_as_float@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <value_as_float@plt>
imul   %eax,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <value_as_int@plt>

LLVM IR (-O0):
define i32 @mul_func(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 = call i32 @value_as_float(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @value_as_float(i32 %7)
%9 = mul nsw i32 %6, %8
%10 = call i32 @value_as_int(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @mul_func(i32 %0, i32 %1) {
%3 = tail call i32 @value_as_float(i32 %0)
%4 = tail call i32 @value_as_float(i32 %1)
%5 = mul nsw i32 %4, %3
%6 = tail call i32 @value_as_int(i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ codeGoTo(int);
int /*<<< orphan*/ codeStr(char *);
void codeZero(int x) {
  codeGoTo(x);
  codeStr("[-]");
}


x86 assembly (clang, -O0):
<codeZero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <codeGoTo@plt>
lea    0xec6(%rip),%rdi
call   1040 <codeStr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<codeZero>:
push   %rax
call   1030 <codeGoTo@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1040 <codeStr@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"[-]\00"
define void @codeZero(i32 %0) {
%2 = tail call i32 @codeGoTo(i32 %0)
%3 = tail call i32 @codeStr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rsencode(char *, char *);
void EncodeBlock(char *Data, char *Encoded) { rsencode(Data, Encoded); }


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

x86 assembly (clang, -O2):
<EncodeBlock>:
jmp    1030 <rsencode@plt>

LLVM IR (-O0):
define void @EncodeBlock(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 = load i8*, i8** %4
%7 = call i32 @rsencode(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @EncodeBlock(i8* %0, i8* %1) {
%3 = tail call i32 @rsencode(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Block_object_dispose(void *, int);
void __Block_byref_id_object_dispose_131(void *src) {
  _Block_object_dispose(*(void **)((char *)src + 40), 131);
}


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

x86 assembly (clang, -O2):
<__Block_byref_id_object_dispose_131>:
mov    0x28(%rdi),%rdi
mov    $0x83,%esi
jmp    1030 <_Block_object_dispose@plt>

LLVM IR (-O0):
define void @__Block_byref_id_object_dispose_131(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 40
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
%7 = call i32 @_Block_object_dispose(i8* %6, i32 131)
ret void
}

LLVM IR (-O2):
define void @__Block_byref_id_object_dispose_131(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 40
%3 = bitcast i8* %2 to i8**
%4 = load i8*, i8** %3
%5 = tail call i32 @_Block_object_dispose(i8* %4, i32 131)
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ rax;

/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
int cpuid_num_pmc(void) {
  uint64_t rax, rbx, rcx, rdx;
  int leaf = 10;
  cpuid(leaf, &rax, &rbx, &rcx, &rdx);
  return (((uint64_t)(rax) &
           ((((uint64_t)1 << (((15)) - ((8)) + 1)) - 1) << ((8)))) >>
          (8));
}


x86 assembly (clang, -O0):
<cpuid_num_pmc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xa,-0x14(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_num_pmc>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0xa,%edi
call   1030 <cpuid@plt>
movzbl 0x9(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @cpuid_num_pmc() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 10, i32* %5
%6 = load i32, i32* %5
%7 = call i32 @cpuid(i32 %6, i32* %1, i32* %2, i32* %3, i32* %4)
%8 = load i32, i32* %1
%9 = and i32 %8, 65280
%10 = ashr i32 %9, 8
ret i32 %10
}

LLVM IR (-O2):
define i32 @cpuid_num_pmc() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 10, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = lshr i32 %10, 8
%12 = and i32 %11, 255
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ strlen(char *);
void ldl_displayhiddenfield(char *defaultdomainp) {
  if (strlen(defaultdomainp) > 0) {
    printf("<input type=\"hidden\" name=\"logindomain\" value=\"%s\">@%s",
           defaultdomainp, defaultdomainp);
  } else {
  }
}


x86 assembly (clang, -O0):
<ldl_displayhiddenfield>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jle    1158 <ldl_displayhiddenfield+0x38>
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
jmp    115d <ldl_displayhiddenfield+0x3d>
jmp    115d <ldl_displayhiddenfield+0x3d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldl_displayhiddenfield>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %rax,%rax
jle    1141 <ldl_displayhiddenfield+0x21>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [55 x i8] c"<input type=\22hidden\22 name=\22logindomain\22 value=\22%s\22>@%s\00"
define void @ldl_displayhiddenfield(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = load i8*, i8** %2
%9 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %6
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"<input type=\22hidden\22 name=\22logindomain\22 value=\22%s\22>@%s\00"
define void @ldl_displayhiddenfield(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
br label %6
6: ; preds = %1, %4
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int pop16(int);
int return_16(uint16_t x) { return pop16(x) + pop16(x ^ 65535); }


x86 assembly (clang, -O0):
<return_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <pop16@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
xor    $0xffff,%edi
call   1030 <pop16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_16>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <pop16@plt>
mov    %eax,%ebp
xor    $0xffff,%ebx
mov    %ebx,%edi
call   1030 <pop16@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @return_16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @pop16(i32 %3)
%5 = load i32, i32* %2
%6 = xor i32 %5, 65535
%7 = call i32 @pop16(i32 %6)
%8 = add nsw i32 %4, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @return_16(i32 %0) {
%2 = tail call i32 @pop16(i32 %0)
%3 = xor i32 %0, 65535
%4 = tail call i32 @pop16(i32 %3)
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int generateDecision();
int /*<<< orphan*/ printf(char *, int);
void printRandom() {
  for (int i = 0; i < 100; i++) {
    printf("%d\n", generateDecision());
  }
}


x86 assembly (clang, -O0):
<printRandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    115c <printRandom+0x3c>
mov    $0x0,%al
call   1030 <generateDecision@plt>
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <printRandom+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printRandom>:
push   %rbp
push   %rbx
push   %rax
mov    $0x64,%ebp
lea    0xed1(%rip),%rbx
nop
xor    %eax,%eax
call   1030 <generateDecision@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1130 <printRandom+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @printRandom() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 100
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = call i32 (...) @generateDecision()
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @printRandom() {
br label %2
1: ; preds = %2
ret void
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %6, %2 ]
%4 = tail call i32 (...) @generateDecision()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nuw nsw i32 %3, 1
%7 = icmp eq i32 %6, 100
br i1 %7, label %1, label %2
}
/* Variables and functions */
int /*<<< orphan*/ longestWord();
int main(int argc, char const *argv[]) {
  longestWord();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @longestWord()
ret i32 0
}
void ena_over(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ena_over() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_coretemp();
int main(void) {
  test_coretemp();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_coretemp()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_coretemp()
ret i32 0
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int c = getchar() != EOF;
  int a = getchar() == EOF;
  printf("%d = getchar() != EOF, %d = getchar() == EOF\n", c, a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2e96(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
xor    %ebx,%ebx
cmp    (%r14),%rax
setne  %bl
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %edx,%edx
cmp    (%r14),%rax
sete   %dl
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [46 x i8] c"%d = getchar() != EOF, %d = getchar() == EOF\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
store i32 %6, i32* %1
%7 = call i64 (...) @getchar()
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
%10 = zext i1 %9 to i32
store i32 %10, i32* %2
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [46 x i8] c"%d = getchar() != EOF, %d = getchar() == EOF\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp ne i64 %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i64 (...) @getchar()
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %8)
ret i32 0
}
unsigned int djb2Hash(void *k) {
  unsigned long h = 0;
  int c;
  char *key = (char *)k;
  while ((c = *key++)) {
    h = ((h << 5) + h) + c;
  }
  return h;
}


x86 assembly (clang, -O0):
<djb2Hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1152 <djb2Hash+0x52>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <djb2Hash+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2Hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <djb2Hash+0x2d>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <djb2Hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @djb2Hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = trunc i64 %11 to i32
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ fftss_plan_with_nthreads(int);
void dfftss_plan_with_nthreads(int *nthreads) {
  fftss_plan_with_nthreads(*nthreads);
}


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

x86 assembly (clang, -O2):
<dfftss_plan_with_nthreads>:
mov    (%rdi),%edi
jmp    1030 <fftss_plan_with_nthreads@plt>

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

LLVM IR (-O2):
define void @dfftss_plan_with_nthreads(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @fftss_plan_with_nthreads(i32 %2)
ret void
}
void CONF_load_fp(void) {}


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

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

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

LLVM IR (-O2):
define void @CONF_load_fp() {
ret void
}
/* Variables and functions */
double sy_evaluate_string_with_error(char *, double, int /*<<< orphan*/ *);
double sy_evaluate_string(char *str, double var) {
  return sy_evaluate_string_with_error(str, var, NULL);
}


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

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

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

LLVM IR (-O2):
define double @sy_evaluate_string(i8* %0, double %1) {
%3 = tail call double @sy_evaluate_string_with_error(i8* %0, double %1, i32* null)
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ __towcase(int /*<<< orphan*/, int);
wint_t towlower(wint_t wc) { return __towcase(wc, 1); }


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

x86 assembly (clang, -O2):
<towlower>:
mov    $0x1,%esi
jmp    1030 <__towcase@plt>

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

LLVM IR (-O2):
define i32 @towlower(i32 %0) {
%2 = tail call i32 @__towcase(i32 %0, i32 1)
ret i32 %2
}
/* Type definitions */
struct gengetopt_args_info {
  int dummy;
};

/* Variables and functions */
int cmdline_parser2(int, char *const *, struct gengetopt_args_info *,
                    int /*<<< orphan*/, int, int);
int cmdline_parser(int argc, char *const *argv,
                   struct gengetopt_args_info *args_info) {
  return cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<cmdline_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <cmdline_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <cmdline_parser2@plt>

LLVM IR (-O0):
%struct.gengetopt_args_info = type { i32 }
define i32 @cmdline_parser(i32 %0, i8** %1, %struct.gengetopt_args_info* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.gengetopt_args_info*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.gengetopt_args_info* %2, %struct.gengetopt_args_info** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load %struct.gengetopt_args_info*, %struct.gengetopt_args_info** %6
%10 = call i32 @cmdline_parser2(i32 %7, i8** %8, %struct.gengetopt_args_info* %9, i32 0, i32 1, i32 1)
ret i32 %10
}

LLVM IR (-O2):
%struct.gengetopt_args_info = type { i32 }
define i32 @cmdline_parser(i32 %0, i8** %1, %struct.gengetopt_args_info* %2) {
%4 = tail call i32 @cmdline_parser2(i32 %0, i8** %1, %struct.gengetopt_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
unsigned Hash(char *name) {
  unsigned hashval;
  for (hashval = 0; *name != '\0'; name++)
    hashval = *name + 31 * hashval;
  return hashval % 1277;
}


x86 assembly (clang, -O0):
<Hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <Hash+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <Hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x4fd,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     114c <Hash+0x4c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <Hash+0x10>
mov    %eax,%ecx
mov    $0x9a8feff7,%edx
imul   %rcx,%rdx
shr    $0x20,%rdx
mov    %eax,%ecx
sub    %edx,%ecx
shr    %ecx
add    %edx,%ecx
shr    $0xa,%ecx
imul   $0x4fd,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = load i32, i32* %3
%14 = mul i32 31, %13
%15 = add i32 %12, %14
store i32 %15, i32* %3
br label %16
16: ; preds = %9
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %4
19: ; preds = %4
%20 = load i32, i32* %3
%21 = urem i32 %20, 1277
ret i32 %21
}

LLVM IR (-O2):
define i32 @Hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 1277
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_store_sd(double *, int /*<<< orphan*/);
void test_mm_store_sd(double *A, __m128d B) { _mm_store_sd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_store_sd>:
jmp    1030 <_mm_store_sd@plt>

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

LLVM IR (-O2):
define void @test_mm_store_sd(double* %0, i32 %1) {
%3 = tail call i32 @_mm_store_sd(double* %0, i32 %1)
ret void
}
/* Variables and functions */
int popNumber();
int /*<<< orphan*/ positionsound(int, int, int);
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basPositionSound() {
  int c, angle, dist;
  dist = popNumber();
  angle = popNumber();
  c = popNumber();
  pushNumber(positionsound(c, angle, dist));
}


x86 assembly (clang, -O0):
<basPositionSound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <positionsound@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basPositionSound>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <positionsound@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <pushNumber@plt>

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

LLVM IR (-O2):
define void @basPositionSound() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 (...) @popNumber()
%4 = tail call i32 @positionsound(i32 %3, i32 %2, i32 %1)
%5 = tail call i32 @pushNumber(i32 %4)
ret void
}
unsigned int random(unsigned int *seed, unsigned int range) {
  return (*seed = *seed * 214013 + 2531011) % range;
}


x86 assembly (clang, -O0):
<random>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x343fd,(%rax),%eax
add    $0x269ec3,%eax
mov    -0x8(%rbp),%rcx
mov    %eax,(%rcx)
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<random>:
imul   $0x343fd,(%rdi),%eax
add    $0x269ec3,%eax
mov    %eax,(%rdi)
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @random(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* %5
%7 = mul i32 %6, 214013
%8 = add i32 %7, 2531011
%9 = load i32*, i32** %3
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = urem i32 %8, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @random(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = mul i32 %3, 214013
%5 = add i32 %4, 2531011
store i32 %5, i32* %0
%6 = urem i32 %5, %1
ret i32 %6
}
void bsp_coresight_enable(void) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/ *);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ log_error(int, char *);
int pthread_mutex_init(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void mutexInit(pthread_mutex_t *mutex, pthread_mutexattr_t *attrs) {
  ASSERT(mutex);
  int r = pthread_mutex_init(mutex, attrs);
  if (r != 0) {
    log_error(r, "Error pthread_mutex_init()");
    abort();
  }
}


x86 assembly (clang, -O0):
<mutexInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <ASSERT@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <pthread_mutex_init@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1189 <mutexInit+0x49>
mov    -0x14(%rbp),%edi
lea    0xe83(%rip),%rsi
call   1040 <log_error@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mutexInit>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <ASSERT@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <pthread_mutex_init@plt>
test   %eax,%eax
jne    1166 <mutexInit+0x26>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe93(%rip),%rsi
mov    %eax,%edi
call   1040 <log_error@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@.str = [27 x i8] c"Error pthread_mutex_init()\00"
define void @mutexInit(i32* %0, i32* %1) {
%3 = tail call i32 @ASSERT(i32* %0)
%4 = tail call i32 @pthread_mutex_init(i32* %0, i32* %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @log_error(i32 %4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void xyz(void) { printf("        func3-xyz\n"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c" func3-xyz\0A\00"
define void @xyz() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c" func3-xyz\00"
define void @xyz() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ bswap32(int /*<<< orphan*/);
void be32_to_cpus(uint32_t *p) { *p = bswap32(*p); }


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

x86 assembly (clang, -O2):
<be32_to_cpus>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <bswap32@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @be32_to_cpus(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @bswap32(i32 %2)
store i32 %3, i32* %0
ret void
}
void dvbapi_stop_all_descrambling(void) {}


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

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

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

LLVM IR (-O2):
define void @dvbapi_stop_all_descrambling() {
ret void
}
void MemoryBarrier(void) { __asm__ __volatile__("" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @MemoryBarrier() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
unsigned setbit(unsigned x, int p, int n, unsigned y) {
  return x & ~(~(~0 << n) << (p + 1 - n)) | (y & ~(~0 << n)) << (p + 1 - n);
}


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

x86 assembly (clang, -O2):
<setbit>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
mov    %eax,%edx
shl    %cl,%edx
not    %edx
and    %edi,%edx
and    %r8d,%eax
shl    %cl,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @setbit(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* %5
%10 = load i32, i32* %7
%11 = shl i32 -1, %10
%12 = xor i32 %11, -1
%13 = load i32, i32* %6
%14 = add nsw i32 %13, 1
%15 = load i32, i32* %7
%16 = sub nsw i32 %14, %15
%17 = shl i32 %12, %16
%18 = xor i32 %17, -1
%19 = and i32 %9, %18
%20 = load i32, i32* %8
%21 = load i32, i32* %7
%22 = shl i32 -1, %21
%23 = xor i32 %22, -1
%24 = and i32 %20, %23
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
%27 = load i32, i32* %7
%28 = sub nsw i32 %26, %27
%29 = shl i32 %24, %28
%30 = or i32 %19, %29
ret i32 %30
}

LLVM IR (-O2):
define i32 @setbit(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl nsw i32 -1, %2
%6 = xor i32 %5, -1
%7 = add nsw i32 %1, 1
%8 = sub i32 %7, %2
%9 = shl i32 %6, %8
%10 = xor i32 %9, -1
%11 = and i32 %10, %0
%12 = and i32 %6, %3
%13 = shl i32 %12, %8
%14 = or i32 %11, %13
ret i32 %14
}
void main() {
  int i, j;
  struct line {
    int *x;
    int *y;
  } * l1;
  struct line l;
  int x = 20;
  int y = 20;
  l1 = &l;
  l.x = &x;
  l.y = &y;
  y = 21;
  y = (l1->x);
  print(*l.y);
  print("end");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x14,-0x24(%rbp)
movl   $0x14,-0x28(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x24(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x15,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1030 <print@plt>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x14,0x4(%rsp)
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1030 <print@plt>
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.line = type { i32*, i32* }
@.str = [4 x i8] c"end\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.line*
%4 = alloca %struct.line
%5 = alloca i32
%6 = alloca i32
store i32 20, i32* %5
store i32 20, i32* %6
store %struct.line* %4, %struct.line** %3
%7 = getelementptr inbounds %struct.line, %struct.line* %4, i32 0, i32 0
store i32* %5, i32** %7
%8 = getelementptr inbounds %struct.line, %struct.line* %4, i32 0, i32 1
store i32* %6, i32** %8
store i32 21, i32* %6
%9 = load %struct.line*, %struct.line** %3
%10 = getelementptr inbounds %struct.line, %struct.line* %9, i32 0, i32 0
%11 = load i32*, i32** %10
%12 = ptrtoint i32* %11 to i32
store i32 %12, i32* %6
%13 = getelementptr inbounds %struct.line, %struct.line* %4, i32 0, i32 1
%14 = load i32*, i32** %13
%15 = load i32, i32* %14
%16 = call i32 (i32, ...) bitcast (i32 (...)* @print to i32 (i32, ...)*)(i32 %15)
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.line = type { i32*, i32* }
@.str = [4 x i8] c"end\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 20, i32* %1
%3 = ptrtoint i32* %1 to i64
%4 = trunc i64 %3 to i32
%5 = call i32 (i32, ...) bitcast (i32 (...)* @print to i32 (i32, ...)*)(i32 %4)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
ISR(INT3_vect) {
  DEBUG("ISR "
        "INT3"
        " occured");
}


x86 assembly (clang, -O0):
<ISR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <DEBUG@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISR>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <DEBUG@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"ISR INT3 occured\00"
define i32 @ISR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [17 x i8] c"ISR INT3 occured\00"
define i32 @ISR(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
void eval(char *cmdline) { return; }


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

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

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

LLVM IR (-O2):
define void @eval(i8* nocapture %0) {
ret void
}
int yywrap(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @yywrap() {
ret i32 1
}

LLVM IR (-O2):
define i32 @yywrap() {
ret i32 1
}
void element2FF() {}


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

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

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

LLVM IR (-O2):
define void @element2FF() {
ret void
}
void blk_schedule_flush_plug(struct task_struct *task) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @blk_schedule_flush_plug(%struct.task_struct* nocapture %0) {
ret void
}
void anotherFunction(void) {
  asm("movl $10, %ecx\n\t"
      "movl %ecx, %eax");
}


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

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

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

LLVM IR (-O2):
define void @anotherFunction() {
tail call void asm sideeffect "movl $$10, %ecx\0A\09movl %ecx, %eax", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
unsigned int fxunssfsi(float f) { return f; }


x86 assembly (clang, -O0):
<fxunssfsi>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fxunssfsi>:
cvttss2si %xmm0,%rax
ret

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

LLVM IR (-O2):
define i32 @fxunssfsi(float %0) {
%2 = fptoui float %0 to i32
ret i32 %2
}
/* Variables and functions */
int function(int);
int /*<<< orphan*/ outer();
int main(void) {
  int i, j;
  for (i = 0, j = 0; i < 100; ++i)
    j = function(j);
  outer();
  return j;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1160 <main+0x40>
mov    -0xc(%rbp),%edi
call   1040 <function@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
mov    $0x0,%al
call   1030 <outer@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
mov    $0x64,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1040 <function@plt>
mov    %eax,%ebx
add    $0xffffffff,%ebp
jne    1130 <main+0x10>
xor    %eax,%eax
call   1030 <outer@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = phi i32 [ 0, %0 ], [ %5, %1 ]
%4 = tail call i32 @function(i32 %2)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 100
br i1 %6, label %7, label %1
7: ; preds = %1
%8 = tail call i32 (...) @outer()
ret i32 %4
}