xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ c_fstr2hecmw_connect_conv(int, int *, int *, int *);
void fstr2hecmw_connect_conv_(int *n_elem, int elem_type[],
                              int elem_node_index[], int elem_node_item[]) {
  c_fstr2hecmw_connect_conv(*n_elem, elem_type, elem_node_index,
                            elem_node_item);
}


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

x86 assembly (clang, -O2):
<fstr2hecmw_connect_conv_>:
mov    (%rdi),%edi
jmp    1030 <c_fstr2hecmw_connect_conv@plt>

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

LLVM IR (-O2):
define void @fstr2hecmw_connect_conv_(i32* nocapture %0, i32* %1, i32* %2, i32* %3) {
%5 = load i32, i32* %0
%6 = tail call i32 @c_fstr2hecmw_connect_conv(i32 %5, i32* %1, i32* %2, i32* %3)
ret void
}
void VP8EncDspInitNEON(void) {}


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

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

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

LLVM IR (-O2):
define void @VP8EncDspInitNEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getMemory(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char *str = NULL;
  getMemory(str);
  strcpy(str, "hello");
  printf("%s\n", str);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <getMemory@plt>
lea    0xec1(%rip),%rsi
xor    %edi,%edi
call   1030 <strcpy@plt>
lea    0xeb9(%rip),%rdi
xor    %esi,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i32 @getMemory(i8* null)
%2 = tail call i32 @strcpy(i8* null, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* null)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int blake2b(int /*<<< orphan*/ *, void const *, void const *, size_t, size_t,
            size_t);
int blake2(uint8_t *out, const void *in, const void *key, size_t outlen,
           size_t inlen, size_t keylen) {
  return blake2b(out, in, key, outlen, inlen, keylen);
}


x86 assembly (clang, -O0):
<blake2>:
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    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <blake2b@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blake2>:
jmp    1030 <blake2b@plt>

LLVM IR (-O0):
define i32 @blake2(i32* %0, i8* %1, i8* %2, i64 %3, i64 %4, i64 %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store i32* %0, i32** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i64 %4, i64* %11
store i64 %5, i64* %12
%13 = load i32*, i32** %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = load i64, i64* %10
%17 = load i64, i64* %11
%18 = load i64, i64* %12
%19 = call i32 @blake2b(i32* %13, i8* %14, i8* %15, i64 %16, i64 %17, i64 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @blake2(i32* %0, i8* %1, i8* %2, i64 %3, i64 %4, i64 %5) {
%7 = tail call i32 @blake2b(i32* %0, i8* %1, i8* %2, i64 %3, i64 %4, i64 %5)
ret i32 %7
}
int WebPGetEncoderVersion(void) { return (1 << 16) | (0 << 8) | 0; }


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

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

LLVM IR (-O0):
define i32 @WebPGetEncoderVersion() {
ret i32 65536
}

LLVM IR (-O2):
define i32 @WebPGetEncoderVersion() {
ret i32 65536
}
/* Type definitions */
struct dbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct dbuf *);
int /*<<< orphan*/ dbuf_clear(struct dbuf *);
int /*<<< orphan*/ mrealloc(struct dbuf *, int /*<<< orphan*/);
void dbuf_free(struct dbuf *b) {
  assert(b);
  dbuf_clear(b);
  mrealloc(b, 0);
}


x86 assembly (clang, -O0):
<dbuf_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <dbuf_clear@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <mrealloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbuf_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1050 <dbuf_clear@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1030 <mrealloc@plt>

LLVM IR (-O0):
%struct.dbuf = type { i32 }
define void @dbuf_free(%struct.dbuf* %0) {
%2 = alloca %struct.dbuf*
store %struct.dbuf* %0, %struct.dbuf** %2
%3 = load %struct.dbuf*, %struct.dbuf** %2
%4 = call i32 @assert(%struct.dbuf* %3)
%5 = load %struct.dbuf*, %struct.dbuf** %2
%6 = call i32 @dbuf_clear(%struct.dbuf* %5)
%7 = load %struct.dbuf*, %struct.dbuf** %2
%8 = call i32 @mrealloc(%struct.dbuf* %7, i32 0)
ret void
}

LLVM IR (-O2):
%struct.dbuf = type { i32 }
define void @dbuf_free(%struct.dbuf* %0) {
%2 = tail call i32 @assert(%struct.dbuf* %0)
%3 = tail call i32 @dbuf_clear(%struct.dbuf* %0)
%4 = tail call i32 @mrealloc(%struct.dbuf* %0, i32 0)
ret void
}
/* Variables and functions */
int calculate_value();
scalar_t__ compare_value(int);
int /*<<< orphan*/ setdistance(int);
int /*<<< orphan*/ setspeed(int);
int main(int argc, char **argv) {
  int value;
  setspeed(6);
  setdistance(60);
  value = calculate_value();
  return compare_value(value) == 0 ? -1 : 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x6,%edi
call   1040 <setspeed@plt>
mov    $0x3c,%edi
call   1060 <setdistance@plt>
mov    $0x0,%al
call   1050 <calculate_value@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <compare_value@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
call   1040 <setspeed@plt>
mov    $0x3c,%edi
call   1060 <setdistance@plt>
xor    %eax,%eax
call   1050 <calculate_value@plt>
mov    %eax,%edi
call   1030 <compare_value@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @setspeed(i32 6)
%8 = call i32 @setdistance(i32 60)
%9 = call i32 (...) @calculate_value()
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = call i64 @compare_value(i32 %10)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 -1, i32 0
ret i32 %14
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @setspeed(i32 6)
%4 = tail call i32 @setdistance(i32 60)
%5 = tail call i32 (...) @calculate_value()
%6 = tail call i64 @compare_value(i32 %5)
%7 = icmp eq i64 %6, 0
%8 = sext i1 %7 to i32
ret i32 %8
}
int test_imm_A3uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xA3 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_A3uint64_midword_reg>:
test   $0xa30000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A3uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 10682368
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int rand_percent(percentage)
register int percentage;
{ return (get_rand(1, 100) <= percentage); }


x86 assembly (clang, -O0):
<rand_percent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x64,%esi
mov    $0x0,%al
call   1030 <get_rand@plt>
cmp    -0x4(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_percent>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <get_rand@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
setle  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_percent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, i32, ...) bitcast (i32 (...)* @get_rand to i32 (i32, i32, ...)*)(i32 1, i32 100)
%4 = load i32, i32* %2
%5 = icmp sle i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @rand_percent(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @get_rand to i32 (i32, i32, ...)*)(i32 1, i32 100)
%3 = icmp sle i32 %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void displayDescription(void) {
  printf("This demo will basically go over function modulation. With\n");
  printf("a switch case structure implemented within main.\n");
}


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

x86 assembly (clang, -O2):
<displayDescription>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf17(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"This demo will basically go over function modulation. With\0A\00"
@.str.1 = [50 x i8] c"a switch case structure implemented within main.\0A\00"
define void @displayDescription() {
%1 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [59 x i8] c"This demo will basically go over function modulation. With\00"
@str.2 = [49 x i8] c"a switch case structure implemented within main.\00"
define void @displayDescription() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_set(int);
int lookup_set(char *);
int /*<<< orphan*/ set_error1(char *);
int /*<<< orphan*/ sprintf(char *, char *);
void clear_command(char *setname) {
  int set_number;
  char message[255];
  set_number = lookup_set(setname);
  if (set_number == 0) {
    sprintf(message, "(clear_command): invalid set");
    set_error1(message);
    return;
  }
  clear_set(set_number);
}


x86 assembly (clang, -O0):
<clear_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <lookup_set@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1189 <clear_command+0x49>
lea    -0x110(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <set_error1@plt>
jmp    1191 <clear_command+0x51>
mov    -0xc(%rbp),%edi
call   1040 <clear_set@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_command>:
sub    $0x108,%rsp
call   1030 <lookup_set@plt>
test   %eax,%eax
je     114e <clear_command+0x1e>
mov    %eax,%edi
add    $0x108,%rsp
jmp    1040 <clear_set@plt>
movups 0xeb8(%rip),%xmm0
movups %xmm0,0xd(%rsp)
movups 0xe9f(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1050 <set_error1@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"(clear_command): invalid set\00"
define void @clear_command(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [255 x i8]
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @lookup_set(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %4, i64 0, i64 0
%11 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [255 x i8], [255 x i8]* %4, i64 0, i64 0
%13 = call i32 @set_error1(i8* %12)
br label %17
14: ; preds = %1
%15 = load i32, i32* %3
%16 = call i32 @clear_set(i32 %15)
br label %17
17: ; preds = %14, %9
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"(clear_command): invalid set\00"
define void @clear_command(i8* %0) {
%2 = alloca [255 x i8]
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @lookup_set(i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @set_error1(i8* %3)
br label %10
8: ; preds = %1
%9 = tail call i32 @clear_set(i32 %4)
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int ain() {
  int a, b, sum;
  scanf("%d %d", &a, &b);
  sum = a + b;
  printf("%d", sum);
  return 0;
}


x86 assembly (clang, -O0):
<ain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ain>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @ain() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, %6
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ALdistortionState_Delete(void *ptr) { free(ptr); }


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

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

LLVM IR (-O2):
define void @ALdistortionState_Delete(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int sys_setfsuid(int /*<<< orphan*/);
int sys_setfsuid32(uid_t uid) { return sys_setfsuid(uid); }


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

x86 assembly (clang, -O2):
<sys_setfsuid32>:
jmp    1030 <sys_setfsuid@plt>

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

LLVM IR (-O2):
define i32 @sys_setfsuid32(i32 %0) {
%2 = tail call i32 @sys_setfsuid(i32 %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ strlen(char *);
int /*<<< orphan*/ write(int, char *, scalar_t__);
void writeFD(char *s, int fd) { write(fd, s, strlen(s) + 1); }


x86 assembly (clang, -O0):
<writeFD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeFD>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @writeFD(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i32 @write(i32 %5, i8* %6, i64 %9)
ret void
}

LLVM IR (-O2):
define void @writeFD(i8* nocapture %0, i32 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @write(i32 %1, i8* %0, i64 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ SVCXPRT;

/* Variables and functions */
void svcraw_destroy(SVCXPRT *xprt) {}


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

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

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

LLVM IR (-O2):
define void @svcraw_destroy(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  printf("%s: Attempting to start ossec.", argv[0]);
  system("net start OssecSvc");
  system("pause");
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"%s: Attempting to start ossec.\00"
@.str.1 = [19 x i8] c"net start OssecSvc\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 @system(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"%s: Attempting to start ossec.\00"
@.str.1 = [19 x i8] c"net start OssecSvc\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @system(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
float nvg__minf(float a, float b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<nvg__minf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <nvg__minf+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <nvg__minf+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvg__minf>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @nvg__minf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @nvg__minf(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
scalar_t__ get_next_input_from_fuzzer();
long map2check_non_det_long() { return (long)get_next_input_from_fuzzer(); }


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

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

LLVM IR (-O0):
define i64 @map2check_non_det_long() {
%1 = call i64 (...) @get_next_input_from_fuzzer()
ret i64 %1
}

LLVM IR (-O2):
define i64 @map2check_non_det_long() {
%1 = tail call i64 (...) @get_next_input_from_fuzzer()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("I should not be run ever.\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"I should not be run ever.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [26 x i8] c"I should not be run ever.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ remove_irq(int);
void adb_clear_data_int() { remove_irq(0x02000); }


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

x86 assembly (clang, -O2):
<adb_clear_data_int>:
mov    $0x2000,%edi
jmp    1030 <remove_irq@plt>

LLVM IR (-O0):
define void @adb_clear_data_int() {
%1 = call i32 @remove_irq(i32 8192)
ret void
}

LLVM IR (-O2):
define void @adb_clear_data_int() {
%1 = tail call i32 @remove_irq(i32 8192)
ret void
}
int ft_isalpha(int c) { return ((c > 64 && c < 91) || (c > 96 && c < 123)); }


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jle    1120 <ft_isalpha+0x20>
mov    $0x1,%al
cmpl   $0x5b,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     113f <ft_isalpha+0x3f>
xor    %eax,%eax
cmpl   $0x60,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jle    1139 <ft_isalpha+0x39>
cmpl   $0x7b,-0x4(%rbp)
setl   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ft_isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 64
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 91
br i1 %7, label %16, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 96
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 123
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %5
%17 = phi i1 [ true, %5 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ htv_disable(int, int);
int plan_cap_stop_channel_1(void *data) {
  htv_disable(1, 1);
  return 0;
}


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

x86 assembly (clang, -O2):
<plan_cap_stop_channel_1>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <htv_disable@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @plan_cap_stop_channel_1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @htv_disable(i32 1, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @plan_cap_stop_channel_1(i8* nocapture readnone %0) {
%2 = tail call i32 @htv_disable(i32 1, i32 1)
ret i32 0
}
int *restrict ip_fn2(void) { return (int *)0; }


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

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

LLVM IR (-O0):
define i32* @ip_fn2() {
ret i32* null
}

LLVM IR (-O2):
define noalias i32* @ip_fn2() {
ret i32* null
}
/* Variables and functions */
int shlib_overriddencall2();
int shlib_shlibcall2() { return shlib_overriddencall2(); }


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

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

LLVM IR (-O0):
define i32 @shlib_shlibcall2() {
%1 = call i32 (...) @shlib_overriddencall2()
ret i32 %1
}

LLVM IR (-O2):
define i32 @shlib_shlibcall2() {
%1 = tail call i32 (...) @shlib_overriddencall2()
ret i32 %1
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
scalar_t__ getCell(int, int, int);
int32_t getWinner(int32_t tab) {
  return -1;
  if (getCell(tab, 0, 0) == getCell(tab, 0, 1) &&
      getCell(tab, 0, 1) == getCell(tab, 0, 2) && getCell(tab, 0, 0) != 0) {
    return getCell(tab, 0, 0);
  }
  if (getCell(tab, 1, 0) == getCell(tab, 1, 1) &&
      getCell(tab, 1, 1) == getCell(tab, 1, 2) && getCell(tab, 1, 0) != 0) {
    return getCell(tab, 1, 0);
  }
  if (getCell(tab, 2, 0) == getCell(tab, 2, 1) &&
      getCell(tab, 2, 1) == getCell(tab, 2, 2) && getCell(tab, 2, 0) != 0) {
    return getCell(tab, 2, 0);
  }
  if (getCell(tab, 0, 0) == getCell(tab, 1, 0) &&
      getCell(tab, 1, 0) == getCell(tab, 2, 0) && getCell(tab, 0, 0) != 0) {
    return getCell(tab, 0, 0);
  }
  if (getCell(tab, 0, 1) == getCell(tab, 1, 1) &&
      getCell(tab, 1, 1) == getCell(tab, 2, 1) && getCell(tab, 0, 1) != 0) {
    return getCell(tab, 0, 1);
  }
  if (getCell(tab, 0, 2) == getCell(tab, 1, 2) &&
      getCell(tab, 1, 2) == getCell(tab, 2, 2) && getCell(tab, 0, 2) != 2) {
    return getCell(tab, 0, 2);
  }
  if (getCell(tab, 0, 0) == getCell(tab, 1, 1) &&
      getCell(tab, 1, 1) == getCell(tab, 2, 2) && getCell(tab, 0, 0) != 0) {
    return getCell(tab, 0, 0);
  }
  if (getCell(tab, 2, 0) == getCell(tab, 1, 1) &&
      getCell(tab, 1, 1) == getCell(tab, 0, 2) && getCell(tab, 2, 0) != 0) {
    return getCell(tab, 2, 0);
  }
  int32_t i;
  int32_t j;
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      if (getCell(tab, i, j) == 0)
        return -1;
    }
  }
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @getWinner(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
ret i32 -1
}

LLVM IR (-O2):
define i32 @getWinner(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ b(int);
int /*<<< orphan*/ write(int, char *, int);
void a(int x) {
  write(1, "A\n", 2);
  b(x);
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
lea    0xec9(%rip),%rsi
mov    $0x2,%edx
call   1040 <write@plt>
mov    -0x4(%rbp),%edi
call   1030 <b@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rsi
mov    $0x1,%edi
mov    $0x2,%edx
call   1040 <write@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <b@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"A\0A\00"
define void @a(i32 %0) {
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @b(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alarm_handler(int, char *, char *);
void alarm_handler0(int severity, char *text) {
  alarm_handler(severity, "%s", text);
}


x86 assembly (clang, -O0):
<alarm_handler0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rsi
call   1030 <alarm_handler@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @alarm_handler0(i32 %0, i8* %1) {
%3 = tail call i32 @alarm_handler(i32 %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_FLAT;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void planet_init(void) {
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glShadeModel(GL_FLAT);
}


x86 assembly (clang, -O0):
<planet_init>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1030 <glClearColor@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <glShadeModel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<planet_init>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1030 <glClearColor@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <glShadeModel@plt>

LLVM IR (-O0):
@GL_FLAT = global i32 0
define void @planet_init() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_FLAT
%3 = call i32 @glShadeModel(i32 %2)
ret void
}

LLVM IR (-O2):
@GL_FLAT = global i32 0
define void @planet_init() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_FLAT
%3 = tail call i32 @glShadeModel(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void prnSym(int c) { printf("%i", c); }


x86 assembly (clang, -O0):
<prnSym>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prnSym>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define void @prnSym(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_common_head(FILE *fp) {
  fprintf(fp, "#include \"web_proc.h\"\n");
  fprintf(fp, "#include \"cgi_api.h\"\n");
}


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

x86 assembly (clang, -O2):
<print_common_head>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xee3(%rip),%rdi
mov    $0x15,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"#include \22web_proc.h\22\0A\00"
@.str.1 = [22 x i8] c"#include \22cgi_api.h\22\0A\00"
define void @print_common_head(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"#include \22web_proc.h\22\0A\00"
@.str.1 = [22 x i8] c"#include \22cgi_api.h\22\0A\00"
define void @print_common_head(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 22, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i64 21, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/);
int /*<<< orphan*/ fopen(char *, char *);
void create_file(char *file_name) { fclose(fopen(file_name, "w")); }


x86 assembly (clang, -O0):
<create_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %eax,%edi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_file>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define void @create_file(i8* %0) {
%2 = tail call i32 @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fclose(i32 %2)
ret void
}
/* Variables and functions */
int euler_problem_80();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", euler_problem_80());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @euler_problem_80()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int a(int y) {
  int z = y;
  return z;
}


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

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

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

LLVM IR (-O2):
define i32 @a(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ CONF_modules_unload(int);
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_remove_thread_state(int /*<<< orphan*/ *);
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ OBJ_cleanup();
int /*<<< orphan*/ destroy_ui();
void openssl_shutdown(void) {
  CONF_modules_unload(1);
  destroy_ui();
  OBJ_cleanup();
  EVP_cleanup();
  CRYPTO_cleanup_all_ex_data();
  ERR_remove_thread_state(NULL);
  ERR_free_strings();
}


x86 assembly (clang, -O0):
<openssl_shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1060 <CONF_modules_unload@plt>
mov    $0x0,%al
call   1050 <destroy_ui@plt>
mov    $0x0,%al
call   1070 <OBJ_cleanup@plt>
mov    $0x0,%al
call   1080 <EVP_cleanup@plt>
mov    $0x0,%al
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <ERR_remove_thread_state@plt>
mov    $0x0,%al
call   1090 <ERR_free_strings@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<openssl_shutdown>:
push   %rax
mov    $0x1,%edi
call   1060 <CONF_modules_unload@plt>
xor    %eax,%eax
call   1050 <destroy_ui@plt>
xor    %eax,%eax
call   1070 <OBJ_cleanup@plt>
xor    %eax,%eax
call   1080 <EVP_cleanup@plt>
xor    %eax,%eax
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
xor    %edi,%edi
call   1030 <ERR_remove_thread_state@plt>
xor    %eax,%eax
pop    %rcx
jmp    1090 <ERR_free_strings@plt>

LLVM IR (-O0):
define void @openssl_shutdown() {
%1 = call i32 @CONF_modules_unload(i32 1)
%2 = call i32 (...) @destroy_ui()
%3 = call i32 (...) @OBJ_cleanup()
%4 = call i32 (...) @EVP_cleanup()
%5 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%6 = call i32 @ERR_remove_thread_state(i32* null)
%7 = call i32 (...) @ERR_free_strings()
ret void
}

LLVM IR (-O2):
define void @openssl_shutdown() {
%1 = tail call i32 @CONF_modules_unload(i32 1)
%2 = tail call i32 (...) @destroy_ui()
%3 = tail call i32 (...) @OBJ_cleanup()
%4 = tail call i32 (...) @EVP_cleanup()
%5 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
%6 = tail call i32 @ERR_remove_thread_state(i32* null)
%7 = tail call i32 (...) @ERR_free_strings()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x1a() {
  Assert_real((isgraph(26) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              135, ("isgraph should be 0 for 0x1a"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x1a>:
push   %rax
mov    $0x1a,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x87,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x1a\00"
define void @t_isgraph_0x1a() {
%1 = call i64 @isgraph(i32 26)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 135, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x1a\00"
define void @t_isgraph_0x1a() {
%1 = tail call i64 @isgraph(i32 26)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 135, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ write_u32sparseco(int, int, int /*<<< orphan*/ **, char *,
                                     int /*<<< orphan*/);
void write_u32sparse(int nr, int nc, uint32_t **x, char *fname) {
  write_u32sparseco(nr, nc, x, fname, 0);
}


x86 assembly (clang, -O0):
<write_u32sparse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <write_u32sparseco@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_u32sparse>:
xor    %r8d,%r8d
jmp    1030 <write_u32sparseco@plt>

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

LLVM IR (-O2):
define void @write_u32sparse(i32 %0, i32 %1, i32** %2, i8* %3) {
%5 = tail call i32 @write_u32sparseco(i32 %0, i32 %1, i32** %2, i8* %3, i32 0)
ret void
}
void zconferror(const char *err) {}


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

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

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

LLVM IR (-O2):
define void @zconferror(i8* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned int __kfifo_max_r(unsigned int len, size_t recsize) {
  unsigned int max = (1 << (recsize << 3)) - 1;
  if (len > max)
    return max;
  return len;
}


x86 assembly (clang, -O0):
<__kfifo_max_r>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jbe    1139 <__kfifo_max_r+0x39>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113f <__kfifo_max_r+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__kfifo_max_r>:
lea    0x0(,%rsi,8),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
cmp    %edi,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @__kfifo_max_r(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
%7 = load i64, i64* %5
%8 = shl i64 %7, 3
%9 = trunc i64 %8 to i32
%10 = shl i32 1, %9
%11 = sub nsw i32 %10, 1
store i32 %11, i32* %6
%12 = load i32, i32* %4
%13 = load i32, i32* %6
%14 = icmp ugt i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i32, i32* %6
store i32 %16, i32* %3
br label %19
17: ; preds = %2
%18 = load i32, i32* %4
store i32 %18, i32* %3
br label %19
19: ; preds = %17, %15
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @__kfifo_max_r(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = shl i32 %3, 3
%5 = shl nsw i32 -1, %4
%6 = xor i32 %5, -1
%7 = icmp ult i32 %6, %0
%8 = select i1 %7, i32 %6, i32 %0
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int ui_finish(void) {
  endwin();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ui_finish() {
%1 = tail call i32 (...) @endwin()
ret i32 0
}