xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xc0() {
  Assert_real((isupper(192) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              965, ("isupper should be 0 for 0xc0"));
}


x86 assembly (clang, -O0):
<t_isupper_0xc0>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc0,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3c5,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0xc0>:
push   %rax
mov    $0xc0,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3c5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xc0\00"
define void @t_isupper_0xc0() {
%1 = call i64 @isupper(i32 192)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 965, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xc0\00"
define void @t_isupper_0xc0() {
%1 = tail call i64 @isupper(i32 192)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 965, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int cut_value(int value, int is_word) {
  if (is_word) {
    return value & 0xffff;
  } else {
    return value & 0xff;
  }
}


x86 assembly (clang, -O0):
<cut_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1124 <cut_value+0x24>
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <cut_value+0x2f>
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cut_value>:
test   %esi,%esi
mov    $0xff,%ecx
mov    $0xffff,%eax
cmove  %ecx,%eax
and    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @cut_value(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i32 255, i32 65535
%5 = and i32 %4, %0
ret i32 %5
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int sendto(int, void const *, int, int, struct sockaddr const *, int);
int dht_sendto(int sockfd, const void *buf, int len, int flags,
               const struct sockaddr *to, int tolen) {
  return sendto(sockfd, buf, len, flags, to, tolen);
}


x86 assembly (clang, -O0):
<dht_sendto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
call   1030 <sendto@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dht_sendto>:
jmp    1030 <sendto@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @dht_sendto(i32 %0, i8* %1, i32 %2, i32 %3, %struct.sockaddr* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.sockaddr*
%12 = alloca i32
store i32 %0, i32* %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store %struct.sockaddr* %4, %struct.sockaddr** %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load %struct.sockaddr*, %struct.sockaddr** %11
%18 = load i32, i32* %12
%19 = call i32 @sendto(i32 %13, i8* %14, i32 %15, i32 %16, %struct.sockaddr* %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @dht_sendto(i32 %0, i8* %1, i32 %2, i32 %3, %struct.sockaddr* %4, i32 %5) {
%7 = tail call i32 @sendto(i32 %0, i8* %1, i32 %2, i32 %3, %struct.sockaddr* %4, i32 %5)
ret i32 %7
}
void config_delitem(const char *varpath) {}


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

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

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

LLVM IR (-O2):
define void @config_delitem(i8* nocapture %0) {
ret void
}
/* Variables and functions */
size_t __hash(void *user_data, const void *key) {
  size_t hash = 0;
  const char *p;
  for (p = (const char *)key; *p != '\0'; p++)
    hash = (hash << 5) - hash + *p;
  return (hash);
}


x86 assembly (clang, -O0):
<__hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1158 <__hash+0x58>
mov    -0x18(%rbp),%rax
shl    $0x5,%rax
sub    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <__hash+0x1c>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @__hash(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %12, %5 ], [ %1, %2 ]
%8 = phi i64 [ %11, %5 ], [ 0, %2 ]
%9 = mul i64 %8, 31
%10 = sext i8 %6 to i64
%11 = add i64 %9, %10
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i64 [ 0, %2 ], [ %11, %5 ]
ret i64 %16
}
/* Variables and functions */
unsigned int exynos_5410_gpio_read(unsigned int);
int /*<<< orphan*/ exynos_5410_gpio_write_mask(unsigned int, unsigned int,
                                               unsigned int);
void odroid_xu_gpio_toggle_18() {
  unsigned int bank_offset = 0x0C20;
  unsigned int bit_index = 3;
  unsigned int d = exynos_5410_gpio_read(bank_offset);
  d ^= (1U << bit_index);
  exynos_5410_gpio_write_mask(bank_offset, d, (1U << bit_index));
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_toggle_18>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xc20,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <exynos_5410_gpio_read@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
call   1030 <exynos_5410_gpio_write_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_toggle_18>:
push   %rax
mov    $0xc20,%edi
call   1040 <exynos_5410_gpio_read@plt>
xor    $0x8,%eax
mov    $0xc20,%edi
mov    %eax,%esi
mov    $0x8,%edx
pop    %rax
jmp    1030 <exynos_5410_gpio_write_mask@plt>

LLVM IR (-O0):
define void @odroid_xu_gpio_toggle_18() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 3104, i32* %1
store i32 3, i32* %2
%4 = load i32, i32* %1
%5 = call i32 @exynos_5410_gpio_read(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = shl i32 1, %6
%8 = load i32, i32* %3
%9 = xor i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %1
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = shl i32 1, %12
%14 = call i32 @exynos_5410_gpio_write_mask(i32 %10, i32 %11, i32 %13)
ret void
}

LLVM IR (-O2):
define void @odroid_xu_gpio_toggle_18() {
%1 = tail call i32 @exynos_5410_gpio_read(i32 3104)
%2 = xor i32 %1, 8
%3 = tail call i32 @exynos_5410_gpio_write_mask(i32 3104, i32 %2, i32 8)
ret void
}
/* Type definitions */
typedef unsigned int uint8_t;

/* Variables and functions */
bool bf_isset(uint8_t field[], size_t idx) {
  return (field[idx / 8] & (1u << (7 - (idx % 8))));
}


x86 assembly (clang, -O0):
<bf_isset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x3,%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rdx
and    $0x7,%rdx
mov    $0x7,%ecx
sub    %rdx,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bf_isset>:
mov    %rsi,%rcx
mov    %rsi,%rdx
not    %cl
and    $0x7,%cl
mov    $0x1,%eax
shl    %cl,%eax
shr    $0x3,%rdx
and    (%rdi,%rdx,4),%eax
ret

LLVM IR (-O0):
define i32 @bf_isset(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = udiv i64 %6, 8
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
%10 = load i64, i64* %4
%11 = urem i64 %10, 8
%12 = sub i64 7, %11
%13 = trunc i64 %12 to i32
%14 = shl i32 1, %13
%15 = and i32 %9, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @bf_isset(i32* nocapture %0, i64 %1) {
%3 = lshr i64 %1, 3
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = trunc i64 %1 to i32
%7 = and i32 %6, 7
%8 = xor i32 %7, 7
%9 = shl nuw i32 1, %8
%10 = and i32 %5, %9
ret i32 %10
}
int _tt_dummyfuncv(int a, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_tt_dummyfuncv(i32 %0, ...) {
ret i32 0
}
void g_closure_remove_invalidate_notifier() {}


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

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

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

LLVM IR (-O2):
define void @g_closure_remove_invalidate_notifier() {
ret void
}
int esprimo(i) {
  int primo = 1;
  int a = 2;
  while (a < i && primo == 1) {
    if (i % a == 0) {
      primo = 0;
    }
    a++;
  }
  return primo;
}


x86 assembly (clang, -O0):
<esprimo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0xd(%rbp)
jge    1130 <esprimo+0x30>
cmpl   $0x1,-0x8(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <esprimo+0x40>
jmp    1165 <esprimo+0x65>
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1157 <esprimo+0x57>
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <esprimo+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<esprimo>:
mov    $0x1,%eax
cmp    $0x3,%edi
jl     112c <esprimo+0x2c>
mov    $0x3,%ecx
nop
lea    -0x1(%rcx),%esi
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1125 <esprimo+0x25>
lea    0x1(%rcx),%eax
cmp    %edi,%ecx
mov    %eax,%ecx
jl     1110 <esprimo+0x10>
xor    %eax,%eax
test   %edx,%edx
setne  %al
ret

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

LLVM IR (-O2):
define i32 @esprimo(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %3, label %12
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 2, %1 ]
%5 = srem i32 %0, %4
%6 = icmp ne i32 %5, 0
%7 = add nuw nsw i32 %4, 1
%8 = icmp slt i32 %7, %0
%9 = and i1 %6, %8
br i1 %9, label %3, label %10
10: ; preds = %3
%11 = zext i1 %6 to i32
br label %12
12: ; preds = %10, %1
%13 = phi i32 [ 1, %1 ], [ %11, %10 ]
ret i32 %13
}
void helper_function(int a) {
  printf("%s(%d): a is %d\n", __func__, 4, a);
  a += 5;
  printf("%s(%d): a is %d\n", __func__, 6, a);
}


x86 assembly (clang, -O0):
<helper_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xedb(%rip),%rdi
lea    0xee5(%rip),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xeb5(%rip),%rdi
lea    0xebf(%rip),%rsi
mov    $0x6,%edx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_function>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
lea    0xee2(%rip),%r14
lea    0xeec(%rip),%r15
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x5,%ebx
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x6,%edx
mov    %ebx,%ecx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%s(%d): a is %d\0A\00"
@__func__.helper_function = [16 x i8] c"helper_function\00"
define void @helper_function(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.helper_function, i64 0, i64 0), i32 4, i32 %3)
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 5
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.helper_function, i64 0, i64 0), i32 6, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s(%d): a is %d\0A\00"
@__func__.helper_function = [16 x i8] c"helper_function\00"
define void @helper_function(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.helper_function, i64 0, i64 0), i32 4, i32 %0)
%3 = add nsw i32 %0, 5
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.helper_function, i64 0, i64 0), i32 6, i32 %3)
ret void
}
void usb_lp_handler(void) {}


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

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

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

LLVM IR (-O2):
define void @usb_lp_handler() {
ret void
}
int test_imm_84int8_reg(signed char val) {
  return ((val) & (-0x84 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_84int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff7c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_84int8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -132
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ might_sleep();
int num_online_cpus();
int rcu_blocking_is_gp(void) {
  might_sleep();
  return num_online_cpus() == 1;
}


x86 assembly (clang, -O0):
<rcu_blocking_is_gp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <might_sleep@plt>
mov    $0x0,%al
call   1030 <num_online_cpus@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rcu_blocking_is_gp>:
push   %rax
xor    %eax,%eax
call   1040 <might_sleep@plt>
xor    %eax,%eax
call   1030 <num_online_cpus@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rcu_blocking_is_gp() {
%1 = call i32 (...) @might_sleep()
%2 = call i32 (...) @num_online_cpus()
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @rcu_blocking_is_gp() {
%1 = tail call i32 (...) @might_sleep()
%2 = tail call i32 (...) @num_online_cpus()
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned long int string_to_s(unsigned long int recv) { return recv; }


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

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

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

LLVM IR (-O2):
define i64 @string_to_s(i64 returned %0) {
ret i64 %0
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local2;
  unsigned int local1;
  {
    state[0UL] = (input[0UL] | 51238316UL) >> 3U;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      local2 = 0UL;
      while (local2 < input[1UL]) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] | 458711886UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
or     $0x30dd5ac,%rax
shr    $0x3,%rax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x4(%rcx),%eax
jae    116b <RandomFunc+0x6b>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x4(%rcx),%eax
jae    115c <RandomFunc+0x5c>
mov    -0x18(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x18(%rbp)
jmp    113d <RandomFunc+0x3d>
mov    -0x1c(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x1c(%rbp)
jmp    1126 <RandomFunc+0x26>
mov    -0x14(%rbp),%eax
or     $0x1b57634e,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%eax
shr    $0x3,%eax
or     $0x1b77fbff,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = zext i32 %10 to i64
%12 = or i64 %11, 51238316
%13 = lshr i64 %12, 3
%14 = trunc i64 %13 to i32
%15 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %14, i32* %15
store i32 0, i32* %7
br label %16
16: ; preds = %34, %2
%17 = load i32, i32* %7
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 1
%20 = load i32, i32* %19
%21 = icmp ult i32 %17, %20
br i1 %21, label %22, label %39
22: ; preds = %16
store i32 0, i32* %6
br label %23
23: ; preds = %29, %22
%24 = load i32, i32* %6
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i64 1
%27 = load i32, i32* %26
%28 = icmp ult i32 %24, %27
br i1 %28, label %29, label %34
29: ; preds = %23
%30 = load i32, i32* %6
%31 = zext i32 %30 to i64
%32 = add i64 %31, 2
%33 = trunc i64 %32 to i32
store i32 %33, i32* %6
br label %23
34: ; preds = %23
%35 = load i32, i32* %7
%36 = zext i32 %35 to i64
%37 = add i64 %36, 2
%38 = trunc i64 %37 to i32
store i32 %38, i32* %7
br label %16
39: ; preds = %16
%40 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%41 = load i32, i32* %40
%42 = zext i32 %41 to i64
%43 = or i64 %42, 458711886
%44 = trunc i64 %43 to i32
%45 = load i32*, i32** %4
%46 = getelementptr inbounds i32, i32* %45, i64 0
store i32 %44, i32* %46
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = lshr i32 %3, 3
%5 = or i32 %4, 460848127
store i32 %5, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ s2pnts(int, float *, float *, float *, int *, int);
void s2pnts_(int *np, float *xpts, float *ypts, float *zpts, int *symbols,
             int *ns) {
  s2pnts(*np, xpts, ypts, zpts, symbols, *ns);
}


x86 assembly (clang, -O0):
<s2pnts_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%rax
mov    (%rax),%r9d
call   1030 <s2pnts@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2pnts_>:
mov    (%rdi),%edi
mov    (%r9),%r9d
jmp    1030 <s2pnts@plt>

LLVM IR (-O0):
define void @s2pnts_(i32* %0, float* %1, float* %2, float* %3, i32* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca i32*
%12 = alloca i32*
store i32* %0, i32** %7
store float* %1, float** %8
store float* %2, float** %9
store float* %3, float** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = load float*, float** %8
%16 = load float*, float** %9
%17 = load float*, float** %10
%18 = load i32*, i32** %11
%19 = load i32*, i32** %12
%20 = load i32, i32* %19
%21 = call i32 @s2pnts(i32 %14, float* %15, float* %16, float* %17, i32* %18, i32 %20)
ret void
}

LLVM IR (-O2):
define void @s2pnts_(i32* nocapture %0, float* %1, float* %2, float* %3, i32* %4, i32* nocapture %5) {
%7 = load i32, i32* %0
%8 = load i32, i32* %5
%9 = tail call i32 @s2pnts(i32 %7, float* %1, float* %2, float* %3, i32* %4, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *t1(void *arg) {
  int a;
  a = *((int *)arg);
  assert(a == 10);
}


x86 assembly (clang, -O0):
<t1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1>:
xor    %eax,%eax
cmpl   $0xa,(%rdi)
sete   %al
mov    %eax,%edi
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define noalias i8* @t1(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 10
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i8* undef
}
void reverse(char *s, char *r) {
  char tmp;
  if (s < r) {
    tmp = *s;
    *s = *r;
    *r = tmp;
    reverse(s + 1, r - 1);
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1161 <reverse+0x51>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
add    $0xffffffffffffffff,%rsi
call   1030 <reverse@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
cmp    %rsi,%rdi
jae    112c <reverse+0x2c>
add    $0x1,%rdi
nopl   0x0(%rax)
movzbl -0x1(%rdi),%eax
movzbl (%rsi),%ecx
mov    %cl,-0x1(%rdi)
mov    %al,(%rsi)
add    $0xffffffffffffffff,%rsi
lea    0x1(%rdi),%rax
cmp    %rsi,%rdi
mov    %rax,%rdi
jb     1110 <reverse+0x10>
ret

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

LLVM IR (-O2):
define void @reverse(i8* %0, i8* %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i8* [ %10, %4 ], [ %1, %2 ]
%6 = phi i8* [ %9, %4 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = load i8, i8* %5
store i8 %8, i8* %6
store i8 %7, i8* %5
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = getelementptr inbounds i8, i8* %5, i64 -1
%11 = icmp ult i8* %9, %10
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret void
}
void foo333(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo333(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fn1(int);
int fn2(int x, int y) {
  if (y) {
    fn1(x);
    y = -2 + x;
    y = y * y * y + y;
    fn1(x + y);
  }
  return x;
}


x86 assembly (clang, -O0):
<fn2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1157 <fn2+0x47>
mov    -0x4(%rbp),%edi
call   1030 <fn1@plt>
mov    -0x4(%rbp),%eax
add    $0xfffffffe,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    -0x8(%rbp),%edi
call   1030 <fn1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn2>:
push   %rbx
mov    %edi,%ebx
test   %esi,%esi
je     1136 <fn2+0x26>
mov    %ebx,%edi
call   1030 <fn1@plt>
lea    -0x2(%rbx),%eax
mov    %eax,%ecx
imul   %eax,%ecx
imul   %eax,%ecx
lea    (%rbx,%rbx,1),%edi
add    $0xfffffffe,%edi
add    %ecx,%edi
call   1030 <fn1@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @fn2(i32 returned %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = tail call i32 @fn1(i32 %0)
%6 = add nsw i32 %0, -2
%7 = mul nsw i32 %6, %6
%8 = mul nsw i32 %7, %6
%9 = add i32 %6, %0
%10 = add i32 %9, %8
%11 = tail call i32 @fn1(i32 %10)
br label %12
12: ; preds = %4, %2
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t gpsNMEAChecksum(char *nmeaStr) {
  uint8_t checksum = 0;
  nmeaStr++;
  while (*nmeaStr)
    checksum ^= *nmeaStr++;
  return checksum;
}


x86 assembly (clang, -O0):
<gpsNMEAChecksum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <gpsNMEAChecksum+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    111b <gpsNMEAChecksum+0x1b>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpsNMEAChecksum>:
add    $0x1,%rdi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
mov    %ecx,%eax
movsbl (%rdi),%edx
xor    %edx,%ecx
add    $0x1,%rdi
test   %edx,%edx
jne    1110 <gpsNMEAChecksum+0x10>
ret

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

LLVM IR (-O2):
define i32 @gpsNMEAChecksum(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %5, %2 ]
%4 = phi i32 [ 0, %1 ], [ %9, %2 ]
%5 = getelementptr inbounds i8, i8* %3, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = sext i8 %6 to i32
%9 = xor i32 %4, %8
br i1 %7, label %10, label %2
10: ; preds = %2
ret i32 %4
}
void foo715() {}


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

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

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

LLVM IR (-O2):
define void @foo715() {
ret void
}
/* Variables and functions */
long num_coeff(long);
long num_scale(long n) { return n - num_coeff(n); }


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

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

LLVM IR (-O0):
define i64 @num_scale(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @num_coeff(i64 %4)
%6 = sub nsw i64 %3, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @num_scale(i64 %0) {
%2 = tail call i64 @num_coeff(i64 %0)
%3 = sub nsw i64 %0, %2
ret i64 %3
}
int __setbit(int val, int bit, int set) {
  int mask = 1 << (bit - 1);
  return ((set == 1) ? (val | mask) : (val & ~mask));
}


x86 assembly (clang, -O0):
<__setbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1135 <__setbit+0x35>
mov    -0x4(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1143 <__setbit+0x43>
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__setbit>:
add    $0xff,%sil
mov    %edi,%eax
bts    %esi,%eax
btr    %esi,%edi
cmp    $0x1,%edx
cmovne %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @__setbit(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, -1
%5 = shl nuw i32 1, %4
%6 = icmp eq i32 %2, 1
%7 = or i32 %5, %0
%8 = xor i32 %5, -1
%9 = and i32 %8, %0
%10 = select i1 %6, i32 %7, i32 %9
ret i32 %10
}
double SuperLU_timer_(void) {
  double tmp;
  tmp = 0.0;
  return (double)(tmp) / 60;
}


x86 assembly (clang, -O0):
<SuperLU_timer_>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee7(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SuperLU_timer_>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @SuperLU_timer_() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = load double, double* %1
%3 = fdiv double %2, 6.000000e+01
ret double %3
}

LLVM IR (-O2):
define double @SuperLU_timer_() {
ret double 0.000000e+00
}
/* Variables and functions */
double cosh(double);
double module_libc_cosh(double x) { return cosh(x); }


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

x86 assembly (clang, -O2):
<module_libc_cosh>:
jmp    1030 <cosh@plt>

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

LLVM IR (-O2):
define double @module_libc_cosh(double %0) {
%2 = tail call double @cosh(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ concurrent_get_stock(char *, int *);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int /*<<< orphan*/);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
void *get_stock_thread(void *arg) {
  char *product;
  int stock;
  product = (char *)malloc(strlen((char *)arg));
  strcpy(product, (char *)arg);
  concurrent_get_stock(product, &stock);
  free(product);
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<get_stock_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1060 <concurrent_get_stock@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_stock_thread>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <strlen@plt>
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <concurrent_get_stock@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1070 <pthread_exit@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @get_stock_thread(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %4
%14 = call i32 @concurrent_get_stock(i8* %13, i32* %5)
%15 = load i8*, i8** %4
%16 = call i32 @free(i8* %15)
%17 = call i32 @pthread_exit(i32* null)
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define noalias i8* @get_stock_thread(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
%8 = call i32 @concurrent_get_stock(i8* %6, i32* %2)
%9 = call i32 @free(i8* %6)
%10 = call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void *process(void *arg) {
  write(2, "a", 1);
  write(2, "b", 1);
  write(2, "b", 1);
  write(2, "b", 1);
  return NULL;
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2,%edi
lea    0xed8(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x2,%edi
lea    0xec4(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x2,%edi
lea    0xeae(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x2,%edi
lea    0xe98(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %rbx
lea    0xee8(%rip),%rsi
mov    $0x2,%edi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0xed4(%rip),%rbx
mov    $0x2,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
define i8* @process(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
%6 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i8* null
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
define noalias i8* @process(i8* nocapture readnone %0) {
%2 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ AllocArrays();
int /*<<< orphan*/ ComputeResistanceProfile();
int /*<<< orphan*/ IntegrateResistanceProfile();
int /*<<< orphan*/ LoadData();
int /*<<< orphan*/ LoadZstep();
int main() {
  AllocArrays();
  LoadData();
  ComputeResistanceProfile();
  LoadZstep();
  IntegrateResistanceProfile();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <AllocArrays@plt>
mov    $0x0,%al
call   1070 <LoadData@plt>
mov    $0x0,%al
call   1030 <ComputeResistanceProfile@plt>
mov    $0x0,%al
call   1050 <LoadZstep@plt>
mov    $0x0,%al
call   1060 <IntegrateResistanceProfile@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <AllocArrays@plt>
xor    %eax,%eax
call   1070 <LoadData@plt>
xor    %eax,%eax
call   1030 <ComputeResistanceProfile@plt>
xor    %eax,%eax
call   1050 <LoadZstep@plt>
xor    %eax,%eax
call   1060 <IntegrateResistanceProfile@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @AllocArrays()
%3 = call i32 (...) @LoadData()
%4 = call i32 (...) @ComputeResistanceProfile()
%5 = call i32 (...) @LoadZstep()
%6 = call i32 (...) @IntegrateResistanceProfile()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @AllocArrays()
%2 = tail call i32 (...) @LoadData()
%3 = tail call i32 (...) @ComputeResistanceProfile()
%4 = tail call i32 (...) @LoadZstep()
%5 = tail call i32 (...) @IntegrateResistanceProfile()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
void _mm_store_epi32(void *, int /*<<< orphan*/);
void test_mm_store_epi32(void *__P, __m128i __A) {
  return _mm_store_epi32(__P, __A);
}


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

x86 assembly (clang, -O2):
<test_mm_store_epi32>:
jmp    1030 <_mm_store_epi32@plt>

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

LLVM IR (-O2):
define void @test_mm_store_epi32(i8* %0, i32 %1) {
tail call void @_mm_store_epi32(i8* %0, i32 %1)
ret void
}
/* Type definitions */
struct conn_sslcon {
  int dummy;
};

/* Variables and functions */
int tcpconHandleBnlTransfer(struct conn_sslcon *, int /*<<< orphan*/);
int tcpconHandleBnlpush(struct conn_sslcon *con) {
  return tcpconHandleBnlTransfer(con, 0);
}


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

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

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

LLVM IR (-O2):
%struct.conn_sslcon = type { i32 }
define i32 @tcpconHandleBnlpush(%struct.conn_sslcon* %0) {
%2 = tail call i32 @tcpconHandleBnlTransfer(%struct.conn_sslcon* %0, i32 0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int count1(int /*<<< orphan*/ const);
void countDigits1(size_t length, const uint32_t *dataArray, int *countArray) {
  while (length) {
    *countArray = count1(*dataArray);
    countArray++;
    dataArray++;
    length--;
  }
}


x86 assembly (clang, -O0):
<countDigits1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116b <countDigits1+0x5b>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <count1@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1124 <countDigits1+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countDigits1>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1146 <countDigits1+0x36>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%edi
call   1030 <count1@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <countDigits1+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @countDigits1(i64 %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %15, label %5
5: ; preds = %3, %5
%6 = phi i32* [ %11, %5 ], [ %2, %3 ]
%7 = phi i32* [ %12, %5 ], [ %1, %3 ]
%8 = phi i64 [ %13, %5 ], [ %0, %3 ]
%9 = load i32, i32* %7
%10 = tail call i32 @count1(i32 %9)
store i32 %10, i32* %6
%11 = getelementptr inbounds i32, i32* %6, i64 1
%12 = getelementptr inbounds i32, i32* %7, i64 1
%13 = add i64 %8, -1
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  printf("La edad del profe es: %d!\n", 26);
  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)
lea    0xed3(%rip),%rdi
mov    $0x1a,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [27 x i8] c"La edad del profe es: %d!\0A\00"
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 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"La edad del profe es: %d!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
ret i32 0
}