xunge/DecIR huggingface dataset:
int isValidFace(int face[]) {
  if (face[0] == face[1] || face[0] == face[2] || face[2] == face[1])
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isValidFace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    0x4(%rcx),%eax
je     1142 <isValidFace+0x42>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    0x8(%rcx),%eax
je     1142 <isValidFace+0x42>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    0x4(%rcx),%eax
jne    114e <isValidFace+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1155 <isValidFace+0x55>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidFace>:
mov    (%rdi),%edx
mov    0x4(%rdi),%ecx
xor    %eax,%eax
cmp    %ecx,%edx
je     111d <isValidFace+0x1d>
mov    0x8(%rdi),%eax
cmp    %eax,%edx
setne  %dl
cmp    %ecx,%eax
setne  %al
and    %dl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @isValidFace(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = icmp eq i32 %2, %4
br i1 %5, label %13, label %6
6: ; preds = %1
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = icmp ne i32 %2, %8
%10 = icmp ne i32 %8, %4
%11 = select i1 %9, i1 %10, i1 false
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %6, %1
%14 = phi i32 [ 0, %1 ], [ %12, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Test not implemented on this platform\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 = [39 x i8] c"Test not implemented on this platform\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [38 x i8] c"Test not implemented on this platform\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void read_mesh_databases_stacey_adios_(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ vec4_divide(float *, float *, float *);
__attribute__((always_)) struct vec4 *
psvec4_divide(struct vec4 *result, struct vec4 *a, struct vec4 *b) {
  vec4_divide((float *)result, (float *)a, (float *)b);
  return result;
}


x86 assembly (clang, -O0):
<psvec4_divide>:
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 <vec4_divide@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec4_divide>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec4_divide@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec4 = type { i32 }
define %struct.vec4* @psvec4_divide(%struct.vec4* %0, %struct.vec4* %1, %struct.vec4* %2) {
%4 = alloca %struct.vec4*
%5 = alloca %struct.vec4*
%6 = alloca %struct.vec4*
store %struct.vec4* %0, %struct.vec4** %4
store %struct.vec4* %1, %struct.vec4** %5
store %struct.vec4* %2, %struct.vec4** %6
%7 = load %struct.vec4*, %struct.vec4** %4
%8 = bitcast %struct.vec4* %7 to float*
%9 = load %struct.vec4*, %struct.vec4** %5
%10 = bitcast %struct.vec4* %9 to float*
%11 = load %struct.vec4*, %struct.vec4** %6
%12 = bitcast %struct.vec4* %11 to float*
%13 = call i32 @vec4_divide(float* %8, float* %10, float* %12)
%14 = load %struct.vec4*, %struct.vec4** %4
ret %struct.vec4* %14
}

LLVM IR (-O2):
%struct.vec4 = type { i32 }
define %struct.vec4* @psvec4_divide(%struct.vec4* returned %0, %struct.vec4* %1, %struct.vec4* %2) {
%4 = bitcast %struct.vec4* %0 to float*
%5 = bitcast %struct.vec4* %1 to float*
%6 = bitcast %struct.vec4* %2 to float*
%7 = tail call i32 @vec4_divide(float* %4, float* %5, float* %6)
ret %struct.vec4* %0
}
/* Variables and functions */
int /*<<< orphan*/ comprintf(char *, char const *, char const *);
void gen_readbyte(const char *address, const char *dest) {
  comprintf("\treadbyte(%s,%s,scratchie);\n", address, dest);
}


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

x86 assembly (clang, -O2):
<gen_readbyte>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <comprintf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"\09readbyte(%s,%s,scratchie);\0A\00"
define void @gen_readbyte(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 = call i32 @comprintf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"\09readbyte(%s,%s,scratchie);\0A\00"
define void @gen_readbyte(i8* %0, i8* %1) {
%3 = tail call i32 @comprintf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ArgNum();
int /*<<< orphan*/ Cmd_MoveDirn(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ GetFlag(int /*<<< orphan*/);
int /*<<< orphan*/ Me();
void Act_Move(void) { Cmd_MoveDirn(Me(), GetFlag(ArgNum())); }


x86 assembly (clang, -O0):
<Act_Move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <Me@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <ArgNum@plt>
mov    %eax,%edi
call   1040 <GetFlag@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1030 <Cmd_MoveDirn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_Move>:
push   %rbx
xor    %eax,%eax
call   1060 <Me@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <ArgNum@plt>
mov    %eax,%edi
call   1040 <GetFlag@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <Cmd_MoveDirn@plt>

LLVM IR (-O0):
define void @Act_Move() {
%1 = call i32 (...) @Me()
%2 = call i32 (...) @ArgNum()
%3 = call i32 @GetFlag(i32 %2)
%4 = call i32 @Cmd_MoveDirn(i32 %1, i32 %3)
ret void
}

LLVM IR (-O2):
define void @Act_Move() {
%1 = tail call i32 (...) @Me()
%2 = tail call i32 (...) @ArgNum()
%3 = tail call i32 @GetFlag(i32 %2)
%4 = tail call i32 @Cmd_MoveDirn(i32 %1, i32 %3)
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_bus_get_events(void *bus) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_get_events>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_get_events>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_get_events(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_get_events(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
int do_925() { return 925; }


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

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

LLVM IR (-O0):
define i32 @do_925() {
ret i32 925
}

LLVM IR (-O2):
define i32 @do_925() {
ret i32 925
}
void call_gmon_start(void) {
  extern void __gmon_start__(void) __attribute__((weak));
  void (*gmon_start)(void) = __gmon_start__;
  if (gmon_start)
    gmon_start();
}


x86 assembly (clang, -O0):
<call_gmon_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ed9(%rip),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1121 <call_gmon_start+0x21>
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_gmon_start>:
cmpq   $0x0,0x2ee0(%rip)
je     110f <call_gmon_start+0xf>
jmp    1030 <__gmon_start__@plt>
ret

LLVM IR (-O0):
define void @call_gmon_start() {
%1 = alloca void ()*
store void ()* @__gmon_start__, void ()** %1
%2 = load void ()*, void ()** %1
%3 = icmp ne void ()* %2, null
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load void ()*, void ()** %1
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
define void @call_gmon_start() {
br i1 icmp ne (void ()* @__gmon_start__, void ()* null), label %1, label %2
1: ; preds = %0
tail call void @__gmon_start__()
br label %2
2: ; preds = %1, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_printf(char *);
int M21_f(char *s) {
  uart_printf("ok\n");
  return 1;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"ok\0A\00"
define i32 @M21_f(i8* nocapture readnone %0) {
%2 = tail call i32 @uart_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ sha_hash(int *, int *);
int /*<<< orphan*/ sha_init(int *);
void do_sha_hash(int *hashval, int *pw) {
  sha_init(hashval);
  sha_hash(pw, hashval);
}


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

x86 assembly (clang, -O2):
<do_sha_hash>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <sha_init@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <sha_hash@plt>

LLVM IR (-O0):
define void @do_sha_hash(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 = call i32 @sha_init(i32* %5)
%7 = load i32*, i32** %4
%8 = load i32*, i32** %3
%9 = call i32 @sha_hash(i32* %7, i32* %8)
ret void
}

LLVM IR (-O2):
define void @do_sha_hash(i32* %0, i32* %1) {
%3 = tail call i32 @sha_init(i32* %0)
%4 = tail call i32 @sha_hash(i32* %1, i32* %0)
ret void
}
/* Type definitions */
struct AstNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
struct AstNode *translationUnit();
struct AstNode *parse() {
  struct AstNode *programAst = translationUnit();
  printf("\n\nparse success!\n");
}


x86 assembly (clang, -O0):
<parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <translationUnit@plt>
mov    %rax,-0x10(%rbp)
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.AstNode = type { i32 }
@.str = [18 x i8] c"\0A\0Aparse success!\0A\00"
define %struct.AstNode* @parse() {
%1 = alloca %struct.AstNode*
%2 = alloca %struct.AstNode*
%3 = call %struct.AstNode* (...) @translationUnit()
store %struct.AstNode* %3, %struct.AstNode** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = load %struct.AstNode*, %struct.AstNode** %1
ret %struct.AstNode* %5
}

LLVM IR (-O2):
%struct.AstNode = type { i32 }
@str = [17 x i8] c"\0A\0Aparse success!\00"
define noalias %struct.AstNode* @parse() {
%1 = tail call %struct.AstNode* (...) @translationUnit()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret %struct.AstNode* undef
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname) {
  fprintf(stderr, "usage: %s PATH [64]\n", progname);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
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>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"usage: %s PATH [64]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(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 ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"usage: %s PATH [64]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cgiTableRowEnd() { printf("</TR>\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"</TR>\00"
define void @cgiTableRowEnd() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int const);
void xmlrpc_millisecond_sleep(unsigned int const milliseconds) {
  usleep(milliseconds * 1000);
}


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

x86 assembly (clang, -O2):
<xmlrpc_millisecond_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @xmlrpc_millisecond_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @xmlrpc_millisecond_sleep(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TCSBRK;
int _ioctl(int, int /*<<< orphan*/, int *);
int _tcsendbreak(int fd, int duration) {
  return (_ioctl(fd, TCSBRK, &duration));
}


x86 assembly (clang, -O0):
<_tcsendbreak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <_ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_tcsendbreak>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ed4(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <_ioctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
@TCSBRK = global i32 0
define i32 @_tcsendbreak(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* @TCSBRK
%7 = call i32 @_ioctl(i32 %5, i32 %6, i32* %4)
ret i32 %7
}

LLVM IR (-O2):
@TCSBRK = global i32 0
define i32 @_tcsendbreak(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @TCSBRK
%5 = call i32 @_ioctl(i32 %0, i32 %4, i32* %3)
ret i32 %5
}
int main() {
  int a, b = 5;
  int *aa = &a, *bb = &b;
  *((int *)12) = b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0xc,%eax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movl   $0x5,0xc
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
store i32 5, i32* %2
store i32* %1, i32** %3
store i32* %2, i32** %4
%5 = load i32, i32* %2
store i32 %5, i32* inttoptr (i64 12 to i32*)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
store i32 5, i32* inttoptr (i64 12 to i32*)
ret i32 0
}
dolabel() {}


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

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

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

LLVM IR (-O2):
define i32 @dolabel() {
ret i32 undef
}
unsigned getNumericGrade(char textualGrade) {
  unsigned grade;
  switch (textualGrade) {
  case 'Z':
    grade = 1;
    break;
  case 'B':
    grade = 2;
    break;
  case 'C':
    grade = 3;
    break;
  case 'D':
    grade = 4;
    break;
  case 'E':
    grade = 5;
    break;
  case 'F':
    grade = 7;
    break;
  default:
    grade = 0;
  }
  return grade;
}


x86 assembly (clang, -O0):
<getNumericGrade>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffffbe,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x18,%eax
ja     117c <getNumericGrade+0x7c>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x8(%rbp)
jmp    1183 <getNumericGrade+0x83>
movl   $0x2,-0x8(%rbp)
jmp    1183 <getNumericGrade+0x83>
movl   $0x3,-0x8(%rbp)
jmp    1183 <getNumericGrade+0x83>
movl   $0x4,-0x8(%rbp)
jmp    1183 <getNumericGrade+0x83>
movl   $0x5,-0x8(%rbp)
jmp    1183 <getNumericGrade+0x83>
movl   $0x7,-0x8(%rbp)
jmp    1183 <getNumericGrade+0x83>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNumericGrade>:
add    $0xffffffbe,%edi
cmp    $0x18,%edi
ja     113b <getNumericGrade+0x3b>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x2,%eax
ret
mov    $0x3,%eax
ret
mov    $0x4,%eax
ret
mov    $0x5,%eax
ret
mov    $0x7,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @getNumericGrade(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %12 [
i32 90, label %6
i32 66, label %7
i32 67, label %8
i32 68, label %9
i32 69, label %10
i32 70, label %11
]
6: ; preds = %1
store i32 1, i32* %3
br label %13
7: ; preds = %1
store i32 2, i32* %3
br label %13
8: ; preds = %1
store i32 3, i32* %3
br label %13
9: ; preds = %1
store i32 4, i32* %3
br label %13
10: ; preds = %1
store i32 5, i32* %3
br label %13
11: ; preds = %1
store i32 7, i32* %3
br label %13
12: ; preds = %1
store i32 0, i32* %3
br label %13
13: ; preds = %12, %11, %10, %9, %8, %7, %6
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @getNumericGrade(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %8 [
i32 90, label %9
i32 66, label %3
i32 67, label %4
i32 68, label %5
i32 69, label %6
i32 70, label %7
]
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %1, %8, %7, %6, %5, %4, %3
%10 = phi i32 [ 0, %8 ], [ 7, %7 ], [ 5, %6 ], [ 4, %5 ], [ 3, %4 ], [ 2, %3 ], [ 1, %1 ]
ret i32 %10
}
int get_short_be(unsigned char **data) {
  int result;
  result = *(*data + 1) | (*((char *)*data) << 8);
  *data += 2;
  return result;
}


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

x86 assembly (clang, -O2):
<get_short_be>:
mov    (%rdi),%rcx
movzbl 0x1(%rcx),%edx
movsbl (%rcx),%eax
shl    $0x8,%eax
or     %edx,%eax
add    $0x2,%rcx
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i32 @get_short_be(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = load i8**, i8*** %2
%10 = load i8*, i8** %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %8, %13
store i32 %14, i32* %3
%15 = load i8**, i8*** %2
%16 = load i8*, i8** %15
%17 = getelementptr inbounds i8, i8* %16, i64 2
store i8* %17, i8** %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @get_short_be(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 1
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = shl nsw i32 %7, 8
%9 = or i32 %8, %5
%10 = getelementptr inbounds i8, i8* %2, i64 2
store i8* %10, i8** %0
ret i32 %9
}
int lengthOfArray() {}


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

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

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

LLVM IR (-O2):
define i32 @lengthOfArray() {
ret i32 undef
}
void gdk_window_focus() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_focus() {
ret void
}
void mvebu_gating_clk_init(void) {}


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

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

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

LLVM IR (-O2):
define void @mvebu_gating_clk_init() {
ret void
}
/* Variables and functions */
int strlen(char const *);
int s2nbits(const char *s) { return strlen(s) * 32 / 9; }


x86 assembly (clang, -O0):
<s2nbits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
shl    $0x5,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2nbits>:
push   %rax
call   1030 <strlen@plt>
shl    $0x5,%eax
cltq
imul   $0x38e38e39,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @s2nbits(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = mul nsw i32 %4, 32
%6 = sdiv i32 %5, 9
ret i32 %6
}

LLVM IR (-O2):
define i32 @s2nbits(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = shl nsw i32 %2, 5
%4 = sdiv i32 %3, 9
ret i32 %4
}
extern int test_endian(void) {
  int test = 1;
  if (((char *)(&test))[0] == 1)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<test_endian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
movsbl -0x8(%rbp),%eax
cmp    $0x1,%eax
jne    1124 <test_endian+0x24>
movl   $0x0,-0x4(%rbp)
jmp    112b <test_endian+0x2b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_endian() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 0, i32* %1
br label %10
9: ; preds = %0
store i32 1, i32* %1
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_endian() {
ret i32 0
}
void remember_line(char *arr, int byte, int *count_found, int *hole_file) {
  arr[*count_found] = byte;
  *count_found = *count_found + 1;
  if (*count_found == 11) {
    *count_found = 0;
    *hole_file = 0;
  }
}


x86 assembly (clang, -O0):
<remember_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq (%rcx),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
cmpl   $0xb,(%rax)
jne    1156 <remember_line+0x56>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<remember_line>:
movslq (%rdx),%rax
mov    %sil,(%rdi,%rax,1)
mov    (%rdx),%eax
add    $0x1,%eax
mov    %eax,(%rdx)
cmp    $0xb,%eax
jne    111f <remember_line+0x1f>
movl   $0x0,(%rdx)
movl   $0x0,(%rcx)
ret

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

LLVM IR (-O2):
define void @remember_line(i8* nocapture writeonly %0, i32 %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = trunc i32 %1 to i8
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %5, i8* %8
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
%11 = icmp eq i32 %10, 11
br i1 %11, label %12, label %13
12: ; preds = %4
store i32 0, i32* %2
store i32 0, i32* %3
br label %13
13: ; preds = %12, %4
ret void
}
int downsample_harmquantities(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @downsample_harmquantities() {
ret i32 0
}
int rl_backward(count, key)
int count, key;
{ return (rl_backward_char(count, key)); }


x86 assembly (clang, -O0):
<rl_backward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <rl_backward_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rl_backward(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_backward_char to i32 (i32, i32, ...)*)(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @rl_backward(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_backward_char to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
ret i32 %3
}
void X509_EXTENSION_free(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void atusb(struct atrf_dsc *dsc, const char *pattern, const char *next) {
  fprintf(stderr, "not compiled with ATUSB support\n");
  exit(1);
}


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

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

LLVM IR (-O0):
%struct.atrf_dsc = type { i32 }
@stderr = global i32 0
@.str = [33 x i8] c"not compiled with ATUSB support\0A\00"
define void @atusb(%struct.atrf_dsc* %0, i8* %1, i8* %2) {
%4 = alloca %struct.atrf_dsc*
%5 = alloca i8*
%6 = alloca i8*
store %struct.atrf_dsc* %0, %struct.atrf_dsc** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
%struct.atrf_dsc = type { i32 }
@stderr = global i32 0
@.str = [33 x i8] c"not compiled with ATUSB support\0A\00"
define void @atusb(%struct.atrf_dsc* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
const char *event_get_method(void) { return "libev"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"libev\00"
define i8* @event_get_method() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ strtol(char const *, int /*<<< orphan*/ *, int);
long atol(const char *nptr) { return (long)strtol(nptr, NULL, 10); }


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

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

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

LLVM IR (-O2):
define i64 @atol(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i32* null, i32 10)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void showusage() {
  fprintf(stderr, "\nusage: $ gen-csv NUM_COLUMNS\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"\0Ausage: $ gen-csv NUM_COLUMNS\0A\00"
define void @showusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"\0Ausage: $ gen-csv NUM_COLUMNS\0A\00"
define void @showusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void f1(x, y) {}


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

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

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

LLVM IR (-O2):
define void @f1(i32 %0, i32 %1) {
ret void
}
int HelpItem14(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem14() {
ret i32 0
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
exam1() {
  long c;
  c = (getchar() != EOF);
  printf("%ld\n", c);
  printf("%d\n", EOF);
}


x86 assembly (clang, -O0):
<exam1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exam1>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
xor    %esi,%esi
cmp    (%rbx),%eax
setne  %sil
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
lea    0xeb9(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@EOF = global i32 0
@.str = [5 x i8] c"%ld\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @exam1() {
%1 = alloca i32
%2 = alloca i64
%3 = call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
%6 = zext i1 %5 to i32
%7 = sext i32 %6 to i64
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = trunc i64 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @EOF
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [5 x i8] c"%ld\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @exam1() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp ne i32 %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @EOF
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 undef
}
void native_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx,
                  unsigned int *edx) {
  asm volatile("cpuid"
               : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx)
               : "0"(*eax), "2"(*ecx));
}


x86 assembly (clang, -O0):
<native_cpuid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
mov    (%rcx),%ecx
cpuid
mov    %eax,%r9d
mov    -0x38(%rbp),%rax
mov    %ecx,%esi
mov    -0x30(%rbp),%rcx
mov    %r9d,(%r8)
mov    %ebx,(%rdi)
mov    %esi,(%rcx)
mov    %edx,(%rax)
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<native_cpuid>:
push   %rbx
mov    %rcx,%r8
mov    %rdx,%r9
mov    (%rdi),%eax
mov    (%rdx),%ecx
cpuid
mov    %eax,(%rdi)
mov    %ebx,(%rsi)
mov    %ecx,(%r9)
mov    %edx,(%r8)
pop    %rbx
ret

LLVM IR (-O0):
define void @native_cpuid(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** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = load i32*, i32** %7
%16 = load i32, i32* %15
%17 = call { i32, i32, i32, i32 } asm sideeffect "cpuid", "={ax},={bx},={cx},={dx},0,2,~{dirflag},~{fpsr},~{flags}"(i32 %14, i32 %16)
%18 = extractvalue { i32, i32, i32, i32 } %17, 0
%19 = extractvalue { i32, i32, i32, i32 } %17, 1
%20 = extractvalue { i32, i32, i32, i32 } %17, 2
%21 = extractvalue { i32, i32, i32, i32 } %17, 3
store i32 %18, i32* %9
store i32 %19, i32* %10
store i32 %20, i32* %11
store i32 %21, i32* %12
ret void
}

LLVM IR (-O2):
define void @native_cpuid(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = load i32, i32* %2
%7 = tail call { i32, i32, i32, i32 } asm sideeffect "cpuid", "={ax},={bx},={cx},={dx},0,2,~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
%8 = extractvalue { i32, i32, i32, i32 } %7, 0
%9 = extractvalue { i32, i32, i32, i32 } %7, 1
%10 = extractvalue { i32, i32, i32, i32 } %7, 2
%11 = extractvalue { i32, i32, i32, i32 } %7, 3
store i32 %8, i32* %0
store i32 %9, i32* %1
store i32 %10, i32* %2
store i32 %11, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bic(int, int);
int bis(int /*<<< orphan*/, int /*<<< orphan*/);
int bool_xor(int x, int y) { return bis(bic(x, y), bic(y, x)); }


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

x86 assembly (clang, -O2):
<bool_xor>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <bic@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <bic@plt>
mov    %r14d,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <bis@plt>

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

LLVM IR (-O2):
define i32 @bool_xor(i32 %0, i32 %1) {
%3 = tail call i32 @bic(i32 %0, i32 %1)
%4 = tail call i32 @bic(i32 %1, i32 %0)
%5 = tail call i32 @bis(i32 %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
scalar_t__ shim_enosys(int /*<<< orphan*/, int, int, int);
int shim_dup3(int oldfd, int newfd, int flags) {
  return (int)shim_enosys(0, oldfd, newfd, flags);
}


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

x86 assembly (clang, -O2):
<shim_dup3>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
define i32 @shim_dup3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i64 @shim_enosys(i32 0, i32 %7, i32 %8, i32 %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @shim_dup3(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @shim_enosys(i32 0, i32 %0, i32 %1, i32 %2)
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ isShellSymb(char);
scalar_t__ isspace(char);
int isSeparator(char c) { return isspace(c) || isShellSymb(c); }


x86 assembly (clang, -O0):
<isSeparator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <isSeparator+0x3c>
movsbl -0x1(%rbp),%edi
call   1030 <isShellSymb@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSeparator>:
push   %rbx
mov    %edi,%ebx
call   1040 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isSeparator+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <isShellSymb@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isSeparator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isspace(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isShellSymb(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isSeparator(i8 signext %0) {
%2 = tail call i64 @isspace(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isShellSymb(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
unsigned int crc32_iscsi_base(unsigned char *, int, unsigned int);
unsigned int crc32_iscsi(unsigned char *buffer, int len,
                         unsigned int crc_init) {
  return crc32_iscsi_base(buffer, len, crc_init);
}


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

x86 assembly (clang, -O2):
<crc32_iscsi>:
jmp    1030 <crc32_iscsi_base@plt>

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

LLVM IR (-O2):
define i32 @crc32_iscsi(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @crc32_iscsi_base(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
int fun1208() { return 1208; }


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

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

LLVM IR (-O0):
define i32 @fun1208() {
ret i32 1208
}

LLVM IR (-O2):
define i32 @fun1208() {
ret i32 1208
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int, size_t);
void *_Memnew(size_t x) {
  void *p;
  assert(x > 0);
  if (x > 0) {
    p = malloc(x);
    if (p)
      memset(p, 0xA3, x);
  } else {
    p = NULL;
  }
  return p;
}


x86 assembly (clang, -O0):
<_Memnew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x8(%rbp)
jbe    1188 <_Memnew+0x58>
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1183 <_Memnew+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0xa3,%esi
call   1030 <memset@plt>
jmp    1190 <_Memnew+0x60>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Memnew>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
test   %rbx,%rbx
je     116c <_Memnew+0x3c>
mov    %rbx,%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     116c <_Memnew+0x3c>
mov    %rax,%r14
mov    %rax,%rdi
mov    $0xa3,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
jmp    116f <_Memnew+0x3f>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @_Memnew(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp ugt i64 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i64, i64* %2
%9 = icmp ugt i64 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %1
%11 = load i64, i64* %2
%12 = call i8* @malloc(i64 %11)
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %19
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = load i64, i64* %2
%18 = call i32 @memset(i8* %16, i32 163, i64 %17)
br label %19
19: ; preds = %15, %10
br label %21
20: ; preds = %1
store i8* null, i8** %3
br label %21
21: ; preds = %20, %19
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @_Memnew(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
br i1 %2, label %5, label %10
5: ; preds = %1
%6 = tail call i8* @malloc(i64 %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @memset(i8* %6, i32 163, i64 %0)
br label %10
10: ; preds = %1, %5, %8
%11 = phi i8* [ %6, %8 ], [ null, %5 ], [ null, %1 ]
ret i8* %11
}