xunge/DecIR huggingface dataset:
/* Variables and functions */
char *_i64toa(long long, char *, int);
char *lltoa(long long _n, char *_c, int _i) { return _i64toa(_n, _c, _i); }


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

x86 assembly (clang, -O2):
<lltoa>:
jmp    1030 <_i64toa@plt>

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

LLVM IR (-O2):
define i8* @lltoa(i64 %0, i8* %1, i32 %2) {
%4 = tail call i8* @_i64toa(i64 %0, i8* %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void start_msg() { printf("=== Sailfish ===\n\n"); }


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"=== Sailfish ===\0A\00"
define void @start_msg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
long hash_function(int size, const char *str) {
  static const int MULTIPLIER = 31;
  long h = 0;
  unsigned char *p;
  for (p = (unsigned char *)str; *p != '\0'; ++p)
    h = MULTIPLIER * h + *p;
  return h % size;
}


x86 assembly (clang, -O0):
<hash_function>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     114f <hash_function+0x4f>
imul   $0x1f,-0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movzbl (%rcx),%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111b <hash_function+0x1b>
mov    -0x18(%rbp),%rax
movslq -0x4(%rbp),%rcx
cqto
idiv   %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_function>:
mov    (%rsi),%cl
test   %cl,%cl
je     112d <hash_function+0x2d>
add    $0x1,%rsi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %rax,%rdx
shl    $0x5,%rdx
sub    %rax,%rdx
movzbl %cl,%eax
add    %rdx,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <hash_function+0x10>
jmp    112f <hash_function+0x2f>
xor    %eax,%eax
movslq %edi,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1147 <hash_function+0x47>
cqto
idiv   %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %edi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_function(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %12, %5 ], [ %1, %2 ]
%8 = phi i64 [ %11, %5 ], [ 0, %2 ]
%9 = mul nsw i64 %8, 31
%10 = zext i8 %6 to i64
%11 = add nsw i64 %9, %10
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i64 [ 0, %2 ], [ %11, %5 ]
%17 = sext i32 %0 to i64
%18 = srem i64 %16, %17
ret i64 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ output;

/* Variables and functions */
char *_crypt_retval_magic(int /*<<< orphan*/, char const *, char *, int);
int /*<<< orphan*/ crypt_rn(char const *, char const *, char *, int);
char *bcrypt(const char *key, const char *setting) {
  static char output[(7 + 22 + 31 + 1)];
  return _crypt_retval_magic(crypt_rn(key, setting, output, sizeof(output)),
                             setting, output, sizeof(output));
}


x86 assembly (clang, -O0):
<bcrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0x2f01(%rip),%rdx
mov    $0x3d,%ecx
call   1030 <crypt_rn@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
lea    0x2eea(%rip),%rdx
mov    $0x3d,%ecx
call   1040 <_crypt_retval_magic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcrypt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
lea    0x2f12(%rip),%r14
mov    %r14,%rdx
mov    $0x3d,%ecx
call   1030 <crypt_rn@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x3d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <_crypt_retval_magic@plt>

LLVM IR (-O0):
@bcrypt.output = internal global [61 x i8] zeroinitializer
define i8* @bcrypt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @crypt_rn(i8* %5, i8* %6, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @bcrypt.output, i64 0, i64 0), i32 61)
%8 = load i8*, i8** %4
%9 = call i8* @_crypt_retval_magic(i32 %7, i8* %8, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @bcrypt.output, i64 0, i64 0), i32 61)
ret i8* %9
}

LLVM IR (-O2):
@bcrypt.output = internal global [61 x i8] zeroinitializer
define i8* @bcrypt(i8* %0, i8* %1) {
%3 = tail call i32 @crypt_rn(i8* %0, i8* %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @bcrypt.output, i64 0, i64 0), i32 61)
%4 = tail call i8* @_crypt_retval_magic(i32 %3, i8* %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @bcrypt.output, i64 0, i64 0), i32 61)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ print_ttable(int, int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int inner = 10;
  int outer = 10;
  printf("The times table:\n");
  print_ttable(outer, inner);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0xa,-0x18(%rbp)
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <print_ttable@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1040 <print_ttable@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"The times table:\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %6
store i32 10, i32* %7
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = call i32 @print_ttable(i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"The times table:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @print_ttable(i32 10, i32 10)
ret i32 0
}
int do_494() { return 494; }


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

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

LLVM IR (-O0):
define i32 @do_494() {
ret i32 494
}

LLVM IR (-O2):
define i32 @do_494() {
ret i32 494
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_version(void) {
  printf("spi-hdlc-adapter "
         "0.06"
         " ("
         "07:55:17"
         " "
         "Mar 17 2022"
         ")\n");
  printf("Copyright (c) 2017 The OpenThread Authors, All Rights Reserved\n");
}


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

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"spi-hdlc-adapter 0.06 (07:55:17 Mar 17 2022)\0A\00"
@.str.1 = [64 x i8] c"Copyright (c) 2017 The OpenThread Authors, All Rights Reserved\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [45 x i8] c"spi-hdlc-adapter 0.06 (07:55:17 Mar 17 2022)\00"
@str.2 = [63 x i8] c"Copyright (c) 2017 The OpenThread Authors, All Rights Reserved\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void in(int16_t arg, char acc) {
  if (arg == 0x0) {
    putchar(acc);
  }
}


x86 assembly (clang, -O0):
<in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1134 <in+0x24>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in>:
test   %edi,%edi
je     1115 <in+0x5>
ret
movsbl %sil,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @in(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8, i8* %4
%9 = call i32 @putchar(i8 signext %8)
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @in(i32 %0, i8 signext %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @putchar(i8 signext %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ w_pawn_defended_from_east(int);
void w_pawn_defended_from_east_test(void **state) {
  assert_int_equal(0x0000000008000000ul,
                   w_pawn_defended_from_east(0x0000000008100000ul));
}


x86 assembly (clang, -O0):
<w_pawn_defended_from_east_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x8100000,%edi
call   1030 <w_pawn_defended_from_east@plt>
mov    %eax,%esi
mov    $0x8000000,%edi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_pawn_defended_from_east_test>:
push   %rax
mov    $0x8100000,%edi
call   1030 <w_pawn_defended_from_east@plt>
mov    $0x8000000,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @w_pawn_defended_from_east_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @w_pawn_defended_from_east(i32 135266304)
%4 = call i32 @assert_int_equal(i32 134217728, i32 %3)
ret void
}

LLVM IR (-O2):
define void @w_pawn_defended_from_east_test(i8** nocapture readnone %0) {
%2 = tail call i32 @w_pawn_defended_from_east(i32 135266304)
%3 = tail call i32 @assert_int_equal(i32 134217728, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MadLibs(char *, char *, char *, int, char *);
int main(void) {
  char animal[50];
  char place[50];
  char verb[50];
  int timeAmount;
  char timeUnit[50];
  MadLibs(animal, place, verb, timeAmount, timeUnit);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
mov    -0xc4(%rbp),%ecx
lea    -0x100(%rbp),%r8
call   1030 <MadLibs@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xf8,%rsp
lea    0xc0(%rsp),%rdi
lea    0x80(%rsp),%rsi
lea    0x40(%rsp),%rdx
mov    %rsp,%r8
call   1030 <MadLibs@plt>
xor    %eax,%eax
add    $0xf8,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = alloca [50 x i8]
%4 = alloca [50 x i8]
%5 = alloca i32
%6 = alloca [50 x i8]
store i32 0, i32* %1
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%10 = load i32, i32* %5
%11 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%12 = call i32 @MadLibs(i8* %7, i8* %8, i8* %9, i32 %10, i8* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = alloca [50 x i8]
%4 = alloca [50 x i8]
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%9 = call i32 @MadLibs(i8* %5, i8* %6, i8* %7, i32 undef, i8* %8)
ret i32 0
}
/* Type definitions */
struct DSPObject {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct DSPObject *);
void dsp_zeropadder_dispose(struct DSPObject *obj) {
  if (obj)
    free(obj);
}


x86 assembly (clang, -O0):
<dsp_zeropadder_dispose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <dsp_zeropadder_dispose+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dsp_zeropadder_dispose>:
test   %rdi,%rdi
je     111a <dsp_zeropadder_dispose+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.DSPObject = type { i32 }
define void @dsp_zeropadder_dispose(%struct.DSPObject* %0) {
%2 = alloca %struct.DSPObject*
store %struct.DSPObject* %0, %struct.DSPObject** %2
%3 = load %struct.DSPObject*, %struct.DSPObject** %2
%4 = icmp ne %struct.DSPObject* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.DSPObject*, %struct.DSPObject** %2
%7 = call i32 @free(%struct.DSPObject* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.DSPObject = type { i32 }
define void @dsp_zeropadder_dispose(%struct.DSPObject* %0) {
%2 = icmp eq %struct.DSPObject* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.DSPObject* %0)
br label %5
5: ; preds = %3, %1
ret void
}
float dot(const float a[3], const float b[3]) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}


x86 assembly (clang, -O0):
<dot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot>:
movss  0x4(%rdi),%xmm0
mulss  0x4(%rsi),%xmm0
movss  (%rdi),%xmm1
mulss  (%rsi),%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  0x8(%rsi),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @dot(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = call float @llvm.fmuladd.f32(float %21, float %24, float %18)
ret float %25
}

LLVM IR (-O2):
define float @dot(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
ret float %15
}
/* Variables and functions */
int /*<<< orphan*/ iface_entry_disable();
scalar_t__ iface_in_entry();
void handle_interrupt() {
  if (iface_in_entry())
    iface_entry_disable();
}


x86 assembly (clang, -O0):
<handle_interrupt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <iface_in_entry@plt>
cmp    $0x0,%rax
je     113c <handle_interrupt+0x1c>
mov    $0x0,%al
call   1040 <iface_entry_disable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_interrupt>:
push   %rax
xor    %eax,%eax
call   1030 <iface_in_entry@plt>
test   %rax,%rax
je     1135 <handle_interrupt+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <iface_entry_disable@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @handle_interrupt() {
%1 = tail call i64 (...) @iface_in_entry()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @iface_entry_disable()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int strany(const void *a, const void *b) {
  return (a != NULL || b != NULL) ? 0 : 1;
}


x86 assembly (clang, -O0):
<strany>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jne    1127 <strany+0x27>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
mov    $0x1,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strany>:
xor    %eax,%eax
or     %rsi,%rdi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @strany(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, char const *);
scalar_t__ time(int /*<<< orphan*/);
void SYSLOG_Write(const char *message) {
  unsigned int t = (unsigned int)time(0);
  printf("%u : %s\r\n", t, message);
}


x86 assembly (clang, -O0):
<SYSLOG_Write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SYSLOG_Write>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%u : %s\0D\0A\00"
define void @SYSLOG_Write(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i64 @time(i32 0)
%5 = trunc i64 %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%u : %s\0D\0A\00"
define void @SYSLOG_Write(i8* %0) {
%2 = tail call i64 @time(i32 0)
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %0)
ret void
}
/* Type definitions */
struct prime_current_block {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_early_prime_group_1_type(struct prime_current_block *,
                                               int, int /*<<< orphan*/);
void do_early_prime_13(struct prime_current_block *pcb) {
  do_early_prime_group_1_type(pcb, 13, 0);
}


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

x86 assembly (clang, -O2):
<do_early_prime_13>:
mov    $0xd,%esi
xor    %edx,%edx
jmp    1030 <do_early_prime_group_1_type@plt>

LLVM IR (-O0):
%struct.prime_current_block = type { i32 }
define void @do_early_prime_13(%struct.prime_current_block* %0) {
%2 = alloca %struct.prime_current_block*
store %struct.prime_current_block* %0, %struct.prime_current_block** %2
%3 = load %struct.prime_current_block*, %struct.prime_current_block** %2
%4 = call i32 @do_early_prime_group_1_type(%struct.prime_current_block* %3, i32 13, i32 0)
ret void
}

LLVM IR (-O2):
%struct.prime_current_block = type { i32 }
define void @do_early_prime_13(%struct.prime_current_block* %0) {
%2 = tail call i32 @do_early_prime_group_1_type(%struct.prime_current_block* %0, i32 13, i32 0)
ret void
}
int default_connect() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @default_connect() {
ret i32 0
}
extern unsigned fn_identity(unsigned p) { return p; }


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

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

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

LLVM IR (-O2):
define i32 @fn_identity(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, char *);
char *get_seq(char *seq_temp, char *map_result) {
  sscanf(map_result, "%*s%*s%*s%*s%s", seq_temp);
  return seq_temp;
}


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

x86 assembly (clang, -O2):
<get_seq>:
push   %rbx
mov    %rsi,%rax
mov    %rdi,%rbx
lea    0xee2(%rip),%rsi
mov    %rax,%rdi
mov    %rbx,%rdx
call   1030 <sscanf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%*s%*s%*s%*s%s\00"
define i8* @get_seq(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 = load i8*, i8** %3
%7 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [15 x i8] c"%*s%*s%*s%*s%s\00"
define i8* @get_seq(i8* returned %0, i8* nocapture %1) {
%3 = tail call i32 @sscanf(i8* %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ memory_tracker_check_integrity(char *, unsigned int);
int /*<<< orphan*/ memory_tracker_lock_mutex();
int /*<<< orphan*/ memory_tracker_unlock_mutex();
void vpx_memory_tracker_check_integrity(char *file, unsigned int line) {
  if (!memory_tracker_lock_mutex()) {
    memory_tracker_check_integrity(file, line);
    memory_tracker_unlock_mutex();
  }
}


x86 assembly (clang, -O0):
<vpx_memory_tracker_check_integrity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <memory_tracker_lock_mutex@plt>
cmp    $0x0,%eax
jne    1162 <vpx_memory_tracker_check_integrity+0x32>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <memory_tracker_check_integrity@plt>
mov    $0x0,%al
call   1030 <memory_tracker_unlock_mutex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vpx_memory_tracker_check_integrity>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <memory_tracker_lock_mutex@plt>
test   %eax,%eax
je     114a <vpx_memory_tracker_check_integrity+0x1a>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <memory_tracker_check_integrity@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <memory_tracker_unlock_mutex@plt>

LLVM IR (-O0):
define void @vpx_memory_tracker_check_integrity(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @memory_tracker_lock_mutex()
%6 = icmp ne i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @memory_tracker_check_integrity(i8* %8, i32 %9)
%11 = call i32 (...) @memory_tracker_unlock_mutex()
br label %12
12: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @vpx_memory_tracker_check_integrity(i8* %0, i32 %1) {
%3 = tail call i32 (...) @memory_tracker_lock_mutex()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @memory_tracker_check_integrity(i8* %0, i32 %1)
%7 = tail call i32 (...) @memory_tracker_unlock_mutex()
br label %8
8: ; preds = %5, %2
ret void
}
/* Variables and functions */
int invert(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%u\n", invert(1983748, 6, 2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1e4504,%edi
mov    $0x6,%esi
mov    $0x2,%edx
call   1030 <invert@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1e4504,%edi
mov    $0x6,%esi
mov    $0x2,%edx
call   1030 <invert@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @invert(i32 1983748, i32 6, i32 2)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @invert(i32 1983748, i32 6, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntEnable(scalar_t__);
int /*<<< orphan*/ IntRegister(scalar_t__, void (*)());
int _UARTBaseValid(scalar_t__);
scalar_t__ _UARTIntNumberGet(scalar_t__);
void UARTIntRegister(uint32_t ui32Base, void (*pfnHandler)(void)) {
  uint32_t ui32Int;
  ASSERT(_UARTBaseValid(ui32Base));
  ui32Int = _UARTIntNumberGet(ui32Base);
  ASSERT(ui32Int != 0);
  IntRegister(ui32Int, pfnHandler);
  IntEnable(ui32Int);
}


x86 assembly (clang, -O0):
<UARTIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1070 <ASSERT@plt>
mov    -0x8(%rbp),%rdi
call   1060 <_UARTIntNumberGet@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <ASSERT@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <IntRegister@plt>
mov    -0x18(%rbp),%rdi
call   1030 <IntEnable@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntRegister>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1070 <ASSERT@plt>
mov    %rbx,%rdi
call   1060 <_UARTIntNumberGet@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1070 <ASSERT@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <IntRegister@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @UARTIntRegister(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
%5 = alloca i64
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%6 = load i64, i64* %3
%7 = call i32 @_UARTBaseValid(i64 %6)
%8 = call i32 @ASSERT(i32 %7)
%9 = load i64, i64* %3
%10 = call i64 @_UARTIntNumberGet(i64 %9)
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @ASSERT(i32 %13)
%15 = load i64, i64* %5
%16 = load void ()*, void ()** %4
%17 = bitcast void ()* %16 to void (...)*
%18 = call i32 @IntRegister(i64 %15, void (...)* %17)
%19 = load i64, i64* %5
%20 = call i32 @IntEnable(i64 %19)
ret void
}

LLVM IR (-O2):
define void @UARTIntRegister(i64 %0, void ()* %1) {
%3 = tail call i32 @_UARTBaseValid(i64 %0)
%4 = tail call i32 @ASSERT(i32 %3)
%5 = tail call i64 @_UARTIntNumberGet(i64 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = bitcast void ()* %1 to void (...)*
%10 = tail call i32 @IntRegister(i64 %5, void (...)* %9)
%11 = tail call i32 @IntEnable(i64 %5)
ret void
}
/* Variables and functions */
int a_ctz_64(unsigned long);
int a_ctz_l(unsigned long x) {
  static const char debruijn32[32] = {
      0,  1,  23, 2,  29, 24, 19, 3,  30, 27, 25, 11, 20, 8, 4,  13,
      31, 22, 28, 18, 26, 10, 7,  12, 21, 17, 9,  6,  16, 5, 15, 14};
  if (sizeof(long) == 8)
    return a_ctz_64(x);
  return debruijn32[(x & -x) * 0x076be629 >> 27];
}


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

x86 assembly (clang, -O2):
<a_ctz_l>:
jmp    1030 <a_ctz_64@plt>

LLVM IR (-O0):
@a_ctz_l.debruijn32 = internal constant [32 x i8] c"\00\01\17\02\1D\18\13\03\1E\1B\19\0B\14\08\04\0D\1F\16\1C\12\1A\0A\07\0C\15\11\09\06\10\05\0F\0E"
define i32 @a_ctz_l(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @a_ctz_64(i64 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @a_ctz_l(i64 %0) {
%2 = tail call i32 @a_ctz_64(i64 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ mat4d_translate_new(double *, double const, double const,
                                       double const);
void mat4d_translateVec_new(double result[16], const double xyz[3]) {
  mat4d_translate_new(result, xyz[0], xyz[1], xyz[2]);
}


x86 assembly (clang, -O0):
<mat4d_translateVec_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
call   1030 <mat4d_translate_new@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat4d_translateVec_new>:
movsd  (%rsi),%xmm0
movsd  0x8(%rsi),%xmm1
movsd  0x10(%rsi),%xmm2
jmp    1030 <mat4d_translate_new@plt>

LLVM IR (-O0):
define void @mat4d_translateVec_new(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %4
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 2
%14 = load double, double* %13
%15 = call i32 @mat4d_translate_new(double* %5, double %8, double %11, double %14)
ret void
}

LLVM IR (-O2):
define void @mat4d_translateVec_new(double* %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = getelementptr inbounds double, double* %1, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %1, i64 2
%7 = load double, double* %6
%8 = tail call i32 @mat4d_translate_new(double* %0, double %3, double %5, double %7)
ret void
}
int host_wrap() { return 1; }


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

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

LLVM IR (-O0):
define i32 @host_wrap() {
ret i32 1
}

LLVM IR (-O2):
define i32 @host_wrap() {
ret i32 1
}
int fun232() { return 232; }


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

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

LLVM IR (-O0):
define i32 @fun232() {
ret i32 232
}

LLVM IR (-O2):
define i32 @fun232() {
ret i32 232
}
/* Variables and functions */
int EAGAIN;
int wby_socket_is_blocking_error(int error) { return (EAGAIN == error); }


x86 assembly (clang, -O0):
<wby_socket_is_blocking_error>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wby_socket_is_blocking_error>:
mov    0x2ed1(%rip),%rcx
xor    %eax,%eax
cmp    %edi,(%rcx)
sete   %al
ret

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

LLVM IR (-O2):
@EAGAIN = global i32 0
define i32 @wby_socket_is_blocking_error(i32 %0) {
%2 = load i32, i32* @EAGAIN
%3 = icmp eq i32 %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
int eiisinf(x)
unsigned short x[];
{
  if (eiisnan(x))
    return (0);
  if ((x[1] & 0x7fff) == 0x7fff)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<eiisinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <eiisnan@plt>
cmp    $0x0,%eax
je     113c <eiisinf+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1167 <eiisinf+0x57>
mov    -0x10(%rbp),%rax
movzwl 0x2(%rax),%eax
and    $0x7fff,%eax
cmp    $0x7fff,%eax
jne    1160 <eiisinf+0x50>
movl   $0x1,-0x4(%rbp)
jmp    1167 <eiisinf+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eiisinf>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <eiisnan@plt>
test   %eax,%eax
jne    1135 <eiisinf+0x25>
movzwl 0x2(%r14),%eax
not    %eax
xor    %ebx,%ebx
test   $0x7fff,%eax
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @eiisinf(i16* %0) {
%2 = alloca i32
%3 = alloca i16*
store i16* %0, i16** %3
%4 = load i16*, i16** %3
%5 = call i32 (i16*, ...) bitcast (i32 (...)* @eiisnan to i32 (i16*, ...)*)(i16* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %17
8: ; preds = %1
%9 = load i16*, i16** %3
%10 = getelementptr inbounds i16, i16* %9, i64 1
%11 = load i16, i16* %10
%12 = zext i16 %11 to i32
%13 = and i32 %12, 32767
%14 = icmp eq i32 %13, 32767
br i1 %14, label %15, label %16
15: ; preds = %8
store i32 1, i32* %2
br label %17
16: ; preds = %8
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @eiisinf(i16* %0) {
%2 = tail call i32 (i16*, ...) bitcast (i32 (...)* @eiisnan to i32 (i16*, ...)*)(i16* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = getelementptr inbounds i16, i16* %0, i64 1
%6 = load i16, i16* %5
%7 = and i16 %6, 32767
%8 = icmp eq i16 %7, 32767
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %1
%11 = phi i32 [ 0, %1 ], [ %9, %4 ]
ret i32 %11
}
int sumc(int k, int N) { return ((N - k) + 1); }


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

x86 assembly (clang, -O2):
<sumc>:
sub    %edi,%esi
lea    0x1(%rsi),%eax
ret

LLVM IR (-O0):
define i32 @sumc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
%8 = add nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @sumc(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x8e() {
  Assert_real((isdigit(142) == 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_isdigit.c",
              715, ("isdigit should be 0 for 0x8e"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x8e>:
push   %rax
mov    $0x8e,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2cb,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x8e\00"
define void @t_isdigit_0x8e() {
%1 = call i64 @isdigit(i32 142)
%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 715, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x8e\00"
define void @t_isdigit_0x8e() {
%1 = tail call i64 @isdigit(i32 142)
%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 715, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test07(char a) { return ((a & 0x80) == 0) ? 0x7FFFFFFF : 0x80000000; }


x86 assembly (clang, -O0):
<test07>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x80,%edx
mov    $0x80000000,%eax
mov    $0x7fffffff,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test07>:
xor    %ecx,%ecx
test   %dil,%dil
setns  %cl
mov    $0x80000000,%eax
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test07(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 128
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 2147483647, i32 -2147483648
ret i32 %8
}

LLVM IR (-O2):
define i32 @test07(i8 signext %0) {
%2 = icmp sgt i8 %0, -1
%3 = select i1 %2, i32 2147483647, i32 -2147483648
ret i32 %3
}
void XtRemoveBlockHook() {}


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

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

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

LLVM IR (-O2):
define void @XtRemoveBlockHook() {
ret void
}
/* Type definitions */
struct st_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Free_Config(struct st_device *);
int /*<<< orphan*/ Free_Vars();
int /*<<< orphan*/ Gamma_FreeTables();
void RTS_Scanner_End(struct st_device *dev) {
  Gamma_FreeTables();
  Free_Config(dev);
  Free_Vars();
}


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

x86 assembly (clang, -O2):
<RTS_Scanner_End>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <Gamma_FreeTables@plt>
mov    %rbx,%rdi
call   1040 <Free_Config@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <Free_Vars@plt>

LLVM IR (-O0):
%struct.st_device = type { i32 }
define void @RTS_Scanner_End(%struct.st_device* %0) {
%2 = alloca %struct.st_device*
store %struct.st_device* %0, %struct.st_device** %2
%3 = call i32 (...) @Gamma_FreeTables()
%4 = load %struct.st_device*, %struct.st_device** %2
%5 = call i32 @Free_Config(%struct.st_device* %4)
%6 = call i32 (...) @Free_Vars()
ret void
}

LLVM IR (-O2):
%struct.st_device = type { i32 }
define void @RTS_Scanner_End(%struct.st_device* %0) {
%2 = tail call i32 (...) @Gamma_FreeTables()
%3 = tail call i32 @Free_Config(%struct.st_device* %0)
%4 = tail call i32 (...) @Free_Vars()
ret void
}
int maxNum(int a, int b) { return a < b ? b : a; }


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

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

LLVM IR (-O0):
define i32 @maxNum(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @maxNum(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
int mq_next(int index) { return (index + 1) % 5; }


x86 assembly (clang, -O0):
<mq_next>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mq_next>:
add    $0x1,%edi
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @mq_next(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = srem i32 %4, 5
ret i32 %5
}

LLVM IR (-O2):
define i32 @mq_next(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = srem i32 %2, 5
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t multiplex_2(uint32_t in0, uint32_t in1, int selec) {
  if (selec == 0)
    return in0;
  if (selec == 1)
    return in1;
  if (selec > 1)
    return 0;
}


x86 assembly (clang, -O0):
<multiplex_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1122 <multiplex_2+0x22>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <multiplex_2+0x48>
cmpl   $0x1,-0x10(%rbp)
jne    1137 <multiplex_2+0x37>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <multiplex_2+0x48>
cmpl   $0x1,-0x10(%rbp)
jle    1148 <multiplex_2+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiplex_2>:
mov    %edi,%eax
test   %edx,%edx
je     110d <multiplex_2+0xd>
mov    %esi,%eax
cmp    $0x1,%edx
jne    110e <multiplex_2+0xe>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @multiplex_2(i32 %0, i32 %1, i32 %2) {
switch i32 %2, label %5 [
i32 0, label %6
i32 1, label %4
]
4: ; preds = %3
br label %6
5: ; preds = %3
br label %6
6: ; preds = %5, %3, %4
%7 = phi i32 [ %1, %4 ], [ %0, %3 ], [ 0, %5 ]
ret i32 %7
}
void glp_mem_limit(int limit) {}


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

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

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

LLVM IR (-O2):
define void @glp_mem_limit(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SCT0_DriverIRQHandler();
__attribute__((weak)) void SCT0_IRQHandler(void) { SCT0_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @SCT0_IRQHandler() {
%1 = call i32 (...) @SCT0_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @SCT0_IRQHandler() {
%1 = tail call i32 (...) @SCT0_DriverIRQHandler()
ret void
}
double inchesToMiles(double inches) { return inches / 63360.0; }


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

x86 assembly (clang, -O2):
<inchesToMiles>:
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @inchesToMiles(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 6.336000e+04
ret double %4
}

LLVM IR (-O2):
define double @inchesToMiles(double %0) {
%2 = fdiv double %0, 6.336000e+04
ret double %2
}