xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ecp_TrimSecretKey(unsigned char *);
int /*<<< orphan*/ x25519_BasePointMultiply(unsigned char *, unsigned char *);
void curve25519_dh_CalculatePublicKey_fast(unsigned char *pk,
                                           unsigned char *sk) {
  ecp_TrimSecretKey(sk);
  x25519_BasePointMultiply(pk, sk);
}


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

x86 assembly (clang, -O2):
<curve25519_dh_CalculatePublicKey_fast>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <ecp_TrimSecretKey@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <x25519_BasePointMultiply@plt>

LLVM IR (-O0):
define void @curve25519_dh_CalculatePublicKey_fast(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @ecp_TrimSecretKey(i8* %5)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @x25519_BasePointMultiply(i8* %7, i8* %8)
ret void
}

LLVM IR (-O2):
define void @curve25519_dh_CalculatePublicKey_fast(i8* %0, i8* %1) {
%3 = tail call i32 @ecp_TrimSecretKey(i8* %1)
%4 = tail call i32 @x25519_BasePointMultiply(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void fail(int dev) { printf("    test failed at %d\n", dev); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c" test failed at %d\0A\00"
define void @fail(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c" test failed at %d\0A\00"
define void @fail(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cr_reset();
int /*<<< orphan*/ printf(char *);
void cleanup(void) {
  cr_reset();
  printf("    Exiting...\n");
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cr_reset@plt>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
xor    %eax,%eax
call   1030 <cr_reset@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@str = [15 x i8] c" Exiting...\00"
define void @cleanup() {
%1 = tail call i32 (...) @cr_reset()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct getopt_data {
  int dummy;
};

/* Variables and functions */
int getopt_internal(int, char *const *, char const *, int /*<<< orphan*/,
                    int /*<<< orphan*/, int /*<<< orphan*/,
                    struct getopt_data *);
int __getopt_r(int argc, char *const argv[], const char *optstring,
               struct getopt_data *data) {
  return getopt_internal(argc, argv, optstring, 0, 0, 0, data);
}


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

x86 assembly (clang, -O2):
<__getopt_r>:
push   %rax
mov    %rcx,(%rsp)
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <getopt_internal@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.getopt_data = type { i32 }
define i32 @__getopt_r(i32 %0, i8** %1, i8* %2, %struct.getopt_data* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca %struct.getopt_data*
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8* %2, i8** %7
store %struct.getopt_data* %3, %struct.getopt_data** %8
%9 = load i32, i32* %5
%10 = load i8**, i8*** %6
%11 = load i8*, i8** %7
%12 = load %struct.getopt_data*, %struct.getopt_data** %8
%13 = call i32 @getopt_internal(i32 %9, i8** %10, i8* %11, i32 0, i32 0, i32 0, %struct.getopt_data* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.getopt_data = type { i32 }
define i32 @__getopt_r(i32 %0, i8** %1, i8* %2, %struct.getopt_data* %3) {
%5 = tail call i32 @getopt_internal(i32 %0, i8** %1, i8* %2, i32 0, i32 0, i32 0, %struct.getopt_data* %3)
ret i32 %5
}
void matmul_init() {}


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

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

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

LLVM IR (-O2):
define void @matmul_init() {
ret void
}
__attribute__((always_)) const int xisinff(float x) {
  return x == __builtin_inff() || x == -__builtin_inff();
}


x86 assembly (clang, -O0):
<xisinff>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x1,%al
movss  0xee8(%rip),%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x5(%rbp)
jne    112f <xisinff+0x2f>
jp     112f <xisinff+0x2f>
jmp    114a <xisinff+0x4a>
movss  -0x4(%rbp),%xmm0
movss  0xec8(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisinff>:
ucomiss 0xef9(%rip),%xmm0
setae  %al
movss  0xef2(%rip),%xmm1
ucomiss %xmm0,%xmm1
setae  %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @xisinff(float %0) {
%2 = fcmp oeq float %0, 0x7FF0000000000000
%3 = fcmp oeq float %0, 0xFFF0000000000000
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int SDL_imageFilterAddByteMMX(unsigned char *Src1, unsigned char *Dest,
                              unsigned int SrcLength, unsigned char C) {
  return (-1);
}


x86 assembly (clang, -O0):
<SDL_imageFilterAddByteMMX>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %al,-0x15(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SDL_imageFilterAddByteMMX(i8* %0, i8* %1, i32 %2, i8 zeroext %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8 %3, i8* %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @SDL_imageFilterAddByteMMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8 zeroext %3) {
ret i32 -1
}
/* Variables and functions */
scalar_t__ getpid();
int rand();
int /*<<< orphan*/ srand(scalar_t__);
int random_bet() {
  srand(rand() + getpid());
  int i = (rand() % 2) + 1;
  return i;
}


x86 assembly (clang, -O0):
<random_bet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <rand@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x10(%rbp),%rdi
add    %rax,%rdi
call   1040 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_bet>:
push   %rbx
xor    %eax,%eax
call   1050 <rand@plt>
movslq %eax,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1040 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @random_bet() {
%1 = alloca i32
%2 = call i32 (...) @rand()
%3 = sext i32 %2 to i64
%4 = call i64 (...) @getpid()
%5 = add nsw i64 %3, %4
%6 = call i32 @srand(i64 %5)
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @random_bet() {
%1 = tail call i32 (...) @rand()
%2 = sext i32 %1 to i64
%3 = tail call i64 (...) @getpid()
%4 = add nsw i64 %3, %2
%5 = tail call i32 @srand(i64 %4)
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 2
%8 = add nsw i32 %7, 1
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ d;

/* Variables and functions */
int /*<<< orphan*/ tx_bytes(unsigned char *, int);
void enable_port(unsigned char port) {
  unsigned char d[2];
  d[0] = ((port % 7) << 5) + 0x1F;
  d[1] = 0x03;
  tx_bytes(d, sizeof(d));
}


x86 assembly (clang, -O0):
<enable_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
shl    $0x5,%eax
add    $0x1f,%eax
mov    %al,-0x3(%rbp)
movb   $0x3,-0x2(%rbp)
lea    -0x3(%rbp),%rdi
mov    $0x2,%esi
call   1030 <tx_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_port>:
push   %rax
lea    (%rdi,%rdi,8),%eax
lea    (%rdi,%rax,4),%eax
shr    $0x8,%eax
mov    %edi,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x2,%cl
add    %dil,%cl
shl    $0x5,%cl
or     $0x1f,%cl
mov    %cl,0x6(%rsp)
movb   $0x3,0x7(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   1030 <tx_bytes@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @enable_port(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca [2 x i8]
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = srem i32 %5, 7
%7 = shl i32 %6, 5
%8 = add nsw i32 %7, 31
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %9, i8* %10
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 3, i8* %11
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%13 = call i32 @tx_bytes(i8* %12, i32 2)
ret void
}

LLVM IR (-O2):
define void @enable_port(i8 zeroext %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = urem i8 %0, 7
%5 = shl nuw i8 %4, 5
%6 = or i8 %5, 31
store i8 %6, i8* %3
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 3, i8* %7
%8 = call i32 @tx_bytes(i8* %3, i32 2)
ret void
}
char *mallo(n) {
  register char *p;
  if (!(p = malloc((unsigned)n)))
    doabort("malloc : out of memory\n");
  return (p);
}


x86 assembly (clang, -O0):
<mallo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1151 <mallo+0x31>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <doabort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mallo>:
push   %rbx
mov    %edi,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113e <mallo+0x1e>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1040 <doabort@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"malloc : out of memory\0A\00"
define i8* @mallo(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @doabort to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [24 x i8] c"malloc : out of memory\0A\00"
define i8* @mallo(i32 %0) {
%2 = zext i32 %0 to i64
%3 = tail call i8* @malloc(i64 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @doabort to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i8* %3
}
int kstrcmp(const char *dst, char *src) {
  int i = 0;
  while ((dst[i] == src[i])) {
    if (src[i++] == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<kstrcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1163 <kstrcmp+0x63>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x1c(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    115e <kstrcmp+0x5e>
movl   $0x0,-0x4(%rbp)
jmp    116a <kstrcmp+0x6a>
jmp    1113 <kstrcmp+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kstrcmp>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
cmp    (%rsi,%rax,1),%cl
jne    1124 <kstrcmp+0x24>
add    $0x1,%rax
test   %cl,%cl
jne    1110 <kstrcmp+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @kstrcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %10, %2
%4 = phi i64 [ %11, %10 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %1, i64 %4
%8 = load i8, i8* %7
%9 = icmp eq i8 %6, %8
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = add nuw i64 %4, 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %13, label %3
13: ; preds = %3, %10
%14 = phi i32 [ 0, %10 ], [ 1, %3 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ virtual_mcu_TimerMilli_isRunning__E();
int /*<<< orphan*/ virtual_mcu_TimerMilli_start__E();
void pollen_time_TimerManager_start__E() {
  if (!virtual_mcu_TimerMilli_isRunning__E()) {
    virtual_mcu_TimerMilli_start__E();
  }
}


x86 assembly (clang, -O0):
<pollen_time_TimerManager_start__E>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <virtual_mcu_TimerMilli_isRunning__E@plt>
cmp    $0x0,%eax
jne    113b <pollen_time_TimerManager_start__E+0x1b>
mov    $0x0,%al
call   1040 <virtual_mcu_TimerMilli_start__E@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pollen_time_TimerManager_start__E>:
push   %rax
xor    %eax,%eax
call   1030 <virtual_mcu_TimerMilli_isRunning__E@plt>
test   %eax,%eax
je     112e <pollen_time_TimerManager_start__E+0xe>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <virtual_mcu_TimerMilli_start__E@plt>

LLVM IR (-O0):
define void @pollen_time_TimerManager_start__E() {
%1 = call i32 (...) @virtual_mcu_TimerMilli_isRunning__E()
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 (...) @virtual_mcu_TimerMilli_start__E()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @pollen_time_TimerManager_start__E() {
%1 = tail call i32 (...) @virtual_mcu_TimerMilli_isRunning__E()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @virtual_mcu_TimerMilli_start__E()
br label %5
5: ; preds = %3, %0
ret void
}
__attribute__((__const__)) int gumbo_ascii_istab_or_newline(int c) {
  return c == 0x09 || c == 0x0a || c == 0x0d;
}


x86 assembly (clang, -O0):
<gumbo_ascii_istab_or_newline>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <gumbo_ascii_istab_or_newline+0x2f>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <gumbo_ascii_istab_or_newline+0x2f>
cmpl   $0xd,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gumbo_ascii_istab_or_newline>:
lea    -0x9(%rdi),%eax
cmp    $0x2,%eax
setb   %al
cmp    $0xd,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @gumbo_ascii_istab_or_newline(i32 %0) {
%2 = add i32 %0, -9
%3 = icmp ult i32 %2, 2
%4 = icmp eq i32 %0, 13
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ die(char *);
int write(int /*<<< orphan*/, char *, int);
void consoleBufferOpen() {
  if (write(STDOUT_FILENO, "\x1b[?47h", 6) == -1)
    die("Error changing terminal buffer");
}


x86 assembly (clang, -O0):
<consoleBufferOpen>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    $0x6,%edx
call   1030 <write@plt>
cmp    $0xffffffff,%eax
jne    1153 <consoleBufferOpen+0x33>
lea    0xeb9(%rip),%rdi
call   1040 <die@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<consoleBufferOpen>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
mov    $0x6,%edx
call   1030 <write@plt>
cmp    $0xffffffff,%eax
je     1142 <consoleBufferOpen+0x22>
pop    %rax
ret
lea    0xebe(%rip),%rdi
pop    %rax
jmp    1040 <die@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [7 x i8] c"\1B[?47h\00"
@.str.1 = [31 x i8] c"Error changing terminal buffer\00"
define void @consoleBufferOpen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i32 @write(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @die(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [7 x i8] c"\1B[?47h\00"
@.str.1 = [31 x i8] c"Error changing terminal buffer\00"
define void @consoleBufferOpen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @die(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret void
}
/* Variables and functions */
void vector_dummy_free(void *data, size_t len) {}


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

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

LLVM IR (-O0):
define void @vector_dummy_free(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @vector_dummy_free(i8* nocapture %0, i64 %1) {
ret void
}
float flerp(float f0, float f1, float p) {
  return ((f0 * (1.0 - p)) + (f1 * p));
}


x86 assembly (clang, -O0):
<flerp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xed3(%rip),%xmm2
subsd  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<flerp>:
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm2,%xmm3
movsd  0xef0(%rip),%xmm4
subsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
mulss  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addsd  %xmm4,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @flerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = load float, float* %6
%10 = fpext float %9 to double
%11 = fsub double 1.000000e+00, %10
%12 = load float, float* %5
%13 = load float, float* %6
%14 = fmul float %12, %13
%15 = fpext float %14 to double
%16 = call double @llvm.fmuladd.f64(double %8, double %11, double %15)
%17 = fptrunc double %16 to float
ret float %17
}

LLVM IR (-O2):
define float @flerp(float %0, float %1, float %2) {
%4 = fpext float %0 to double
%5 = fpext float %2 to double
%6 = fsub double 1.000000e+00, %5
%7 = fmul float %1, %2
%8 = fpext float %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %4, double %6, double %8)
%10 = fptrunc double %9 to float
ret float %10
}
int *GetTokenCounterAddress(void) {
  static int count = 0;
  return &count;
}


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

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

LLVM IR (-O0):
@GetTokenCounterAddress.count = internal global i32 0
define i32* @GetTokenCounterAddress() {
ret i32* @GetTokenCounterAddress.count
}

LLVM IR (-O2):
@GetTokenCounterAddress.count = internal global i32 0
define i32* @GetTokenCounterAddress() {
ret i32* @GetTokenCounterAddress.count
}
/* Variables and functions */
int func(int, int);
int main() {
  func(2, 3);
  func(8, 2);
  return func(-3, -2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <func@plt>
mov    $0x8,%edi
mov    $0x2,%esi
call   1030 <func@plt>
mov    $0xfffffffd,%edi
mov    $0xfffffffe,%esi
call   1030 <func@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <func@plt>
mov    $0x8,%edi
mov    $0x2,%esi
call   1030 <func@plt>
mov    $0xfffffffd,%edi
mov    $0xfffffffe,%esi
pop    %rax
jmp    1030 <func@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @func(i32 2, i32 3)
%2 = tail call i32 @func(i32 8, i32 2)
%3 = tail call i32 @func(i32 -3, i32 -2)
ret i32 %3
}
void left_case_1(struct rbt *tree, struct node *node, struct node *sibling) {}


x86 assembly (clang, -O0):
<left_case_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.rbt = type opaque
%struct.node = type opaque
define void @left_case_1(%struct.rbt* %0, %struct.node* %1, %struct.node* %2) {
%4 = alloca %struct.rbt*
%5 = alloca %struct.node*
%6 = alloca %struct.node*
store %struct.rbt* %0, %struct.rbt** %4
store %struct.node* %1, %struct.node** %5
store %struct.node* %2, %struct.node** %6
ret void
}

LLVM IR (-O2):
%struct.rbt = type opaque
%struct.node = type opaque
define void @left_case_1(%struct.rbt* nocapture %0, %struct.node* nocapture %1, %struct.node* nocapture %2) {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int ch, prevch;
  ch = prevch = 0;
  while ((ch = getchar()) != EOF) {
    if (ch == ' ' && prevch == ' ')
      continue;
    prevch = ch;
    putchar(ch);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%eax
je     1182 <main+0x62>
cmpl   $0x20,-0x8(%rbp)
jne    116f <main+0x4f>
cmpl   $0x20,-0xc(%rbp)
jne    116f <main+0x4f>
jmp    113d <main+0x1d>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%eax
jne    1141 <main+0x21>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %ebx,%ebx
jmp    1163 <main+0x43>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
je     1137 <main+0x17>
mov    %ebx,%ecx
mov    %eax,%ebx
cmp    $0x20,%ecx
jne    1150 <main+0x30>
cmp    $0x20,%ebx
je     1157 <main+0x37>
jmp    1150 <main+0x30>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 0, i32* %2
br label %4
4: ; preds = %15, %14, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %19
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 32
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 32
br i1 %13, label %14, label %15
14: ; preds = %11
br label %4
15: ; preds = %11, %8
%16 = load i32, i32* %2
store i32 %16, i32* %3
%17 = load i32, i32* %2
%18 = call i32 @putchar(i32 %17)
br label %4
19: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %16, label %4
4: ; preds = %0, %12
%5 = phi i32 [ %13, %12 ], [ %1, %0 ]
%6 = phi i32 [ %5, %12 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 32
%8 = icmp eq i32 %6, 32
%9 = and i1 %8, %7
br i1 %9, label %12, label %10
10: ; preds = %4
%11 = tail call i32 @putchar(i32 %5)
br label %12
12: ; preds = %10, %4
%13 = tail call i32 (...) @getchar()
%14 = load i32, i32* @EOF
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %4
16: ; preds = %12, %0
ret i32 0
}
/* Type definitions */
struct _Locale_numeric {
  int dummy;
};

/* Variables and functions */
char _Locale_thousands_sep(struct _Locale_numeric *lnum) { return ','; }


x86 assembly (clang, -O0):
<_Locale_thousands_sep>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x2c,%al
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._Locale_numeric = type { i32 }
define signext i8 @_Locale_thousands_sep(%struct._Locale_numeric* %0) {
%2 = alloca %struct._Locale_numeric*
store %struct._Locale_numeric* %0, %struct._Locale_numeric** %2
ret i8 44
}

LLVM IR (-O2):
%struct._Locale_numeric = type { i32 }
define signext i8 @_Locale_thousands_sep(%struct._Locale_numeric* nocapture readnone %0) {
ret i8 44
}
/* Variables and functions */
int /*<<< orphan*/ arm_logic_tst(int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_rdn3_op();
void t16_tst_rdn3() { arm_logic_tst(t16_data_rdn3_op()); }


x86 assembly (clang, -O0):
<t16_tst_rdn3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <t16_data_rdn3_op@plt>
mov    %eax,%edi
call   1030 <arm_logic_tst@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t16_tst_rdn3>:
push   %rax
xor    %eax,%eax
call   1040 <t16_data_rdn3_op@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <arm_logic_tst@plt>

LLVM IR (-O0):
define void @t16_tst_rdn3() {
%1 = call i32 (...) @t16_data_rdn3_op()
%2 = call i32 @arm_logic_tst(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_tst_rdn3() {
%1 = tail call i32 (...) @t16_data_rdn3_op()
%2 = tail call i32 @arm_logic_tst(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ z;

/* Variables and functions */
int /*<<< orphan*/ memset(long double *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printfp(char *, long double *);
int main(void) {
  long double x = 3.141592653589793238462643383279502884L;
  long double y = 2.718281828459045235360287471352662498L;
  long double z;
  memset(&z, 0, sizeof(z));
  z = x * y;
  printfp("result", &z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
fldt   0xecb(%rip)
fstpt  -0x20(%rbp)
fldt   0xed2(%rip)
fstpt  -0x30(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
fmulp  %st,%st(1)
fstpt  -0x40(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <printfp@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
fldt   0xec3(%rip)
fstpt  (%rsp)
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printfp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"result\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store i32 0, i32* %1
store x86_fp80 0xK4000C90FDAA22168C235, x86_fp80* %2
store x86_fp80 0xK4000ADF85458A2BB4A9B, x86_fp80* %3
%5 = call i32 @memset(x86_fp80* %4, i32 0, i32 16)
%6 = load x86_fp80, x86_fp80* %2
%7 = load x86_fp80, x86_fp80* %3
%8 = fmul x86_fp80 %6, %7
store x86_fp80 %8, x86_fp80* %4
%9 = call i32 @printfp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), x86_fp80* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"result\00"
define i32 @main() {
%1 = alloca x86_fp80
%2 = bitcast x86_fp80* %1 to i8*
%3 = call i32 @memset(x86_fp80* %1, i32 0, i32 16)
store x86_fp80 0xK400288A2C05A2EA3A4F3, x86_fp80* %1
%4 = call i32 @printfp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), x86_fp80* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ rotN(char *, int);
int main() {
  char str[] = "Hello, world!";
  rotN(str, 13);
  puts(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x12(%rbp),%rdi
mov    $0xd,%esi
call   1040 <rotN@plt>
lea    -0x12(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x21646c726f7720,%rax
mov    %rax,0x6(%rsp)
movabs $0x77202c6f6c6c6548,%rax
2c 20 77
mov    %rax,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xd,%esi
call   1040 <rotN@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
store i32 0, i32* %1
%3 = bitcast [14 x i8]* %2 to i8*
%4 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%5 = call i32 @rotN(i8* %4, i32 13)
%6 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%7 = call i32 @puts(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%3 = call i32 @rotN(i8* %2, i32 13)
%4 = call i32 @puts(i8* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
__m64 __attribute__((__always___, __nodebug__)) _mm_cvtsi64_m64(long long __i) {
  return (__m64)__i;
}


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

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

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

LLVM IR (-O2):
define i32 @_mm_cvtsi64_m64(i64 %0) {
%2 = trunc i64 %0 to i32
ret i32 %2
}
/* Variables and functions */
double exp(double);
int snprintf(char *, int, char *, double);
int senFunc7(char *s, int n, int a) {
  return snprintf(s, n, "H2: %lf ppm", 0.387551 * exp(2.48982 * a * 0.00488));
}


x86 assembly (clang, -O0):
<senFunc7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm1
movsd  0xec3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeaf(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
movaps %xmm0,%xmm1
movsd  0xe8c(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe99(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<senFunc7>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
cvtsi2sd %edx,%xmm0
mulsd  0xecc(%rip),%xmm0
mulsd  0xecc(%rip),%xmm0
call   1040 <exp@plt>
mulsd  0xec7(%rip),%xmm0
lea    0xec8(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"H2: %lf ppm\00"
define i32 @senFunc7(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = sitofp i32 %9 to double
%11 = fmul double 2.489820e+00, %10
%12 = fmul double %11, 4.880000e-03
%13 = call double @exp(double %12)
%14 = fmul double 3.875510e-01, %13
%15 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double %14)
ret i32 %15
}

LLVM IR (-O2):
@.str = [12 x i8] c"H2: %lf ppm\00"
define i32 @senFunc7(i8* %0, i32 %1, i32 %2) {
%4 = sitofp i32 %2 to double
%5 = fmul double %4, 2.489820e+00
%6 = fmul double %5, 4.880000e-03
%7 = tail call double @exp(double %6)
%8 = fmul double %7, 3.875510e-01
%9 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 %9
}
float clampf(float val, float min, float max) {
  if (val > max)
    return max;
  if (val < min)
    return min;
  return val;
}


x86 assembly (clang, -O0):
<clampf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1131 <clampf+0x31>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clampf+0x5d>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1153 <clampf+0x53>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clampf+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clampf>:
maxss  %xmm0,%xmm1
movaps %xmm2,%xmm3
cmpltss %xmm0,%xmm3
movaps %xmm3,%xmm0
andnps %xmm1,%xmm0
andps  %xmm2,%xmm3
orps   %xmm0,%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @clampf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %7
%10 = fcmp ogt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %7
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %5
%15 = load float, float* %6
%16 = fcmp olt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %6
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %5
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @clampf(float %0, float %1, float %2) {
%4 = fcmp ogt float %0, %2
%5 = fcmp olt float %0, %1
%6 = select i1 %5, float %1, float %0
%7 = select i1 %4, float %2, float %6
ret float %7
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA_PSS_PARAMS;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ RSA_PSS_PARAMS_it;
void RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a) {
  ASN1_item_free((ASN1_VALUE *)a, &RSA_PSS_PARAMS_it);
}


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

x86 assembly (clang, -O2):
<RSA_PSS_PARAMS_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

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

LLVM IR (-O2):
@RSA_PSS_PARAMS_it = global i32 0
define void @RSA_PSS_PARAMS_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @RSA_PSS_PARAMS_it)
ret void
}
long labs(long n) {
  if (n < 0)
    return (-n);
  return n;
}


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1122 <labs+0x22>
xor    %eax,%eax
sub    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112a <labs+0x2a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
OP(dd, c3) {
  illegal_1();
  op_c3();
}


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

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_c3@plt>

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_c3()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_c3()
ret i32 undef
}
void *set_size(void *chunk, int size) {
  int *cs_ptr = (int *)chunk;
  (*cs_ptr) = size;
  chunk += sizeof(size);
  return chunk;
}


x86 assembly (clang, -O0):
<set_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_size>:
mov    %esi,(%rdi)
lea    0x4(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @set_size(i8* writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
%4 = getelementptr i8, i8* %0, i64 4
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ crt_putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ serial_putc(char, int);
void console_putc(char c) {
  serial_putc(c, 1);
  crt_putc(c, 0);
}


x86 assembly (clang, -O0):
<console_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%esi
movsbl -0x1(%rbp),%edi
call   1030 <serial_putc@plt>
xor    %esi,%esi
movsbl -0x1(%rbp),%edi
call   1040 <crt_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_putc>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%esi
call   1030 <serial_putc@plt>
mov    %ebx,%edi
xor    %esi,%esi
pop    %rbx
jmp    1040 <crt_putc@plt>

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

LLVM IR (-O2):
define void @console_putc(i8 signext %0) {
%2 = tail call i32 @serial_putc(i8 signext %0, i32 1)
%3 = tail call i32 @crt_putc(i8 signext %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char *, char);
int pathIsBaseName(char *path) {
  return strchr(path, '/') == NULL && strchr(path, '\\') == NULL;
}


x86 assembly (clang, -O0):
<pathIsBaseName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1154 <pathIsBaseName+0x44>
mov    -0x8(%rbp),%rdi
mov    $0x5c,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathIsBaseName>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     112a <pathIsBaseName+0x1a>
pop    %rbx
ret
mov    %rbx,%rdi
mov    $0x5c,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pathIsBaseName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @strchr(i8* %3, i8 signext 47)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32* @strchr(i8* %7, i8 signext 92)
%9 = icmp eq i32* %8, null
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @pathIsBaseName(i8* %0) {
%2 = tail call i32* @strchr(i8* %0, i8 signext 47)
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32* @strchr(i8* %0, i8 signext 92)
%6 = icmp eq i32* %5, null
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
struct ctrl_command {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ send_error(char *);
void cmd_start_crypt_out(struct ctrl_command *cmd) {
  send_error("can't start encryption - no OpenSSL suppport!");
}


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

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

LLVM IR (-O0):
%struct.ctrl_command = type { i32 }
@.str = [46 x i8] c"can't start encryption - no OpenSSL suppport!\00"
define void @cmd_start_crypt_out(%struct.ctrl_command* %0) {
%2 = alloca %struct.ctrl_command*
store %struct.ctrl_command* %0, %struct.ctrl_command** %2
%3 = call i32 @send_error(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.ctrl_command = type { i32 }
@.str = [46 x i8] c"can't start encryption - no OpenSSL suppport!\00"
define void @cmd_start_crypt_out(%struct.ctrl_command* nocapture readnone %0) {
%2 = tail call i32 @send_error(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}
int cmp(const void *a, const void *b) {
  const int *ia = (const int *)a;
  const int *ib = (const int *)b;
  return *ia - *ib;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}