xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned short update_crc16(unsigned short, unsigned char const *,
                            unsigned int);
unsigned short crc16(const unsigned char *buf, unsigned int length) {
  unsigned short crc = 0xFFFF;
  return update_crc16(crc, buf, length);
}


x86 assembly (clang, -O0):
<crc16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movw   $0xffff,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
movzwl %ax,%edi
call   1030 <update_crc16@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc16>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xffff,%edi
jmp    1030 <update_crc16@plt>

LLVM IR (-O0):
define zeroext i16 @crc16(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i16
store i8* %0, i8** %3
store i32 %1, i32* %4
store i16 -1, i16* %5
%6 = load i16, i16* %5
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call zeroext i16 @update_crc16(i16 zeroext %6, i8* %7, i32 %8)
ret i16 %9
}

LLVM IR (-O2):
define zeroext i16 @crc16(i8* %0, i32 %1) {
%3 = tail call zeroext i16 @update_crc16(i16 zeroext -1, i8* %0, i32 %1)
ret i16 %3
}
void SIO1_writeStat16(unsigned short val) {}


x86 assembly (clang, -O0):
<SIO1_writeStat16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SIO1_writeStat16(i16 zeroext %0) {
ret void
}
/* Variables and functions */
int fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int yyerror(char *msg) { return fprintf(stderr, "YACC: %s\n", msg); }


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyerror>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [10 x i8] c"YACC: %s\0A\00"
define i32 @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"YACC: %s\0A\00"
define i32 @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %3
}
void foo019() {}


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

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

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

LLVM IR (-O2):
define void @foo019() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ make_empty();
int /*<<< orphan*/ printf(char *);
void stack_underflow(void) {
  printf("Not enough operands in expression!\n");
  make_empty();
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"Not enough operands in expression!\0A\00"
define void @stack_underflow() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @make_empty()
ret void
}

LLVM IR (-O2):
@str = [35 x i8] c"Not enough operands in expression!\00"
define void @stack_underflow() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @make_empty()
ret void
}
int fun1103() { return 1103; }


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

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

LLVM IR (-O0):
define i32 @fun1103() {
ret i32 1103
}

LLVM IR (-O2):
define i32 @fun1103() {
ret i32 1103
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct ndarray {
  int dummy;
};
typedef int int8_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ *stdlib_ndarray_get_ptr(struct ndarray const *,
                                           int /*<<< orphan*/ const *);
int stdlib_ndarray_get_ptr_bool(int /*<<< orphan*/ *, int *);
int8_t stdlib_ndarray_get_bool(const struct ndarray *arr, const int64_t *sub,
                               bool *out) {
  uint8_t *idx = stdlib_ndarray_get_ptr(arr, sub);
  if (idx == NULL) {
    return -1;
  }
  return stdlib_ndarray_get_ptr_bool(idx, out);
}


x86 assembly (clang, -O0):
<stdlib_ndarray_get_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <stdlib_ndarray_get_ptr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    115c <stdlib_ndarray_get_bool+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <stdlib_ndarray_get_bool+0x4c>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <stdlib_ndarray_get_ptr_bool@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_ndarray_get_bool>:
push   %rbx
mov    %rdx,%rbx
call   1030 <stdlib_ndarray_get_ptr@plt>
test   %rax,%rax
je     113a <stdlib_ndarray_get_bool+0x1a>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <stdlib_ndarray_get_ptr_bool@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ndarray = type { i32 }
define i32 @stdlib_ndarray_get_bool(%struct.ndarray* %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.ndarray*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store %struct.ndarray* %0, %struct.ndarray** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
%9 = load %struct.ndarray*, %struct.ndarray** %5
%10 = load i32*, i32** %6
%11 = call i32* @stdlib_ndarray_get_ptr(%struct.ndarray* %9, i32* %10)
store i32* %11, i32** %8
%12 = load i32*, i32** %8
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 -1, i32* %4
br label %19
15: ; preds = %3
%16 = load i32*, i32** %8
%17 = load i32*, i32** %7
%18 = call i32 @stdlib_ndarray_get_ptr_bool(i32* %16, i32* %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %15, %14
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
%struct.ndarray = type { i32 }
define i32 @stdlib_ndarray_get_bool(%struct.ndarray* %0, i32* %1, i32* %2) {
%4 = tail call i32* @stdlib_ndarray_get_ptr(%struct.ndarray* %0, i32* %1)
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @stdlib_ndarray_get_ptr_bool(i32* %4, i32* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x37() {
  Assert_real((isalpha(55) == 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_isalpha.c",
              280, ("isalpha should be 0 for 7"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x37>:
push   %rax
mov    $0x37,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x118,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 7\00"
define void @t_isalpha_0x37() {
%1 = call i64 @isalpha(i32 55)
%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 280, i8* getelementptr inbounds ([26 x i8], [26 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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 7\00"
define void @t_isalpha_0x37() {
%1 = tail call i64 @isalpha(i32 55)
%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 280, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned long long _bextr_u64(unsigned long long, unsigned long long,
                              unsigned long long);
unsigned long long func_bextr64_3args(unsigned long long X,
                                      unsigned long long Y,
                                      unsigned long long Z) {
  return _bextr_u64(X, Y, Z);
}


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

x86 assembly (clang, -O2):
<func_bextr64_3args>:
jmp    1030 <_bextr_u64@plt>

LLVM IR (-O0):
define i64 @func_bextr64_3args(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i64 @_bextr_u64(i64 %7, i64 %8, i64 %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @func_bextr64_3args(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 @_bextr_u64(i64 %0, i64 %1, i64 %2)
ret i64 %4
}
/* Variables and functions */
char EOF;
char getchar();
void EatLine(void) {
  char ch;
  while (ch = getchar(), ch != '\n' && ch != EOF)
    continue;
  return;
}


x86 assembly (clang, -O0):
<EatLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114a <EatLine+0x3a>
movsbl -0x1(%rbp),%eax
mov    0x2ea9(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    115a <EatLine+0x4a>
jmp    115f <EatLine+0x4f>
jmp    1118 <EatLine+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EatLine>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
je     112f <EatLine+0x1f>
cmp    (%rbx),%al
jne    1120 <EatLine+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i8 0
define void @EatLine() {
%1 = alloca i8
br label %2
2: ; preds = %15, %0
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
%10 = load i8, i8* @EOF
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %9, %11
br label %13
13: ; preds = %7, %2
%14 = phi i1 [ false, %2 ], [ %12, %7 ]
br i1 %14, label %15, label %16
15: ; preds = %13
br label %2
16: ; preds = %13
ret void
}

LLVM IR (-O2):
@EOF = global i8 0
define void @EatLine() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp ne i8 %2, 10
%4 = load i8, i8* @EOF
%5 = icmp ne i8 %2, %4
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
/* Type definitions */
struct cstr_t {
  int dummy;
};

/* Variables and functions */
int cstr_comparestriat(struct cstr_t const *, int /*<<< orphan*/, char const *,
                       int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int cstr_comparestri(const struct cstr_t *a, const char *b) {
  ;
  int rval = cstr_comparestriat(a, 0, b, strlen(b));
  { return (rval); };
}


x86 assembly (clang, -O0):
<cstr_comparestri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
xor    %esi,%esi
call   1040 <cstr_comparestriat@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstr_comparestri>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <cstr_comparestriat@plt>

LLVM IR (-O0):
%struct.cstr_t = type { i32 }
define i32 @cstr_comparestri(%struct.cstr_t* %0, i8* %1) {
%3 = alloca %struct.cstr_t*
%4 = alloca i8*
%5 = alloca i32
store %struct.cstr_t* %0, %struct.cstr_t** %3
store i8* %1, i8** %4
%6 = load %struct.cstr_t*, %struct.cstr_t** %3
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = call i32 @cstr_comparestriat(%struct.cstr_t* %6, i32 0, i8* %7, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
%struct.cstr_t = type { i32 }
define i32 @cstr_comparestri(%struct.cstr_t* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @cstr_comparestriat(%struct.cstr_t* %0, i32 0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void _sys_printInt(unsigned n) { printf("Bedrock> %u\n", n); }


x86 assembly (clang, -O0):
<_sys_printInt>:
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):
<_sys_printInt>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Bedrock> %u\0A\00"
define void @_sys_printInt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Bedrock> %u\0A\00"
define void @_sys_printInt(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef size_t ssize_t;

/* Variables and functions */
size_t ENOMEM;
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
ssize_t just_copy(const char *in, size_t in_length, char *out,
                  size_t out_size) {
  if (in_length <= out_size - 1) {
    memcpy(out, in, in_length);
    out[in_length] = 0;
    return in_length;
  }
  return -ENOMEM;
}


x86 assembly (clang, -O0):
<just_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
ja     1167 <just_copy+0x57>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <just_copy+0x67>
xor    %eax,%eax
mov    0x2e70(%rip),%rcx
sub    (%rcx),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<just_copy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
add    $0xffffffffffffffff,%rcx
cmp    %rsi,%rcx
jae    112e <just_copy+0x1e>
mov    0x2eb9(%rip),%rax
xor    %ebx,%ebx
sub    (%rax),%rbx
jmp    1144 <just_copy+0x34>
mov    %rdx,%r14
mov    %rdi,%rsi
mov    %rdx,%rdi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
movb   $0x0,(%r14,%rbx,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@ENOMEM = global i64 0
define i64 @just_copy(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = add i64 %3, -1
%6 = icmp ult i64 %5, %1
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i32 @memcpy(i8* %2, i8* %0, i64 %1)
%9 = getelementptr inbounds i8, i8* %2, i64 %1
store i8 0, i8* %9
br label %13
10: ; preds = %4
%11 = load i64, i64* @ENOMEM
%12 = sub i64 0, %11
br label %13
13: ; preds = %10, %7
%14 = phi i64 [ %1, %7 ], [ %12, %10 ]
ret i64 %14
}
void RTco_transfer(__attribute__((unused)) int *p1,
                   __attribute__((unused)) int p2) {}


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

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

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

LLVM IR (-O2):
define void @RTco_transfer(i32* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
double RandomInteger();
void Initialize(double Array[]) {
  register int i;
  for (i = 0; i < 100; i++)
    Array[i] = i + RandomInteger() / 8095.0;
}


x86 assembly (clang, -O0):
<Initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1171 <Initialize+0x61>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <RandomInteger@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <Initialize+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Initialize>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <RandomInteger@plt>
divsd  0xec5(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    $0x64,%rbx
jne    1120 <Initialize+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @Initialize(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
store i32 0, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = call double (...) @RandomInteger()
%11 = fdiv double %10, 8.095000e+03
%12 = fadd double %9, %11
%13 = load double*, double** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %13, i64 %15
store double %12, double* %16
br label %17
17: ; preds = %7
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %4
20: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @Initialize(double* nocapture writeonly %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %10, %2 ]
%4 = trunc i64 %3 to i32
%5 = sitofp i32 %4 to double
%6 = tail call double (...) @RandomInteger()
%7 = fdiv double %6, 8.095000e+03
%8 = fadd double %7, %5
%9 = getelementptr inbounds double, double* %0, i64 %3
store double %8, double* %9
%10 = add nuw nsw i64 %3, 1
%11 = icmp eq i64 %10, 100
br i1 %11, label %12, label %2
12: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char name[100];
  printf("Name: ");
  scanf("%s", name);
  printf("Hello %s, I was build with yocto. Just so you know it\n", name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x70(%rbp),%rsi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Name: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [55 x i8] c"Hello %s, I was build with yocto. Just so you know it\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Name: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [55 x i8] c"Hello %s, I was build with yocto. Just so you know it\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
int xstat(const char *pathname, struct stat *statbuf) {
  return stat(pathname, statbuf);
}


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

x86 assembly (clang, -O2):
<xstat>:
jmp    1030 <stat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @xstat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @stat(i8* %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @xstat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @stat(i8* %0, %struct.stat* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_CRL;
typedef int /*<<< orphan*/ EVP_MD;

/* Variables and functions */
int ASN1_item_digest(int /*<<< orphan*/ *, int /*<<< orphan*/ const *, char *,
                     unsigned char *, unsigned int *);
int /*<<< orphan*/ X509_CRL_it;
int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, unsigned char *md,
                    unsigned int *len) {
  return (ASN1_item_digest(&X509_CRL_it, type, (char *)data, md, len));
}


x86 assembly (clang, -O0):
<X509_CRL_digest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    0x2ea1(%rip),%rdi
call   1030 <ASN1_item_digest@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_CRL_digest>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rdi,%rdx
mov    0x2ec0(%rip),%rdi
jmp    1030 <ASN1_item_digest@plt>

LLVM IR (-O0):
@X509_CRL_it = global i32 0
define i32 @X509_CRL_digest(i32* %0, i32* %1, i8* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %6
%10 = load i32*, i32** %5
%11 = bitcast i32* %10 to i8*
%12 = load i8*, i8** %7
%13 = load i32*, i32** %8
%14 = call i32 @ASN1_item_digest(i32* @X509_CRL_it, i32* %9, i8* %11, i8* %12, i32* %13)
ret i32 %14
}

LLVM IR (-O2):
@X509_CRL_it = global i32 0
define i32 @X509_CRL_digest(i32* %0, i32* %1, i8* %2, i32* %3) {
%5 = bitcast i32* %0 to i8*
%6 = tail call i32 @ASN1_item_digest(i32* @X509_CRL_it, i32* %1, i8* %5, i8* %2, i32* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ showUnderlineCursor_24064();
void showUnderlineCursor(void) { showUnderlineCursor_24064(); }


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

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

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

LLVM IR (-O2):
define void @showUnderlineCursor() {
%1 = tail call i32 (...) @showUnderlineCursor_24064()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_multi_vecteurs_test();
int /*<<< orphan*/ add_vecteur_test();
int /*<<< orphan*/ copy_vecteur_test();
int /*<<< orphan*/ div_vecteur_test();
int /*<<< orphan*/ equals_vecteur_test();
int /*<<< orphan*/ new_vecteur_test();
int /*<<< orphan*/ set_vecteur_test();
int /*<<< orphan*/ sub_vecteur_test();
int main(int argc, char **argv) {
  new_vecteur_test();
  equals_vecteur_test();
  add_vecteur_test();
  sub_vecteur_test();
  div_vecteur_test();
  add_multi_vecteurs_test();
  set_vecteur_test();
  copy_vecteur_test();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <new_vecteur_test@plt>
mov    $0x0,%al
call   1050 <equals_vecteur_test@plt>
mov    $0x0,%al
call   10a0 <add_vecteur_test@plt>
mov    $0x0,%al
call   1060 <sub_vecteur_test@plt>
mov    $0x0,%al
call   1070 <div_vecteur_test@plt>
mov    $0x0,%al
call   1090 <add_multi_vecteurs_test@plt>
mov    $0x0,%al
call   1080 <set_vecteur_test@plt>
mov    $0x0,%al
call   1040 <copy_vecteur_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <new_vecteur_test@plt>
xor    %eax,%eax
call   1050 <equals_vecteur_test@plt>
xor    %eax,%eax
call   10a0 <add_vecteur_test@plt>
xor    %eax,%eax
call   1060 <sub_vecteur_test@plt>
xor    %eax,%eax
call   1070 <div_vecteur_test@plt>
xor    %eax,%eax
call   1090 <add_multi_vecteurs_test@plt>
xor    %eax,%eax
call   1080 <set_vecteur_test@plt>
xor    %eax,%eax
call   1040 <copy_vecteur_test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @new_vecteur_test()
%6 = call i32 (...) @equals_vecteur_test()
%7 = call i32 (...) @add_vecteur_test()
%8 = call i32 (...) @sub_vecteur_test()
%9 = call i32 (...) @div_vecteur_test()
%10 = call i32 (...) @add_multi_vecteurs_test()
%11 = call i32 (...) @set_vecteur_test()
%12 = call i32 (...) @copy_vecteur_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @new_vecteur_test()
%4 = tail call i32 (...) @equals_vecteur_test()
%5 = tail call i32 (...) @add_vecteur_test()
%6 = tail call i32 (...) @sub_vecteur_test()
%7 = tail call i32 (...) @div_vecteur_test()
%8 = tail call i32 (...) @add_multi_vecteurs_test()
%9 = tail call i32 (...) @set_vecteur_test()
%10 = tail call i32 (...) @copy_vecteur_test()
ret i32 0
}
/* Type definitions */
struct section_list {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_shuffle(struct genlist *);
void section_list_shuffle(struct section_list *tthis) {
  genlist_shuffle((struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<section_list_shuffle>:
jmp    1030 <genlist_shuffle@plt>

LLVM IR (-O0):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_shuffle(%struct.section_list* %0) {
%2 = alloca %struct.section_list*
store %struct.section_list* %0, %struct.section_list** %2
%3 = load %struct.section_list*, %struct.section_list** %2
%4 = bitcast %struct.section_list* %3 to %struct.genlist*
%5 = call i32 @genlist_shuffle(%struct.genlist* %4)
ret void
}

LLVM IR (-O2):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_shuffle(%struct.section_list* %0) {
%2 = bitcast %struct.section_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_shuffle(%struct.genlist* %2)
ret void
}
void pgdb_free(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @pgdb_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UtilsDelay(int);
unsigned short RTCU16MSecRegRead(void) {
  unsigned short usRegValue;
  usRegValue = (*(unsigned short *)(0x4402F800 + 0x00000420 + 2));
  UtilsDelay((80 * 200) / 3);
  return (usRegValue & 0x3FF);
}


x86 assembly (clang, -O0):
<RTCU16MSecRegRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4402fc22,%eax
mov    (%rax),%ax
mov    %ax,-0x2(%rbp)
mov    $0x14d5,%edi
call   1030 <UtilsDelay@plt>
movzwl -0x2(%rbp),%eax
and    $0x3ff,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTCU16MSecRegRead>:
push   %rbx
movzwl 0x4402fc22,%ebx
44
mov    $0x14d5,%edi
call   1030 <UtilsDelay@plt>
and    $0x3ff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @RTCU16MSecRegRead() {
%1 = alloca i16
%2 = load i16, i16* inttoptr (i64 1141046306 to i16*)
store i16 %2, i16* %1
%3 = call i32 @UtilsDelay(i32 5333)
%4 = load i16, i16* %1
%5 = zext i16 %4 to i32
%6 = and i32 %5, 1023
%7 = trunc i32 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @RTCU16MSecRegRead() {
%1 = load i16, i16* inttoptr (i64 1141046306 to i16*)
%2 = tail call i32 @UtilsDelay(i32 5333)
%3 = and i16 %1, 1023
ret i16 %3
}
/* Type definitions */
struct passwd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ endpwent();
struct passwd *getpwent();
int /*<<< orphan*/ prt_passwd(struct passwd *);
void list_passwd() {
  struct passwd *pw;
  while (1) {
    pw = getpwent();
    if (pw == NULL)
      break;
    prt_passwd(pw);
  }
  endpwent();
}


x86 assembly (clang, -O0):
<list_passwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getpwent@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1153 <list_passwd+0x23>
jmp    1161 <list_passwd+0x31>
mov    -0x8(%rbp),%rdi
call   1050 <prt_passwd@plt>
jmp    1138 <list_passwd+0x8>
mov    $0x0,%al
call   1040 <endpwent@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_passwd>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getpwent@plt>
test   %rax,%rax
je     1156 <list_passwd+0x26>
mov    %rax,%rdi
call   1050 <prt_passwd@plt>
jmp    1140 <list_passwd+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1040 <endpwent@plt>

LLVM IR (-O0):
%struct.passwd = type { i32 }
define void @list_passwd() {
%1 = alloca %struct.passwd*
br label %2
2: ; preds = %0, %7
%3 = call %struct.passwd* (...) @getpwent()
store %struct.passwd* %3, %struct.passwd** %1
%4 = load %struct.passwd*, %struct.passwd** %1
%5 = icmp eq %struct.passwd* %4, null
br i1 %5, label %6, label %7
6: ; preds = %2
br label %10
7: ; preds = %2
%8 = load %struct.passwd*, %struct.passwd** %1
%9 = call i32 @prt_passwd(%struct.passwd* %8)
br label %2
10: ; preds = %6
%11 = call i32 (...) @endpwent()
ret void
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
define void @list_passwd() {
%1 = tail call %struct.passwd* (...) @getpwent()
%2 = icmp eq %struct.passwd* %1, null
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = phi %struct.passwd* [ %6, %3 ], [ %1, %0 ]
%5 = tail call i32 @prt_passwd(%struct.passwd* %4)
%6 = tail call %struct.passwd* (...) @getpwent()
%7 = icmp eq %struct.passwd* %6, null
br i1 %7, label %8, label %3
8: ; preds = %3, %0
%9 = tail call i32 (...) @endpwent()
ret void
}
float obdConvert_46(unsigned int A, unsigned int B, unsigned int C,
                    unsigned int D) {
  return (float)A - 40.0f;
}


x86 assembly (clang, -O0):
<obdConvert_46>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
movss  0xee0(%rip),%xmm1
subss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_46>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
addss  0xef1(%rip),%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_46(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = fsub float %10, 4.000000e+01
ret float %11
}

LLVM IR (-O2):
define float @obdConvert_46(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = fadd float %5, -4.000000e+01
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ TOSH_MAKE_GIO2_INPUT();
void HUMIDITY_MAKE_CLOCK_INPUT() { TOSH_MAKE_GIO2_INPUT(); }


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

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

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

LLVM IR (-O2):
define void @HUMIDITY_MAKE_CLOCK_INPUT() {
%1 = tail call i32 (...) @TOSH_MAKE_GIO2_INPUT()
ret void
}
int bar(int a, int b) { return a - b; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    %edi,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @bar(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @bar(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
void INT_Excep_SCI5_TXI5(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI5_TXI5() {
ret void
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
scalar_t__ system(char *);
void start_time(char *key) {
  char sys_str[1024];
  sprintf(sys_str, "start_time.e %s_%d", key, getpid());
  if (system(sys_str)) {
  };
}


x86 assembly (clang, -O0):
<start_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rax
mov    %rax,-0x420(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x418(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x420(%rbp),%rdi
mov    -0x418(%rbp),%rdx
mov    %eax,%ecx
lea    0xe8a(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1040 <system@plt>
cmp    $0x0,%rax
je     1196 <start_time+0x66>
jmp    1196 <start_time+0x66>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_time>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeb5(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %eax,%ecx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1040 <system@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c"start_time.e %s_%d\00"
define void @start_time(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 (...) @getpid()
%7 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = call i64 @system(i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"start_time.e %s_%d\00"
define void @start_time(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = tail call i32 (...) @getpid()
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4)
%6 = call i64 @system(i8* %3)
ret void
}
/* Type definitions */
struct tw_extensible_t {
  int dummy;
};
struct extensible_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ failprint_ext(struct extensible_t const *);
void failprint_tw_ext(const struct tw_extensible_t *a) {
  failprint_ext((const struct extensible_t *)a);
}


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

x86 assembly (clang, -O2):
<failprint_tw_ext>:
jmp    1030 <failprint_ext@plt>

LLVM IR (-O0):
%struct.tw_extensible_t = type { i32 }
%struct.extensible_t = type { i32 }
define void @failprint_tw_ext(%struct.tw_extensible_t* %0) {
%2 = alloca %struct.tw_extensible_t*
store %struct.tw_extensible_t* %0, %struct.tw_extensible_t** %2
%3 = load %struct.tw_extensible_t*, %struct.tw_extensible_t** %2
%4 = bitcast %struct.tw_extensible_t* %3 to %struct.extensible_t*
%5 = call i32 @failprint_ext(%struct.extensible_t* %4)
ret void
}

LLVM IR (-O2):
%struct.tw_extensible_t = type { i32 }
%struct.extensible_t = type { i32 }
define void @failprint_tw_ext(%struct.tw_extensible_t* %0) {
%2 = bitcast %struct.tw_extensible_t* %0 to %struct.extensible_t*
%3 = tail call i32 @failprint_ext(%struct.extensible_t* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *xmalloc(scalar_t__);
char *strxcpy(const char *str) {
  char *cpy = xmalloc(strlen(str) + 1);
  strcpy(cpy, str);
  return cpy;
}


x86 assembly (clang, -O0):
<strxcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <xmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strxcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strxcpy(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @xmalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @strxcpy(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
int unlockpt(int fdm) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @unlockpt(i32 %0) {
ret i32 0
}
/* Variables and functions */
double rel_stddev_stats(double stddev, double avg) {
  double pct = 0.0;
  if (avg)
    pct = 100.0 * stddev / avg;
  return pct;
}


x86 assembly (clang, -O0):
<rel_stddev_stats>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1133 <rel_stddev_stats+0x33>
jp     1133 <rel_stddev_stats+0x33>
jmp    114a <rel_stddev_stats+0x4a>
movsd  0xec5(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rel_stddev_stats>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    110c <rel_stddev_stats+0xc>
jnp    111c <rel_stddev_stats+0x1c>
mulsd  0xeec(%rip),%xmm0
divsd  %xmm1,%xmm0
movapd %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @rel_stddev_stats(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %5
%6 = load double, double* %4
%7 = fcmp une double %6, 0.000000e+00
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load double, double* %3
%10 = fmul double 1.000000e+02, %9
%11 = load double, double* %4
%12 = fdiv double %10, %11
store double %12, double* %5
br label %13
13: ; preds = %8, %2
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @rel_stddev_stats(double %0, double %1) {
%3 = fcmp une double %1, 0.000000e+00
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = fmul double %0, 1.000000e+02
%6 = fdiv double %5, %1
br label %7
7: ; preds = %4, %2
%8 = phi double [ %6, %4 ], [ 0.000000e+00, %2 ]
ret double %8
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_network_get_ntp(char ***ret) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_network_get_ntp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_network_get_ntp>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_network_get_ntp(i8*** %0) {
%2 = alloca i8***
store i8*** %0, i8**** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_network_get_ntp(i8*** nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
void rop3_231_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk1 = S ^ T;
  stk2 = T ^ *D;
  stk1 = stk1 & stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_231_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_231_0_0>:
xor    %edx,%esi
mov    (%rdi),%al
xor    %dl,%al
and    %sil,%al
not    %al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_231_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = xor i32 %16, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %8
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %8
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %7
%28 = load i8, i8* %7
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = trunc i32 %30 to i8
store i8 %31, i8* %7
%32 = load i8, i8* %7
%33 = load i8*, i8** %4
store i8 %32, i8* %33
ret void
}

LLVM IR (-O2):
define void @rop3_231_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = xor i8 %5, %2
%7 = and i8 %6, %4
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
int kernel___Pointer_address_is_null___impl(void *recv) { return recv == NULL; }


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

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

LLVM IR (-O0):
define i32 @kernel___Pointer_address_is_null___impl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @kernel___Pointer_address_is_null___impl(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ g1(int);
void h(int i) { g1(i); }


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

x86 assembly (clang, -O2):
<h>:
jmp    1030 <g1@plt>

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

LLVM IR (-O2):
define void @h(i32 %0) {
%2 = tail call i32 @g1(i32 %0)
ret void
}
void functionBodyExpr() {}


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

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

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

LLVM IR (-O2):
define void @functionBodyExpr() {
ret void
}