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

/* Variables and functions */
int /*<<< orphan*/ h264avcc_get_nb_sps(int /*<<< orphan*/ *);
int /*<<< orphan*/ *h264avcc_get_spsh(int /*<<< orphan*/ *, int /*<<< orphan*/);
void h264avcc_set_nb_pps(uint8_t *p, uint8_t val) {
  p = h264avcc_get_spsh(p, h264avcc_get_nb_sps(p));
  p[0] = val;
}


x86 assembly (clang, -O0):
<h264avcc_set_nb_pps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <h264avcc_get_nb_sps@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <h264avcc_get_spsh@plt>
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h264avcc_set_nb_pps>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <h264avcc_get_nb_sps@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <h264avcc_get_spsh@plt>
mov    %ebp,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @h264avcc_set_nb_pps(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @h264avcc_get_nb_sps(i32* %6)
%8 = call i32* @h264avcc_get_spsh(i32* %5, i32 %7)
store i32* %8, i32** %3
%9 = load i32, i32* %4
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @h264avcc_set_nb_pps(i32* %0, i32 %1) {
%3 = tail call i32 @h264avcc_get_nb_sps(i32* %0)
%4 = tail call i32* @h264avcc_get_spsh(i32* %0, i32 %3)
store i32 %1, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PrintTty(int, int, char *);
void Prompt2(char *msg) {
  PrintTty(4, 10, "                                                          ");
  PrintTty(4, 10, msg);
}


x86 assembly (clang, -O0):
<Prompt2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
mov    $0xa,%esi
lea    0xed3(%rip),%rdx
call   1030 <PrintTty@plt>
mov    -0x8(%rbp),%rdx
mov    $0x4,%edi
mov    $0xa,%esi
call   1030 <PrintTty@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Prompt2>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdx
mov    $0x4,%edi
mov    $0xa,%esi
call   1030 <PrintTty@plt>
mov    $0x4,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <PrintTty@plt>

LLVM IR (-O0):
@.str = [59 x i8] c" \00"
define void @Prompt2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @PrintTty(i32 4, i32 10, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @PrintTty(i32 4, i32 10, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c" \00"
define void @Prompt2(i8* %0) {
%2 = tail call i32 @PrintTty(i32 4, i32 10, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @PrintTty(i32 4, i32 10, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getuid();
int /*<<< orphan*/ seteuid(int /*<<< orphan*/);
void drop_privleges(void) { seteuid(getuid()); }


x86 assembly (clang, -O0):
<drop_privleges>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,%edi
call   1040 <seteuid@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop_privleges>:
push   %rax
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <seteuid@plt>

LLVM IR (-O0):
define void @drop_privleges() {
%1 = call i32 (...) @getuid()
%2 = call i32 @seteuid(i32 %1)
ret void
}

LLVM IR (-O2):
define void @drop_privleges() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i32 @seteuid(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glFrontFace(unsigned int);
void FrontFace(unsigned int f) { glFrontFace(f); }


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

x86 assembly (clang, -O2):
<FrontFace>:
jmp    1030 <glFrontFace@plt>

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

LLVM IR (-O2):
define void @FrontFace(i32 %0) {
%2 = tail call i32 @glFrontFace(i32 %0)
ret void
}
/* Variables and functions */
const char *eiki_sigill_info(int code) {
  switch (code) {
  default:
    return NULL;
  }
}


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

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

LLVM IR (-O0):
define i8* @eiki_sigill_info(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %4 [
]
4: ; preds = %1
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @eiki_sigill_info(i32 %0) {
ret i8* null
}
int __getclktck() { return 60; }


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

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

LLVM IR (-O0):
define i32 @__getclktck() {
ret i32 60
}

LLVM IR (-O2):
define i32 @__getclktck() {
ret i32 60
}
/* Type definitions */
typedef int /*<<< orphan*/ para2;
typedef int /*<<< orphan*/ para1;

/* Variables and functions */
double findMedianSortedArrays(int *, int, int *, int);
int /*<<< orphan*/ printf(char *, double);
int main() {
  int para1[] = {1};
  int para2[] = {1};
  printf("%f\n", findMedianSortedArrays(para1, sizeof(para1) / sizeof(int),
                                        para2, sizeof(para2) / sizeof(int)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rdx
mov    $0x1,%ecx
mov    %ecx,%esi
call   1040 <findMedianSortedArrays@plt>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
movl   $0x1,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rdx
mov    $0x1,%esi
mov    $0x1,%ecx
call   1040 <findMedianSortedArrays@plt>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.para1 = [1 x i32] [i32 1]
@__const.main.para2 = [1 x i32] [i32 1]
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1 x i32]
%3 = alloca [1 x i32]
store i32 0, i32* %1
%4 = bitcast [1 x i32]* %2 to i8*
%5 = bitcast [1 x i32]* %3 to i8*
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
%8 = call double @findMedianSortedArrays(i32* %6, i32 1, i32* %7, i32 1)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca [1 x i32]
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %1 to i8*
%4 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 1, i32* %4
%5 = bitcast [1 x i32]* %2 to i8*
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 1, i32* %6
%7 = call double @findMedianSortedArrays(i32* %4, i32 1, i32* %6, i32 1)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %7)
ret i32 0
}
/* Variables and functions */
scalar_t__ close(int);
int /*<<< orphan*/ error(char *);
void eclose(int fd) {
  if (close(fd) < 0)
    error("close");
}


x86 assembly (clang, -O0):
<eclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmp    $0x0,%rax
jge    1149 <eclose+0x29>
lea    0xebc(%rip),%rdi
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eclose>:
push   %rax
call   1030 <close@plt>
test   %rax,%rax
js     112d <eclose+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <error@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"close\00"
define void @eclose(i32 %0) {
%2 = tail call i64 @close(i32 %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @error(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
int ssbgst(int c, int k) {
  int a, i, j;
  a = 0;
  i = 1;
  j = k;
  while (j) {
    a += (j + i) * (k + i + c) + (j + i + c);
    j = j - 1;
  }
  return a;
}


x86 assembly (clang, -O0):
<ssbgst>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1159 <ssbgst+0x59>
mov    -0x14(%rbp),%eax
add    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0x10(%rbp),%ecx
add    -0x4(%rbp),%ecx
imul   %ecx,%eax
mov    -0x14(%rbp),%ecx
add    -0x10(%rbp),%ecx
add    -0x4(%rbp),%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111e <ssbgst+0x1e>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssbgst>:
test   %esi,%esi
je     1139 <ssbgst+0x39>
lea    (%rsi,%rdi,1),%eax
add    $0x1,%eax
add    %esi,%edi
lea    -0x1(%rsi),%ecx
lea    0x1(%rsi),%edx
imul   %eax,%edx
lea    -0x1(%rdx),%eax
imul   %ecx,%eax
add    %edi,%eax
add    %edx,%eax
mov    $0xfffffffe,%edx
sub    %edi,%edx
add    $0xfffffffe,%esi
imul   %rcx,%rsi
shr    %rsi
imul   %edx,%esi
add    %esi,%eax
add    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ssbgst(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %26, label %4
4: ; preds = %2
%5 = add i32 %0, 1
%6 = add i32 %5, %1
%7 = add i32 %1, %0
%8 = add i32 %1, -1
%9 = add i32 %1, 1
%10 = mul i32 %6, %9
%11 = add i32 %10, -1
%12 = mul i32 %8, %11
%13 = add i32 %7, %12
%14 = add i32 %13, %10
%15 = add i32 %1, %0
%16 = sub i32 -2, %15
%17 = zext i32 %8 to i33
%18 = add i32 %1, -2
%19 = zext i32 %18 to i33
%20 = mul i33 %17, %19
%21 = lshr i33 %20, 1
%22 = trunc i33 %21 to i32
%23 = mul i32 %16, %22
%24 = add i32 %14, %23
%25 = add i32 %24, 1
br label %26
26: ; preds = %4, %2
%27 = phi i32 [ 0, %2 ], [ %25, %4 ]
ret i32 %27
}
void ff_hevc_put_hevc_bi_epel_v24_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_v24_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PushSymTab();
int /*<<< orphan*/ yyparse();
int main(void) {
  PushSymTab();
  yyparse();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <PushSymTab@plt>
xor    %eax,%eax
call   1030 <yyparse@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @PushSymTab()
%3 = call i32 (...) @yyparse()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @PushSymTab()
%2 = tail call i32 (...) @yyparse()
ret i32 0
}
int cycleNote(int note) {
  note++;
  return (note % 12);
}


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

x86 assembly (clang, -O2):
<cycleNote>:
add    $0x1,%edi
movslq %edi,%rax
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x21,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cycleNote(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = srem i32 %2, 12
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
void ExitProcess(int status) {
  puts("Exit");
  exit(status);
}


x86 assembly (clang, -O0):
<ExitProcess>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ExitProcess>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"Exit\00"
define void @ExitProcess(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"Exit\00"
define void @ExitProcess(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void raiseError(char *error) {
  fprintf(stderr, "%s\n", error);
  exit(0);
}


x86 assembly (clang, -O0):
<raiseError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<raiseError>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @raiseError(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
void wizchip_cris_enter(void) {}


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

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

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

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

/* Variables and functions */
struct utmpx *getutxline(const struct utmpx *ut) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
%struct.utmpx = type { i32 }
define noalias %struct.utmpx* @getutxline(%struct.utmpx* nocapture readnone %0) {
ret %struct.utmpx* null
}
void init_log(void) {}


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

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

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

LLVM IR (-O2):
define void @init_log() {
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
char *skipb(char *s) {
  if (s == NULL)
    return s;
  for (; isspace(*s); s++)
    ;
  return s;
}


x86 assembly (clang, -O0):
<skipb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <skipb+0x24>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116d <skipb+0x5d>
jmp    1139 <skipb+0x29>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1165 <skipb+0x55>
jmp    1154 <skipb+0x44>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1139 <skipb+0x29>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipb>:
push   %rbx
test   %rdi,%rdi
je     1134 <skipb+0x24>
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <skipb+0x10>
jmp    1136 <skipb+0x26>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skipb(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %8, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = tail call i64 @isspace(i8 signext %5)
%7 = icmp eq i64 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ AddYearToDate(char *, char *);
int /*<<< orphan*/ GetGMTInTime(char *);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int ChgField7ToGmt(char *field7) {
  char curtime[15];
  memset(curtime, 0, 15);
  memcpy(curtime, field7, 10);
  AddYearToDate(field7, curtime);
  GetGMTInTime(curtime);
  memcpy(field7, &curtime[4], 10);
  return 0;
}


x86 assembly (clang, -O0):
<ChgField7ToGmt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x17(%rbp),%rdi
xor    %esi,%esi
mov    $0xf,%edx
call   1030 <memset@plt>
lea    -0x17(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0xa,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
lea    -0x17(%rbp),%rsi
call   1060 <AddYearToDate@plt>
lea    -0x17(%rbp),%rdi
call   1040 <GetGMTInTime@plt>
mov    -0x8(%rbp),%rdi
lea    -0x17(%rbp),%rsi
add    $0x4,%rsi
mov    $0xa,%edx
call   1050 <memcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChgField7ToGmt>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
lea    0x9(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0xf,%edx
call   1030 <memset@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1050 <memcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <AddYearToDate@plt>
mov    %r14,%rdi
call   1040 <GetGMTInTime@plt>
lea    0xd(%rsp),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1050 <memcpy@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @ChgField7ToGmt(i8* %0) {
%2 = alloca i8*
%3 = alloca [15 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i32 0, i32 15)
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @memcpy(i8* %6, i8* %7, i32 10)
%9 = load i8*, i8** %2
%10 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%11 = call i32 @AddYearToDate(i8* %9, i8* %10)
%12 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%13 = call i32 @GetGMTInTime(i8* %12)
%14 = load i8*, i8** %2
%15 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 4
%16 = call i32 @memcpy(i8* %14, i8* %15, i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @ChgField7ToGmt(i8* %0) {
%2 = alloca [15 x i8]
%3 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i32 0, i32 15)
%5 = call i32 @memcpy(i8* %3, i8* %0, i32 10)
%6 = call i32 @AddYearToDate(i8* %0, i8* %3)
%7 = call i32 @GetGMTInTime(i8* %3)
%8 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 4
%9 = call i32 @memcpy(i8* %0, i8* %8, i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glEnable(unsigned int);
void Enable(unsigned int f) { glEnable(f); }


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

x86 assembly (clang, -O2):
<Enable>:
jmp    1030 <glEnable@plt>

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

LLVM IR (-O2):
define void @Enable(i32 %0) {
%2 = tail call i32 @glEnable(i32 %0)
ret void
}
void chat_init(char *chat_file) {}


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

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

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

LLVM IR (-O2):
define void @chat_init(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Existentialism.\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"Existentialism.\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"Existentialism.\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
}
void *pampd_mask_intransit_and_remote(void *marked_pampd) {
  unsigned long pampd = (unsigned long)marked_pampd;
  pampd &= ~(1UL << 0);
  pampd &= ~(1UL << (0 + 1));
  return (void *)pampd;
}


x86 assembly (clang, -O0):
<pampd_mask_intransit_and_remote>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xfffffffffffffffd,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pampd_mask_intransit_and_remote>:
mov    %rdi,%rax
and    $0xfffffffffffffffc,%rax
ret

LLVM IR (-O0):
define i8* @pampd_mask_intransit_and_remote(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = and i64 %6, -2
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = and i64 %8, -3
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @pampd_mask_intransit_and_remote(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, -4
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void free(void *ptr) { printf("free\n"); }


x86 assembly (clang, -O0):
<free>:
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):
<free>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [5 x i8] c"free\00"
define void @free(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timespec {
  long long tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
uint64_t get_time_ns() {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return ts.tv_sec * 1000000000LL + ts.tv_nsec;
}


x86 assembly (clang, -O0):
<get_time_ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time_ns>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x8(%rsp),%rax
9a 3b
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @get_time_ns() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @get_time_ns() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = mul nsw i64 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ getppid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
void superlogDump() { kill(getppid(), SIGUSR1); }


x86 assembly (clang, -O0):
<superlogDump>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getppid@plt>
mov    %eax,%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<superlogDump>:
push   %rax
xor    %eax,%eax
call   1040 <getppid@plt>
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
pop    %rax
jmp    1030 <kill@plt>

LLVM IR (-O0):
@SIGUSR1 = global i32 0
define void @superlogDump() {
%1 = call i32 (...) @getppid()
%2 = load i32, i32* @SIGUSR1
%3 = call i32 @kill(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
define void @superlogDump() {
%1 = tail call i32 (...) @getppid()
%2 = load i32, i32* @SIGUSR1
%3 = tail call i32 @kill(i32 %1, i32 %2)
ret void
}
char *q_memchr(char *p, int c, unsigned int size) {
  char *end;
  end = p + size;
  for (; p < end; p++) {
    if (*p == (unsigned char)c)
      return p;
  }
  return 0;
}


x86 assembly (clang, -O0):
<q_memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1162 <q_memchr+0x62>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x14(%rbp),%ecx
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    114c <q_memchr+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116a <q_memchr+0x6a>
jmp    1151 <q_memchr+0x51>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <q_memchr+0x1c>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<q_memchr>:
test   %edx,%edx
je     1120 <q_memchr+0x20>
mov    %rdi,%rax
mov    %edx,%ecx
add    %rdi,%rcx
movzbl %sil,%edx
movsbl (%rax),%esi
cmp    %esi,%edx
je     1122 <q_memchr+0x22>
add    $0x1,%rax
cmp    %rcx,%rax
jb     1110 <q_memchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @q_memchr(i8* %0, i32 %1, i32 %2) {
%4 = zext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = icmp eq i32 %2, 0
br i1 %6, label %17, label %7
7: ; preds = %3
%8 = and i32 %1, 255
br label %9
9: ; preds = %7, %14
%10 = phi i8* [ %0, %7 ], [ %15, %14 ]
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %8, %12
br i1 %13, label %17, label %14
14: ; preds = %9
%15 = getelementptr inbounds i8, i8* %10, i64 1
%16 = icmp ult i8* %15, %5
br i1 %16, label %9, label %17
17: ; preds = %9, %14, %3
%18 = phi i8* [ null, %3 ], [ null, %14 ], [ %10, %9 ]
ret i8* %18
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void num_store_words8(void *dst, const void *src, size_t t) {
  memcpy(dst, src, t);
}


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

x86 assembly (clang, -O2):
<num_store_words8>:
jmp    1030 <memcpy@plt>

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

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


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"foo\00"
define void @foo_command() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
void fn3E10() { return; }


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

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

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

LLVM IR (-O2):
define void @fn3E10() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fsub_preg64_qword(int reg64) {
  put8(0xDC);
  put8(0x20 + reg64);
}


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

x86 assembly (clang, -O2):
<fsub_preg64_qword>:
push   %rbx
mov    %edi,%ebx
mov    $0xdc,%edi
call   1030 <put8@plt>
add    $0x20,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @fsub_preg64_qword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 220)
%4 = load i32, i32* %2
%5 = add nsw i32 32, %4
%6 = call i32 @put8(i32 %5)
ret void
}

LLVM IR (-O2):
define void @fsub_preg64_qword(i32 %0) {
%2 = tail call i32 @put8(i32 220)
%3 = add nsw i32 %0, 32
%4 = tail call i32 @put8(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_ptr_param_array(int *);
void set_ptr_param_array_return_true_ok() {
  int buf[2];
  int *p = 0;
  if (!set_ptr_param_array(buf))
    *p = 42;
}


x86 assembly (clang, -O0):
<set_ptr_param_array_return_true_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <set_ptr_param_array@plt>
cmp    $0x0,%eax
jne    113c <set_ptr_param_array_return_true_ok+0x2c>
mov    -0x10(%rbp),%rax
movl   $0x2a,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_ptr_param_array_return_true_ok>:
push   %rax
mov    %rsp,%rdi
call   1030 <set_ptr_param_array@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @set_ptr_param_array_return_true_ok() {
%1 = alloca [2 x i32]
%2 = alloca i32*
store i32* null, i32** %2
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = call i32 @set_ptr_param_array(i32* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = load i32*, i32** %2
store i32 42, i32* %7
br label %8
8: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
define void @set_ptr_param_array_return_true_ok() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = call i32 @set_ptr_param_array(i32* %3)
%5 = icmp ne i32 %4, 0
ret void
}
/* Variables and functions */
int fs_nwrite(char const *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int fs_write(const char *path, const char *buffer) {
  return fs_nwrite(path, buffer, strlen(buffer));
}


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

x86 assembly (clang, -O2):
<fs_write>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fs_nwrite@plt>

LLVM IR (-O0):
define i32 @fs_write(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @fs_nwrite(i8* %5, i8* %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @fs_write(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @fs_nwrite(i8* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
double rand_float(void) {
  double v = (double)rand();
  return (v + 1) / ((double)RAND_MAX + 2);
}


x86 assembly (clang, -O0):
<rand_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed7(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
mov    0x2eab(%rip),%rax
cvtsi2sdq (%rax),%xmm1
movsd  0xeb6(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_float>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
addsd  0xedb(%rip),%xmm0
mov    0x2ebc(%rip),%rax
cvtsi2sdq (%rax),%xmm1
addsd  0xecf(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @rand_float() {
%1 = alloca double
%2 = call i64 (...) @rand()
%3 = sitofp i64 %2 to double
store double %3, double* %1
%4 = load double, double* %1
%5 = fadd double %4, 1.000000e+00
%6 = load i64, i64* @RAND_MAX
%7 = sitofp i64 %6 to double
%8 = fadd double %7, 2.000000e+00
%9 = fdiv double %5, %8
ret double %9
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @rand_float() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = fadd double %2, 1.000000e+00
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to double
%6 = fadd double %5, 2.000000e+00
%7 = fdiv double %3, %6
ret double %7
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int _error(char *, int);
int /*<<< orphan*/ _oinit_child();
int fork();
int _oinit(void) {
  pid_t pid;
  if ((pid = fork()) == -1)
    return -_error("fork", 1);
  else if (pid == 0)
    _oinit_child();
  return 0;
}


x86 assembly (clang, -O0):
<_oinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jne    116a <_oinit+0x3a>
lea    0xeae(%rip),%rdi
mov    $0x1,%esi
call   1040 <_error@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1187 <_oinit+0x57>
cmpl   $0x0,-0x8(%rbp)
jne    117b <_oinit+0x4b>
mov    $0x0,%al
call   1030 <_oinit_child@plt>
jmp    1180 <_oinit+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_oinit>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
je     115a <_oinit+0x2a>
cmp    $0xffffffff,%eax
jne    1163 <_oinit+0x33>
lea    0xeb6(%rip),%rdi
mov    $0x1,%esi
call   1040 <_error@plt>
mov    %eax,%ebx
neg    %ebx
jmp    1163 <_oinit+0x33>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <_oinit_child@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fork\00"
define i32 @_oinit() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @fork()
store i32 %3, i32* %2
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%7 = sub nsw i32 0, %6
store i32 %7, i32* %1
br label %15
8: ; preds = %0
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @_oinit_child()
br label %13
13: ; preds = %11, %8
br label %14
14: ; preds = %13
store i32 0, i32* %1
br label %15
15: ; preds = %14, %5
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [5 x i8] c"fork\00"
define i32 @_oinit() {
%1 = tail call i32 (...) @fork()
switch i32 %1, label %7 [
i32 -1, label %2
i32 0, label %5
]
2: ; preds = %0
%3 = tail call i32 @_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = sub nsw i32 0, %3
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @_oinit_child()
br label %7
7: ; preds = %5, %0, %2
%8 = phi i32 [ %4, %2 ], [ 0, %0 ], [ 0, %5 ]
ret i32 %8
}
void mem_cgroup_uncharge_page(struct page *page) {}


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define void @mem_cgroup_uncharge_page(%struct.page* nocapture %0) {
ret void
}
/* Type definitions */
struct statement {
  int dummy;
};

/* Variables and functions */
struct statement *stmt_void();
struct statement *stmt_goto(const char *label) {
  return stmt_void();
}


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

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

LLVM IR (-O0):
%struct.statement = type { i32 }
define %struct.statement* @stmt_goto(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call %struct.statement* (...) @stmt_void()
ret %struct.statement* %3
}

LLVM IR (-O2):
%struct.statement = type { i32 }
define %struct.statement* @stmt_goto(i8* nocapture readnone %0) {
%2 = tail call %struct.statement* (...) @stmt_void()
ret %struct.statement* %2
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/);
void wait_in_seconds(unsigned int secs) {
  time_t retTime = time(0) + secs;
  while (time(0) < retTime)
    ;
}


x86 assembly (clang, -O0):
<wait_in_seconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <time@plt>
mov    -0x4(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
xor    %edi,%edi
call   1030 <time@plt>
cmp    -0x10(%rbp),%rax
jge    1142 <wait_in_seconds+0x32>
jmp    112c <wait_in_seconds+0x1c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_in_seconds>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <time@plt>
mov    %ebx,%ebx
add    %rax,%rbx
nop
xor    %edi,%edi
call   1030 <time@plt>
cmp    %rbx,%rax
jl     1120 <wait_in_seconds+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @wait_in_seconds(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = call i64 @time(i32 0)
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = add nsw i64 %4, %6
store i64 %7, i64* %3
br label %8
8: ; preds = %12, %1
%9 = call i64 @time(i32 0)
%10 = load i64, i64* %3
%11 = icmp slt i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8
br label %8
13: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @wait_in_seconds(i32 %0) {
%2 = tail call i64 @time(i32 0)
%3 = zext i32 %0 to i64
%4 = add nsw i64 %2, %3
br label %5
5: ; preds = %5, %1
%6 = tail call i64 @time(i32 0)
%7 = icmp slt i64 %6, %4
br i1 %7, label %5, label %8
8: ; preds = %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void end_progress(void) {
  printf("\r                          \r");
  printf("\033[?25h");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<end_progress>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_progress>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"\0D \0D\00"
@.str.1 = [7 x i8] c"\1B[?25h\00"
@stdout = global i32 0
define void @end_progress() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"\0D \0D\00"
@.str.1 = [7 x i8] c"\1B[?25h\00"
@stdout = global i32 0
define void @end_progress() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int setxattr(const char *path, const char *name, const char *value, size_t size,
             int flags) {
  return 0;
}


x86 assembly (clang, -O0):
<setxattr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @setxattr(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3, i32 %4) {
ret i32 0
}