xunge/DecIR huggingface dataset:
/* Type definitions */
struct aFILE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
int putc(int, int /*<<< orphan*/);
int my_putc(int c, struct aFILE *fp) { return putc(c, _get_actual_fp(fp)); }


x86 assembly (clang, -O0):
<my_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_get_actual_fp@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <putc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putc>:
push   %rbx
mov    %edi,%ebx
mov    %rsi,%rdi
call   1030 <_get_actual_fp@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <putc@plt>

LLVM IR (-O0):
%struct.aFILE = type { i32 }
define i32 @my_putc(i32 %0, %struct.aFILE* %1) {
%3 = alloca i32
%4 = alloca %struct.aFILE*
store i32 %0, i32* %3
store %struct.aFILE* %1, %struct.aFILE** %4
%5 = load i32, i32* %3
%6 = load %struct.aFILE*, %struct.aFILE** %4
%7 = call i32 @_get_actual_fp(%struct.aFILE* %6)
%8 = call i32 @putc(i32 %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define i32 @my_putc(i32 %0, %struct.aFILE* %1) {
%3 = tail call i32 @_get_actual_fp(%struct.aFILE* %1)
%4 = tail call i32 @putc(i32 %0, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t ev3_gyro_sensor_get_angle(int32_t port) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ev3_gyro_sensor_get_angle(i32 %0) {
ret i32 0
}
void test2(void) {
  extern double foo2;
  extern double bar2(double);
}


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

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

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

LLVM IR (-O2):
define void @test2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void pause() {
  printf("Prese [Enter] to continue...");
  fflush(stdout);
  getchar();
}


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Prese [Enter] to continue...\00"
@stdout = global i32 0
define void @pause() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
%4 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Prese [Enter] to continue...\00"
@stdout = global i32 0
define void @pause() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
void Default_CRYPTOCELL_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_CRYPTOCELL_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_CRYPTOCELL_IRQHandler+0x9>
jmp    1109 <Default_CRYPTOCELL_IRQHandler+0x9>

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

LLVM IR (-O0):
define void @Default_CRYPTOCELL_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_CRYPTOCELL_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
char *strncpy(char *, char const *, size_t);
char *xmalloc(size_t);
char *xstrndup(const char *str, size_t len) {
  char *dup;
  dup = xmalloc(len + 1);
  dup[len] = '\0';
  return strncpy(dup, str, len);
}


x86 assembly (clang, -O0):
<xstrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1040 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x1(%rsi),%rdi
call   1040 <xmalloc@plt>
movb   $0x0,(%rax,%rbx,1)
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strncpy@plt>

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

LLVM IR (-O2):
define i8* @xstrndup(i8* nocapture %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %5
%6 = tail call i8* @strncpy(i8* dereferenceable(1) %4, i8* %0, i64 %1)
ret i8* %4
}
unsigned int S(const unsigned int *x, int n) {
  return (*x >> n | *x << (32 - n));
}


x86 assembly (clang, -O0):
<S>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0xc(%rbp),%ecx
shr    %cl,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%edx
mov    $0x20,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<S>:
mov    %esi,%ecx
mov    (%rdi),%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @S(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* %5
%7 = load i32, i32* %4
%8 = lshr i32 %6, %7
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = load i32, i32* %4
%12 = sub nsw i32 32, %11
%13 = shl i32 %10, %12
%14 = or i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @S(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = lshr i32 %3, %1
%5 = sub nsw i32 32, %1
%6 = shl i32 %3, %5
%7 = or i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void uninitvar_puts(void) {
  char *s;
  (void)puts(s);
}


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

x86 assembly (clang, -O2):
<uninitvar_puts>:
jmp    1030 <puts@plt>

LLVM IR (-O0):
define void @uninitvar_puts() {
%1 = alloca i8*
%2 = load i8*, i8** %1
%3 = call i32 @puts(i8* %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_puts() {
%1 = tail call i32 @puts(i8* dereferenceable(1) undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ filesystem_dir_create_and_store(char *, int, char *, char *);
void filesystem_dir_create(char *parent, char *child) {
  char tmp[400];
  filesystem_dir_create_and_store(tmp, 400, parent, child);
}


x86 assembly (clang, -O0):
<filesystem_dir_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x190,%esi
call   1030 <filesystem_dir_create_and_store@plt>
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filesystem_dir_create>:
sub    $0x198,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    %rsp,%rdi
mov    $0x190,%esi
call   1030 <filesystem_dir_create_and_store@plt>
add    $0x198,%rsp
ret

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

LLVM IR (-O2):
define void @filesystem_dir_create(i8* %0, i8* %1) {
%3 = alloca [400 x i8]
%4 = getelementptr inbounds [400 x i8], [400 x i8]* %3, i64 0, i64 0
%5 = call i32 @filesystem_dir_create_and_store(i8* %4, i32 400, i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_get_prop_string_array() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_get_prop_string_array"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [54 x i8] c"NOT IMPLEMENTED:pa_format_info_get_prop_string_array\0A\00"
define i32 @pa_format_info_get_prop_string_array() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [53 x i8] c"NOT IMPLEMENTED:pa_format_info_get_prop_string_array\00"
define i32 @pa_format_info_get_prop_string_array() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int compare(const void *s1, const void *s2) {
  return (*(long long *)s1) - (*(long long *)s2);
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @compare(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 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = sub nsw i64 %7, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
extern int link(char *old, char *new) { return -1; }


x86 assembly (clang, -O0):
<link>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @link(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
void foo662(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo662(i32 %0) {
ret void
}
void v2i_GENERAL_NAMES(void) {}


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

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

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

LLVM IR (-O2):
define void @v2i_GENERAL_NAMES() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void ttyClose(int fd) { close(fd); }


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

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

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

LLVM IR (-O2):
define void @ttyClose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ garbage();
int function_from_primary() { garbage(); }


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

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

LLVM IR (-O0):
define i32 @function_from_primary() {
%1 = alloca i32
%2 = call i32 (...) @garbage()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @function_from_primary() {
%1 = tail call i32 (...) @garbage()
ret i32 undef
}
/* Type definitions */
struct ffnode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ doupdate();
int /*<<< orphan*/ operate_select(struct ffnode *, struct ffnode **, int *);
int /*<<< orphan*/ update_panels();
void pickafilter(struct ffnode *ffiles, struct ffnode **fltfile, int *aborted) {
  operate_select(ffiles, fltfile, aborted);
  update_panels();
  doupdate();
}


x86 assembly (clang, -O0):
<pickafilter>:
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 <operate_select@plt>
mov    $0x0,%al
call   1040 <update_panels@plt>
mov    $0x0,%al
call   1050 <doupdate@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pickafilter>:
push   %rax
call   1030 <operate_select@plt>
xor    %eax,%eax
call   1040 <update_panels@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <doupdate@plt>

LLVM IR (-O0):
%struct.ffnode = type { i32 }
define void @pickafilter(%struct.ffnode* %0, %struct.ffnode** %1, i32* %2) {
%4 = alloca %struct.ffnode*
%5 = alloca %struct.ffnode**
%6 = alloca i32*
store %struct.ffnode* %0, %struct.ffnode** %4
store %struct.ffnode** %1, %struct.ffnode*** %5
store i32* %2, i32** %6
%7 = load %struct.ffnode*, %struct.ffnode** %4
%8 = load %struct.ffnode**, %struct.ffnode*** %5
%9 = load i32*, i32** %6
%10 = call i32 @operate_select(%struct.ffnode* %7, %struct.ffnode** %8, i32* %9)
%11 = call i32 (...) @update_panels()
%12 = call i32 (...) @doupdate()
ret void
}

LLVM IR (-O2):
%struct.ffnode = type { i32 }
define void @pickafilter(%struct.ffnode* %0, %struct.ffnode** %1, i32* %2) {
%4 = tail call i32 @operate_select(%struct.ffnode* %0, %struct.ffnode** %1, i32* %2)
%5 = tail call i32 (...) @update_panels()
%6 = tail call i32 (...) @doupdate()
ret void
}
/* Variables and functions */
unsigned char *otp_encrypt(unsigned char *, size_t *, unsigned char const *,
                           size_t, unsigned char const *,
                           unsigned char const *);
unsigned char *otp_decrypt(unsigned char *out, size_t *out_len,
                           const unsigned char *in, size_t in_len,
                           const unsigned char *nonce,
                           const unsigned char *key) {
  return otp_encrypt(out, out_len, in, in_len, nonce, key);
}


x86 assembly (clang, -O0):
<otp_decrypt>:
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 <otp_encrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<otp_decrypt>:
jmp    1030 <otp_encrypt@plt>

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

LLVM IR (-O2):
define i8* @otp_decrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i8* @otp_encrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
void conn_rmfifo(void) {
  unlink("temp_fifo_aobi");
  unlink("temp_fifo_aibo");
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"temp_fifo_aobi\00"
@.str.1 = [15 x i8] c"temp_fifo_aibo\00"
define void @conn_rmfifo() {
%1 = call i32 @unlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @unlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"temp_fifo_aobi\00"
@.str.1 = [15 x i8] c"temp_fifo_aibo\00"
define void @conn_rmfifo() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @unlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printHeader();
int /*<<< orphan*/ printMenu();
int /*<<< orphan*/ system(char *);
void printMainMenu(void) {
  system("clear");
  printHeader();
  printMenu();
}


x86 assembly (clang, -O0):
<printMainMenu>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <system@plt>
mov    $0x0,%al
call   1050 <printHeader@plt>
mov    $0x0,%al
call   1040 <printMenu@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMainMenu>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
call   1050 <printHeader@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <printMenu@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
define void @printMainMenu() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @printHeader()
%3 = call i32 (...) @printMenu()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @printMainMenu() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @printHeader()
%3 = tail call i32 (...) @printMenu()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello(char *);
int main(void) {
  hello("World");
  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 <hello@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"World\00"
define i32 @main() {
%1 = tail call i32 @hello(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void gzclearerr(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ DestroyDeftemplate(void *, struct deftemplate *);
void DestroyDeftemplateAction(void *theEnv,
                              struct constructHeader *theConstruct,
                              void *buffer) {
  struct deftemplate *theDeftemplate = (struct deftemplate *)theConstruct;
  if (theDeftemplate == NULL)
    return;
  DestroyDeftemplate(theEnv, theDeftemplate);
}


x86 assembly (clang, -O0):
<DestroyDeftemplateAction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    113c <DestroyDeftemplateAction+0x2c>
jmp    1149 <DestroyDeftemplateAction+0x39>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <DestroyDeftemplate@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DestroyDeftemplateAction>:
test   %rsi,%rsi
je     111a <DestroyDeftemplateAction+0xa>
jmp    1030 <DestroyDeftemplate@plt>
ret

LLVM IR (-O0):
%struct.constructHeader = type { i32 }
%struct.deftemplate = type { i32 }
define void @DestroyDeftemplateAction(i8* %0, %struct.constructHeader* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca %struct.constructHeader*
%6 = alloca i8*
%7 = alloca %struct.deftemplate*
store i8* %0, i8** %4
store %struct.constructHeader* %1, %struct.constructHeader** %5
store i8* %2, i8** %6
%8 = load %struct.constructHeader*, %struct.constructHeader** %5
%9 = bitcast %struct.constructHeader* %8 to %struct.deftemplate*
store %struct.deftemplate* %9, %struct.deftemplate** %7
%10 = load %struct.deftemplate*, %struct.deftemplate** %7
%11 = icmp eq %struct.deftemplate* %10, null
br i1 %11, label %12, label %13
12: ; preds = %3
br label %17
13: ; preds = %3
%14 = load i8*, i8** %4
%15 = load %struct.deftemplate*, %struct.deftemplate** %7
%16 = call i32 @DestroyDeftemplate(i8* %14, %struct.deftemplate* %15)
br label %17
17: ; preds = %13, %12
ret void
}

LLVM IR (-O2):
%struct.constructHeader = type { i32 }
%struct.deftemplate = type { i32 }
define void @DestroyDeftemplateAction(i8* %0, %struct.constructHeader* %1, i8* nocapture readnone %2) {
%4 = icmp eq %struct.constructHeader* %1, null
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = bitcast %struct.constructHeader* %1 to %struct.deftemplate*
%7 = tail call i32 @DestroyDeftemplate(i8* %0, %struct.deftemplate* %6)
br label %8
8: ; preds = %3, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ grava_li(int, char *);
void rot16_sem() { grava_li(1, "$REPEAT"); }


x86 assembly (clang, -O0):
<rot16_sem>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <grava_li@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot16_sem>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <grava_li@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"$REPEAT\00"
define void @rot16_sem() {
%1 = call i32 @grava_li(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"$REPEAT\00"
define void @rot16_sem() {
%1 = tail call i32 @grava_li(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ClrTCLK();
int /*<<< orphan*/ DR_Shift16(int);
int /*<<< orphan*/ IR_Shift(int);
int /*<<< orphan*/ SetTCLK();
void ReleaseCPU(void) {
  ClrTCLK();
  IR_Shift(0xC8);
  DR_Shift16(0x2401);
  IR_Shift(0x21);
  SetTCLK();
}


x86 assembly (clang, -O0):
<ReleaseCPU>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <ClrTCLK@plt>
mov    $0xc8,%edi
call   1060 <IR_Shift@plt>
mov    $0x2401,%edi
call   1040 <DR_Shift16@plt>
mov    $0x21,%edi
call   1060 <IR_Shift@plt>
mov    $0x0,%al
call   1030 <SetTCLK@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReleaseCPU>:
push   %rax
xor    %eax,%eax
call   1050 <ClrTCLK@plt>
mov    $0xc8,%edi
call   1060 <IR_Shift@plt>
mov    $0x2401,%edi
call   1040 <DR_Shift16@plt>
mov    $0x21,%edi
call   1060 <IR_Shift@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <SetTCLK@plt>

LLVM IR (-O0):
define void @ReleaseCPU() {
%1 = call i32 (...) @ClrTCLK()
%2 = call i32 @IR_Shift(i32 200)
%3 = call i32 @DR_Shift16(i32 9217)
%4 = call i32 @IR_Shift(i32 33)
%5 = call i32 (...) @SetTCLK()
ret void
}

LLVM IR (-O2):
define void @ReleaseCPU() {
%1 = tail call i32 (...) @ClrTCLK()
%2 = tail call i32 @IR_Shift(i32 200)
%3 = tail call i32 @DR_Shift16(i32 9217)
%4 = tail call i32 @IR_Shift(i32 33)
%5 = tail call i32 (...) @SetTCLK()
ret void
}
/* Type definitions */
struct tdb_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ F_SETLKW;
int F_WRLCK;
int _tdb_lockall(struct tdb_context *, int, int /*<<< orphan*/);
int ext2fs_tdb_lockall_mark(struct tdb_context *tdb) {
  return _tdb_lockall(tdb, F_WRLCK | 0x80000000, F_SETLKW);
}


x86 assembly (clang, -O0):
<ext2fs_tdb_lockall_mark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
or     $0x80000000,%esi
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
call   1030 <_tdb_lockall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext2fs_tdb_lockall_mark>:
mov    0x2ec1(%rip),%rax
mov    $0x80000000,%esi
or     (%rax),%esi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edx
jmp    1030 <_tdb_lockall@plt>

LLVM IR (-O0):
%struct.tdb_context = type { i32 }
@F_WRLCK = global i32 0
@F_SETLKW = global i32 0
define i32 @ext2fs_tdb_lockall_mark(%struct.tdb_context* %0) {
%2 = alloca %struct.tdb_context*
store %struct.tdb_context* %0, %struct.tdb_context** %2
%3 = load %struct.tdb_context*, %struct.tdb_context** %2
%4 = load i32, i32* @F_WRLCK
%5 = or i32 %4, -2147483648
%6 = load i32, i32* @F_SETLKW
%7 = call i32 @_tdb_lockall(%struct.tdb_context* %3, i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.tdb_context = type { i32 }
@F_WRLCK = global i32 0
@F_SETLKW = global i32 0
define i32 @ext2fs_tdb_lockall_mark(%struct.tdb_context* %0) {
%2 = load i32, i32* @F_WRLCK
%3 = or i32 %2, -2147483648
%4 = load i32, i32* @F_SETLKW
%5 = tail call i32 @_tdb_lockall(%struct.tdb_context* %0, i32 %3, i32 %4)
ret i32 %5
}
void lif_read_phy_device(int device, int cylinder, int head, int sector,
                         unsigned char *data) {}


x86 assembly (clang, -O0):
<lif_read_phy_device>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @lif_read_phy_device(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rt_InitInfAndNaN(unsigned int);
void Prep_initialize(void) { rt_InitInfAndNaN(8U); }


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

x86 assembly (clang, -O2):
<Prep_initialize>:
mov    $0x8,%edi
jmp    1030 <rt_InitInfAndNaN@plt>

LLVM IR (-O0):
define void @Prep_initialize() {
%1 = call i32 @rt_InitInfAndNaN(i32 8)
ret void
}

LLVM IR (-O2):
define void @Prep_initialize() {
%1 = tail call i32 @rt_InitInfAndNaN(i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AUDIO_PLAY;
scalar_t__ ioctl(int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int audioPlay(int fd) {
  int ans;
  if ((ans = ioctl(fd, AUDIO_PLAY) < 0)) {
    perror("AUDIO PLAY: ");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<audioPlay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
cmp    $0x0,%rax
setl   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0xc(%rbp)
test   $0x1,%al
jne    115b <audioPlay+0x3b>
jmp    1173 <audioPlay+0x53>
lea    0xe9e(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    117a <audioPlay+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audioPlay>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     113b <audioPlay+0x1b>
pop    %rcx
ret
lea    0xebe(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@AUDIO_PLAY = global i32 0
@.str = [13 x i8] c"AUDIO PLAY: \00"
define i32 @audioPlay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @AUDIO_PLAY
%7 = call i64 @ioctl(i32 %5, i32 %6)
%8 = icmp slt i64 %7, 0
%9 = zext i1 %8 to i32
store i32 %9, i32* %4
br i1 %8, label %10, label %12
10: ; preds = %1
%11 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@AUDIO_PLAY = global i32 0
@.str = [13 x i8] c"AUDIO PLAY: \00"
define i32 @audioPlay(i32 %0) {
%2 = load i32, i32* @AUDIO_PLAY
%3 = tail call i64 @ioctl(i32 %0, i32 %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ -1, %5 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
int BNC_7() {
  int ii, stat = 99;
  char com1, data;
  BNCIO(7);
  return (stat);
}


x86 assembly (clang, -O0):
<BNC_7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x63,-0x8(%rbp)
mov    $0x7,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNC_7>:
push   %rax
mov    $0x7,%edi
call   1030 <BNCIO@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @BNC_7() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 99, i32* %2
%5 = call i32 @BNCIO(i32 7)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @BNC_7() {
%1 = tail call i32 @BNCIO(i32 7)
ret i32 99
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reccursive_natural_till_0(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  printf("\n");
  reccursive_natural_till_0(num);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%edi
call   1040 <reccursive_natural_till_0@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @putchar(i32 10)
%5 = load i32, i32* %1
%6 = call i32 @reccursive_natural_till_0(i32 %5)
ret i32 0
}
/* Variables and functions */
double cos(double);
double wdcos_(double *x) { return cos(*x); }


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

x86 assembly (clang, -O2):
<wdcos_>:
movsd  (%rdi),%xmm0
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define double @wdcos_(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call double @cos(double %2)
ret double %3
}
int foo(int cond) {
  asm volatile goto("testl %0, %0; jne %l1;" ::"r"(cond)::label_true, loop);
  asm volatile goto("testl %0, %0; jne %l1;" ::"r"(cond)::label_true, loop);
  return 0;
loop:
  return 0;
label_true:
  return 1;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    113f <foo+0x3f>
jmp    1117 <foo+0x17>
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    113f <foo+0x3f>
jmp    1127 <foo+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1146 <foo+0x46>
movl   $0x0,-0x4(%rbp)
jmp    1146 <foo+0x46>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %edi,%edi
jne    110b <foo+0xb>
xor    %eax,%eax
test   %edi,%edi
jne    110b <foo+0xb>
ret
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
to label %5 [label %9, label %8]
5: ; preds = %1
%6 = load i32, i32* %3
to label %7 [label %9, label %8]
7: ; preds = %5
store i32 0, i32* %2
br label %10
8: ; preds = %5, %1
store i32 0, i32* %2
br label %10
9: ; preds = %5, %1
store i32 1, i32* %2
br label %10
10: ; preds = %9, %8, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
to label %2 [label %4, label %3]
2: ; preds = %1
to label %5 [label %4, label %3]
3: ; preds = %2, %1
br label %5
4: ; preds = %2, %1
br label %5
5: ; preds = %2, %4, %3
%6 = phi i32 [ 0, %3 ], [ 1, %4 ], [ 0, %2 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *ocupa_tempo(void *null) {
  int i, j;
  for (i = 0; i < 50000; i++)
    j += i;
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<ocupa_tempo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xc350,-0x14(%rbp)
jge    1147 <ocupa_tempo+0x37>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <ocupa_tempo+0x13>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ocupa_tempo>:
xor    %edi,%edi
jmp    1030 <pthread_exit@plt>

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

LLVM IR (-O2):
define noalias i8* @ocupa_tempo(i8* nocapture readnone %0) {
%2 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
int do_877() { return 877; }


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

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

LLVM IR (-O0):
define i32 @do_877() {
ret i32 877
}

LLVM IR (-O2):
define i32 @do_877() {
ret i32 877
}
void selinux_audit_set_callback(int (*callback)(void)) { return; }


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

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

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

LLVM IR (-O2):
define void @selinux_audit_set_callback(i32 ()* nocapture %0) {
ret void
}
void GP_break40(void) {}


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

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

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

LLVM IR (-O2):
define void @GP_break40() {
ret void
}
int pow2_atleast(int x) {
  int h;
  for (h = 1; h < x; h = 2 * h)
    ;
  return h;
}


x86 assembly (clang, -O0):
<pow2_atleast>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <pow2_atleast+0x2d>
jmp    111f <pow2_atleast+0x1f>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <pow2_atleast+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow2_atleast>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jl     1110 <pow2_atleast+0x10>
ret

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

LLVM IR (-O2):
define i32 @pow2_atleast(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp slt i32 %3, %0
%5 = shl nsw i32 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main2(int argc, const char *argv[]) {
  printf("Hello, World!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
define i32 @main2(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, World!\00"
define i32 @main2(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_SET_RADIO_GIO1_PIN() { set_io_bit(-1, 7); }


x86 assembly (clang, -O0):
<TOSH_SET_RADIO_GIO1_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
mov    $0x7,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_RADIO_GIO1_PIN>:
mov    $0xffffffff,%edi
mov    $0x7,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_RADIO_GIO1_PIN() {
%1 = call i32 @set_io_bit(i32 -1, i32 7)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_RADIO_GIO1_PIN() {
%1 = tail call i32 @set_io_bit(i32 -1, i32 7)
ret void
}
FNIEMOP_DEF(iemOp_Grp7_xgetbv) {
  AssertFailed();
  return IEMOP_RAISE_INVALID_OPCODE();
}


x86 assembly (clang, -O0):
<FNIEMOP_DEF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <AssertFailed@plt>
mov    $0x0,%al
call   1030 <IEMOP_RAISE_INVALID_OPCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FNIEMOP_DEF>:
push   %rax
xor    %eax,%eax
call   1040 <AssertFailed@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <IEMOP_RAISE_INVALID_OPCODE@plt>

LLVM IR (-O0):
define i32 @FNIEMOP_DEF(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @AssertFailed()
%4 = call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %4
}

LLVM IR (-O2):
define i32 @FNIEMOP_DEF(i32 %0) {
%2 = tail call i32 (...) @AssertFailed()
%3 = tail call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %3
}
void port_unlock(void) {}


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

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

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

LLVM IR (-O2):
define void @port_unlock() {
ret void
}
/* Variables and functions */
char *crypt(char *, char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ strcmp(char *, char *);
void check(char key[], char salt[], char hash[]) {
  char *output = crypt(key, salt);
  if (strcmp(output, hash) == 0) {
    printf("%s\n", key);
    exit(0);
  }
}


x86 assembly (clang, -O0):
<check>:
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
call   1030 <crypt@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1193 <check+0x53>
mov    -0x8(%rbp),%rsi
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
call   1030 <crypt@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1167 <check+0x27>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe92(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @check(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i8* @crypt(i8* %8, i8* %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8*, i8** %6
%13 = call i64 @strcmp(i8* %11, i8* %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = call i32 @exit(i32 0)
unreachable
19: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @check(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @crypt(i8* %0, i8* %1)
%5 = tail call i64 @strcmp(i8* %4, i8* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %3
ret void
}
/* Variables and functions */
unsigned long long crc64(char const *, int);
int strlen(char const *);
unsigned long long word_crc64(const char *str, int len) {
  if (len < 0) {
    len = strlen(str);
  }
  return crc64(str, len);
}


x86 assembly (clang, -O0):
<word_crc64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1145 <word_crc64+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <crc64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<word_crc64>:
push   %rbx
mov    %rdi,%rbx
test   %esi,%esi
jns    1132 <word_crc64+0x12>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <crc64@plt>

LLVM IR (-O0):
define i64 @word_crc64(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 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %4
br label %10
10: ; preds = %7, %2
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = call i64 @crc64(i8* %11, i32 %12)
ret i64 %13
}

LLVM IR (-O2):
define i64 @word_crc64(i8* %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @strlen(i8* %0)
br label %6
6: ; preds = %4, %2
%7 = phi i32 [ %5, %4 ], [ %1, %2 ]
%8 = tail call i64 @crc64(i8* %0, i32 %7)
ret i64 %8
}
void isakmp_ph1resend_stub(p) void *p;
{ (void)isakmp_ph1resend((struct ph1handle *)p); }


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

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

LLVM IR (-O0):
%struct.ph1handle = type opaque
define void @isakmp_ph1resend_stub(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.ph1handle*
%5 = call i32 (%struct.ph1handle*, ...) bitcast (i32 (...)* @isakmp_ph1resend to i32 (%struct.ph1handle*, ...)*)(%struct.ph1handle* %4)
ret void
}

LLVM IR (-O2):
%struct.ph1handle = type opaque
define void @isakmp_ph1resend_stub(i8* %0) {
%2 = bitcast i8* %0 to %struct.ph1handle*
%3 = tail call i32 (%struct.ph1handle*, ...) bitcast (i32 (...)* @isakmp_ph1resend to i32 (%struct.ph1handle*, ...)*)(%struct.ph1handle* %2)
ret void
}