xunge/DecIR huggingface dataset:
long long fll(long long a, long long b) {
  a = (a & ~(0xfffffull << 4)) | ((b << 4) & (0xfffffull << 4));
  return a;
}


x86 assembly (clang, -O0):
<fll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffffffffff00000f,%rax
mov    -0x10(%rbp),%rcx
shl    $0x4,%rcx
and    $0xfffff0,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fll>:
and    $0xffffffffff00000f,%rdi
shl    $0x4,%esi
and    $0xfffff0,%esi
lea    (%rsi,%rdi,1),%rax
ret

LLVM IR (-O0):
define i64 @fll(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = and i64 %5, -16777201
%7 = load i64, i64* %4
%8 = shl i64 %7, 4
%9 = and i64 %8, 16777200
%10 = or i64 %6, %9
store i64 %10, i64* %3
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
define i64 @fll(i64 %0, i64 %1) {
%3 = and i64 %0, -16777201
%4 = shl i64 %1, 4
%5 = and i64 %4, 16777200
%6 = or i64 %5, %3
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ Emit(char *);
void BlankLine() { Emit(""); }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @BlankLine() {
%1 = call i32 @Emit(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @BlankLine() {
%1 = tail call i32 @Emit(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
void GPIOPinWrite(uint32_t ui32Port, uint8_t ui8Pins, uint8_t ui8Val) {
  ;
  (*((volatile unsigned long *)(ui32Port + (0x00000000 + (ui8Pins << 2))))) =
      ui8Val;
}


x86 assembly (clang, -O0):
<GPIOPinWrite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movslq -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edx
shl    $0x2,%edx
add    $0x0,%edx
movslq %edx,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinWrite>:
movslq %edx,%rax
shl    $0x2,%esi
movslq %esi,%rcx
mov    %rax,(%rcx,%rdi,1)
ret

LLVM IR (-O0):
define void @GPIOPinWrite(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = load i64, i64* %4
%10 = load i32, i32* %5
%11 = shl i32 %10, 2
%12 = add nsw i32 0, %11
%13 = sext i32 %12 to i64
%14 = add nsw i64 %9, %13
%15 = inttoptr i64 %14 to i64*
store volatile i64 %8, i64* %15
ret void
}

LLVM IR (-O2):
define void @GPIOPinWrite(i64 %0, i32 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = shl i32 %1, 2
%6 = sext i32 %5 to i64
%7 = add nsw i64 %6, %0
%8 = inttoptr i64 %7 to i64*
store volatile i64 %4, i64* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
void handleMouseMove(double x, double y) {
  printf("mouse move x %f y %f\n", x, y);
}


x86 assembly (clang, -O0):
<handleMouseMove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [22 x i8] c"mouse move x %f y %f\0A\00"
define void @handleMouseMove(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 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %5, double %6)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"mouse move x %f y %f\0A\00"
define void @handleMouseMove(double %0, double %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %0, double %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ __pos;
};
typedef TYPE_1__ fpos_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int __infer_nondet_int();
int /*<<< orphan*/ __infer_nondet_long();
int fgetpos(FILE *__restrict stream, fpos_t *__restrict pos) {
  int success;
  FILE tmp;
  tmp = *stream;
  pos->__pos = __infer_nondet_long();
  success = __infer_nondet_int();
  if (success)
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<fgetpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_long@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1040 <__infer_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1168 <fgetpos+0x48>
movl   $0x0,-0x4(%rbp)
jmp    116f <fgetpos+0x4f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetpos>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1030 <__infer_nondet_long@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
call   1040 <__infer_nondet_int@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @fgetpos(i32* noalias %0, %struct.TYPE_3__* noalias %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca %struct.TYPE_3__*
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
store i32 %9, i32* %7
%10 = call i32 (...) @__infer_nondet_long()
%11 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 0
store i32 %10, i32* %12
%13 = call i32 (...) @__infer_nondet_int()
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 0, i32* %3
br label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @fgetpos(i32* noalias nocapture readnone %0, %struct.TYPE_3__* noalias nocapture writeonly %1) {
%3 = tail call i32 (...) @__infer_nondet_long()
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
store i32 %3, i32* %4
%5 = tail call i32 (...) @__infer_nondet_int()
%6 = icmp eq i32 %5, 0
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void www_html(char *f) { printf("<A HREF=\"http://%s\">%s</A>", f, f); }


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

x86 assembly (clang, -O2):
<www_html>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    %rdx,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"<A HREF=\22http://%s\22>%s</A>\00"
define void @www_html(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"<A HREF=\22http://%s\22>%s</A>\00"
define void @www_html(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ isspace(char const);
void skip_whitespace(const char **parsebuf) {
  while (**parsebuf && isspace(**parsebuf))
    (*parsebuf)++;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     114d <skip_whitespace+0x3d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115d <skip_whitespace+0x4d>
jmp    1170 <skip_whitespace+0x60>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <skip_whitespace+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
push   %rbx
mov    (%rdi),%rax
mov    (%rax),%al
test   %al,%al
je     113f <skip_whitespace+0x2f>
mov    %rdi,%rbx
nopl   (%rax)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     113f <skip_whitespace+0x2f>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movzbl 0x1(%rax),%eax
test   %al,%al
jne    1120 <skip_whitespace+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @skip_whitespace(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %9
%6 = phi i8 [ %12, %9 ], [ %3, %1 ]
%7 = tail call i64 @isspace(i8 signext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = load i8*, i8** %0
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %11, i8** %0
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %9, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int strlen(char *);
char *append_str(char *str, char *dest) {
  int len = strlen(str);
  memcpy(dest, str, len);
  return dest + len;
}


x86 assembly (clang, -O0):
<append_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_str>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
movslq %ebp,%rax
add    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @append_str(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %4
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = call i32 @memcpy(i8* %8, i8* %9, i32 %10)
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
ret i8* %15
}

LLVM IR (-O2):
define i8* @append_str(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @memcpy(i8* %1, i8* %0, i32 %3)
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %1, i64 %5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int main(int argc, char *argv[]) { _exit(0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
unsigned char LPCByteRead(unsigned long ulBase, unsigned long ulOffset) {
  DEBUG_ASSERT(ulBase == 0x40080000);
  DEBUG_ASSERT(
      ulOffset <
      ((((*((volatile unsigned long *)(ulBase + 0x00000004))) & 0x00070000) >>
        16) *
       256));
  return ((*((volatile unsigned char *)(ulBase + 0x00000400 + ulOffset))));
}


x86 assembly (clang, -O0):
<LPCByteRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x40080000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%rcx
and    $0x70000,%rcx
shr    $0x10,%rcx
shl    $0x8,%rcx
cmp    %rcx,%rax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
add    $0x400,%rax
add    -0x10(%rbp),%rax
mov    (%rax),%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCByteRead>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x40080000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    0x4(%rbx),%rax
shr    $0x8,%rax
and    $0x700,%eax
xor    %edi,%edi
cmp    %r14,%rax
seta   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    0x400(%rbx,%r14,1),%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define zeroext i8 @LPCByteRead(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1074266112
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = load i64, i64* %3
%11 = add i64 %10, 4
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
%14 = and i64 %13, 458752
%15 = lshr i64 %14, 16
%16 = mul i64 %15, 256
%17 = icmp ult i64 %9, %16
%18 = zext i1 %17 to i32
%19 = call i32 @DEBUG_ASSERT(i32 %18)
%20 = load i64, i64* %3
%21 = add i64 %20, 1024
%22 = load i64, i64* %4
%23 = add i64 %21, %22
%24 = inttoptr i64 %23 to i8*
%25 = load volatile i8, i8* %24
ret i8 %25
}

LLVM IR (-O2):
define zeroext i8 @LPCByteRead(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1074266112
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = add i64 %0, 4
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = lshr i64 %8, 8
%10 = and i64 %9, 1792
%11 = icmp ugt i64 %10, %1
%12 = zext i1 %11 to i32
%13 = tail call i32 @DEBUG_ASSERT(i32 %12)
%14 = add i64 %0, 1024
%15 = add i64 %14, %1
%16 = inttoptr i64 %15 to i8*
%17 = load volatile i8, i8* %16
ret i8 %17
}
/* Variables and functions */
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int getpid();
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void terminating_signal_handler(int sig) {
  fprintf(stderr,
          "[%d] PROCESS HAS LASTED MORE THAN %d MINUTES. KILLING ITSELF\n",
          getpid(), 3);
  raise(SIGKILL);
}


x86 assembly (clang, -O0):
<terminating_signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%edx
lea    0xea6(%rip),%rsi
mov    $0x3,%ecx
call   1050 <fprintf@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminating_signal_handler>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xeb8(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
mov    $0x3,%ecx
call   1050 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
pop    %rbx
jmp    1030 <raise@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"[%d] PROCESS HAS LASTED MORE THAN %d MINUTES. KILLING ITSELF\0A\00"
@SIGKILL = global i32 0
define void @terminating_signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 (...) @getpid()
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 %4, i32 3)
%6 = load i32, i32* @SIGKILL
%7 = call i32 @raise(i32 %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"[%d] PROCESS HAS LASTED MORE THAN %d MINUTES. KILLING ITSELF\0A\00"
@SIGKILL = global i32 0
define void @terminating_signal_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 %3, i32 3)
%5 = load i32, i32* @SIGKILL
%6 = tail call i32 @raise(i32 %5)
ret void
}
void avio_put_str16be() {}


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

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

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

LLVM IR (-O2):
define void @avio_put_str16be() {
ret void
}
int matoi(char *s) {
  int n = 0;
  for (; *s >= '0' && *s <= '9'; s++)
    n = 10 * n + (*s - '0');
  return n;
}


x86 assembly (clang, -O0):
<matoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0xd(%rbp)
jl     1134 <matoi+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1144 <matoi+0x44>
jmp    1168 <matoi+0x68>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <matoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<matoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <matoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <matoi+0x20>
ret

LLVM IR (-O0):
define i32 @matoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %24, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp sge i32 %7, 48
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 57
br label %14
14: ; preds = %9, %4
%15 = phi i1 [ false, %4 ], [ %13, %9 ]
br i1 %15, label %16, label %27
16: ; preds = %14
%17 = load i32, i32* %3
%18 = mul nsw i32 10, %17
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 48
%23 = add nsw i32 %18, %22
store i32 %23, i32* %3
br label %24
24: ; preds = %16
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %2
br label %4
27: ; preds = %14
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @matoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %12, %5 ], [ 0, %1 ]
%8 = phi i8* [ %13, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %18
}
void test_array_shuffle() {}


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

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

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

LLVM IR (-O2):
define void @test_array_shuffle() {
ret void
}
int is_divisible(int n, int d) { return n % d == 0; }


x86 assembly (clang, -O0):
<is_divisible>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_divisible>:
mov    %edi,%eax
cltd
idiv   %esi
xor    %eax,%eax
test   %edx,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_divisible(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 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_divisible(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
__attribute__((weak)) void HardFault_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<HardFault_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <HardFault_Handler+0x9>
jmp    1109 <HardFault_Handler+0x9>

x86 assembly (clang, -O2):
<HardFault_Handler>:
jmp    1100 <HardFault_Handler>

LLVM IR (-O0):
define weak void @HardFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @HardFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
struct cec_op_digital_service_id {
  int dummy;
};
struct cec_msg {
  scalar_t__ msg;
};

/* Variables and functions */
int /*<<< orphan*/
cec_get_digital_service_id(scalar_t__, struct cec_op_digital_service_id *);
void cec_ops_select_digital_service(const struct cec_msg *msg,
                                    struct cec_op_digital_service_id *digital) {
  cec_get_digital_service_id(msg->msg + 2, digital);
}


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

x86 assembly (clang, -O2):
<cec_ops_select_digital_service>:
mov    (%rdi),%rdi
add    $0x2,%rdi
jmp    1030 <cec_get_digital_service_id@plt>

LLVM IR (-O0):
%struct.cec_msg = type { i64 }
%struct.cec_op_digital_service_id = type { i32 }
define void @cec_ops_select_digital_service(%struct.cec_msg* %0, %struct.cec_op_digital_service_id* %1) {
%3 = alloca %struct.cec_msg*
%4 = alloca %struct.cec_op_digital_service_id*
store %struct.cec_msg* %0, %struct.cec_msg** %3
store %struct.cec_op_digital_service_id* %1, %struct.cec_op_digital_service_id** %4
%5 = load %struct.cec_msg*, %struct.cec_msg** %3
%6 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = add nsw i64 %7, 2
%9 = load %struct.cec_op_digital_service_id*, %struct.cec_op_digital_service_id** %4
%10 = call i32 @cec_get_digital_service_id(i64 %8, %struct.cec_op_digital_service_id* %9)
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i64 }
%struct.cec_op_digital_service_id = type { i32 }
define void @cec_ops_select_digital_service(%struct.cec_msg* nocapture %0, %struct.cec_op_digital_service_id* %1) {
%3 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
%4 = load i64, i64* %3
%5 = add nsw i64 %4, 2
%6 = tail call i32 @cec_get_digital_service_id(i64 %5, %struct.cec_op_digital_service_id* %1)
ret void
}
char *naturaltime(const int number) { return ""; }


x86 assembly (clang, -O0):
<naturaltime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @naturaltime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @naturaltime(i32 %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ mp2vstart_init(int *, int);
void mp2vpic_init(uint8_t *p_mp2vpic) {
  mp2vstart_init(p_mp2vpic, 0x0);
  p_mp2vpic[7] = 0x0;
}


x86 assembly (clang, -O0):
<mp2vpic_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <mp2vstart_init@plt>
mov    -0x8(%rbp),%rax
movl   $0x0,0x1c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vpic_init>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <mp2vstart_init@plt>
movl   $0x0,0x1c(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @mp2vpic_init(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @mp2vstart_init(i32* %3, i32 0)
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 7
store i32 0, i32* %6
ret void
}

LLVM IR (-O2):
define void @mp2vpic_init(i32* %0) {
%2 = tail call i32 @mp2vstart_init(i32* %0, i32 0)
%3 = getelementptr inbounds i32, i32* %0, i64 7
store i32 0, i32* %3
ret void
}
/* Variables and functions */
scalar_t__ isspace(int);
char *rstrip_e(char *beg, char *end) {
  while (end > beg && isspace((int)*--end)) {
    *end = '\0';
  }
  return beg;
}


x86 assembly (clang, -O0):
<rstrip_e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x11(%rbp)
jbe    1155 <rstrip_e+0x45>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movsbl -0x1(%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1165 <rstrip_e+0x55>
jmp    1171 <rstrip_e+0x61>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    1120 <rstrip_e+0x10>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rstrip_e>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
cmp    %rdi,%rsi
jbe    113b <rstrip_e+0x2b>
mov    %rsi,%rbx
nop
movsbl -0x1(%rbx),%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     113b <rstrip_e+0x2b>
movb   $0x0,-0x1(%rbx)
add    $0xffffffffffffffff,%rbx
cmp    %r14,%rbx
ja     1120 <rstrip_e+0x10>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @rstrip_e(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %18, %2
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = icmp ugt i8* %6, %7
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 -1
store i8* %11, i8** %4
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = call i64 @isspace(i32 %13)
%15 = icmp ne i64 %14, 0
br label %16
16: ; preds = %9, %5
%17 = phi i1 [ false, %5 ], [ %15, %9 ]
br i1 %17, label %18, label %20
18: ; preds = %16
%19 = load i8*, i8** %4
store i8 0, i8* %19
br label %5
20: ; preds = %16
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
define i8* @rstrip_e(i8* readnone returned %0, i8* %1) {
%3 = icmp ugt i8* %1, %0
br i1 %3, label %4, label %13
4: ; preds = %2, %11
%5 = phi i8* [ %6, %11 ], [ %1, %2 ]
%6 = getelementptr inbounds i8, i8* %5, i64 -1
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = tail call i64 @isspace(i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %4
store i8 0, i8* %6
%12 = icmp ugt i8* %6, %0
br i1 %12, label %4, label %13
13: ; preds = %4, %11, %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  double a = -5.0, b = -5.0;
  printf("square(a+b)       = %lf\n", ((a + b) * (a + b)));
  printf("(a+b)/square(a+b) = %lf\n", (a + b) / ((a + b) * (a + b)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
addsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
movsd  0xed4(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"square(a+b) = %lf\0A\00"
@.str.1 = [25 x i8] c"(a+b)/square(a+b) = %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store double -5.000000e+00, double* %2
store double -5.000000e+00, double* %3
%4 = load double, double* %2
%5 = load double, double* %3
%6 = fadd double %4, %5
%7 = load double, double* %2
%8 = load double, double* %3
%9 = fadd double %7, %8
%10 = fmul double %6, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %10)
%12 = load double, double* %2
%13 = load double, double* %3
%14 = fadd double %12, %13
%15 = load double, double* %2
%16 = load double, double* %3
%17 = fadd double %15, %16
%18 = load double, double* %2
%19 = load double, double* %3
%20 = fadd double %18, %19
%21 = fmul double %17, %20
%22 = fdiv double %14, %21
%23 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), double %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"square(a+b) = %lf\0A\00"
@.str.1 = [25 x i8] c"(a+b)/square(a+b) = %lf\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double 1.000000e+02)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), double -1.000000e-01)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_putc(char);
void uart_puts(char *str) {
  for (int i = 0; str[i] != '\0'; ++i) {
    uart_putc(str[i]);
  }
  uart_putc('\n');
  return;
}


x86 assembly (clang, -O0):
<uart_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <uart_puts+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <uart_putc@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <uart_puts+0x13>
mov    $0xa,%edi
call   1030 <uart_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <uart_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <uart_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <uart_puts+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <uart_putc@plt>

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

LLVM IR (-O2):
define void @uart_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %1
%5 = tail call i32 @uart_putc(i8 signext 10)
ret void
6: ; preds = %1, %6
%7 = phi i64 [ %10, %6 ], [ 0, %1 ]
%8 = phi i8 [ %12, %6 ], [ %2, %1 ]
%9 = tail call i32 @uart_putc(i8 signext %8)
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %4, label %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x47() {
  Assert_real((islower(71) == 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_islower.c",
              360, ("islower should be 0 for G"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x47>:
push   %rax
mov    $0x47,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x168,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for G\00"
define void @t_islower_0x47() {
%1 = call i64 @islower(i32 71)
%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 360, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for G\00"
define void @t_islower_0x47() {
%1 = tail call i64 @islower(i32 71)
%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 360, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/ *);
int main() {
  char *s = NULL;
  printf("%s\n", NULL);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
lea    0xed2(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* null)
ret i32 0
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ errno_exit(char *);
void close_device(int *fd) {
  if (-1 == close(*fd))
    errno_exit("close");
  *fd = -1;
}


x86 assembly (clang, -O0):
<close_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <close@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1152 <close_device+0x32>
lea    0xeb3(%rip),%rdi
call   1030 <errno_exit@plt>
mov    -0x8(%rbp),%rax
movl   $0xffffffff,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_device>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1040 <close@plt>
cmp    $0xffffffff,%eax
jne    113c <close_device+0x1c>
lea    0xec9(%rip),%rdi
call   1030 <errno_exit@plt>
movl   $0xffffffff,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"close\00"
define void @close_device(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @close(i32 %4)
%6 = icmp eq i32 -1, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @errno_exit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32*, i32** %2
store i32 -1, i32* %10
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"close\00"
define void @close_device(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @close(i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @errno_exit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
store i32 -1, i32* %0
ret void
}
float dot(const int *g, const float x, const float y, const float z) {
  return g[0] * x + g[1] * y + g[2] * z;
}


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

x86 assembly (clang, -O2):
<dot>:
cvtsi2ssl (%rdi),%xmm3
cvtsi2ssl 0x4(%rdi),%xmm4
mulss  %xmm1,%xmm4
xorps  %xmm1,%xmm1
cvtsi2ssl 0x8(%rdi),%xmm1
mulss  %xmm3,%xmm0
addss  %xmm4,%xmm0
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @dot(i32* nocapture %0, float %1, float %2, float %3) {
%5 = load i32, i32* %0
%6 = sitofp i32 %5 to float
%7 = getelementptr inbounds i32, i32* %0, i64 1
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to float
%10 = fmul float %9, %2
%11 = tail call float @llvm.fmuladd.f32(float %6, float %1, float %10)
%12 = getelementptr inbounds i32, i32* %0, i64 2
%13 = load i32, i32* %12
%14 = sitofp i32 %13 to float
%15 = tail call float @llvm.fmuladd.f32(float %14, float %3, float %11)
ret float %15
}
/* Variables and functions */
int syscall(int, char *, char *, int /*<<< orphan*/);
int readlink(char *file, char *linkname) {
  return syscall(26, file, linkname, 0);
}


x86 assembly (clang, -O0):
<readlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x1a,%edi
xor    %ecx,%ecx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readlink>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1a,%edi
xor    %ecx,%ecx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @readlink(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 @syscall(i32 26, i8* %5, i8* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @readlink(i8* %0, i8* %1) {
%3 = tail call i32 @syscall(i32 26, i8* %0, i8* %1, i32 0)
ret i32 %3
}
/* Type definitions */
struct cli_def {
  int dummy;
};

/* Variables and functions */
int cli_quit(struct cli_def *, char const *, char **, int);
int cli_int_quit(struct cli_def *cli,
                 const char *command __attribute__((unused)),
                 char *argv[] __attribute__((unused)),
                 int argc __attribute__((unused))) {
  return cli_quit(cli, command, argv, argc);
}


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

x86 assembly (clang, -O2):
<cli_int_quit>:
jmp    1030 <cli_quit@plt>

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

LLVM IR (-O2):
%struct.cli_def = type { i32 }
define i32 @cli_int_quit(%struct.cli_def* %0, i8* %1, i8** %2, i32 %3) {
%5 = tail call i32 @cli_quit(%struct.cli_def* %0, i8* %1, i8** %2, i32 %3)
ret i32 %5
}
void debug_frames(void) {}


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

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

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

LLVM IR (-O2):
define void @debug_frames() {
ret void
}
float ft_inf(int p) {
  int inf;
  inf = 0x7F800000;
  return (p * *(float *)&inf);
}


x86 assembly (clang, -O0):
<ft_inf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x7f800000,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_inf>:
cvtsi2ss %edi,%xmm0
mulss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @ft_inf(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2139095040, i32* %3
%4 = load i32, i32* %2
%5 = sitofp i32 %4 to float
%6 = bitcast i32* %3 to float*
%7 = load float, float* %6
%8 = fmul float %5, %7
ret float %8
}

LLVM IR (-O2):
define float @ft_inf(i32 %0) {
%2 = sitofp i32 %0 to float
%3 = fmul float %2, 0x7FF0000000000000
ret float %3
}
__attribute__((weak)) void
fd_nrf8001_display_key_event(char *passkey __attribute__((unused))) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define weak void @fd_nrf8001_display_key_event(i8* %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int myfgetc(int /*<<< orphan*/ *);
int __uflow(FILE *stream) { return myfgetc(stream); }


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

x86 assembly (clang, -O2):
<__uflow>:
jmp    1030 <myfgetc@plt>

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

LLVM IR (-O2):
define i32 @__uflow(i32* %0) {
%2 = tail call i32 @myfgetc(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ forced_memset(void *, int /*<<< orphan*/, int);
int /*<<< orphan*/ free(void *);
void *malloc(int);
void *mallocMemsetFree() {
  void *ptr = malloc(128);
  if (ptr)
    forced_memset(ptr, 0, 128);
  free(ptr);
  return ptr;
}


x86 assembly (clang, -O0):
<mallocMemsetFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x80,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1161 <mallocMemsetFree+0x31>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1050 <forced_memset@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mallocMemsetFree>:
push   %rbx
mov    $0x80,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1152 <mallocMemsetFree+0x22>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1050 <forced_memset@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @mallocMemsetFree() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 128)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = call i32 @forced_memset(i8* %6, i32 0, i32 128)
br label %8
8: ; preds = %5, %0
%9 = load i8*, i8** %1
%10 = call i32 @free(i8* %9)
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
define i8* @mallocMemsetFree() {
%1 = tail call dereferenceable_or_null(128) i8* @malloc(i32 128)
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @forced_memset(i8* %1, i32 0, i32 128)
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @free(i8* %1)
ret i8* %1
}
int test_024(int a, int b, int c, int d) { return ((b >> 31) & 1) + a; }


x86 assembly (clang, -O0):
<test_024>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_024>:
shr    $0x1f,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @test_024(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* %6
%10 = ashr i32 %9, 31
%11 = and i32 %10, 1
%12 = load i32, i32* %5
%13 = add nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @test_024(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = lshr i32 %1, 31
%6 = add nsw i32 %5, %0
ret i32 %6
}