xunge/DecIR huggingface dataset:
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec2_tangent(float *, float *);
__attribute__((always_)) struct vec2 *psvec2_tangent(struct vec2 *result,
                                                     struct vec2 *a) {
  vec2_tangent((float *)result, (float *)a);
  return result;
}


x86 assembly (clang, -O0):
<psvec2_tangent>:
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 <vec2_tangent@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_tangent(%struct.vec2* returned %0, %struct.vec2* %1) {
%3 = bitcast %struct.vec2* %0 to float*
%4 = bitcast %struct.vec2* %1 to float*
%5 = tail call i32 @vec2_tangent(float* %3, float* %4)
ret %struct.vec2* %0
}
char *langRomTypeY8950() { return "Y8950"; }


x86 assembly (clang, -O0):
<langRomTypeY8950>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeY8950>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Y8950\00"
define i8* @langRomTypeY8950() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"Y8950\00"
define i8* @langRomTypeY8950() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ cBreak();
int /*<<< orphan*/ dash();
int /*<<< orphan*/ dot();
void sG() {
  dash();
  dash();
  dot();
  cBreak();
}


x86 assembly (clang, -O0):
<sG>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <dash@plt>
mov    $0x0,%al
call   1040 <dash@plt>
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1050 <cBreak@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sG>:
push   %rax
xor    %eax,%eax
call   1040 <dash@plt>
xor    %eax,%eax
call   1040 <dash@plt>
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cBreak@plt>

LLVM IR (-O0):
define void @sG() {
%1 = call i32 (...) @dash()
%2 = call i32 (...) @dash()
%3 = call i32 (...) @dot()
%4 = call i32 (...) @cBreak()
ret void
}

LLVM IR (-O2):
define void @sG() {
%1 = tail call i32 (...) @dash()
%2 = tail call i32 (...) @dash()
%3 = tail call i32 (...) @dot()
%4 = tail call i32 (...) @cBreak()
ret void
}
int count_slashes(const char *filename) {
  int slash_count;
  for (slash_count = 0; *filename != '\0'; filename++) {
    if (*filename == '/') {
      slash_count++;
    }
  }
  return slash_count;
}


x86 assembly (clang, -O0):
<count_slashes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114e <count_slashes+0x4e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1138 <count_slashes+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <count_slashes+0x3d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <count_slashes+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_slashes>:
xor    %eax,%eax
jmp    1117 <count_slashes+0x17>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x2f,%cl
je     1110 <count_slashes+0x10>
test   %cl,%cl
jne    1113 <count_slashes+0x13>
ret

LLVM IR (-O0):
define i32 @count_slashes(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %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 %21
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 47
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %17
17: ; preds = %14, %9
br label %18
18: ; preds = %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %2
br label %4
21: ; preds = %4
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @count_slashes(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i32 [ 0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 47, label %6
]
6: ; preds = %2
%7 = add nsw i32 %4, 1
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int *dynamic_array(int, int, int, int, int);
int main(int argc, char **argv) {
  int *tableau = dynamic_array(4, 1, 2, 3, 4);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%r8d
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    %r8d,%edi
call   1030 <dynamic_array@plt>
mov    %rax,-0x18(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
call   1030 <dynamic_array@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32* @dynamic_array(i32 4, i32 1, i32 2, i32 3, i32 4)
store i32* %7, i32** %6
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32* @dynamic_array(i32 4, i32 1, i32 2, i32 3, i32 4)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int main() {
  int a = 10;
  int b = 20;
  int c;
  c = add(a, b);
  fprintf(stderr, "Result is : %d \n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <add@plt>
mov    %eax,-0x10(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%edx
lea    0xea2(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x14,%esi
call   1030 <add@plt>
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%edi
lea    0xec0(%rip),%rsi
mov    %eax,%edx
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"Result is : %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 20, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @add(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* @stderr
%9 = load i32, i32* %4
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"Result is : %d \0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 10, i32 20)
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int nrf_802154_delayed_trx_receive(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/);
bool nrf_802154_receive_at(uint32_t t0, uint32_t dt, uint32_t timeout,
                           uint8_t channel) {
  bool result;
  (void)(0x000AUL);
  result = nrf_802154_delayed_trx_receive(t0, dt, timeout, channel);
  (void)(0x000AUL);
  return result;
}


x86 assembly (clang, -O0):
<nrf_802154_receive_at>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <nrf_802154_delayed_trx_receive@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_802154_receive_at>:
jmp    1030 <nrf_802154_delayed_trx_receive@plt>

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

LLVM IR (-O2):
define i32 @nrf_802154_receive_at(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @nrf_802154_delayed_trx_receive(i32 %0, i32 %1, i32 %2, i32 %3)
ret i32 %5
}
void overflowStack(int callNum) {
  char a[100000];
  printf("\n %s: \n", __func__);
  printf("Call %4d - top of stack near %10p\n", callNum, &a[0]);
  overflowStack(callNum + 1);
}


x86 assembly (clang, -O0):
<overflowStack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x186b0,%rsp
mov    %edi,-0x4(%rbp)
lea    0xecb(%rip),%rdi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    -0x186b0(%rbp),%rdx
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1040 <overflowStack@plt>
add    $0x186b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<overflowStack>:
push   %rbx
sub    $0x186a0,%rsp
mov    %edi,%ebx
lea    0xecf(%rip),%rdi
lea    0xed0(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    %rsp,%rdx
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebx
mov    %ebx,%edi
call   1040 <overflowStack@plt>
add    $0x186a0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.overflowStack = [14 x i8] c"overflowStack\00"
@.str.1 = [35 x i8] c"Call %4d - top of stack near %10p\0A\00"
define void @overflowStack(i32 %0) {
%2 = alloca i32
%3 = alloca [100000 x i8]
store i32 %0, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.overflowStack, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = getelementptr inbounds [100000 x i8], [100000 x i8]* %3, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %5, i8* %6)
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.overflowStack = [14 x i8] c"overflowStack\00"
@.str.1 = [35 x i8] c"Call %4d - top of stack near %10p\0A\00"
define void @overflowStack(i32 %0) {
%2 = alloca [100000 x i8]
%3 = getelementptr inbounds [100000 x i8], [100000 x i8]* %2, i64 0, i64 0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.overflowStack, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %0, i8* %3)
%6 = add nsw i32 %0, 1
ret void
}
/* Type definitions */
struct dirent {
  char *d_name;
};

/* Variables and functions */
int selecc_arch(const struct dirent *entry) {
  if (entry->d_name[0] == '.')
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<selecc_arch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    1127 <selecc_arch+0x27>
movl   $0x0,-0x4(%rbp)
jmp    112e <selecc_arch+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<selecc_arch>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmpb   $0x2e,(%rcx)
setne  %al
ret

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

LLVM IR (-O2):
%struct.dirent = type { i8* }
define i32 @selecc_arch(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 46
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ delwin(int /*<<< orphan*/ *);
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ werase(int /*<<< orphan*/ *);
void cleanup_window(WINDOW *win) {
  werase(win);
  delwin(win);
  endwin();
}


x86 assembly (clang, -O0):
<cleanup_window>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <werase@plt>
mov    -0x8(%rbp),%rdi
call   1030 <delwin@plt>
mov    $0x0,%al
call   1040 <endwin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup_window>:
push   %rbx
mov    %rdi,%rbx
call   1050 <werase@plt>
mov    %rbx,%rdi
call   1030 <delwin@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <endwin@plt>

LLVM IR (-O0):
define void @cleanup_window(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @werase(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @delwin(i32* %5)
%7 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @cleanup_window(i32* %0) {
%2 = tail call i32 @werase(i32* %0)
%3 = tail call i32 @delwin(i32* %0)
%4 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void if_ne(void) { printf("not equal\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"not equal\00"
define void @if_ne() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
double fifdsign(double mag, double sign) {
  if (mag < 0)
    mag = -mag;
  if (sign < 0)
    mag = -mag;
  return mag;
}


x86 assembly (clang, -O0):
<fifdsign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    113d <fifdsign+0x3d>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    116c <fifdsign+0x6c>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fifdsign>:
movapd 0xef8(%rip),%xmm2
movapd %xmm0,%xmm3
xorpd  %xmm2,%xmm3
xorpd  %xmm4,%xmm4
movapd %xmm0,%xmm5
cmpltsd %xmm4,%xmm5
andpd  %xmm5,%xmm3
andnpd %xmm0,%xmm5
orpd   %xmm3,%xmm5
xorpd  %xmm5,%xmm2
cmpltsd %xmm4,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm5,%xmm1
orpd   %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @fifdsign(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load double, double* %3
%9 = fneg double %8
store double %9, double* %3
br label %10
10: ; preds = %7, %2
%11 = load double, double* %4
%12 = fcmp olt double %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load double, double* %3
%15 = fneg double %14
store double %15, double* %3
br label %16
16: ; preds = %13, %10
%17 = load double, double* %3
ret double %17
}

LLVM IR (-O2):
define double @fifdsign(double %0, double %1) {
%3 = fcmp olt double %0, 0.000000e+00
%4 = fneg double %0
%5 = select i1 %3, double %4, double %0
%6 = fcmp olt double %1, 0.000000e+00
%7 = fneg double %5
%8 = select i1 %6, double %7, double %5
ret double %8
}
int main(void) {
  int a = -100;
  int b = 2;
  int c = 3;
  int d = 4;
  while (d) {
    a += 23;
    d = a + d;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xffffff9c,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1148 <main+0x48>
mov    -0x8(%rbp),%eax
add    $0x17,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <main+0x27>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void led_status_starting(void) {}


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

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

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

LLVM IR (-O2):
define void @led_status_starting() {
ret void
}
void pci_save_aer_state(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_save_aer_state(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void l_message(const char *pname, const char *msg) {
  if (pname)
    fprintf(stderr, "%s: ", pname);
  fprintf(stderr, "%s\n", msg);
}


x86 assembly (clang, -O0):
<l_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1144 <l_message+0x34>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xead(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_message>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
je     1131 <l_message+0x21>
mov    %rdi,%rdx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"%s: \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @l_message(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %3
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7, %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %4
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %13)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"%s: \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @l_message(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %4, %2
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BotFreeCharacter2(int);
int /*<<< orphan*/ LibVarGetValue(char *);
void BotFreeCharacter(int handle) {
  if (!LibVarGetValue("bot_reloadcharacters"))
    return;
  BotFreeCharacter2(handle);
}


x86 assembly (clang, -O0):
<BotFreeCharacter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <LibVarGetValue@plt>
cmp    $0x0,%eax
jne    1145 <BotFreeCharacter+0x25>
jmp    114d <BotFreeCharacter+0x2d>
mov    -0x4(%rbp),%edi
call   1030 <BotFreeCharacter2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BotFreeCharacter>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1040 <LibVarGetValue@plt>
test   %eax,%eax
je     113b <BotFreeCharacter+0x1b>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <BotFreeCharacter2@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"bot_reloadcharacters\00"
define void @BotFreeCharacter(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @LibVarGetValue(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @BotFreeCharacter2(i32 %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"bot_reloadcharacters\00"
define void @BotFreeCharacter(i32 %0) {
%2 = tail call i32 @LibVarGetValue(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @BotFreeCharacter2(i32 %0)
br label %6
6: ; preds = %1, %4
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strcoll(const char *str1, const char *str2) { return strcmp(str1, str2); }


x86 assembly (clang, -O0):
<strcoll>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcoll>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @strcoll(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 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void gzungetc(void) {}


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

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

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

LLVM IR (-O2):
define void @gzungetc() {
ret void
}
void FChange(float *a, float *b) {
  float c;
  c = *a;
  *a = *b;
  *b = c;
}


x86 assembly (clang, -O0):
<FChange>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FChange>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  %xmm1,(%rdi)
movss  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @FChange(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %3
%7 = load float, float* %6
store float %7, float* %5
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = load float*, float** %3
store float %9, float* %10
%11 = load float, float* %5
%12 = load float*, float** %4
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @FChange(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
store float %4, float* %0
store float %3, float* %1
ret void
}
int main(void) { 42; }


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

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

LLVM IR (-O0):
define i32 @main() {
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ oops(char *);
FILE *fropen(const char *fn) {
  FILE *f = fopen(fn, "r");
  if (!f)
    oops("fopen");
  return f;
}


x86 assembly (clang, -O0):
<fropen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1157 <fropen+0x37>
lea    0xeb0(%rip),%rdi
call   1030 <oops@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fropen>:
push   %rbx
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1141 <fropen+0x21>
lea    0xec6(%rip),%rdi
call   1030 <oops@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [6 x i8] c"fopen\00"
define i32* @fropen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @oops(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i32*, i32** %3
ret i32* %11
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [6 x i8] c"fopen\00"
define noalias i32* @fropen(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @oops(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32* %2
}
void memcg_uncharge_slab(struct kmem_cache *s, int order) {}


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

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

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

LLVM IR (-O2):
%struct.kmem_cache = type opaque
define void @memcg_uncharge_slab(%struct.kmem_cache* nocapture %0, i32 %1) {
ret void
}
int main() { printf("%s", 1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
AR0AX1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((p0[10000000]) <= (((short *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movswl 0x1312d00(%rax),%eax
movslq -0x10(%rbp),%rdx
mov    $0xa98ac7,%ecx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114b <AR0AX1+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <AR0AX1+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0AX1>:
movzwl 0x1312d00(%r8),%edx
01
movslq %ecx,%rcx
xor    %eax,%eax
cmp    0xa98ac7(%rcx,%rcx,1),%dx
setle  %al
ret

LLVM IR (-O0):
define i32 @AR0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %12
%17 = getelementptr inbounds i16, i16* %16, i64 10000000
%18 = load i16, i16* %17
%19 = sext i16 %18 to i32
%20 = load i32, i32* %11
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %21
%23 = load i16, i16* %22
%24 = sext i16 %23 to i32
%25 = icmp sle i32 %19, %24
br i1 %25, label %26, label %27
26: ; preds = %6
store i32 1, i32* %7
br label %28
27: ; preds = %6
store i32 0, i32* %7
br label %28
28: ; preds = %27, %26
%29 = load i32, i32* %7
ret i32 %29
}

LLVM IR (-O2):
define i32 @AR0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = getelementptr inbounds i16, i16* %4, i64 10000000
%8 = load i16, i16* %7
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %9
%11 = load i16, i16* %10
%12 = icmp sle i16 %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ gen_sysmsg(int, char *, int, int /*<<< orphan*/ *);
void sysmsg(int msgid, char *s) { gen_sysmsg(msgid, s, 2, NULL); }


x86 assembly (clang, -O0):
<sysmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x2,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <gen_sysmsg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysmsg>:
mov    $0x2,%edx
xor    %ecx,%ecx
jmp    1030 <gen_sysmsg@plt>

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

LLVM IR (-O2):
define void @sysmsg(i32 %0, i8* %1) {
%3 = tail call i32 @gen_sysmsg(i32 %0, i8* %1, i32 2, i32* null)
ret void
}
char func(int a) { return 'b'; }


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

x86 assembly (clang, -O2):
<func>:
mov    $0x62,%al
ret

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

LLVM IR (-O2):
define signext i8 @func(i32 %0) {
ret i8 98
}
int not_fcnumber(char *s) {
  if (s == (void *)0)
    return 0;
  if (*s == '-')
    s++;
  return (!is_number(s));
}


x86 assembly (clang, -O0):
<not_fcnumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <not_fcnumber+0x23>
movl   $0x0,-0x4(%rbp)
jmp    116a <not_fcnumber+0x5a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    114f <not_fcnumber+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <is_number@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<not_fcnumber>:
test   %rdi,%rdi
je     1139 <not_fcnumber+0x29>
push   %rax
xor    %eax,%eax
cmpb   $0x2d,(%rdi)
sete   %al
add    %rdi,%rax
mov    %rax,%rdi
xor    %eax,%eax
call   1030 <is_number@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @not_fcnumber(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %21
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 45
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
br label %15
15: ; preds = %12, %7
%16 = load i8*, i8** %3
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @is_number to i32 (i8*, ...)*)(i8* %16)
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
store i32 %20, i32* %2
br label %21
21: ; preds = %15, %6
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @not_fcnumber(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
%6 = zext i1 %5 to i64
%7 = getelementptr i8, i8* %0, i64 %6
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @is_number to i32 (i8*, ...)*)(i8* %7)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %1, %3
%12 = phi i32 [ %10, %3 ], [ 0, %1 ]
ret i32 %12
}
/* Type definitions */
struct test_cases {
  int dummy;
};

/* Variables and functions */
int __init_cow(struct test_cases *, int /*<<< orphan*/);
int init_cow(struct test_cases *tcs) { return __init_cow(tcs, 0); }


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

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

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

LLVM IR (-O2):
%struct.test_cases = type { i32 }
define i32 @init_cow(%struct.test_cases* %0) {
%2 = tail call i32 @__init_cow(%struct.test_cases* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ vecNd_sub_new(double *, double const *, double const *, int);
void vec3d_sub_new(double result[3], const double a[3], const double b[3]) {
  vecNd_sub_new(result, a, b, 3);
}


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

x86 assembly (clang, -O2):
<vec3d_sub_new>:
mov    $0x3,%ecx
jmp    1030 <vecNd_sub_new@plt>

LLVM IR (-O0):
define void @vec3d_sub_new(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = load double*, double** %5
%9 = load double*, double** %6
%10 = call i32 @vecNd_sub_new(double* %7, double* %8, double* %9, i32 3)
ret void
}

LLVM IR (-O2):
define void @vec3d_sub_new(double* %0, double* %1, double* %2) {
%4 = tail call i32 @vecNd_sub_new(double* %0, double* %1, double* %2, i32 3)
ret void
}
int _isspace(int c) { return c == ' ' || c == '\n'; }


x86 assembly (clang, -O0):
<_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <_isspace+0x20>
cmpl   $0xa,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isspace>:
cmp    $0x20,%edi
sete   %al
cmp    $0xa,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @_isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 10
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @_isspace(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 10
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ x86CpuID(int *, int, int /*<<< orphan*/);
int cpuSupportsAVX512F() {
  int32_t reg[4];
  x86CpuID(reg, 7, 0);
  return (reg[1] & (1 << 16)) != 0;
}


x86 assembly (clang, -O0):
<cpuSupportsAVX512F>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
mov    $0x7,%esi
xor    %edx,%edx
call   1030 <x86CpuID@plt>
mov    -0xc(%rbp),%eax
and    $0x10000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuSupportsAVX512F>:
sub    $0x18,%rsp
mov    %rsp,%rdi
mov    $0x7,%esi
xor    %edx,%edx
call   1030 <x86CpuID@plt>
mov    0x4(%rsp),%eax
shr    $0x10,%eax
and    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @cpuSupportsAVX512F() {
%1 = alloca [4 x i32]
%2 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%3 = call i32 @x86CpuID(i32* %2, i32 7, i32 0)
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%5 = load i32, i32* %4
%6 = and i32 %5, 65536
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @cpuSupportsAVX512F() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @x86CpuID(i32* %3, i32 7, i32 0)
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%6 = load i32, i32* %5
%7 = lshr i32 %6, 16
%8 = and i32 %7, 1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ resetHardA7GPSModule(int);
void startRecoveryForA7GPSPowerFailed(int n) { resetHardA7GPSModule(n); }


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

x86 assembly (clang, -O2):
<startRecoveryForA7GPSPowerFailed>:
jmp    1030 <resetHardA7GPSModule@plt>

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

LLVM IR (-O2):
define void @startRecoveryForA7GPSPowerFailed(i32 %0) {
%2 = tail call i32 @resetHardA7GPSModule(i32 %0)
ret void
}
/* Variables and functions */
int **calloc(int, int);
int (*pf())[50] {
  int(*parr)[50] = calloc(50, sizeof(int));
  return parr;
}


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

x86 assembly (clang, -O2):
<pf>:
mov    $0x32,%edi
mov    $0x4,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define [50 x i32]* @pf() {
%1 = alloca [50 x i32]*
%2 = call i32** @calloc(i32 50, i32 4)
%3 = bitcast i32** %2 to [50 x i32]*
store [50 x i32]* %3, [50 x i32]** %1
%4 = load [50 x i32]*, [50 x i32]** %1
ret [50 x i32]* %4
}

LLVM IR (-O2):
define noalias [50 x i32]* @pf() {
%1 = tail call i32** @calloc(i32 50, i32 4)
%2 = bitcast i32** %1 to [50 x i32]*
ret [50 x i32]* %2
}
void RTThreadStateName(void) {}


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

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

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

LLVM IR (-O2):
define void @RTThreadStateName() {
ret void
}
int editable_0(int m) {
  int _tmp035;
  if (m == 0) {
    _tmp035 = 0;
  } else if (m == 1) {
    _tmp035 = 1;
  }
  return _tmp035;
}


x86 assembly (clang, -O0):
<editable_0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    111d <editable_0+0x1d>
movl   $0x0,-0x8(%rbp)
jmp    1133 <editable_0+0x33>
cmpl   $0x1,-0x4(%rbp)
jne    112e <editable_0+0x2e>
movl   $0x1,-0x8(%rbp)
jmp    1133 <editable_0+0x33>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<editable_0>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @editable_0(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
int pci_stub_probe(struct pci_dev *dev, const struct pci_device_id *id) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
%struct.pci_device_id = type opaque
define i32 @pci_stub_probe(%struct.pci_dev* nocapture readnone %0, %struct.pci_device_id* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool mp2vpicx_get_framepreddct(const uint8_t *p_mp2vpicx) {
  return !!(p_mp2vpicx[7] & 0x40);
}


x86 assembly (clang, -O0):
<mp2vpicx_get_framepreddct>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
and    $0x40,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vpicx_get_framepreddct>:
mov    0x1c(%rdi),%eax
shr    $0x6,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @mp2vpicx_get_framepreddct(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 7
%5 = load i32, i32* %4
%6 = and i32 %5, 64
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mp2vpicx_get_framepreddct(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 7
%3 = load i32, i32* %2
%4 = lshr i32 %3, 6
%5 = and i32 %4, 1
ret i32 %5
}
unsigned long long signum_fun_ullong(unsigned long long a) { return (a > 0); }


x86 assembly (clang, -O0):
<signum_fun_ullong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<signum_fun_ullong>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i64 @signum_fun_ullong(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ugt i64 %3, 0
%5 = zext i1 %4 to i32
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @signum_fun_ullong(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = zext i1 %2 to i64
ret i64 %3
}
int omap_enable_layer(int enabled) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omap_enable_layer(i32 %0) {
ret i32 0
}
const char *ajUrlinTypeGetQlinks(void) { return "|"; }


x86 assembly (clang, -O0):
<ajUrlinTypeGetQlinks>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ajUrlinTypeGetQlinks>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"|\00"
define i8* @ajUrlinTypeGetQlinks() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [2 x i8] c"|\00"
define i8* @ajUrlinTypeGetQlinks() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
int test_imm_31uint16_mem(unsigned short *val) {
  return ((*val) & (0x31 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_31uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x31,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_31uint16_mem>:
testb  $0x31,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_31uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 49
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}