xunge/DecIR huggingface dataset:
/* Variables and functions */
int rand();
int nudgeHealth(int hp) {
  int value = rand() % 10;
  if ((rand() % 10) >= 5)
    return hp + value;
  else
    return hp - value;
}


x86 assembly (clang, -O0):
<nudgeHealth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x5,%edx
jl     1153 <nudgeHealth+0x43>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115c <nudgeHealth+0x4c>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nudgeHealth>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rcx
imul   $0x66666667,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rax
add    %edx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ecx
mov    %ebx,%eax
neg    %eax
cmp    $0x5,%ecx
cmovge %ebx,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @nudgeHealth(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 10
store i32 %6, i32* %4
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 10
%9 = icmp sge i32 %8, 5
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = add nsw i32 %11, %12
store i32 %13, i32* %2
br label %18
14: ; preds = %1
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = sub nsw i32 %15, %16
store i32 %17, i32* %2
br label %18
18: ; preds = %14, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @nudgeHealth(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 10
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, 10
%6 = icmp sgt i32 %5, 4
%7 = sub nsw i32 0, %3
%8 = select i1 %6, i32 %3, i32 %7
%9 = add i32 %8, %0
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ prg(unsigned char *, int, unsigned char const *);
void expand_seed(unsigned char outseeds[(1 << 16) * 32],
                 const unsigned char inseed[32]) {
  prg(outseeds, (1 << 16) * 32, inseed);
}


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

x86 assembly (clang, -O2):
<expand_seed>:
mov    %rsi,%rdx
mov    $0x200000,%esi
jmp    1030 <prg@plt>

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

LLVM IR (-O2):
define void @expand_seed(i8* %0, i8* %1) {
%3 = tail call i32 @prg(i8* %0, i32 2097152, i8* %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr2setBank2(int);
void m193setParams6001(uint16_t addr, uint8_t val) {
  (void)addr;
  chr2setBank2((val >> 1) << 11);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edi
and    $0xfffffffe,%edi
shl    $0xa,%edi
jmp    1030 <chr2setBank2@plt>

LLVM IR (-O0):
define void @m193setParams6001(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = ashr i32 %6, 1
%8 = shl i32 %7, 11
%9 = call i32 @chr2setBank2(i32 %8)
ret void
}

LLVM IR (-O2):
define void @m193setParams6001(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = and i32 %3, -2048
%5 = tail call i32 @chr2setBank2(i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ CRC32_CalcStream(int /*<<< orphan*/, unsigned char const *,
                                    int const);
uint32_t CRC32_Calc(const unsigned char *buf, const int len) {
  return CRC32_CalcStream(0, buf, len);
}


x86 assembly (clang, -O0):
<CRC32_Calc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
xor    %edi,%edi
call   1030 <CRC32_CalcStream@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRC32_Calc>:
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <CRC32_CalcStream@plt>

LLVM IR (-O0):
define i32 @CRC32_Calc(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
%7 = call i32 @CRC32_CalcStream(i32 0, i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @CRC32_Calc(i8* %0, i32 %1) {
%3 = tail call i32 @CRC32_CalcStream(i32 0, i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int factorial(int num) {
  int product = 1;
  while (num) {
    product *= num;
    --num;
    sleep(1);
  }
  return product;
}


x86 assembly (clang, -O0):
<factorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114e <factorial+0x3e>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1122 <factorial+0x12>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<factorial>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
je     1134 <factorial+0x24>
mov    %edi,%ebp
mov    $0x1,%ebx
xchg   %ax,%ax
imul   %ebp,%ebx
mov    $0x1,%edi
call   1030 <sleep@plt>
add    $0xffffffff,%ebp
jne    1120 <factorial+0x10>
jmp    1139 <factorial+0x29>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @factorial(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = mul nsw i32 %4, %5
%7 = add nsw i32 %5, -1
%8 = tail call i32 @sleep(i32 1)
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %11
}
/* Variables and functions */
char *strdup(char *);
char *owen_M_get_listsupportdevices() { return strdup("TMP200\0XXX\0"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"TMP200\00XXX\00\00"
define i8* @owen_M_get_listsupportdevices() {
%1 = call i8* @strdup(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [12 x i8] c"TMP200\00XXX\00\00"
define noalias i8* @owen_M_get_listsupportdevices() {
%1 = tail call dereferenceable_or_null(7) i8* @strdup(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Type definitions */
typedef int uint8_t;
typedef int int16_t;

/* Variables and functions */
int16_t char2_to_short(uint8_t scratch[2]) {
  int16_t val = (scratch[0] << 8) + scratch[1];
  return val;
}


x86 assembly (clang, -O0):
<char2_to_short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
add    0x4(%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char2_to_short>:
mov    (%rdi),%eax
shl    $0x8,%eax
add    0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @char2_to_short(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
%7 = shl i32 %6, 8
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = add nsw i32 %7, %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @char2_to_short(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = add nsw i32 %3, %5
ret i32 %6
}
int asalmi(int x) {
  int i;
  if (x <= 1) {
    return 0;
  } else {
    int kok = x ^ 1 / 2;
    for (i = 2; i < kok; i++) {
      if (x % i == 0) {
        return 0;
      }
    }
    return 1;
  }
}


x86 assembly (clang, -O0):
<asalmi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     111d <asalmi+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    116f <asalmi+0x6f>
mov    -0x8(%rbp),%eax
xor    $0x0,%eax
mov    %eax,-0x10(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1168 <asalmi+0x68>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1155 <asalmi+0x55>
movl   $0x0,-0x4(%rbp)
jmp    116f <asalmi+0x6f>
jmp    115a <asalmi+0x5a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <asalmi+0x2d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<asalmi>:
xor    %ecx,%ecx
cmp    $0x2,%edi
jge    110a <asalmi+0xa>
mov    %ecx,%eax
ret
jne    1112 <asalmi+0x12>
mov    $0x1,%eax
ret
mov    $0x2,%esi
nopw   0x0(%rax,%rax,1)
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1107 <asalmi+0x7>
add    $0x1,%esi
cmp    %esi,%edi
jne    1120 <asalmi+0x20>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @asalmi(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp eq i32 %0, 2
br i1 %4, label %12, label %7
5: ; preds = %7
%6 = icmp eq i32 %11, %0
br i1 %6, label %12, label %7
7: ; preds = %3, %5
%8 = phi i32 [ %11, %5 ], [ 2, %3 ]
%9 = srem i32 %0, %8
%10 = icmp eq i32 %9, 0
%11 = add nuw nsw i32 %8, 1
br i1 %10, label %12, label %5
12: ; preds = %5, %7, %3, %1
%13 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 1, %5 ], [ 0, %7 ]
ret i32 %13
}
/* Variables and functions */
int f();
int /*<<< orphan*/ printf(char *, int);
void f3() {
  int r;
  if ((r = f()) != 0) {
    int y = r;
    printf("the error is: %d\n", y);
  }
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1150 <f3+0x30>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
test   %eax,%eax
je     113b <f3+0x1b>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"the error is: %d\0A\00"
define void @f3() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @f()
store i32 %3, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i32, i32* %1
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"the error is: %d\0A\00"
define void @f3() {
%1 = tail call i32 (...) @f()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %5
5: ; preds = %3, %0
ret void
}
unsigned int minin(unsigned int a, unsigned int b) {
  if (a >= b)
    return (b);
  else
    return (a);
}


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

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

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

LLVM IR (-O2):
define i32 @minin(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x86() {
  Assert_real((ispunct(134) == 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_ispunct.c",
              675, ("ispunct should be 0 for 0x86"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x86>:
push   %rax
mov    $0x86,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2a3,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x86\00"
define void @t_ispunct_0x86() {
%1 = call i64 @ispunct(i32 134)
%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 675, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x86\00"
define void @t_ispunct_0x86() {
%1 = tail call i64 @ispunct(i32 134)
%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 675, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double max(double x, double y) {
  double max_xy;
  max_xy = x > y ? x : y;
  return max_xy;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <max+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1137 <max+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @max(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fcmp ogt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %4
br label %13
13: ; preds = %11, %9
%14 = phi double [ %10, %9 ], [ %12, %11 ]
store double %14, double* %5
%15 = load double, double* %5
ret double %15
}

LLVM IR (-O2):
define double @max(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
double InterpretLocaleValue(char const *, char **);
double StringToDoubleInterval(const char *string, const double interval) {
  char *q;
  double value;
  value = InterpretLocaleValue(string, &q);
  if (*q == '%')
    value *= interval / 100.0;
  return (value);
}


x86 assembly (clang, -O0):
<StringToDoubleInterval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <InterpretLocaleValue@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    115e <StringToDoubleInterval+0x4e>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringToDoubleInterval>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
lea    0x10(%rsp),%rsi
call   1030 <InterpretLocaleValue@plt>
mov    0x10(%rsp),%rax
cmpb   $0x25,(%rax)
jne    1140 <StringToDoubleInterval+0x30>
movsd  0x8(%rsp),%xmm1
divsd  0xec4(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @StringToDoubleInterval(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca i8*
%6 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%7 = load i8*, i8** %3
%8 = call double @InterpretLocaleValue(i8* %7, i8** %5)
store double %8, double* %6
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 37
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load double, double* %4
%15 = fdiv double %14, 1.000000e+02
%16 = load double, double* %6
%17 = fmul double %16, %15
store double %17, double* %6
br label %18
18: ; preds = %13, %2
%19 = load double, double* %6
ret double %19
}

LLVM IR (-O2):
define double @StringToDoubleInterval(i8* %0, double %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call double @InterpretLocaleValue(i8* %0, i8** %3)
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 37
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = fdiv double %1, 1.000000e+02
%11 = fmul double %10, %5
br label %12
12: ; preds = %9, %2
%13 = phi double [ %11, %9 ], [ %5, %2 ]
ret double %13
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ pixel_avg_weight_wxh(int /*<<< orphan*/ *, int,
                                        int /*<<< orphan*/ *, int, int, int,
                                        int);
void pixel_avg_weight_4x2(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                          int i_stride_pix2, int i_weight1) {
  pixel_avg_weight_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 4, 2,
                       i_weight1);
}


x86 assembly (clang, -O0):
<pixel_avg_weight_4x2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%eax
mov    $0x4,%r8d
mov    $0x2,%r9d
mov    %eax,(%rsp)
call   1030 <pixel_avg_weight_wxh@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_avg_weight_4x2>:
push   %rax
mov    %r8d,(%rsp)
mov    $0x4,%r8d
mov    $0x2,%r9d
call   1030 <pixel_avg_weight_wxh@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @pixel_avg_weight_4x2(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = tail call i32 @pixel_avg_weight_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 4, i32 2, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set32(int, int);
void mem_setswap() { set32((0xd800000 + 0x060), 0x20); }


x86 assembly (clang, -O0):
<mem_setswap>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd800060,%edi
mov    $0x20,%esi
call   1030 <set32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_setswap>:
mov    $0xd800060,%edi
mov    $0x20,%esi
jmp    1030 <set32@plt>

LLVM IR (-O0):
define void @mem_setswap() {
%1 = call i32 @set32(i32 226492512, i32 32)
ret void
}

LLVM IR (-O2):
define void @mem_setswap() {
%1 = tail call i32 @set32(i32 226492512, i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ amaret_local_A1_toggle__E();
void pollen_hardware_Led_toggle__E() { amaret_local_A1_toggle__E(); }


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

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

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

LLVM IR (-O2):
define void @pollen_hardware_Led_toggle__E() {
%1 = tail call i32 (...) @amaret_local_A1_toggle__E()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int main() {
  printf("A line to stdout\n");
  fprintf(stderr, "A line to stderr\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"A line to stdout\0A\00"
@stderr = global i32 0
@.str.1 = [18 x i8] c"A line to stderr\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str.1 = [18 x i8] c"A line to stderr\0A\00"
@str = [17 x i8] c"A line to stdout\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_udecimal(int);
int /*<<< orphan*/ stdout_put_char(char);
void print_decimal(int decimal) {
  if (decimal >= 0) {
    print_udecimal(decimal);
  } else {
    stdout_put_char('-');
    print_udecimal(-decimal);
  }
}


x86 assembly (clang, -O0):
<print_decimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1142 <print_decimal+0x22>
mov    -0x4(%rbp),%edi
call   1030 <print_udecimal@plt>
jmp    1156 <print_decimal+0x36>
mov    $0x2d,%edi
call   1040 <stdout_put_char@plt>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
call   1030 <print_udecimal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_decimal>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jns    1133 <print_decimal+0x13>
mov    $0x2d,%edi
call   1040 <stdout_put_char@plt>
neg    %ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <print_udecimal@plt>

LLVM IR (-O0):
define void @print_decimal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @print_udecimal(i32 %6)
br label %13
8: ; preds = %1
%9 = call i32 @stdout_put_char(i8 signext 45)
%10 = load i32, i32* %2
%11 = sub nsw i32 0, %10
%12 = call i32 @print_udecimal(i32 %11)
br label %13
13: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
define void @print_decimal(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @stdout_put_char(i8 signext 45)
%5 = sub nsw i32 0, %0
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = tail call i32 @print_udecimal(i32 %7)
ret void
}
int test_imm_A4uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xA4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A4uint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xa4,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A4uint64_lowword_reg>:
test   $0xa4,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A4uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 164
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
R0AX1(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ r0 = (((float *)11111111)[x1]); }


x86 assembly (clang, -O0):
<R0AX1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movslq -0x14(%rbp),%rcx
mov    $0xa98ac7,%eax
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @R0AX1(double %0, double %1, i32 %2, i32 %3, float* nocapture readnone %4, float* nocapture readnone %5) {
ret i32 undef
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ window;
};
typedef TYPE_1__ XMapEvent;

/* Variables and functions */
unsigned long get_XMapEvent_window(void *_p) {
  return (unsigned long)((XMapEvent *)_p)->window;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XMapEvent_window(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XMapEvent_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void term_handler(int signum) { (void)signum; }


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

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

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

LLVM IR (-O2):
define void @term_handler(i32 %0) {
ret void
}
/* Variables and functions */
int io_con_write(char *, int);
int io_con_put_char(char ch) {
  char d[1] = {ch};
  return io_con_write(d, 1);
}


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

x86 assembly (clang, -O2):
<io_con_put_char>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <io_con_write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @io_con_put_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca [1 x i8]
store i8 %0, i8* %2
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%5 = load i8, i8* %2
store i8 %5, i8* %4
%6 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%7 = call i32 @io_con_write(i8* %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @io_con_put_char(i8 signext %0) {
%2 = alloca [1 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
store i8 %0, i8* %3
%4 = call i32 @io_con_write(i8* %3, i32 1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerCapComP__4__Compare__default__fired();
void Msp430TimerCapComP__4__Compare__fired(void) {
  Msp430TimerCapComP__4__Compare__default__fired();
}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__4__Compare__fired() {
%1 = tail call i32 (...) @Msp430TimerCapComP__4__Compare__default__fired()
ret void
}
void swap(int *pa, int *pb) {
  int tmp = *pa;
  *pa = *pb;
  *pb = tmp;
}


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

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
unsigned getUnaligned32(void *p) {
  unsigned char *c = p;
  return c[0] + (c[1] << 8) + (c[2] << 16) + (c[3] << 24);
}


x86 assembly (clang, -O0):
<getUnaligned32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getUnaligned32>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @getUnaligned32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Variables and functions */
char *strchr(char const *, char);
const char *P_(const char *Text) {
  const char *const stripto = strchr(Text, '|');
  return stripto + 1;
}


x86 assembly (clang, -O0):
<P_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x7c,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<P_>:
push   %rax
mov    $0x7c,%esi
call   1030 <strchr@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @P_(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 124)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 1
ret i8* %7
}

LLVM IR (-O2):
define i8* @P_(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 124)
%3 = getelementptr inbounds i8, i8* %2, i64 1
ret i8* %3
}
/* Variables and functions */
bool nrf53_errata_58(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_58() {
ret i32 0
}
/* Variables and functions */
double dfac_intern(int, int);
double dfac(int n) { return dfac_intern(n, 1); }


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

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

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

LLVM IR (-O2):
define double @dfac(i32 %0) {
%2 = tail call double @dfac_intern(i32 %0, i32 1)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ check(int, int, int);
int main() {
  check(41, 11, 1549);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x29,%edi
mov    $0xb,%esi
mov    $0x60d,%edx
call   1030 <check@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x29,%edi
mov    $0xb,%esi
mov    $0x60d,%edx
call   1030 <check@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @check(i32 41, i32 11, i32 1549)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/, char *, float *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
float pedir_valor_float() {
  float aux;
  fprintf(stdout, "Dame un numero: ");
  fscanf(stdin, "%f", &aux);
  return aux;
}


x86 assembly (clang, -O0):
<pedir_valor_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
lea    -0x4(%rbp),%rdx
call   1030 <fscanf@plt>
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pedir_valor_float>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xecb(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <fscanf@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [17 x i8] c"Dame un numero: \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%f\00"
define float @pedir_valor_float() {
%1 = alloca float
%2 = load i32, i32* @stdout
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fscanf(i32 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%6 = load float, float* %1
ret float %6
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [17 x i8] c"Dame un numero: \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%f\00"
define float @pedir_valor_float() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdin
%6 = call i32 @fscanf(i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = load float, float* %1
ret float %7
}
int maximoR(int n, int v[]) {
  int x;
  if (n == 1)
    x = v[0];
  else {
    x = maximoR(n - 1, v);
    if (x < v[n - 1])
      x = v[n - 1];
  }
  return x;
}


x86 assembly (clang, -O0):
<maximoR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1137 <maximoR+0x27>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    117a <maximoR+0x6a>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <maximoR@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jge    1175 <maximoR+0x65>
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
jmp    117a <maximoR+0x6a>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximoR>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
cmp    $0x1,%edi
jne    1121 <maximoR+0x11>
mov    (%r14),%eax
jmp    113b <maximoR+0x2b>
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
mov    %r14,%rsi
call   1030 <maximoR@plt>
movslq %ebx,%rcx
mov    -0x4(%r14,%rcx,4),%ecx
cmp    %ecx,%eax
cmovl  %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @maximoR(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32*, i32** %4
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
store i32 %11, i32* %5
br label %33
12: ; preds = %2
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 1
%15 = load i32*, i32** %4
%16 = call i32 @maximoR(i32 %14, i32* %15)
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = load i32*, i32** %4
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %18, i64 %21
%23 = load i32, i32* %22
%24 = icmp slt i32 %17, %23
br i1 %24, label %25, label %32
25: ; preds = %12
%26 = load i32*, i32** %4
%27 = load i32, i32* %3
%28 = sub nsw i32 %27, 1
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %26, i64 %29
%31 = load i32, i32* %30
store i32 %31, i32* %5
br label %32
32: ; preds = %25, %12
br label %33
33: ; preds = %32, %8
%34 = load i32, i32* %5
ret i32 %34
}

LLVM IR (-O2):
define i32 @maximoR(i32 %0, i32* nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* %1
br label %6
6: ; preds = %4, %8
%7 = phi i32 [ %15, %8 ], [ %5, %4 ]
ret i32 %7
8: ; preds = %2
%9 = add nsw i32 %0, -1
%10 = tail call i32 @maximoR(i32 %9, i32* %1)
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds i32, i32* %1, i64 %11
%13 = load i32, i32* %12
%14 = icmp slt i32 %10, %13
%15 = select i1 %14, i32 %13, i32 %10
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ miniprintf(char *, int, char *, char, int *);
int main() {
  char *s = "I love programming!";
  int a = 100;
  char c = 'X';
  miniprintf("%d , %s , %c , %p\n", a, s, c, &a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
movb   $0x58,-0x15(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
lea    -0x14(%rbp),%r8
movsbl -0x15(%rbp),%ecx
call   1030 <miniprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x64,0x4(%rsp)
lea    0xef4(%rip),%rdi
lea    0xed9(%rip),%rdx
lea    0x4(%rsp),%r8
mov    $0x64,%esi
mov    $0x58,%ecx
call   1030 <miniprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"I love programming!\00"
@.str.1 = [19 x i8] c"%d , %s , %c , %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8
store i32 0, i32* %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** %2
store i32 100, i32* %3
store i8 88, i8* %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %2
%7 = load i8, i8* %4
%8 = call i32 @miniprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %5, i8* %6, i8 signext %7, i32* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I love programming!\00"
@.str.1 = [19 x i8] c"%d , %s , %c , %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 100, i32* %1
%3 = call i32 @miniprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 signext 88, i32* %1)
ret i32 0
}
int power2(int x) { return 1 << (x); }


x86 assembly (clang, -O0):
<power2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power2>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @power2(i32 %0) {
%2 = shl nuw i32 1, %0
ret i32 %2
}
/* Variables and functions */
long meat_time_find_begin_of_day(long const);
long meat_time_offset_days(int);
signed long int meat_time_find_end_of_day(signed long int const i_now) {
  return meat_time_find_begin_of_day(i_now) + meat_time_offset_days(1);
}


x86 assembly (clang, -O0):
<meat_time_find_end_of_day>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <meat_time_find_begin_of_day@plt>
mov    %rax,-0x10(%rbp)
mov    $0x1,%edi
call   1030 <meat_time_offset_days@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<meat_time_find_end_of_day>:
push   %rbx
call   1040 <meat_time_find_begin_of_day@plt>
mov    %rax,%rbx
mov    $0x1,%edi
call   1030 <meat_time_offset_days@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @meat_time_find_end_of_day(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @meat_time_find_begin_of_day(i64 %3)
%5 = call i64 @meat_time_offset_days(i32 1)
%6 = add nsw i64 %4, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @meat_time_find_end_of_day(i64 %0) {
%2 = tail call i64 @meat_time_find_begin_of_day(i64 %0)
%3 = tail call i64 @meat_time_offset_days(i32 1)
%4 = add nsw i64 %3, %2
ret i64 %4
}