xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int);
pid_t getppid(void) { return syscall(64); }


x86 assembly (clang, -O0):
<getppid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40,%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getppid>:
mov    $0x40,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @getppid() {
%1 = call i32 @syscall(i32 64)
ret i32 %1
}

LLVM IR (-O2):
define i32 @getppid() {
%1 = tail call i32 @syscall(i32 64)
ret i32 %1
}
void ff_hevc_put_hevc_bi_epel_hv4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv4_12_sse4() {
ret void
}
/* Variables and functions */
scalar_t__ EINTR;
int /*<<< orphan*/ assert(int);
int close(int);
scalar_t__ errno;
int close_nointr(int fd) {
  assert(fd >= 0);
  for (;;) {
    int r;
    if ((r = close(fd)) >= 0)
      return r;
    if (errno != EINTR)
      return r;
  }
}


x86 assembly (clang, -O0):
<close_nointr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jl     115b <close_nointr+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1185 <close_nointr+0x65>
mov    0x2e7e(%rip),%rax
mov    (%rax),%rax
mov    0x2e6c(%rip),%rcx
cmp    (%rcx),%rax
je     1180 <close_nointr+0x60>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1185 <close_nointr+0x65>
jmp    113c <close_nointr+0x1c>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_nointr>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
not    %edi
shr    $0x1f,%edi
call   1040 <assert@plt>
mov    0x2ea8(%rip),%r14
mov    0x2e99(%rip),%r15
nop
mov    %ebx,%edi
call   1030 <close@plt>
test   %eax,%eax
jns    1153 <close_nointr+0x33>
mov    (%r14),%rcx
cmp    (%r15),%rcx
je     1140 <close_nointr+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @close_nointr(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
br label %9
9: ; preds = %21, %1
%10 = load i32, i32* %3
%11 = call i32 @close(i32 %10)
store i32 %11, i32* %4
%12 = icmp sge i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %22
15: ; preds = %9
%16 = load i64, i64* @errno
%17 = load i64, i64* @EINTR
%18 = icmp ne i64 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load i32, i32* %4
store i32 %20, i32* %2
br label %22
21: ; preds = %15
br label %9
22: ; preds = %19, %13
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @close_nointr(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
%4 = tail call i32 @assert(i32 %3)
br label %5
5: ; preds = %8, %1
%6 = tail call i32 @close(i32 %0)
%7 = icmp sgt i32 %6, -1
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = load i64, i64* @errno
%10 = load i64, i64* @EINTR
%11 = icmp eq i64 %9, %10
br i1 %11, label %5, label %12
12: ; preds = %5, %8
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ vMemFreeToCheckPoint(void *, int /*<<< orphan*/);
void vMemClear(void *vpCtx) { vMemFreeToCheckPoint(vpCtx, 0); }


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

x86 assembly (clang, -O2):
<vMemClear>:
xor    %esi,%esi
jmp    1030 <vMemFreeToCheckPoint@plt>

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

LLVM IR (-O2):
define void @vMemClear(i8* %0) {
%2 = tail call i32 @vMemFreeToCheckPoint(i8* %0, i32 0)
ret void
}
/* Variables and functions */
int japi_radiogroup(int);
int j_radiogroup(int arg0) { return (japi_radiogroup(arg0)); }


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

x86 assembly (clang, -O2):
<j_radiogroup>:
jmp    1030 <japi_radiogroup@plt>

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

LLVM IR (-O2):
define i32 @j_radiogroup(i32 %0) {
%2 = tail call i32 @japi_radiogroup(i32 %0)
ret i32 %2
}
xfree(s) register char *s;
{ freecell((char *)s); }


x86 assembly (clang, -O0):
<xfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <freecell@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xfree(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @freecell to i32 (i8*, ...)*)(i8* %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @xfree(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @freecell to i32 (i8*, ...)*)(i8* %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("We are in Linux\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [16 x i8] c"We are in Linux\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void build_node_error(char *message, char *definition) {
  fprintf(stderr, "build_node error: %s\n%s\n", message, definition);
  exit(1);
}


x86 assembly (clang, -O0):
<build_node_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<build_node_error>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"build_node error: %s\0A%s\0A\00"
define void @build_node_error(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"build_node error: %s\0A%s\0A\00"
define void @build_node_error(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 @exit(i32 1)
unreachable
}
unsigned int log2above(unsigned int v) {
  unsigned int l;
  unsigned int r;
  for (l = 0, r = 0; (v >> 1); ++l, v >>= 1)
    r |= (v & 1);
  return l + r;
}


x86 assembly (clang, -O0):
<log2above>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
cmp    $0x0,%eax
je     1147 <log2above+0x47>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1115 <log2above+0x15>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2above>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     1125 <log2above+0x25>
xor    %eax,%eax
xor    %ecx,%ecx
mov    %edi,%edx
nopl   (%rax)
shr    %edx
mov    %edi,%esi
and    $0x1,%esi
or     %esi,%eax
add    $0x1,%ecx
cmp    $0x3,%edi
mov    %edx,%edi
ja     1110 <log2above+0x10>
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @log2above(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ 0, %1 ]
%5 = phi i32 [ %10, %3 ], [ 0, %1 ]
%6 = phi i32 [ %7, %3 ], [ %0, %1 ]
%7 = lshr i32 %6, 1
%8 = and i32 %6, 1
%9 = or i32 %4, %8
%10 = add nuw nsw i32 %5, 1
%11 = icmp ult i32 %6, 4
br i1 %11, label %12, label %3
12: ; preds = %3
%13 = add i32 %9, %10
br label %14
14: ; preds = %12, %1
%15 = phi i32 [ %13, %12 ], [ 0, %1 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ run_test1();
int main() {
  run_test1();
  printf("All tests passed successfully.\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [31 x i8] c"All tests passed successfully.\00"
define i32 @main() {
%1 = tail call i32 (...) @run_test1()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int fpxx(void) { return 5; }


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

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

LLVM IR (-O0):
define i32 @fpxx() {
ret i32 5
}

LLVM IR (-O2):
define i32 @fpxx() {
ret i32 5
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int override_redirect;
};
struct TYPE_4__ {
  TYPE_1__ xconfigure;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xconfigure_override_redirect(void *_p, int _v) {
  ((XEvent *)_p)->xconfigure.override_redirect = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xconfigure_override_redirect>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xconfigure_override_redirect(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xconfigure_override_redirect(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
int CLAMP(int, int, int);
char *_ultoa_internal(unsigned long, char *, int /*<<< orphan*/);
char *ultoa(unsigned long value, char *str, int base) {
  base = CLAMP(base, 2, 32);
  return _ultoa_internal(value, str, (uint)base);
}


x86 assembly (clang, -O0):
<ultoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x2,%esi
mov    $0x20,%edx
call   1040 <CLAMP@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <_ultoa_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ultoa>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %edx,%edi
mov    $0x2,%esi
mov    $0x20,%edx
call   1040 <CLAMP@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <_ultoa_internal@plt>

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

LLVM IR (-O2):
define i8* @ultoa(i64 %0, i8* %1, i32 %2) {
%4 = tail call i32 @CLAMP(i32 %2, i32 2, i32 32)
%5 = tail call i8* @_ultoa_internal(i64 %0, i8* %1, i32 %4)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  time_t date;
  time(&date);
  printf("Date: %s", ctime(&date));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <time@plt>
lea    -0x8(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1030 <ctime@plt>
lea    0xeaf(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"Date: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call i8* @ctime(i32* %1)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
int smc_inb(unsigned int addr) {
  register unsigned short w;
  w = *((volatile unsigned short *)(addr & ~0x1));
  return (((addr & 0x1) ? w : (w >> 8)) & 0xff);
}


x86 assembly (clang, -O0):
<smc_inb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffffe,%eax
mov    %eax,%eax
mov    (%rax),%ax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1131 <smc_inb+0x31>
movzwl -0x6(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    113b <smc_inb+0x3b>
movzwl -0x6(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smc_inb>:
mov    %edi,%eax
and    $0xfffffffe,%eax
movzwl (%rax),%eax
mov    %eax,%ecx
shr    $0x8,%ecx
test   $0x1,%dil
cmovne %eax,%ecx
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @smc_inb(i32 %0) {
%2 = alloca i32
%3 = alloca i16
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, -2
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i16*
%8 = load volatile i16, i16* %7
store i16 %8, i16* %3
%9 = load i32, i32* %2
%10 = and i32 %9, 1
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i16, i16* %3
%14 = zext i16 %13 to i32
br label %19
15: ; preds = %1
%16 = load i16, i16* %3
%17 = zext i16 %16 to i32
%18 = ashr i32 %17, 8
br label %19
19: ; preds = %15, %12
%20 = phi i32 [ %14, %12 ], [ %18, %15 ]
%21 = and i32 %20, 255
ret i32 %21
}

LLVM IR (-O2):
define i32 @smc_inb(i32 %0) {
%2 = and i32 %0, -2
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i16*
%5 = load volatile i16, i16* %4
%6 = and i32 %0, 1
%7 = icmp eq i32 %6, 0
%8 = zext i16 %5 to i32
%9 = lshr i32 %8, 8
%10 = select i1 %7, i32 %9, i32 %8
%11 = and i32 %10, 255
ret i32 %11
}
/* Type definitions */
struct timeval {
  int /*<<< orphan*/ tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int show_time() {
  struct timeval t;
  gettimeofday(&t, NULL);
  printf("%ld.%06ld", t.tv_sec, t.tv_usec);
  return 0;
}


x86 assembly (clang, -O0):
<show_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_time>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    (%rsp),%edx
mov    0x4(%rsp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@.str = [10 x i8] c"%ld.%06ld\00"
define i32 @show_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@.str = [10 x i8] c"%ld.%06ld\00"
define i32 @show_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
int pi(int);
int /*<<< orphan*/ printf(char *, double);
int main() {
  clock_t start, end;
  start = clock();
  printf("%d\n", pi(100000000));
  end = clock();
  printf("%f\n", (double)(end - start) / CLOCKS_PER_SEC);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x8(%rbp)
mov    $0x5f5e100,%edi
call   1050 <pi@plt>
cvtsi2sd %eax,%xmm0
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2e6c(%rip),%rax
divsd  (%rax),%xmm0
lea    0xe7d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <clock@plt>
mov    %rax,%rbx
mov    $0x5f5e100,%edi
call   1050 <pi@plt>
cvtsi2sd %eax,%xmm0
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <clock@plt>
sub    %rbx,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    0x2e7a(%rip),%rax
divsd  (%rax),%xmm0
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = call i64 (...) @clock()
store i64 %3, i64* %1
%4 = call i32 @pi(i32 100000000)
%5 = sitofp i32 %4 to double
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %5)
%7 = call i64 (...) @clock()
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = load i64, i64* %1
%10 = sub nsw i64 %8, %9
%11 = sitofp i64 %10 to double
%12 = load double, double* @CLOCKS_PER_SEC
%13 = fdiv double %11, %12
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
define i32 @main() {
%1 = tail call i64 (...) @clock()
%2 = tail call i32 @pi(i32 100000000)
%3 = sitofp i32 %2 to double
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
%5 = tail call i64 (...) @clock()
%6 = sub nsw i64 %5, %1
%7 = sitofp i64 %6 to double
%8 = load double, double* @CLOCKS_PER_SEC
%9 = fdiv double %7, %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %9)
ret i32 0
}
void sort_colors_swap(int *p1, int *p2) {
  int temp = *p1;
  *p1 = *p2;
  *p2 = temp;
}


x86 assembly (clang, -O0):
<sort_colors_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @sort_colors_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int scanf(char *, int *);
int solve(int);
int main() {
  int n = 0, res = 0;
  res = scanf("%d", &n);
  printf("%d", solve(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <solve@plt>
mov    %eax,%esi
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xebc(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1030 <solve@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @solve(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int power(int, int);
int /*<<< orphan*/ printf(char *, int);
void main(void) {
  int a = 2, b = 8;
  printf("2 power 8 is: %d\n", power(a, b));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <power@plt>
mov    %eax,%esi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x8,%esi
call   1030 <power@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"2 power 8 is: %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 2, i32* %1
store i32 8, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 @power(i32 %3, i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"2 power 8 is: %d\0A\00"
define void @main() {
%1 = tail call i32 @power(i32 2, i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void I400ToARGBRow_SSE2() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @I400ToARGBRow_SSE2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int quit_db() {
  printf("Exiting from Employee Database......\n\n");
  system("clear");
  exit(0);
}


x86 assembly (clang, -O0):
<quit_db>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<quit_db>:
push   %rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
call   1040 <system@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Exiting from Employee Database......\0A\0A\00"
@.str.1 = [6 x i8] c"clear\00"
define i32 @quit_db() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"clear\00"
@str = [38 x i8] c"Exiting from Employee Database......\0A\00"
define i32 @quit_db() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
size_t get_max_mac_limit(void) { return 128; }


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

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

LLVM IR (-O0):
define i64 @get_max_mac_limit() {
ret i64 128
}

LLVM IR (-O2):
define i64 @get_max_mac_limit() {
ret i64 128
}
int greatest_common_divisor(int a, int b) {
  int l, s;
  int mod;
  if (a > b) {
    l = a;
    s = b;
  } else {
    l = b;
    s = a;
  }
  mod = l % s;
  if (mod == 0)
    return s;
  return greatest_common_divisor(mod, s);
}


x86 assembly (clang, -O0):
<greatest_common_divisor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    113b <greatest_common_divisor+0x2b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <greatest_common_divisor+0x37>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1166 <greatest_common_divisor+0x56>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <greatest_common_divisor+0x64>
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <greatest_common_divisor@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<greatest_common_divisor>:
mov    %edi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %esi,%eax
cmp    %esi,%edx
mov    %edx,%esi
cmovg  %eax,%esi
cmovg  %edx,%eax
cltd
idiv   %esi
test   %edx,%edx
jne    1110 <greatest_common_divisor+0x10>
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @greatest_common_divisor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %4
store i32 %13, i32* %6
%14 = load i32, i32* %5
store i32 %14, i32* %7
br label %18
15: ; preds = %2
%16 = load i32, i32* %5
store i32 %16, i32* %6
%17 = load i32, i32* %4
store i32 %17, i32* %7
br label %18
18: ; preds = %15, %12
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = srem i32 %19, %20
store i32 %21, i32* %8
%22 = load i32, i32* %8
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %18
%25 = load i32, i32* %7
store i32 %25, i32* %3
br label %30
26: ; preds = %18
%27 = load i32, i32* %8
%28 = load i32, i32* %7
%29 = call i32 @greatest_common_divisor(i32 %27, i32 %28)
store i32 %29, i32* %3
br label %30
30: ; preds = %26, %24
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @greatest_common_divisor(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %9, %3 ]
%5 = phi i32 [ %1, %2 ], [ %8, %3 ]
%6 = icmp sgt i32 %4, %5
%7 = select i1 %6, i32 %4, i32 %5
%8 = select i1 %6, i32 %5, i32 %4
%9 = srem i32 %7, %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3
ret i32 %8
}
int validaEntrada(int n) {
  if (n > 0 && n < 1000) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<validaEntrada>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    112a <validaEntrada+0x2a>
cmpl   $0x3e8,-0x8(%rbp)
jge    112a <validaEntrada+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <validaEntrada+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<validaEntrada>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x3e7,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @validaEntrada(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 999
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ flexerror(char *);
int /*<<< orphan*/ sprintf(char *, char const *, int);
void lerrif(const char *msg, int arg) {
  char errmsg[2048];
  (void)sprintf(errmsg, msg, arg);
  flexerror(errmsg);
}


x86 assembly (clang, -O0):
<lerrif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x810(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <sprintf@plt>
lea    -0x810(%rbp),%rdi
call   1030 <flexerror@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lerrif>:
push   %rbx
sub    $0x800,%rsp
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <flexerror@plt>
add    $0x800,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @lerrif(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [2048 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @sprintf(i8* %6, i8* %7, i32 %8)
%10 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%11 = call i32 @flexerror(i8* %10)
ret void
}

LLVM IR (-O2):
define void @lerrif(i8* nocapture %0, i32 %1) {
%3 = alloca [2048 x i8]
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) %0, i32 %1)
%6 = call i32 @flexerror(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TransformAlarmC__0__AlarmFrom__stop();
void TransformAlarmC__0__Alarm__stop(void) {
  TransformAlarmC__0__AlarmFrom__stop();
}


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

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

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

LLVM IR (-O2):
define void @TransformAlarmC__0__Alarm__stop() {
%1 = tail call i32 (...) @TransformAlarmC__0__AlarmFrom__stop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closetty(int fd) {
  close(fd);
  return;
}


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

x86 assembly (clang, -O2):
<closetty>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @closetty(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Type definitions */
struct stopwatch {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct stopwatch *);
void free_sw(struct stopwatch *sw) { free(sw); }


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

x86 assembly (clang, -O2):
<free_sw>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.stopwatch = type { i32 }
define void @free_sw(%struct.stopwatch* nocapture %0) {
%2 = tail call i32 @free(%struct.stopwatch* %0)
ret void
}
char **XGetFontPath() {}


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

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

LLVM IR (-O0):
define i8** @XGetFontPath() {
%1 = alloca i8**
%2 = load i8**, i8*** %1
ret i8** %2
}

LLVM IR (-O2):
define noalias i8** @XGetFontPath() {
ret i8** undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int x = -2;
  printf("Hello CLLL\n");
  return x;
}


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"Hello CLLL\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 -2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
void *calloc(unsigned int, unsigned int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_error(char *, unsigned int);
void *chk_calloc(unsigned n, unsigned size) {
  void *p;
  p = calloc(n, size);
  if (p == 0) {
    print_error(
        "chk_calloc: Ran out of memory (while trying to allocate %d bytes)\n",
        n * size);
    exit(EXIT_FAILURE);
  }
  return p;
}


x86 assembly (clang, -O0):
<chk_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1179 <chk_calloc+0x49>
mov    -0x4(%rbp),%esi
imul   -0x8(%rbp),%esi
lea    0xe9a(%rip),%rdi
call   1030 <print_error@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chk_calloc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <calloc@plt>
test   %rax,%rax
je     1148 <chk_calloc+0x18>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
imul   %ebp,%ebx
lea    0xeae(%rip),%rdi
mov    %ebx,%esi
call   1030 <print_error@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"chk_calloc: Ran out of memory (while trying to allocate %d bytes)\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @chk_calloc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i8* @calloc(i32 %6, i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = mul i32 %12, %13
%15 = call i32 @print_error(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %2
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
@.str = [67 x i8] c"chk_calloc: Ran out of memory (while trying to allocate %d bytes)\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @chk_calloc(i32 %0, i32 %1) {
%3 = tail call i8* @calloc(i32 %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = mul i32 %1, %0
%7 = tail call i32 @print_error(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
ret i8* %3
}
void ffsnd_noop(char *s, ...) {}


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

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

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

LLVM IR (-O2):
define void @ffsnd_noop(i8* nocapture %0, ...) {
ret void
}
/* Type definitions */
struct SVGParser {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ quadBezRec(struct SVGParser *, float, float, float, float,
                              float, float, int /*<<< orphan*/);
int /*<<< orphan*/ svgPathPoint(struct SVGParser *, float, float);
void quadBez(struct SVGParser *p, float x1, float y1, float cx, float cy,
             float x2, float y2) {
  quadBezRec(p, x1, y1, cx, cy, x2, y2, 0);
  svgPathPoint(p, x2, y2);
}


x86 assembly (clang, -O0):
<quadBez>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
movss  %xmm4,-0x1c(%rbp)
movss  %xmm5,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm3
movss  -0x1c(%rbp),%xmm4
movss  -0x20(%rbp),%xmm5
xor    %esi,%esi
call   1040 <quadBezRec@plt>
mov    -0x8(%rbp),%rdi
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
call   1030 <svgPathPoint@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadBez>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm5,0xc(%rsp)
movss  %xmm4,0x8(%rsp)
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <quadBezRec@plt>
mov    %rbx,%rdi
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
add    $0x10,%rsp
pop    %rbx
jmp    1030 <svgPathPoint@plt>

LLVM IR (-O0):
%struct.SVGParser = type { i32 }
define void @quadBez(%struct.SVGParser* %0, float %1, float %2, float %3, float %4, float %5, float %6) {
%8 = alloca %struct.SVGParser*
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
store %struct.SVGParser* %0, %struct.SVGParser** %8
store float %1, float* %9
store float %2, float* %10
store float %3, float* %11
store float %4, float* %12
store float %5, float* %13
store float %6, float* %14
%15 = load %struct.SVGParser*, %struct.SVGParser** %8
%16 = load float, float* %9
%17 = load float, float* %10
%18 = load float, float* %11
%19 = load float, float* %12
%20 = load float, float* %13
%21 = load float, float* %14
%22 = call i32 @quadBezRec(%struct.SVGParser* %15, float %16, float %17, float %18, float %19, float %20, float %21, i32 0)
%23 = load %struct.SVGParser*, %struct.SVGParser** %8
%24 = load float, float* %13
%25 = load float, float* %14
%26 = call i32 @svgPathPoint(%struct.SVGParser* %23, float %24, float %25)
ret void
}

LLVM IR (-O2):
%struct.SVGParser = type { i32 }
define void @quadBez(%struct.SVGParser* %0, float %1, float %2, float %3, float %4, float %5, float %6) {
%8 = tail call i32 @quadBezRec(%struct.SVGParser* %0, float %1, float %2, float %3, float %4, float %5, float %6, i32 0)
%9 = tail call i32 @svgPathPoint(%struct.SVGParser* %0, float %5, float %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
void dump(int n) {
  int a, b, c;
  while (n--)
    scanf("%d %d %d", &a, &b, &c);
}


x86 assembly (clang, -O0):
<dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     114c <dump+0x3c>
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1030 <scanf@plt>
jmp    111b <dump+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
test   %edi,%edi
je     1156 <dump+0x46>
mov    %edi,%ebx
lea    0xed6(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
lea    0x4(%rsp),%r13
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
call   1030 <scanf@plt>
add    $0xffffffff,%ebx
jne    1140 <dump+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
define void @dump(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = icmp eq i32 %0, 0
br i1 %8, label %14, label %9
9: ; preds = %1, %9
%10 = phi i32 [ %11, %9 ], [ %0, %1 ]
%11 = add nsw i32 %10, -1
%12 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%13 = icmp eq i32 %11, 0
br i1 %13, label %14, label %9
14: ; preds = %9, %1
ret void
}
void check_logfs_obj_alias(void) { ; }


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

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

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

LLVM IR (-O2):
define void @check_logfs_obj_alias() {
ret void
}
int _isalpha(int c) {
  if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     111b <_isalpha+0x1b>
cmpl   $0x7a,-0x8(%rbp)
jle    112f <_isalpha+0x2f>
cmpl   $0x41,-0x8(%rbp)
jl     113b <_isalpha+0x3b>
cmpl   $0x5a,-0x8(%rbp)
jg     113b <_isalpha+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <_isalpha+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @_isalpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %15, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 65
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 90
br i1 %14, label %15, label %16
15: ; preds = %12, %6
store i32 1, i32* %2
br label %17
16: ; preds = %12, %9
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
int pe_parser_fatal_error(struct pe_parser *p) { return -2; }


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

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

LLVM IR (-O0):
%struct.pe_parser = type opaque
define i32 @pe_parser_fatal_error(%struct.pe_parser* %0) {
%2 = alloca %struct.pe_parser*
store %struct.pe_parser* %0, %struct.pe_parser** %2
ret i32 -2
}

LLVM IR (-O2):
%struct.pe_parser = type opaque
define i32 @pe_parser_fatal_error(%struct.pe_parser* nocapture readnone %0) {
ret i32 -2
}