xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ close(int);
void ws_close(int listener) { close(listener); }


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

LLVM IR (-O0):
define void @ws_close(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 @ws_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Type definitions */
struct compile_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ generate_local_labels(struct compile_state *);
int /*<<< orphan*/ print_instructions(struct compile_state *);
void generate_code(struct compile_state *state) {
  generate_local_labels(state);
  print_instructions(state);
}


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

x86 assembly (clang, -O2):
<generate_code>:
push   %rbx
mov    %rdi,%rbx
call   1040 <generate_local_labels@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <print_instructions@plt>

LLVM IR (-O0):
%struct.compile_state = type { i32 }
define void @generate_code(%struct.compile_state* %0) {
%2 = alloca %struct.compile_state*
store %struct.compile_state* %0, %struct.compile_state** %2
%3 = load %struct.compile_state*, %struct.compile_state** %2
%4 = call i32 @generate_local_labels(%struct.compile_state* %3)
%5 = load %struct.compile_state*, %struct.compile_state** %2
%6 = call i32 @print_instructions(%struct.compile_state* %5)
ret void
}

LLVM IR (-O2):
%struct.compile_state = type { i32 }
define void @generate_code(%struct.compile_state* %0) {
%2 = tail call i32 @generate_local_labels(%struct.compile_state* %0)
%3 = tail call i32 @print_instructions(%struct.compile_state* %0)
ret void
}
void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags,
                              void *data) {}


x86 assembly (clang, -O0):
<security_sb_post_remount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.vfsmount = type opaque
define void @security_sb_post_remount(%struct.vfsmount* %0, i64 %1, i8* %2) {
%4 = alloca %struct.vfsmount*
%5 = alloca i64
%6 = alloca i8*
store %struct.vfsmount* %0, %struct.vfsmount** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
%struct.vfsmount = type opaque
define void @security_sb_post_remount(%struct.vfsmount* nocapture %0, i64 %1, i8* nocapture %2) {
ret void
}
int do_083() { return 83; }


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

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

LLVM IR (-O0):
define i32 @do_083() {
ret i32 83
}

LLVM IR (-O2):
define i32 @do_083() {
ret i32 83
}
int df03_dialer(num, acu)
char *num, *acu;
{ return (df_dialer(num, acu, 1)); }


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

x86 assembly (clang, -O2):
<df03_dialer>:
mov    $0x1,%edx
xor    %eax,%eax
jmp    1030 <df_dialer@plt>

LLVM IR (-O0):
define i32 @df03_dialer(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 (i8*, i8*, i32, ...) bitcast (i32 (...)* @df_dialer to i32 (i8*, i8*, i32, ...)*)(i8* %5, i8* %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @df03_dialer(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @df_dialer to i32 (i8*, i8*, i32, ...)*)(i8* %0, i8* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  puts("Hello world! My first C program.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <puts@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 = [33 x i8] c"Hello world! My first C program.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Hello world! My first C program.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
void touch(char *file) {
  FILE *fd;
  fd = fopen(file, "w");
  fwrite("x", 1, 1, fd);
  fclose(fd);
}


x86 assembly (clang, -O0):
<touch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    0xea7(%rip),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1050 <fwrite@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<touch>:
push   %rbx
lea    0xec8(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    $0x78,%edi
mov    %rax,%rsi
call   1040 <fputc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define void @touch(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fputc(i32 120, i32* %2)
%4 = tail call i32 @fclose(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, int);
void close(int fd) { syscall(3, fd); }


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

x86 assembly (clang, -O2):
<close>:
mov    %edi,%esi
mov    $0x3,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define void @close(i32 %0) {
%2 = tail call i32 @syscall(i32 3, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_raw(int *, int *, int);
void F_r(int *a, int *b) { F_raw(a, b, 1); }


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

x86 assembly (clang, -O2):
<F_r>:
mov    $0x1,%edx
jmp    1030 <F_raw@plt>

LLVM IR (-O0):
define void @F_r(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 @F_raw(i32* %5, i32* %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @F_r(i32* %0, i32* %1) {
%3 = tail call i32 @F_raw(i32* %0, i32* %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_UNIX;
int /*<<< orphan*/ SOCK_STREAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int do_socket(void) { return socket(AF_UNIX, SOCK_STREAM, 0); }


x86 assembly (clang, -O0):
<do_socket>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_socket>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
define i32 @do_socket() {
%1 = load i32, i32* @AF_UNIX
%2 = load i32, i32* @SOCK_STREAM
%3 = call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}

LLVM IR (-O2):
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
define i32 @do_socket() {
%1 = load i32, i32* @AF_UNIX
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}
/* Type definitions */
struct hourly_prices_for_day {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct hourly_prices_for_day *);
void free_hourly_prices_for_day(void *p) {
  struct hourly_prices_for_day *h = (struct hourly_prices_for_day *)p;
  free(h);
}


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

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

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

LLVM IR (-O2):
%struct.hourly_prices_for_day = type { i32 }
define void @free_hourly_prices_for_day(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.hourly_prices_for_day*
%3 = tail call i32 @free(%struct.hourly_prices_for_day* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putstr(char *);
char *ft_strdup(char *);
int read(int /*<<< orphan*/, char *, int);
char *ft_prompt(char *message) {
  int ret;
  char buffer[50];
  ft_putstr(message);
  ret = read(0, buffer, 50);
  buffer[ret - 1] = '\0';
  return (ft_strdup(buffer));
}


x86 assembly (clang, -O0):
<ft_prompt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <ft_putstr@plt>
lea    -0x40(%rbp),%rsi
xor    %edi,%edi
mov    $0x32,%edx
call   1030 <read@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1040 <ft_strdup@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_prompt>:
push   %rbx
sub    $0x40,%rsp
call   1050 <ft_putstr@plt>
mov    %rsp,%rbx
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x32,%edx
call   1030 <read@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
call   1040 <ft_strdup@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ft_prompt(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [50 x i8]
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @ft_putstr(i8* %5)
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%8 = call i32 @read(i32 0, i8* %7, i32 50)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 %11
store i8 0, i8* %12
%13 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%14 = call i8* @ft_strdup(i8* %13)
ret i8* %14
}

LLVM IR (-O2):
define i8* @ft_prompt(i8* %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @ft_putstr(i8* %0)
%5 = call i32 @read(i32 0, i8* %3, i32 50)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 %7
store i8 0, i8* %8
%9 = call i8* @ft_strdup(i8* %3)
ret i8* %9
}
void dummyaudio_VolumeSetLevel(int level) { return; }


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

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

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

LLVM IR (-O2):
define void @dummyaudio_VolumeSetLevel(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int, int);
int /*<<< orphan*/ output_w32(int);
void emit_fsqrtd(int s, int d) {
  assem_debug("fsqrtd s%d,d%d", d, s);
  output_w32(0xeeb10bc0 | ((d & 7) << 12) | (s & 7));
}


x86 assembly (clang, -O0):
<emit_fsqrtd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1030 <assem_debug@plt>
mov    -0x8(%rbp),%edi
and    $0x7,%edi
shl    $0xc,%edi
or     $0xeeb10bc0,%edi
mov    -0x4(%rbp),%eax
and    $0x7,%eax
or     %eax,%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fsqrtd>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%r14d
lea    0xed0(%rip),%rdi
mov    %r14d,%edx
call   1030 <assem_debug@plt>
and    $0x7,%ebx
shl    $0xc,%ebx
and    $0x7,%r14d
lea    (%r14,%rbx,1),%edi
add    $0xeeb10bc0,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"fsqrtd s%d,d%d\00"
define void @emit_fsqrtd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @assem_debug(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = and i32 %8, 7
%10 = shl i32 %9, 12
%11 = or i32 -290387008, %10
%12 = load i32, i32* %3
%13 = and i32 %12, 7
%14 = or i32 %11, %13
%15 = call i32 @output_w32(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"fsqrtd s%d,d%d\00"
define void @emit_fsqrtd(i32 %0, i32 %1) {
%3 = tail call i32 @assem_debug(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
%4 = shl i32 %1, 12
%5 = and i32 %4, 28672
%6 = and i32 %0, 7
%7 = or i32 %6, %5
%8 = or i32 %7, -290387008
%9 = tail call i32 @output_w32(i32 %8)
ret void
}
void arch_init_registers(int pid) {}


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

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

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

LLVM IR (-O2):
define void @arch_init_registers(i32 %0) {
ret void
}
long long swap_load(long long *a) { return __builtin_bswap64(*a); }


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

x86 assembly (clang, -O2):
<swap_load>:
mov    (%rdi),%rax
bswap  %rax
ret

LLVM IR (-O0):
define i64 @swap_load(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = call i64 @llvm.bswap.i64(i64 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @swap_load(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i64 @llvm.bswap.i64(i64 %2)
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int __SIGSUSPEND(int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int sigsuspend(const sigset_t *sigmask_p) {
  sigset_t mask;
  if (sigmask_p)
    mask = *sigmask_p;
  else
    sigemptyset(&mask);
  return __SIGSUSPEND(mask);
}


x86 assembly (clang, -O0):
<sigsuspend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1145 <sigsuspend+0x25>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    114e <sigsuspend+0x2e>
lea    -0xc(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    -0xc(%rbp),%edi
call   1030 <__SIGSUSPEND@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigsuspend>:
push   %rax
test   %rdi,%rdi
je     112e <sigsuspend+0xe>
mov    (%rdi),%edi
mov    %edi,0x4(%rsp)
jmp    113c <sigsuspend+0x1c>
lea    0x4(%rsp),%rdi
call   1040 <sigemptyset@plt>
mov    0x4(%rsp),%edi
call   1030 <__SIGSUSPEND@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @sigsuspend(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = icmp eq i32* %0, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = load i32, i32* %0
store i32 %6, i32* %2
br label %10
7: ; preds = %1
%8 = call i32 @sigemptyset(i32* %2)
%9 = load i32, i32* %2
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ %9, %7 ], [ %6, %5 ]
%12 = call i32 @__SIGSUSPEND(i32 %11)
ret i32 %12
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
int exists(const char *path) {
  struct stat sb;
  return (stat(path, &sb) == -1) ? 0 : 1;
}


x86 assembly (clang, -O0):
<exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0xffffffff,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 0, i32 1
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @exists(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp ne i32 %4, -1
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ gmx_relax(int, char **);
int main(int argc, char *argv[]) {
  gmx_relax(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_relax(i32 %0, i8** %1)
ret i32 0
}
int file_size(const char *path) {
  { (void)(path); };
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @file_size(i8* nocapture readnone %0) {
ret i32 0
}
int net_shell_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @net_shell_init() {
ret i32 0
}
float quat_dot(float *a, float *b) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
}


x86 assembly (clang, -O0):
<quat_dot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quat_dot>:
movss  0x4(%rdi),%xmm0
mulss  0x4(%rsi),%xmm0
movss  (%rdi),%xmm1
mulss  (%rsi),%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm2
mulss  0x8(%rsi),%xmm2
addss  %xmm1,%xmm2
movss  0xc(%rdi),%xmm0
mulss  0xc(%rsi),%xmm0
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @quat_dot(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = call float @llvm.fmuladd.f32(float %21, float %24, float %18)
%26 = load float*, float** %3
%27 = getelementptr inbounds float, float* %26, i64 3
%28 = load float, float* %27
%29 = load float*, float** %4
%30 = getelementptr inbounds float, float* %29, i64 3
%31 = load float, float* %30
%32 = call float @llvm.fmuladd.f32(float %28, float %31, float %25)
ret float %32
}

LLVM IR (-O2):
define float @quat_dot(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
%16 = getelementptr inbounds float, float* %0, i64 3
%17 = load float, float* %16
%18 = getelementptr inbounds float, float* %1, i64 3
%19 = load float, float* %18
%20 = tail call float @llvm.fmuladd.f32(float %17, float %19, float %15)
ret float %20
}
/* Variables and functions */
int /*<<< orphan*/ execMake(char const *, char const **, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int fork();
int waitPid(int);
int callMake(const char *what, const char *aav[]) {
  int pid;
  if ((pid = fork()) == 0) {
    execMake(what, aav, 0);
    exit(-1);
  }
  return waitPid(pid);
}


x86 assembly (clang, -O0):
<callMake>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <fork@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    117c <callMake+0x3c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1040 <execMake@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x14(%rbp),%edi
call   1030 <waitPid@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callMake>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1060 <fork@plt>
test   %eax,%eax
je     1163 <callMake+0x23>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <waitPid@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1040 <execMake@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @callMake(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i32
store i8* %0, i8** %3
store i8** %1, i8*** %4
%6 = call i32 (...) @fork()
store i32 %6, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i8**, i8*** %4
%11 = call i32 @execMake(i8* %9, i8** %10, i32 0)
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %2
%14 = load i32, i32* %5
%15 = call i32 @waitPid(i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @callMake(i8* %0, i8** %1) {
%3 = tail call i32 (...) @fork()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @execMake(i8* %0, i8** %1, i32 0)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
%9 = tail call i32 @waitPid(i32 %3)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigusr1_handler(int signo) { printf("sigusr1 handled!\n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"sigusr1 handled!\00"
define void @sigusr1_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGTSTP;
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
void linedit_stop(void) { kill(0, SIGTSTP); }


x86 assembly (clang, -O0):
<linedit_stop>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1030 <kill@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<linedit_stop>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
jmp    1030 <kill@plt>

LLVM IR (-O0):
@SIGTSTP = global i32 0
define void @linedit_stop() {
%1 = load i32, i32* @SIGTSTP
%2 = call i32 @kill(i32 0, i32 %1)
ret void
}

LLVM IR (-O2):
@SIGTSTP = global i32 0
define void @linedit_stop() {
%1 = load i32, i32* @SIGTSTP
%2 = tail call i32 @kill(i32 0, i32 %1)
ret void
}
void dsi_wait_pll_hsdiv_dsi_active(struct platform_device *dsidev) {}


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

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

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

LLVM IR (-O2):
%struct.platform_device = type opaque
define void @dsi_wait_pll_hsdiv_dsi_active(%struct.platform_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ talloc_abort(char *);
void talloc_abort_unknown_value(void) {
  talloc_abort("Bad talloc magic value - unknown value");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"Bad talloc magic value - unknown value\00"
define void @talloc_abort_unknown_value() {
%1 = call i32 @talloc_abort(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Bad talloc magic value - unknown value\00"
define void @talloc_abort_unknown_value() {
%1 = tail call i32 @talloc_abort(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void navbar() {
  printf("\t           1-Perfil            4-Categorias\n\t           "
         "2-Fornecedores      0-Voltar\n\t           3-Estoque");
}


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

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

LLVM IR (-O0):
@.str = [108 x i8] c"\09 1-Perfil 4-Categorias\0A\09 2-Fornecedores 0-Voltar\0A\09 3-Estoque\00"
define void @navbar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [108 x i8] c"\09 1-Perfil 4-Categorias\0A\09 2-Fornecedores 0-Voltar\0A\09 3-Estoque\00"
define void @navbar() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @.str, i64 0, i64 0))
ret void
}
double f(double x, double y) { return x * x - y; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mulsd  %xmm0,%xmm0
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fneg double %7
%9 = call double @llvm.fmuladd.f64(double %5, double %6, double %8)
ret double %9
}

LLVM IR (-O2):
define double @f(double %0, double %1) {
%3 = fneg double %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ ferror(int /*<<< orphan*/ *);
size_t fread(void *, size_t, size_t, int /*<<< orphan*/ *);
size_t FREAD(void *buf, size_t s, size_t n, FILE *f) {
  size_t const read = fread(buf, s, n, f);
  assert(ferror(f) == 0);
  assert(read <= s * n);
  return read;
}


x86 assembly (clang, -O0):
<FREAD>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <fread@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
imul   -0x18(%rbp),%rcx
cmp    %rcx,%rax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FREAD>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
call   1040 <fread@plt>
mov    %rax,%r12
mov    %r14,%rdi
call   1030 <ferror@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
imul   %r15,%rbx
xor    %edi,%edi
cmp    %rbx,%r12
setbe  %dil
call   1050 <assert@plt>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @FREAD(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i32*, i32** %8
%14 = call i64 @fread(i8* %10, i64 %11, i64 %12, i32* %13)
store i64 %14, i64* %9
%15 = load i32*, i32** %8
%16 = call i64 @ferror(i32* %15)
%17 = icmp eq i64 %16, 0
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i64, i64* %9
%21 = load i64, i64* %6
%22 = load i64, i64* %7
%23 = mul i64 %21, %22
%24 = icmp ule i64 %20, %23
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = load i64, i64* %9
ret i64 %27
}

LLVM IR (-O2):
define i64 @FREAD(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
%5 = tail call i64 @fread(i8* %0, i64 %1, i64 %2, i32* %3)
%6 = tail call i64 @ferror(i32* %3)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = mul i64 %2, %1
%11 = icmp ule i64 %5, %10
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
ret i64 %5
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t len = 0;
  while (str[len++])
    ;
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
cmpb   $0x0,(%rax,%rcx,1)
je     1132 <strlen+0x32>
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %4, %2 ]
%4 = add i64 %3, 1
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %2
8: ; preds = %2
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ mymsgctl(int, int, int /*<<< orphan*/);
int mymsgget(int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void RemoveMessageQueueTest4(int inputKey) {
  int msgid, len;
  int count, key;
  key = inputKey;
  if ((msgid = mymsgget(key, 0)) < 0) {
    perror("msgget");
    exit(1);
  }
  mymsgctl(msgid, (1), 0);
}


x86 assembly (clang, -O0):
<RemoveMessageQueueTest4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
xor    %esi,%esi
call   1040 <mymsgget@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    117d <RemoveMessageQueueTest4+0x3d>
lea    0xe92(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <mymsgctl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemoveMessageQueueTest4>:
push   %rax
xor    %esi,%esi
call   1040 <mymsgget@plt>
test   %eax,%eax
js     115b <RemoveMessageQueueTest4+0x1b>
mov    %eax,%edi
mov    $0x1,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <mymsgctl@plt>
lea    0xe9e(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"msgget\00"
define void @RemoveMessageQueueTest4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* %2
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @mymsgget(i32 %8, i32 0)
store i32 %9, i32* %3
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %1
%15 = load i32, i32* %3
%16 = call i32 @mymsgctl(i32 %15, i32 1, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"msgget\00"
define void @RemoveMessageQueueTest4(i32 %0) {
%2 = tail call i32 @mymsgget(i32 %0, i32 0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
%8 = tail call i32 @mymsgctl(i32 %2, i32 1, i32 0)
ret void
}
void vd(double d) { return; }


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

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

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

LLVM IR (-O2):
define void @vd(double %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ reportError(char *);
int target(FILE *stream) {
  char buf[10];
  size_t b = fread(buf, 7, 1, stream);
  if (b < 1) {
    reportError(buf);
    return -22;
  }
  return b;
}


x86 assembly (clang, -O0):
<target>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x7,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x1,-0x28(%rbp)
jae    1167 <target+0x47>
lea    -0x1a(%rbp),%rdi
call   1040 <reportError@plt>
movl   $0xffffffea,-0x4(%rbp)
jmp    116e <target+0x4e>
mov    -0x28(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target>:
sub    $0x18,%rsp
mov    %rdi,%rcx
lea    0xe(%rsp),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
test   %rax,%rax
je     1145 <target+0x25>
add    $0x18,%rsp
ret
lea    0xe(%rsp),%rdi
call   1040 <reportError@plt>
mov    $0xffffffea,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @target(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca [10 x i8]
%5 = alloca i64
store i32* %0, i32** %3
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%7 = load i32*, i32** %3
%8 = call i64 @fread(i8* %6, i32 7, i32 1, i32* %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = icmp ult i64 %9, 1
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%13 = call i32 @reportError(i8* %12)
store i32 -22, i32* %2
br label %17
14: ; preds = %1
%15 = load i64, i64* %5
%16 = trunc i64 %15 to i32
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %11
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @target(i32* nocapture %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i64 @fread(i8* %3, i32 7, i32 1, i32* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @reportError(i8* %3)
br label %10
8: ; preds = %1
%9 = trunc i64 %4 to i32
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ -22, %6 ], [ %9, %8 ]
ret i32 %11
}
char *hash_plugin_detailed(void) {
  return ("nsldaps - nsldaps (salted SHA) plugin\n"
          "------------------------\n"
          "Use this module to crack LDAP SHA passwords\n"
          "Input should be in form: \'user:hash\' or just \'hash\'\n"
          "Known software that uses this password hashing method:\n"
          "OpenLDAP, various LDAP implementations\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [299 x i8] c"nsldaps - nsldaps (salted SHA) plugin\0A------------------------\0AUse this module to crack LDAP SHA passwords\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0AOpenLDAP, various LDAP implementations\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([299 x i8], [299 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [299 x i8] c"nsldaps - nsldaps (salted SHA) plugin\0A------------------------\0AUse this module to crack LDAP SHA passwords\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0AOpenLDAP, various LDAP implementations\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([299 x i8], [299 x i8]* @.str, i64 0, i64 0)
}
void wpas_dbus_signal_debug_level_changed(struct wpa_global *global) {}


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

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

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

LLVM IR (-O2):
%struct.wpa_global = type opaque
define void @wpas_dbus_signal_debug_level_changed(%struct.wpa_global* nocapture %0) {
ret void
}
int adb_mouse_open(__attribute__((unused)) void *private) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @adb_mouse_open(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct timeval {
  unsigned long tv_usec;
  int /*<<< orphan*/ tv_sec;
};
typedef int /*<<< orphan*/ incr_usec;

/* Variables and functions */
int /*<<< orphan*/ memcpy(struct timeval *, struct timeval *, int);
int time_increment_and_copy(struct timeval *time, struct timeval *buffer,
                            unsigned int incr_usec) {
  if ((sizeof(incr_usec) == 32) && (sizeof(time->tv_usec) == 32)) {
    if ((time->tv_usec & 1UL << 31) && (incr_usec & 1UL << 31)) {
      time->tv_usec = (time->tv_usec - (1UL << 31)) + (incr_usec - (1UL << 31));
      time->tv_sec++;
    } else {
      time->tv_usec += incr_usec;
      if (time->tv_usec > 1000000) {
        time->tv_usec -= 1000000;
        time->tv_sec++;
      }
    }
  } else {
    return -1;
  }
  memcpy(buffer, time, sizeof(*time));
  return 0;
}


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

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

LLVM IR (-O0):
%struct.timeval = type { i64, i32 }
define i32 @time_increment_and_copy(%struct.timeval* %0, %struct.timeval* %1, i32 %2) {
%4 = alloca %struct.timeval*
%5 = alloca %struct.timeval*
%6 = alloca i32
store %struct.timeval* %0, %struct.timeval** %4
store %struct.timeval* %1, %struct.timeval** %5
store i32 %2, i32* %6
ret i32 -1
}

LLVM IR (-O2):
%struct.timeval = type { i64, i32 }
define i32 @time_increment_and_copy(%struct.timeval* nocapture readnone %0, %struct.timeval* nocapture readnone %1, i32 %2) {
ret i32 -1
}
int test_imm_16int64_midword_reg(long long val) {
  return ((val >> 16) & (0x16 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_16int64_midword_reg(i64 %0) {
%2 = and i64 %0, 1441792
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *Op_lt(char *, char *);
char *Op_not(char *);
int /*<<< orphan*/ mu__free(char *, int, char *);
char *Op_ge(char *arg1, char *arg2) {
  char *tmp = Op_lt(arg1, arg2);
  char *result = Op_not(tmp);
  mu__free("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/Ops.c",
           141, tmp);
  return result;
}


x86 assembly (clang, -O0):
<Op_ge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <Op_lt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <Op_not@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdx
lea    0xe97(%rip),%rdi
mov    $0x8d,%esi
call   1040 <mu__free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op_ge>:
push   %r14
push   %rbx
push   %rax
call   1050 <Op_lt@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <Op_not@plt>
mov    %rax,%r14
lea    0xeb2(%rip),%rdi
mov    $0x8d,%esi
mov    %rbx,%rdx
call   1040 <mu__free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/Ops.c\00"
define i8* @Op_ge(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i8* @Op_lt(i8* %7, i8* %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = call i8* @Op_not(i8* %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %5
%13 = call i32 @mu__free(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 141, i8* %12)
%14 = load i8*, i8** %6
ret i8* %14
}

LLVM IR (-O2):
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/Ops.c\00"
define i8* @Op_ge(i8* %0, i8* %1) {
%3 = tail call i8* @Op_lt(i8* %0, i8* %1)
%4 = tail call i8* @Op_not(i8* %3)
%5 = tail call i32 @mu__free(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 141, i8* %3)
ret i8* %4
}