xunge/DecIR huggingface dataset:
int FBTest_RunTest() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @FBTest_RunTest() {
ret i32 0
}
int ValArrayDefaultCompareFn(const void *pleft, const void *pright) {
  const short *left = pleft, *right = pright;
  return *left < *right ? -1 : (*left > *right ? 1 : 0);
}


x86 assembly (clang, -O0):
<ValArrayDefaultCompareFn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
mov    -0x20(%rbp),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jge    113f <ValArrayDefaultCompareFn+0x3f>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    115c <ValArrayDefaultCompareFn+0x5c>
mov    -0x18(%rbp),%rax
movswl (%rax),%edx
mov    -0x20(%rbp),%rax
movswl (%rax),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovg  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ValArrayDefaultCompareFn>:
movzwl (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%ax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ValArrayDefaultCompareFn(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i16*
%6 = alloca i16*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i16*
store i16* %8, i16** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i16*
store i16* %10, i16** %6
%11 = load i16*, i16** %5
%12 = load i16, i16* %11
%13 = sext i16 %12 to i32
%14 = load i16*, i16** %6
%15 = load i16, i16* %14
%16 = sext i16 %15 to i32
%17 = icmp slt i32 %13, %16
br i1 %17, label %18, label %19
18: ; preds = %2
br label %29
19: ; preds = %2
%20 = load i16*, i16** %5
%21 = load i16, i16* %20
%22 = sext i16 %21 to i32
%23 = load i16*, i16** %6
%24 = load i16, i16* %23
%25 = sext i16 %24 to i32
%26 = icmp sgt i32 %22, %25
%27 = zext i1 %26 to i64
%28 = select i1 %26, i32 1, i32 0
br label %29
29: ; preds = %19, %18
%30 = phi i32 [ -1, %18 ], [ %28, %19 ]
ret i32 %30
}

LLVM IR (-O2):
define i32 @ValArrayDefaultCompareFn(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i16*
%4 = bitcast i8* %1 to i16*
%5 = load i16, i16* %3
%6 = load i16, i16* %4
%7 = icmp slt i16 %5, %6
%8 = icmp sgt i16 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void g_io_channel_read_line_string() {}


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

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

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

LLVM IR (-O2):
define void @g_io_channel_read_line_string() {
ret void
}
int create_signal_code(int sig, int ret) {
  return ((sig & 0x7F) | (((int)(unsigned char)ret) << 8));
}


x86 assembly (clang, -O0):
<create_signal_code>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7f,%eax
mov    -0x8(%rbp),%ecx
movzbl %cl,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_signal_code>:
and    $0x7f,%edi
shl    $0x8,%esi
movzwl %si,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @create_signal_code(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 = and i32 %5, 127
%7 = load i32, i32* %4
%8 = trunc i32 %7 to i8
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = or i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @create_signal_code(i32 %0, i32 %1) {
%3 = and i32 %0, 127
%4 = shl i32 %1, 8
%5 = and i32 %4, 65280
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ frbob(int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basFrBob() {
  int n;
  n = popNumber();
  pushNumber(frbob(n));
}


x86 assembly (clang, -O0):
<basFrBob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <frbob@plt>
mov    %eax,%edi
call   1030 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basFrBob>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1040 <frbob@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <pushNumber@plt>

LLVM IR (-O0):
define void @basFrBob() {
%1 = alloca i32
%2 = call i32 (...) @popNumber()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @frbob(i32 %3)
%5 = call i32 @pushNumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @basFrBob() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @frbob(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ freeGrid(short **);
void freeGlobalDynamicGrid(short ***grid) {
  if (*grid) {
    freeGrid(*grid);
    *grid = NULL;
  }
}


x86 assembly (clang, -O0):
<freeGlobalDynamicGrid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <freeGlobalDynamicGrid+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <freeGrid@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeGlobalDynamicGrid>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <freeGlobalDynamicGrid+0x18>
call   1030 <freeGrid@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @freeGlobalDynamicGrid(i16*** nocapture %0) {
%2 = load i16**, i16*** %0
%3 = icmp eq i16** %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @freeGrid(i16** %2)
store i16** null, i16*** %0
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr,
                "usage: env [-iv] [-P utilpath] [-S string] [-u name]\n"
                "           [name=value ...] [utility [argument ...]]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [107 x i8] c"usage: env [-iv] [-P utilpath] [-S string] [-u name]\0A [name=value ...] [utility [argument ...]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [107 x i8] c"usage: env [-iv] [-P utilpath] [-S string] [-u name]\0A [name=value ...] [utility [argument ...]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void sn_grs_mark_resources_as_registered(struct nsdl_s *handle) {}


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

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

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

LLVM IR (-O2):
%struct.nsdl_s = type opaque
define void @sn_grs_mark_resources_as_registered(%struct.nsdl_s* nocapture %0) {
ret void
}
unsigned int ft_collatz_conjecture(unsigned int base) {
  if (base % 2 == 0)
    return (ft_collatz_conjecture(base / 2));
  else
    return (ft_collatz_conjecture(base * 3 + 1));
}


x86 assembly (clang, -O0):
<ft_collatz_conjecture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    113d <ft_collatz_conjecture+0x2d>
mov    -0x8(%rbp),%edi
shr    $0x1,%edi
call   1030 <ft_collatz_conjecture@plt>
mov    %eax,-0x4(%rbp)
jmp    114c <ft_collatz_conjecture+0x3c>
imul   $0x3,-0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <ft_collatz_conjecture@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ft_collatz_conjecture(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = urem i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = udiv i32 %8, 2
%10 = call i32 @ft_collatz_conjecture(i32 %9)
store i32 %10, i32* %2
br label %16
11: ; preds = %1
%12 = load i32, i32* %3
%13 = mul i32 %12, 3
%14 = add i32 %13, 1
%15 = call i32 @ft_collatz_conjecture(i32 %14)
store i32 %15, i32* %2
br label %16
16: ; preds = %11, %7
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @ft_collatz_conjecture(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
short _pico_big_short(short src) {
  return ((src & 0xFF00) >> 8) | ((src & 0x00FF) << 8);
}


x86 assembly (clang, -O0):
<_pico_big_short>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
movswl -0x2(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<_pico_big_short>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define signext i16 @_pico_big_short(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 65280
%6 = ashr i32 %5, 8
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = and i32 %8, 255
%10 = shl i32 %9, 8
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @_pico_big_short(i16 signext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
int dummy_parse_dns() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dummy_parse_dns() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x27() {
  Assert_real((isascii(39)),
              "/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_isascii.c",
              200, ("isascii should be 1 for '"));
}


x86 assembly (clang, -O0):
<t_isascii_0x27>:
push   %rbp
mov    %rsp,%rbp
mov    $0x27,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xc8,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x27>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xc8,%edx
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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for '\00"
define void @t_isascii_0x27() {
%1 = call i32 @isascii(i32 39)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 200, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for '\00"
define void @t_isascii_0x27() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 200, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ctache_array {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ctache_array *);
void ctache_array_destroy(void *data) {
  struct ctache_array *array = (struct ctache_array *)(data);
  free(array);
}


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

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

LLVM IR (-O0):
%struct.ctache_array = type { i32 }
define void @ctache_array_destroy(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.ctache_array*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.ctache_array*
store %struct.ctache_array* %5, %struct.ctache_array** %3
%6 = load %struct.ctache_array*, %struct.ctache_array** %3
%7 = call i32 @free(%struct.ctache_array* %6)
ret void
}

LLVM IR (-O2):
%struct.ctache_array = type { i32 }
define void @ctache_array_destroy(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.ctache_array*
%3 = tail call i32 @free(%struct.ctache_array* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void mod_websocket_disconnect(int fd) { close(fd); }


x86 assembly (clang, -O0):
<mod_websocket_disconnect>:
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):
<mod_websocket_disconnect>:
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @mod_websocket_disconnect(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 @mod_websocket_disconnect(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump_stuff(void *, unsigned int);
int /*<<< orphan*/ printf(char *, char *);
void dump_stuff_msg(const void *msg, void *x, unsigned int size) {
  printf("%s : ", (char *)msg);
  dump_stuff(x, size);
}


x86 assembly (clang, -O0):
<dump_stuff_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <dump_stuff@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_stuff_msg>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <dump_stuff@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s : \00"
define void @dump_stuff_msg(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @dump_stuff(i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s : \00"
define void @dump_stuff_msg(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @dump_stuff(i8* %1, i32 %2)
ret void
}
short int cast_uchar_short(unsigned char x) { return (short int)x; }


x86 assembly (clang, -O0):
<cast_uchar_short>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cwtl
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @cast_uchar_short(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i16
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @cast_uchar_short(i8 zeroext %0) {
%2 = zext i8 %0 to i16
ret i16 %2
}
int fibs(int n) {
  if (n < 2) {
    return n;
  }
  return fibs(n - 2) + fibs(n - 1);
}


x86 assembly (clang, -O0):
<fibs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1130 <fibs+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fibs+0x43>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibs@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibs@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibs>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jl     1147 <fibs+0x37>
add    $0x1,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x3(%rbx),%edi
call   1030 <fibs@plt>
add    %eax,%ebp
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
ja     1130 <fibs+0x20>
mov    $0x1,%ebx
add    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fibs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 2
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* %3
store i32 %7, i32* %2
br label %16
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 2
%11 = call i32 @fibs(i32 %10)
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = call i32 @fibs(i32 %13)
%15 = add nsw i32 %11, %14
store i32 %15, i32* %2
br label %16
16: ; preds = %8, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @fibs(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -2
%7 = tail call i32 @fibs(i32 %6)
%8 = add nsw i32 %4, -1
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 3
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ 1, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
/* Type definitions */
struct __va_list_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct __va_list_struct *);
void __va_end(struct __va_list_struct *ap) { free(ap); }


x86 assembly (clang, -O0):
<__va_end>:
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):
<__va_end>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.__va_list_struct = type { i32 }
define void @__va_end(%struct.__va_list_struct* nocapture %0) {
%2 = tail call i32 @free(%struct.__va_list_struct* %0)
ret void
}
void RTAvloHCPhysInsert(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvloHCPhysInsert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
void *fun(void *temp) {
  sleep(*(int *)temp);
  printf("%d\n", *(int *)temp);
  return 0;
}


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

x86 assembly (clang, -O2):
<fun>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1040 <sleep@plt>
mov    (%rbx),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i8* @fun(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @sleep(i32 %5)
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i8* null
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define noalias i8* @fun(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @sleep(i32 %3)
%5 = load i32, i32* %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i8* null
}
int test_imm_F5uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xF5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F5uint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xf5,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F5uint64_lowword_reg>:
test   $0xf5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F5uint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 245
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_F5uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 245
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ GetProcessHeap();
int /*<<< orphan*/ HeapFree(int /*<<< orphan*/, int /*<<< orphan*/, void *);
void free(void *p) {
  HeapFree(GetProcessHeap(), 0, p);
  return;
}


x86 assembly (clang, -O0):
<free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <GetProcessHeap@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <HeapFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <GetProcessHeap@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <HeapFree@plt>

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

LLVM IR (-O2):
define void @free(i8* %0) {
%2 = tail call i32 (...) @GetProcessHeap()
%3 = tail call i32 @HeapFree(i32 %2, i32 0, i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ intmax_t;

/* Variables and functions */
int EXIT_SUCCESS;
scalar_t__ getpid();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(void) {
  printf("pid=%jd\n", (intmax_t)getpid());
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"pid=%jd\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @getpid()
%3 = trunc i64 %2 to i32
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}

LLVM IR (-O2):
@.str = [9 x i8] c"pid=%jd\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void showArgMismatch(const char *name) {
  printf("Argument mismatched!\n");
  printf("Please type \"%s -h\" get the usage!\n", name);
}


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

x86 assembly (clang, -O2):
<showArgMismatch>:
push   %rbx
mov    %rdi,%rbx
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Argument mismatched!\0A\00"
@.str.1 = [36 x i8] c"Please type \22%s -h\22 get the usage!\0A\00"
define void @showArgMismatch(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str.1 = [36 x i8] c"Please type \22%s -h\22 get the usage!\0A\00"
@str = [21 x i8] c"Argument mismatched!\00"
define void @showArgMismatch(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int prompt_consumption(char string[]) {
  int temp_value = 0;
  printf("%s? ", string);
  scanf("%d", &temp_value);
  return temp_value;
}


x86 assembly (clang, -O0):
<prompt_consumption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prompt_consumption>:
push   %rax
mov    %rdi,%rsi
movl   $0x0,0x4(%rsp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s? \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @prompt_consumption(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
ret i32 %6
}
/* Variables and functions */
int fn_sq_ch_40(char const *);
int fn_al_sq_ch_40(const char *text) {
  int pos = 0;
  pos = fn_sq_ch_40(text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_40>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_40@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_40+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_40+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_40>:
jmp    1030 <fn_sq_ch_40@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_40(i8* %0) {
%2 = tail call i32 @fn_sq_ch_40(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ PUT32(int, unsigned int);
void uart_putc(unsigned int c) { PUT32(0x16000000, c); }


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

x86 assembly (clang, -O2):
<uart_putc>:
mov    %edi,%esi
mov    $0x16000000,%edi
jmp    1030 <PUT32@plt>

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

LLVM IR (-O2):
define void @uart_putc(i32 %0) {
%2 = tail call i32 @PUT32(i32 369098752, i32 %0)
ret void
}
/* Variables and functions */
double genrand_int32();
double random_double3(double n) {
  return n * (genrand_int32() / (double)4294967295.0 + 1);
}


x86 assembly (clang, -O0):
<random_double3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <genrand_int32@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xeca(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xeb6(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_double3>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <genrand_int32@plt>
divsd  0xedb(%rip),%xmm0
addsd  0xedb(%rip),%xmm0
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @random_double3(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double (...) @genrand_int32()
%5 = fdiv double %4, 0x41EFFFFFFFE00000
%6 = fadd double %5, 1.000000e+00
%7 = fmul double %3, %6
ret double %7
}

LLVM IR (-O2):
define double @random_double3(double %0) {
%2 = tail call double (...) @genrand_int32()
%3 = fdiv double %2, 0x41EFFFFFFFE00000
%4 = fadd double %3, 1.000000e+00
%5 = fmul double %4, %0
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void fatal(const char *s) {
  fputs(s, stderr);
  fputc('\n', stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%esi
call   1030 <fputs@plt>
mov    (%rbx),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fputc(i8 signext 10, i32 %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputc(i8 signext 10, i32 %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
int within_interval(int currentTime, int min2, int interval) {
  if ((currentTime / interval) * interval < min2)
    if ((1 + currentTime / interval) * interval > min2)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<within_interval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x10(%rbp)
imul   -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1149 <within_interval+0x49>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x10(%rbp)
add    $0x1,%eax
imul   -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1144 <within_interval+0x44>
movl   $0x1,-0x4(%rbp)
jmp    1150 <within_interval+0x50>
jmp    1149 <within_interval+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<within_interval>:
mov    %edx,%ecx
mov    %edi,%eax
cltd
idiv   %ecx
mov    %eax,%edx
imul   %ecx,%edx
cmp    %esi,%edx
jge    111f <within_interval+0x1f>
add    $0x1,%eax
imul   %ecx,%eax
mov    $0x1,%ecx
cmp    %esi,%eax
jg     1121 <within_interval+0x21>
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @within_interval(i32 %0, i32 %1, i32 %2) {
%4 = sdiv i32 %0, %2
%5 = mul nsw i32 %4, %2
%6 = icmp slt i32 %5, %1
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = add nsw i32 %4, 1
%9 = mul nsw i32 %8, %2
%10 = icmp sgt i32 %9, %1
br i1 %10, label %12, label %11
11: ; preds = %7, %3
br label %12
12: ; preds = %7, %11
%13 = phi i32 [ 0, %11 ], [ 1, %7 ]
ret i32 %13
}
int clickplc_exe_EOF_enc(void *obj, unsigned char *stream) {
  int encsize = 4;
  stream[0] = 0xff;
  stream[1] = 0xff;
  stream[2] = 0xff;
  stream[3] = 0xff;
  return (encsize);
}


x86 assembly (clang, -O0):
<clickplc_exe_EOF_enc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movb   $0xff,(%rax)
mov    -0x10(%rbp),%rax
movb   $0xff,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0xff,0x2(%rax)
mov    -0x10(%rbp),%rax
movb   $0xff,0x3(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clickplc_exe_EOF_enc>:
movl   $0xffffffff,(%rsi)
mov    $0x4,%eax
ret

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

LLVM IR (-O2):
define i32 @clickplc_exe_EOF_enc(i8* nocapture readnone %0, i8* nocapture writeonly %1) {
%3 = bitcast i8* %1 to i32*
store i32 -1, i32* %3
ret i32 4
}
/* Type definitions */
struct MP4InputStreamRecord {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct MP4InputStreamRecord *);
void destroy(struct MP4InputStreamRecord *s) { free(s); }


x86 assembly (clang, -O0):
<destroy>:
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):
<destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.MP4InputStreamRecord = type { i32 }
define void @destroy(%struct.MP4InputStreamRecord* nocapture %0) {
%2 = tail call i32 @free(%struct.MP4InputStreamRecord* %0)
ret void
}
/* Type definitions */
struct rsp_addrinfo {
  int dummy;
};

/* Variables and functions */
int rsp_getaddrinfo_tags(unsigned char const *, size_t const,
                         struct rsp_addrinfo **, size_t const,
                         unsigned int const, int /*<<< orphan*/ *);
int rsp_getaddrinfo(const unsigned char *poolHandle,
                    const size_t poolHandleSize,
                    struct rsp_addrinfo **rspAddrInfo, const size_t items,
                    const unsigned int staleCacheValue) {
  return (rsp_getaddrinfo_tags(poolHandle, poolHandleSize, rspAddrInfo, items,
                               staleCacheValue, NULL));
}


x86 assembly (clang, -O0):
<rsp_getaddrinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <rsp_getaddrinfo_tags@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsp_getaddrinfo>:
xor    %r9d,%r9d
jmp    1030 <rsp_getaddrinfo_tags@plt>

LLVM IR (-O0):
%struct.rsp_addrinfo = type { i32 }
define i32 @rsp_getaddrinfo(i8* %0, i64 %1, %struct.rsp_addrinfo** %2, i64 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca %struct.rsp_addrinfo**
%9 = alloca i64
%10 = alloca i32
store i8* %0, i8** %6
store i64 %1, i64* %7
store %struct.rsp_addrinfo** %2, %struct.rsp_addrinfo*** %8
store i64 %3, i64* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i64, i64* %7
%13 = load %struct.rsp_addrinfo**, %struct.rsp_addrinfo*** %8
%14 = load i64, i64* %9
%15 = load i32, i32* %10
%16 = call i32 @rsp_getaddrinfo_tags(i8* %11, i64 %12, %struct.rsp_addrinfo** %13, i64 %14, i32 %15, i32* null)
ret i32 %16
}

LLVM IR (-O2):
%struct.rsp_addrinfo = type { i32 }
define i32 @rsp_getaddrinfo(i8* %0, i64 %1, %struct.rsp_addrinfo** %2, i64 %3, i32 %4) {
%6 = tail call i32 @rsp_getaddrinfo_tags(i8* %0, i64 %1, %struct.rsp_addrinfo** %2, i64 %3, i32 %4, i32* null)
ret i32 %6
}
void do_debug(void *x) {
  do {
    kprintf("Unsupport Now...[%s]\n", __FUNCTION__);
    while (1)
      ;
  } while (0);
  ;
}


x86 assembly (clang, -O0):
<do_debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xeec(%rip),%rsi
mov    $0x0,%al
call   1030 <kprintf@plt>
jmp    1131 <do_debug+0x21>

x86 assembly (clang, -O2):
<do_debug>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef7(%rip),%rsi
xor    %eax,%eax
call   1030 <kprintf@plt>
cs nopw 0x0(%rax,%rax,1)
jmp    1130 <do_debug+0x20>

LLVM IR (-O0):
@.str = [22 x i8] c"Unsupport Now...[%s]\0A\00"
@__FUNCTION__.do_debug = [9 x i8] c"do_debug\00"
define void @do_debug(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.do_debug, i64 0, i64 0))
br label %5
5: ; preds = %3, %5
br label %5
6: ; No predecessors!
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Unsupport Now...[%s]\0A\00"
@__FUNCTION__.do_debug = [9 x i8] c"do_debug\00"
define void @do_debug(i8* nocapture readnone %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.do_debug, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
br label %3
}
void IEEE_Swap__DBL(double *dval) {
  unsigned long long llval;
  (void)memcpy(&llval, dval, sizeof(long long));
  llval = byte_swap_u64(llval);
  (void)memcpy(dval, &llval, sizeof(long long));
}


x86 assembly (clang, -O0):
<IEEE_Swap__DBL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <byte_swap_u64@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IEEE_Swap__DBL>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
xor    %eax,%eax
call   1030 <byte_swap_u64@plt>
cltq
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @IEEE_Swap__DBL(double* %0) {
%2 = alloca double*
%3 = alloca i64
store double* %0, double** %2
%4 = bitcast i64* %3 to i8*
%5 = load double*, double** %2
%6 = bitcast double* %5 to i8*
%7 = load i64, i64* %3
%8 = call i32 (i64, ...) bitcast (i32 (...)* @byte_swap_u64 to i32 (i64, ...)*)(i64 %7)
%9 = sext i32 %8 to i64
store i64 %9, i64* %3
%10 = load double*, double** %2
%11 = bitcast double* %10 to i8*
%12 = bitcast i64* %3 to i8*
ret void
}

LLVM IR (-O2):
define void @IEEE_Swap__DBL(double* nocapture %0) {
%2 = bitcast double* %0 to i64*
%3 = load i64, i64* %2
%4 = tail call i32 (i64, ...) bitcast (i32 (...)* @byte_swap_u64 to i32 (i64, ...)*)(i64 %3)
%5 = sext i32 %4 to i64
store i64 %5, i64* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glutMainLoop();
void OnLoop() { glutMainLoop(); }


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

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

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

LLVM IR (-O2):
define void @OnLoop() {
%1 = tail call i32 (...) @glutMainLoop()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cmd;

/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void signal_producer(int fd) {
  char cmd;
  cmd = 'S';
  write(fd, &cmd, sizeof(cmd));
}


x86 assembly (clang, -O0):
<signal_producer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x53,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_producer>:
push   %rax
movb   $0x53,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @signal_producer(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
store i8 83, i8* %3
%4 = load i32, i32* %2
%5 = call i32 @write(i32 %4, i8* %3, i32 1)
ret void
}

LLVM IR (-O2):
define void @signal_producer(i32 %0) {
%2 = alloca i8
store i8 83, i8* %2
%3 = call i32 @write(i32 %0, i8* %2, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_dup2;
int syscall_2(int /*<<< orphan*/, int, int);
int dup2(int oldfd, int newfd) {
  int ret;
  ret = syscall_2(SYS_dup2, oldfd, newfd);
  return ret;
}


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

x86 assembly (clang, -O2):
<dup2>:
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall_2@plt>

LLVM IR (-O0):
@SYS_dup2 = global i32 0
define i32 @dup2(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* @SYS_dup2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @syscall_2(i32 %6, i32 %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
@SYS_dup2 = global i32 0
define i32 @dup2(i32 %0, i32 %1) {
%3 = load i32, i32* @SYS_dup2
%4 = tail call i32 @syscall_2(i32 %3, i32 %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void U_WMRNOTIMPLEMENTED_print(const char *contents) {
  (void)(contents);
  printf("   Not Implemented!\n");
}


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c" Not Implemented!\00"
define void @U_WMRNOTIMPLEMENTED_print(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
void foo527(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo527(i32 %0) {
ret void
}
__attribute__((always_)) void far_call(unsigned short cs, unsigned long eip) {
  struct {
    unsigned long eip;
    unsigned short cs;
  } __attribute__((__packed__)) FARCALL;
  FARCALL.cs = cs;
  FARCALL.eip = eip;
  __asm__ __volatile__("lcall *(%0)" : : "q"(&FARCALL) : "memory");
}


x86 assembly (clang, -O0):
<far_call>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x2(%rbp),%ax
mov    %ax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rax
lcall  *(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<far_call>:
mov    %di,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
lea    -0x10(%rsp),%rax
lcall  *(%rax)
ret

LLVM IR (-O0):
%struct.anon = type <{ i64, i16 }>
define void @far_call(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
%5 = alloca %struct.anon
store i16 %0, i16* %3
store i64 %1, i64* %4
%6 = load i16, i16* %3
%7 = getelementptr inbounds %struct.anon, %struct.anon* %5, i32 0, i32 1
store i16 %6, i16* %7
%8 = load i64, i64* %4
%9 = getelementptr inbounds %struct.anon, %struct.anon* %5, i32 0, i32 0
store i64 %8, i64* %9
ret void
}

LLVM IR (-O2):
%struct.anon = type <{ i64, i16 }>
define void @far_call(i16 zeroext %0, i64 %1) {
%3 = alloca %struct.anon
%4 = bitcast %struct.anon* %3 to i8*
%5 = getelementptr inbounds %struct.anon, %struct.anon* %3, i64 0, i32 1
store i16 %0, i16* %5
%6 = getelementptr inbounds %struct.anon, %struct.anon* %3, i64 0, i32 0
store i64 %1, i64* %6
ret void
}