xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ *gets(char *);
int /*<<< orphan*/ printf(char *, int);
int strlen(char *);
int main(int argc, const char *argv[]) {
  char s[501];
  while (gets(s) != NULL)
    printf("%d\n", strlen(s));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <gets@plt>
cmp    $0x0,%rax
je     117e <main+0x4e>
lea    -0x210(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
jmp    1149 <main+0x19>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x1f8,%rsp
mov    %rsp,%rdi
call   1050 <gets@plt>
test   %rax,%rax
je     117f <main+0x4f>
mov    %rsp,%rbx
lea    0xeaf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <gets@plt>
test   %rax,%rax
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x1f8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [501 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %11, %2
%8 = getelementptr inbounds [501 x i8], [501 x i8]* %6, i64 0, i64 0
%9 = call i32* @gets(i8* %8)
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = getelementptr inbounds [501 x i8], [501 x i8]* %6, i64 0, i64 0
%13 = call i32 @strlen(i8* %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %7
15: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [501 x i8]
%4 = getelementptr inbounds [501 x i8], [501 x i8]* %3, i64 0, i64 0
%5 = call i32* @gets(i8* %4)
%6 = icmp eq i32* %5, null
br i1 %6, label %12, label %7
7: ; preds = %2, %7
%8 = call i32 @strlen(i8* %4)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32* @gets(i8* %4)
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %7
12: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int _tfsseek(int, int, int);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
int mon_tfsseek(int fd, int offset, int whence) {
  int ret;
  monLock();
  ret = _tfsseek(fd, offset, whence);
  monUnlock();
  return (ret);
}


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

x86 assembly (clang, -O2):
<mon_tfsseek>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <monLock@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <_tfsseek@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <monUnlock@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mon_tfsseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = call i32 (...) @monLock()
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @_tfsseek(i32 %9, i32 %10, i32 %11)
store i32 %12, i32* %7
%13 = call i32 (...) @monUnlock()
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
define i32 @mon_tfsseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @monLock()
%5 = tail call i32 @_tfsseek(i32 %0, i32 %1, i32 %2)
%6 = tail call i32 (...) @monUnlock()
ret i32 %5
}
/* Type definitions */
struct timespec {
  int tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int nanosleep(struct timespec *, int /*<<< orphan*/ *);
int main(int argc, const char *argv[]) {
  struct timespec t;
  int status;
  t.tv_sec = 5 * 60;
  t.tv_nsec = 0;
  status = nanosleep(&t, NULL);
  return (status != -1 ? 0 : 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x12c,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0xffffffff,%edx
cmovne %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x12c,0x8(%rsp)
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.timespec
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 0
store i32 300, i32* %8
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 1
store i64 0, i64* %9
%10 = call i32 @nanosleep(%struct.timespec* %6, i32* null)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = icmp ne i32 %11, -1
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 0, i32 1
ret i32 %14
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to i8*
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 0
store i32 300, i32* %5
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 1
store i64 0, i64* %6
%7 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
%8 = icmp eq i32 %7, -1
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int dopr(char *, size_t, char const *, int /*<<< orphan*/);
int xmpp_vsnprintf(char *str, size_t count, const char *fmt, va_list args) {
  if (str != NULL)
    str[0] = 0;
  return dopr(str, count, fmt, args);
}


x86 assembly (clang, -O0):
<xmpp_vsnprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <xmpp_vsnprintf+0x29>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <dopr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmpp_vsnprintf>:
test   %rdi,%rdi
je     1118 <xmpp_vsnprintf+0x8>
movb   $0x0,(%rdi)
jmp    1030 <dopr@plt>

LLVM IR (-O0):
define i32 @xmpp_vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 0
store i8 0, i8* %13
br label %14
14: ; preds = %11, %4
%15 = load i8*, i8** %5
%16 = load i64, i64* %6
%17 = load i8*, i8** %7
%18 = load i32, i32* %8
%19 = call i32 @dopr(i8* %15, i64 %16, i8* %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @xmpp_vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = icmp eq i8* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i8 0, i8* %0
br label %7
7: ; preds = %6, %4
%8 = tail call i32 @dopr(i8* %0, i64 %1, i8* %2, i32 %3)
ret i32 %8
}
unsigned xrop3_228_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T ^ S;
  stk2 = D & stk3;
  stk1 = S ^ stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_228_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_228_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
xor    %esi,%edi
xor    %eax,%edi
not    %ecx
or     %eax,%ecx
and    %edi,%ecx
not    %eax
and    %esi,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_228_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = load i32, i32* %6
%25 = xor i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %5
%27 = load i32, i32* %10
%28 = and i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %6
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = load i32, i32* %6
%34 = and i32 %32, %33
%35 = load i32, i32* %8
%36 = load i32, i32* %7
%37 = xor i32 %36, -1
%38 = and i32 %35, %37
%39 = or i32 %34, %38
%40 = load i32, i32* %7
%41 = load i32, i32* %6
%42 = xor i32 %41, -1
%43 = and i32 %40, %42
%44 = load i32, i32* %5
%45 = and i32 %43, %44
%46 = or i32 %39, %45
ret i32 %46
}

LLVM IR (-O2):
define i32 @xrop3_228_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i8 %1, %0
%8 = zext i8 %7 to i32
%9 = xor i32 %4, %8
%10 = xor i32 %6, -1
%11 = or i32 %4, %10
%12 = and i32 %11, %9
%13 = xor i32 %4, -1
%14 = and i32 %13, %5
%15 = or i32 %12, %14
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int nicrealtek_shutdown(void *data) {
  free(data);
  return 0;
}


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

x86 assembly (clang, -O2):
<nicrealtek_shutdown>:
push   %rax
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @nicrealtek_shutdown(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
long ndb_free_ptr(void *m_ptr) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @ndb_free_ptr(i8* nocapture readnone %0) {
ret i64 0
}
void nonlinear_to_linear_rgb(double gamma, double *c) { return; }


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

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

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

LLVM IR (-O2):
define void @nonlinear_to_linear_rgb(double %0, double* nocapture %1) {
ret void
}
int LPeekBE(const void *a) {
  int r;
  unsigned char *c = (unsigned char *)a;
  r = ((int)(signed char)c[0] << 24) + (c[1] << 16) + (c[2] << 8) + c[3];
  return r;
}


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

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

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

LLVM IR (-O2):
define i32 @LPeekBE(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ d2i_of_void;
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ DH;

/* Variables and functions */
int /*<<< orphan*/ *PEM_ASN1_read(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int /*<<< orphan*/ *, void **,
                                  int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ PEM_STRING_DHPARAMS;
scalar_t__ d2i_DHparams;
DH *PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u) {
  return PEM_ASN1_read((d2i_of_void *)d2i_DHparams, PEM_STRING_DHPARAMS, fp,
                       (void **)x, cb, u);
}


x86 assembly (clang, -O0):
<PEM_read_DHparams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%rdi
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <PEM_ASN1_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_DHparams>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%rdi
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PEM_ASN1_read@plt>

LLVM IR (-O0):
@d2i_DHparams = global i64 0
@PEM_STRING_DHPARAMS = global i32 0
define i32* @PEM_read_DHparams(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i64, i64* @d2i_DHparams
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* @PEM_STRING_DHPARAMS
%12 = load i32*, i32** %5
%13 = load i32**, i32*** %6
%14 = bitcast i32** %13 to i8**
%15 = load i32*, i32** %7
%16 = load i8*, i8** %8
%17 = call i32* @PEM_ASN1_read(i32* %10, i32 %11, i32* %12, i8** %14, i32* %15, i8* %16)
ret i32* %17
}

LLVM IR (-O2):
@d2i_DHparams = global i64 0
@PEM_STRING_DHPARAMS = global i32 0
define i32* @PEM_read_DHparams(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = load i64, i64* @d2i_DHparams
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_DHPARAMS
%8 = bitcast i32** %1 to i8**
%9 = tail call i32* @PEM_ASN1_read(i32* %6, i32 %7, i32* %0, i8** %8, i32* %2, i8* %3)
ret i32* %9
}
float findvffrom_va_vi(float va, float vi) { return (2 * va) - vi; }


x86 assembly (clang, -O0):
<findvffrom_va_vi>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
addss  %xmm0,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<findvffrom_va_vi>:
addss  %xmm0,%xmm0
subss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @findvffrom_va_vi(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 = load float, float* %4
%7 = fneg float %6
%8 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %5, float %7)
ret float %8
}

LLVM IR (-O2):
define float @findvffrom_va_vi(float %0, float %1) {
%3 = fneg float %1
%4 = tail call float @llvm.fmuladd.f32(float %0, float 2.000000e+00, float %3)
ret float %4
}
R0R1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if (r0 <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<R0R1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     113c <R0R1+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1143 <R0R1+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R0R1>:
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setae  %al
ret

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

LLVM IR (-O2):
define i32 @R0R1(double %0, double %1, i32 %2, i32 %3, double* nocapture readnone %4, double* nocapture readnone %5) {
%7 = fcmp ole double %0, %1
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t rtp2435_get_height(uint8_t *header) { return header[7]; }


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

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

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

LLVM IR (-O2):
define i32 @rtp2435_get_height(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 7
%3 = load i32, i32* %2
ret i32 %3
}
void foo553() {}


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

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

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

LLVM IR (-O2):
define void @foo553() {
ret void
}
char *sljit_get_platform_name() { return "ppc-64"; }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"ppc-64\00"
define i8* @sljit_get_platform_name() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"ppc-64\00"
define i8* @sljit_get_platform_name() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
void malloc_bad() {
  int *p = (int *)malloc(sizeof(int));
  if (p) {
    int x = *p;
  }
  free(p);
}


x86 assembly (clang, -O0):
<malloc_bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114a <malloc_bad+0x2a>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_bad>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @malloc_bad() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @free(i32* %2)
ret void
}
/* Variables and functions */
long long strtoll(char const *, int /*<<< orphan*/ *, int);
long long atoll(const char *str) { return strtoll(str, NULL, 10); }


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

x86 assembly (clang, -O2):
<atoll>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtoll@plt>

LLVM IR (-O0):
define i64 @atoll(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtoll(i8* %3, i32* null, i32 10)
ret i64 %4
}

LLVM IR (-O2):
define i64 @atoll(i8* nocapture %0) {
%2 = tail call i64 @strtoll(i8* nocapture %0, i32* null, i32 10)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ irqEnable();
int EnableInterrupts() {
  irqEnable();
  return 0;
}


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

x86 assembly (clang, -O2):
<EnableInterrupts>:
push   %rax
xor    %eax,%eax
call   1030 <irqEnable@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @EnableInterrupts() {
%1 = call i32 (...) @irqEnable()
ret i32 0
}

LLVM IR (-O2):
define i32 @EnableInterrupts() {
%1 = tail call i32 (...) @irqEnable()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void strrchr() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

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

LLVM IR (-O2):
define void @strrchr() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xb0() {
  Assert_real((isgraph(176) == 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_isgraph.c",
              885, ("isgraph should be 0 for 0xb0"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xb0>:
push   %rax
mov    $0xb0,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x375,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xb0\00"
define void @t_isgraph_0xb0() {
%1 = call i64 @isgraph(i32 176)
%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 885, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xb0\00"
define void @t_isgraph_0xb0() {
%1 = tail call i64 @isgraph(i32 176)
%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 885, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void clear(int ntaps, double z[]) {
  int ii;
  for (ii = 0; ii < ntaps; ii++) {
    z[ii] = 0;
  }
}


x86 assembly (clang, -O0):
<clear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    113c <clear+0x3c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <clear+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear>:
test   %edi,%edi
jle    1129 <clear+0x19>
push   %rax
mov    %edi,%edx
shl    $0x3,%rdx
mov    %rsi,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @clear(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
store i32 %0, i32* %3
store double* %1, double** %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load double*, double** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
store double 0.000000e+00, double* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @clear(i32 %0, double* nocapture writeonly %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast double* %1 to i8*
%6 = zext i32 %0 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
char *ultoa(int, char *, int);
char *utoa(int val, char *s, int radix) { return ultoa(val, s, radix); }


x86 assembly (clang, -O0):
<utoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <ultoa@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utoa>:
jmp    1030 <ultoa@plt>

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

LLVM IR (-O2):
define i8* @utoa(i32 %0, i8* %1, i32 %2) {
%4 = tail call i8* @ultoa(i32 %0, i8* %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
scalar_t__ KIONIX_ACCEL_read_bytes(int, char *, int);
int /*<<< orphan*/ KIONIX_ACCEL_write_byte(int, char);
int KIONIX_ACCEL_enable_outputs(void) {
  char ctlreg_1 = 0;
  int status = 0;
  if (KIONIX_ACCEL_read_bytes(0x1B, &ctlreg_1, 1) == 0) {
    ctlreg_1 |= 0x80;
    KIONIX_ACCEL_write_byte(0x1B, ctlreg_1);
  } else
    status = 1;
  return status;
}


x86 assembly (clang, -O0):
<KIONIX_ACCEL_enable_outputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1b,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
cmp    $0x0,%rax
jne    116f <KIONIX_ACCEL_enable_outputs+0x4f>
movsbl -0x1(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x1(%rbp)
mov    $0x1b,%edi
movsbl -0x1(%rbp),%esi
call   1040 <KIONIX_ACCEL_write_byte@plt>
jmp    1176 <KIONIX_ACCEL_enable_outputs+0x56>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KIONIX_ACCEL_enable_outputs>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%ebx
mov    $0x1b,%edi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
test   %rax,%rax
jne    1161 <KIONIX_ACCEL_enable_outputs+0x41>
movsbl 0xf(%rsp),%esi
or     $0xffffff80,%esi
mov    %sil,0xf(%rsp)
mov    $0x1b,%edi
call   1040 <KIONIX_ACCEL_write_byte@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @KIONIX_ACCEL_enable_outputs() {
%1 = alloca i8
%2 = alloca i32
store i8 0, i8* %1
store i32 0, i32* %2
%3 = call i64 @KIONIX_ACCEL_read_bytes(i32 27, i8* %1, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = or i32 %7, 128
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = load i8, i8* %1
%11 = call i32 @KIONIX_ACCEL_write_byte(i32 27, i8 signext %10)
br label %13
12: ; preds = %0
store i32 1, i32* %2
br label %13
13: ; preds = %12, %5
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @KIONIX_ACCEL_enable_outputs() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i64 @KIONIX_ACCEL_read_bytes(i32 27, i8* %1, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i8, i8* %1
%6 = or i8 %5, -128
store i8 %6, i8* %1
%7 = call i32 @KIONIX_ACCEL_write_byte(i32 27, i8 signext %6)
br label %8
8: ; preds = %0, %4
%9 = phi i32 [ 0, %4 ], [ 1, %0 ]
ret i32 %9
}
/* Variables and functions */
int lseek(int, int, int);
int Hlseek(int f, int o, int w) { return lseek(f, o, w); }


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

x86 assembly (clang, -O2):
<Hlseek>:
jmp    1030 <lseek@plt>

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

LLVM IR (-O2):
define i32 @Hlseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @lseek(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ displayNames(char **);
int main() {
  char *namesPointers[4] = {"Al", "Sue", "Johnny", "Sally"};
  displayNames(namesPointers);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cd4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cd1(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <displayNames@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0x2cf5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2cd9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <displayNames@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"Al\00"
@.str.1 = [4 x i8] c"Sue\00"
@.str.2 = [7 x i8] c"Johnny\00"
@.str.3 = [6 x i8] c"Sally\00"
@__const.main.namesPointers = [4 x i8*] [i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0)]
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8*]
store i32 0, i32* %1
%3 = bitcast [4 x i8*]* %2 to i8*
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
%5 = call i32 @displayNames(i8** %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"Al\00"
@.str.1 = [4 x i8] c"Sue\00"
@.str.2 = [7 x i8] c"Johnny\00"
@.str.3 = [6 x i8] c"Sally\00"
@__const.main.namesPointers = [4 x i8*] [i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0)]
define i32 @main() {
%1 = alloca [4 x i8*]
%2 = bitcast [4 x i8*]* %1 to i8*
%3 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 0
%4 = call i32 @displayNames(i8** %3)
ret i32 0
}
char *skipSpaces(char *pc) {
  while ((*pc == ' ' || *pc == '\n' || *pc == '\t' || *pc == '\r') &&
         *pc != '\0')
    pc++;
  return pc;
}


x86 assembly (clang, -O0):
<skipSpaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     114d <skipSpaces+0x4d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     114d <skipSpaces+0x4d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     114d <skipSpaces+0x4d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xd,%ecx
mov    %al,-0x9(%rbp)
jne    115d <skipSpaces+0x5d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    116d <skipSpaces+0x6d>
jmp    117e <skipSpaces+0x7e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skipSpaces+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipSpaces>:
mov    %rdi,%rax
movabs $0x100002600,%rcx
nopl   (%rax)
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1125 <skipSpaces+0x25>
bt     %rdx,%rcx
jae    1125 <skipSpaces+0x25>
add    $0x1,%rax
jmp    1110 <skipSpaces+0x10>
ret

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

LLVM IR (-O2):
define i8* @skipSpaces(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 10, label %5
i8 9, label %5
i8 13, label %5
]
5: ; preds = %2, %2, %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ sleep(double);
int /*<<< orphan*/ usleep(double);
void xsleep(double seconds) {
  if (seconds > 1000) {
    sleep(seconds);
    seconds -= (long)seconds;
  }
  usleep(seconds * 1000000);
}


x86 assembly (clang, -O0):
<xsleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1167 <xsleep+0x47>
movsd  -0x8(%rbp),%xmm0
call   1030 <sleep@plt>
cvttsd2si -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xe99(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsleep>:
push   %rax
ucomisd 0xed7(%rip),%xmm0
jbe    115b <xsleep+0x3b>
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
call   1030 <sleep@plt>
cvttsd2si (%rsp),%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
mulsd  0xea5(%rip),%xmm0
pop    %rax
jmp    1040 <usleep@plt>

LLVM IR (-O0):
define void @xsleep(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 1.000000e+03
br i1 %4, label %5, label %13
5: ; preds = %1
%6 = load double, double* %2
%7 = call i32 @sleep(double %6)
%8 = load double, double* %2
%9 = fptosi double %8 to i64
%10 = sitofp i64 %9 to double
%11 = load double, double* %2
%12 = fsub double %11, %10
store double %12, double* %2
br label %13
13: ; preds = %5, %1
%14 = load double, double* %2
%15 = fmul double %14, 1.000000e+06
%16 = call i32 @usleep(double %15)
ret void
}

LLVM IR (-O2):
define void @xsleep(double %0) {
%2 = fcmp ogt double %0, 1.000000e+03
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = tail call i32 @sleep(double %0)
%5 = fptosi double %0 to i64
%6 = sitofp i64 %5 to double
%7 = fsub double %0, %6
br label %8
8: ; preds = %3, %1
%9 = phi double [ %7, %3 ], [ %0, %1 ]
%10 = fmul double %9, 1.000000e+06
%11 = tail call i32 @usleep(double %10)
ret void
}
unsigned int max(unsigned int a, unsigned int b) { return a > b ? a : b; }


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

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

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int ss_leb128size(uint64_t value) {
  int size = 0;
  do {
    value >>= 7;
    size++;
  } while (value != 0);
  return size;
}


x86 assembly (clang, -O0):
<ss_leb128size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x7,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    110e <ss_leb128size+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss_leb128size>:
xor    %eax,%eax
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sar    $0x7,%ecx
add    $0x1,%eax
cmp    $0x7f,%edi
mov    %ecx,%edi
ja     1110 <ss_leb128size+0x10>
ret

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

LLVM IR (-O2):
define i32 @ss_leb128size(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %5, %2 ]
%4 = phi i32 [ 0, %1 ], [ %6, %2 ]
%5 = ashr i32 %3, 7
%6 = add nuw nsw i32 %4, 1
%7 = icmp ult i32 %3, 128
br i1 %7, label %8, label %2
8: ; preds = %2
ret i32 %6
}
int fun1182() { return 1182; }


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

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

LLVM IR (-O0):
define i32 @fun1182() {
ret i32 1182
}

LLVM IR (-O2):
define i32 @fun1182() {
ret i32 1182
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int fn_iv(void) {
  abort();
  return 0;
}


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

x86 assembly (clang, -O2):
<fn_iv>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @fn_iv() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @fn_iv() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int isprint(int c __attribute__((__unused__))) { abort(); }


x86 assembly (clang, -O0):
<isprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<isprint>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @isprint(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
void aes_gen_tables(void) {}


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

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

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

LLVM IR (-O2):
define void @aes_gen_tables() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  printf("int type is %hd bytes\n", sizeof(int));
  printf("char type is %hd bytes\n", sizeof(char));
  char test = 'ABCD';
  char test1 = 'ABCDE';
  printf("test is %c\n", test);
  printf("test1 is %c\n", test1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
movb   $0x44,-0x5(%rbp)
movb   $0x45,-0x6(%rbp)
lea    0xedf(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
movsbl -0x6(%rbp),%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
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x44,%esi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x45,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"int type is %hd bytes\0A\00"
@.str.1 = [24 x i8] c"char type is %hd bytes\0A\00"
@.str.2 = [12 x i8] c"test is %c\0A\00"
@.str.3 = [13 x i8] c"test1 is %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 signext 4)
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8 signext 1)
store i8 68, i8* %2
store i8 69, i8* %3
%6 = load i8, i8* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8 signext %6)
%8 = load i8, i8* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8 signext %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"int type is %hd bytes\0A\00"
@.str.1 = [24 x i8] c"char type is %hd bytes\0A\00"
@.str.2 = [12 x i8] c"test is %c\0A\00"
@.str.3 = [13 x i8] c"test1 is %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 signext 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8 signext 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8 signext 68)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8 signext 69)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void error(char *message) {
  perror(message);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void Crash() {
  char *p = (char *)0;
  *p = 'c';
}


x86 assembly (clang, -O0):
<Crash>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x63,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @Crash() {
%1 = alloca i8*
store i8* null, i8** %1
%2 = load i8*, i8** %1
store i8 99, i8* %2
ret void
}

LLVM IR (-O2):
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t getFlashSizeKB(void) { return *((uint16_t *)0x1FFFF7E0); }


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

x86 assembly (clang, -O2):
<getFlashSizeKB>:
mov    0x1ffff7e0,%eax
ret

LLVM IR (-O0):
define i32 @getFlashSizeKB() {
%1 = load i32, i32* inttoptr (i64 536868832 to i32*)
ret i32 %1
}

LLVM IR (-O2):
define i32 @getFlashSizeKB() {
%1 = load i32, i32* inttoptr (i64 536868832 to i32*)
ret i32 %1
}