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

/* Variables and functions */
void little_endian(uint32_t *buf, unsigned int words) {}


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

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

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

LLVM IR (-O2):
define void @little_endian(i32* nocapture %0, i32 %1) {
ret void
}
int h(int a, int b, int c, int d) {
  if (a == d && b > c)
    return d;
  return a;
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1133 <h+0x33>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1133 <h+0x33>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <h+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
mov    %ecx,%eax
cmp    %ecx,%edi
cmovne %edi,%eax
cmp    %edx,%esi
cmovle %edi,%eax
ret

LLVM IR (-O0):
define i32 @h(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
%11 = load i32, i32* %9
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %19
13: ; preds = %4
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load i32, i32* %9
store i32 %18, i32* %5
br label %21
19: ; preds = %13, %4
%20 = load i32, i32* %6
store i32 %20, i32* %5
br label %21
21: ; preds = %19, %17
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @h(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %0, %3
%6 = icmp sgt i32 %1, %2
%7 = and i1 %6, %5
%8 = select i1 %7, i32 %3, i32 %0
ret i32 %8
}
/* Variables and functions */
int write(int, char *, size_t);
int g_omfp_write(int fd, char *buffer, size_t max_size, void *arg) {
  return write(fd, buffer, max_size);
}


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

x86 assembly (clang, -O2):
<g_omfp_write>:
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @g_omfp_write(i32 %0, i8* nocapture %1, i64 %2, i8* nocapture readnone %3) {
%5 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
ret i32 %5
}
void gtk_tree_row_reference_deleted() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_row_reference_deleted() {
ret void
}
/* Variables and functions */
int __ESBMC_abs(int);
int abs(int i) { return __ESBMC_abs(i); }


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

x86 assembly (clang, -O2):
<abs>:
jmp    1030 <__ESBMC_abs@plt>

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @__ESBMC_abs(i32 %0)
ret i32 %2
}
/* Type definitions */
struct termios {
  int dummy;
};
typedef int /*<<< orphan*/ speed_t;

/* Variables and functions */
int /*<<< orphan*/ cfgetispeed(struct termios const *);
int /*<<< orphan*/ cfgetospeed(struct termios const *);
int /*<<< orphan*/ print_speed(char *, int /*<<< orphan*/);
void print_baudrate(const struct termios *tmios) {
  speed_t s = cfgetispeed(tmios);
  print_speed("input speed", s);
  s = cfgetospeed(tmios);
  print_speed("output speed", s);
}


x86 assembly (clang, -O0):
<print_baudrate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <cfgetispeed@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <print_speed@plt>
mov    -0x8(%rbp),%rdi
call   1050 <cfgetospeed@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <print_speed@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_baudrate>:
push   %rbx
mov    %rdi,%rbx
call   1040 <cfgetispeed@plt>
lea    0xec0(%rip),%rdi
mov    %eax,%esi
call   1030 <print_speed@plt>
mov    %rbx,%rdi
call   1050 <cfgetospeed@plt>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <print_speed@plt>

LLVM IR (-O0):
%struct.termios = type { i32 }
@.str = [12 x i8] c"input speed\00"
@.str.1 = [13 x i8] c"output speed\00"
define void @print_baudrate(%struct.termios* %0) {
%2 = alloca %struct.termios*
%3 = alloca i32
store %struct.termios* %0, %struct.termios** %2
%4 = load %struct.termios*, %struct.termios** %2
%5 = call i32 @cfgetispeed(%struct.termios* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @print_speed(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load %struct.termios*, %struct.termios** %2
%9 = call i32 @cfgetospeed(%struct.termios* %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = call i32 @print_speed(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@.str = [12 x i8] c"input speed\00"
@.str.1 = [13 x i8] c"output speed\00"
define void @print_baudrate(%struct.termios* %0) {
%2 = tail call i32 @cfgetispeed(%struct.termios* %0)
%3 = tail call i32 @print_speed(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @cfgetospeed(%struct.termios* %0)
%5 = tail call i32 @print_speed(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_relocations();
__attribute__((section(".text._init_noinit"))) int
init_noinit(int argc, char **argv, char **env) {
  do_relocations();
  return 0;
}


x86 assembly (clang, -O0):
<init_noinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <do_relocations@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @init_noinit(i32 %0, i8** %1, i8** %2) section ".text._init_noinit" {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = call i32 (...) @do_relocations()
ret i32 0
}

LLVM IR (-O2):
define i32 @init_noinit(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) section ".text._init_noinit" {
%4 = tail call i32 (...) @do_relocations()
ret i32 0
}
/* Variables and functions */
int bar1_from_bar3();
int bar3(void) { return bar1_from_bar3(); }


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

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

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

LLVM IR (-O2):
define i32 @bar3() {
%1 = tail call i32 (...) @bar1_from_bar3()
ret i32 %1
}
void *mem_copy(void *src) {
  void *tmp = (void *)malloc(mem_get_size(src) + sizeof(unsigned long));
  ((unsigned long *)tmp)[0] = mem_get_size(src);
  memcpy((char *)tmp + sizeof(unsigned long), src, mem_get_size(src));
  return ((char *)tmp + sizeof(unsigned long));
}


x86 assembly (clang, -O0):
<mem_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <mem_get_size@plt>
movslq %eax,%rdi
add    $0x8,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <mem_get_size@plt>
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <mem_get_size@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movslq %eax,%rdx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_copy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1050 <mem_get_size@plt>
movslq %eax,%rdi
add    $0x8,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <mem_get_size@plt>
cltq
mov    %rax,(%rbx)
add    $0x8,%rbx
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <mem_get_size@plt>
movslq %eax,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i8* @mem_copy(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @mem_get_size to i32 (i8*, ...)*)(i8* %4)
%6 = sext i32 %5 to i64
%7 = add i64 %6, 8
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @mem_get_size to i32 (i8*, ...)*)(i8* %9)
%11 = sext i32 %10 to i64
%12 = load i8*, i8** %3
%13 = bitcast i8* %12 to i64*
%14 = getelementptr inbounds i64, i64* %13, i64 0
store i64 %11, i64* %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 8
%17 = load i8*, i8** %2
%18 = load i8*, i8** %2
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @mem_get_size to i32 (i8*, ...)*)(i8* %18)
%20 = sext i32 %19 to i64
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 8
ret i8* %22
}

LLVM IR (-O2):
define i8* @mem_copy(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mem_get_size to i32 (i8*, ...)*)(i8* %0)
%3 = sext i32 %2 to i64
%4 = add nsw i64 %3, 8
%5 = tail call i8* @malloc(i64 %4)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mem_get_size to i32 (i8*, ...)*)(i8* %0)
%7 = sext i32 %6 to i64
%8 = bitcast i8* %5 to i64*
store i64 %7, i64* %8
%9 = getelementptr inbounds i8, i8* %5, i64 8
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mem_get_size to i32 (i8*, ...)*)(i8* %0)
%11 = sext i32 %10 to i64
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %9, i8* align 1 %0, i64 %11, i1 false)
ret i8* %9
}
int isign(int x) { return ((x) < 0) ? -1 : 1; }


x86 assembly (clang, -O0):
<isign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isign>:
mov    %edi,%eax
sar    $0x1f,%eax
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isign(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 -1, i32 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @isign(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = select i1 %2, i32 1, i32 -1
ret i32 %3
}
feq(x, y) long long int x;
long long int y;
{
  if (x == y)
    return 13;
  else
    return 140;
}


x86 assembly (clang, -O0):
<feq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1126 <feq+0x26>
movl   $0xd,-0x4(%rbp)
jmp    112d <feq+0x2d>
movl   $0x8c,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<feq>:
cmp    %rsi,%rdi
mov    $0xd,%ecx
mov    $0x8c,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @feq(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = select i1 %3, i32 13, i32 140
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert_context_process();
long nondet_long();
long schedule_timeout(long timeout) {
  long tmp;
  {
    assert_context_process();
    tmp = nondet_long();
    return (tmp);
  }
}


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

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

LLVM IR (-O0):
define i64 @schedule_timeout(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = call i32 (...) @assert_context_process()
%5 = call i64 (...) @nondet_long()
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @schedule_timeout(i64 %0) {
%2 = tail call i32 (...) @assert_context_process()
%3 = tail call i64 (...) @nondet_long()
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ ffpmrk();
extern void ftpmrk_(void) {
  ;
  ffpmrk();
  return;
}


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

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

LLVM IR (-O0):
define void @ftpmrk_() {
%1 = call i32 (...) @ffpmrk()
ret void
}

LLVM IR (-O2):
define void @ftpmrk_() {
%1 = tail call i32 (...) @ffpmrk()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ get_current_dir_name();
int /*<<< orphan*/ printf(char *, char *);
void show_prompt() {
  char *pwd = (char *)get_current_dir_name();
  printf("%s> ", pwd);
  free(pwd);
}


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

x86 assembly (clang, -O2):
<show_prompt>:
push   %rbx
xor    %eax,%eax
call   1050 <get_current_dir_name@plt>
mov    %rax,%rbx
lea    0xebe(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s> \00"
define void @show_prompt() {
%1 = tail call i64 (...) @get_current_dir_name()
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @free(i8* %2)
ret void
}
unsigned int *createTaskStack(unsigned int *userStack, void (*func)(void)) {
  static unsigned char first = 1;
  userStack += 256 - 16;
  if (first) {
    userStack[8] = (unsigned int)func;
    first = 0;
  } else {
    userStack[8] = 0xfffffffd;
    userStack[15] = (unsigned int)func;
    userStack[16] = 0x01000000;
  }
  return userStack;
}


x86 assembly (clang, -O0):
<createTaskStack>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x3c0,%rax
mov    %rax,-0x8(%rbp)
cmpb   $0x0,0x2eff(%rip)
je     1140 <createTaskStack+0x40>
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
movb   $0x0,0x2ee5(%rip)
jmp    1163 <createTaskStack+0x63>
mov    -0x8(%rbp),%rax
movl   $0xfffffffd,0x20(%rax)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x3c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1000000,0x40(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<createTaskStack>:
mov    %rdi,%rax
cmpb   $0x0,0x2f17(%rip)
je     1123 <createTaskStack+0x23>
mov    %esi,0x3fc(%rax)
movl   $0x1000000,0x400(%rax)
mov    $0xfffffffd,%esi
jmp    112a <createTaskStack+0x2a>
movb   $0x1,0x2ef7(%rip)
mov    %esi,0x3e0(%rax)
add    $0x3c0,%rax
ret

LLVM IR (-O0):
@createTaskStack.first = internal global i8 1
define i32* @createTaskStack(i32* %0, void ()* %1) {
%3 = alloca i32*
%4 = alloca void ()*
store i32* %0, i32** %3
store void ()* %1, void ()** %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 240
store i32* %6, i32** %3
%7 = load i8, i8* @createTaskStack.first
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load void ()*, void ()** %4
%11 = ptrtoint void ()* %10 to i32
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 8
store i32 %11, i32* %13
store i8 0, i8* @createTaskStack.first
br label %23
14: ; preds = %2
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 8
store i32 -3, i32* %16
%17 = load void ()*, void ()** %4
%18 = ptrtoint void ()* %17 to i32
%19 = load i32*, i32** %3
%20 = getelementptr inbounds i32, i32* %19, i64 15
store i32 %18, i32* %20
%21 = load i32*, i32** %3
%22 = getelementptr inbounds i32, i32* %21, i64 16
store i32 16777216, i32* %22
br label %23
23: ; preds = %14, %9
%24 = load i32*, i32** %3
ret i32* %24
}

LLVM IR (-O2):
@createTaskStack.first = internal unnamed_addr global i1 false
define i32* @createTaskStack(i32* writeonly %0, void ()* %1) {
%3 = load i1, i1* @createTaskStack.first
%4 = ptrtoint void ()* %1 to i64
%5 = trunc i64 %4 to i32
br i1 %3, label %7, label %6
6: ; preds = %2
store i1 true, i1* @createTaskStack.first
br label %10
7: ; preds = %2
%8 = getelementptr inbounds i32, i32* %0, i64 255
store i32 %5, i32* %8
%9 = getelementptr inbounds i32, i32* %0, i64 256
store i32 16777216, i32* %9
br label %10
10: ; preds = %7, %6
%11 = phi i32 [ -3, %7 ], [ %5, %6 ]
%12 = getelementptr inbounds i32, i32* %0, i64 248
store i32 %11, i32* %12
%13 = getelementptr inbounds i32, i32* %0, i64 240
ret i32* %13
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char *);
char *concatenar(char *codigo, char novo) {
  size_t tamanho = strlen(codigo);
  char *novo_codigo = (char *)malloc(tamanho + 2);
  strcpy(novo_codigo, codigo);
  novo_codigo[tamanho] = novo;
  novo_codigo[tamanho + 1] = '\0';
  return novo_codigo;
}


x86 assembly (clang, -O0):
<concatenar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x9(%rbp),%dl
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,0x1(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concatenar>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%r15
call   1040 <strlen@plt>
mov    %rax,%rbp
lea    0x2(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %r14b,(%rbx,%rbp,1)
movb   $0x0,0x1(%rbx,%rbp,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @concatenar(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %3
store i8 %1, i8* %4
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = add i64 %9, 2
%11 = call i64 @malloc(i64 %10)
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %6
%13 = load i8*, i8** %6
%14 = load i8*, i8** %3
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8, i8* %4
%17 = load i8*, i8** %6
%18 = load i64, i64* %5
%19 = getelementptr inbounds i8, i8* %17, i64 %18
store i8 %16, i8* %19
%20 = load i8*, i8** %6
%21 = load i64, i64* %5
%22 = add i64 %21, 1
%23 = getelementptr inbounds i8, i8* %20, i64 %22
store i8 0, i8* %23
%24 = load i8*, i8** %6
ret i8* %24
}

LLVM IR (-O2):
define i8* @concatenar(i8* %0, i8 signext %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add i64 %3, 2
%5 = tail call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
%8 = getelementptr inbounds i8, i8* %6, i64 %3
store i8 %1, i8* %8
%9 = add i64 %3, 1
%10 = getelementptr inbounds i8, i8* %6, i64 %9
store i8 0, i8* %10
ret i8* %6
}
int test_imm_33int32_mem(int *val) {
  return ((*val) & (0x33 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_33int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x33,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_33int32_mem>:
testb  $0x33,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_33int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 51
%6 = icmp ne i32 %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_33int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 51
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
float sqrtf(float);
float el_eccf(float semiMajor, float semiMinor) {
  return sqrtf(1.0f - (semiMinor / semiMajor) * (semiMinor / semiMajor));
}


x86 assembly (clang, -O0):
<el_eccf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
divss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
divss  -0x4(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xeb1(%rip),%xmm1
addss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<el_eccf>:
divss  %xmm0,%xmm1
mulss  %xmm1,%xmm1
movss  0xee0(%rip),%xmm0
subss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1131 <el_eccf+0x21>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @el_eccf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = fdiv float %5, %6
%8 = load float, float* %4
%9 = load float, float* %3
%10 = fdiv float %8, %9
%11 = fneg float %7
%12 = call float @llvm.fmuladd.f32(float %11, float %10, float 1.000000e+00)
%13 = call float @sqrtf(float %12)
ret float %13
}

LLVM IR (-O2):
define float @el_eccf(float %0, float %1) {
%3 = fdiv float %1, %0
%4 = fneg float %3
%5 = tail call float @llvm.fmuladd.f32(float %4, float %3, float 1.000000e+00)
%6 = tail call float @sqrtf(float %5)
ret float %6
}
void eglBindTexImage(void) { return; }


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

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

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

LLVM IR (-O2):
define void @eglBindTexImage() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ stdin;
void read(char *line) {
  memset(line, 0, 1000);
  fgets(line, 1000, stdin);
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1040 <fgets@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x3e8,%edx
call   1030 <memset@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x3e8,%esi
pop    %rbx
jmp    1040 <fgets@plt>

LLVM IR (-O0):
@stdin = global i32 0
define void @read(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @memset(i8* %3, i32 0, i32 1000)
%5 = load i8*, i8** %2
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 1000, i32 %6)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @read(i8* %0) {
%2 = tail call i32 @memset(i8* %0, i32 0, i32 1000)
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgets(i8* %0, i32 1000, i32 %3)
ret void
}
const char *plugin_api_info_weechat_site_cb(const void *pointer, void *data,
                                            const char *info_name,
                                            const char *arguments) {
  (void)pointer;
  (void)data;
  (void)info_name;
  (void)arguments;
  return "https://weechat.org/";
}


x86 assembly (clang, -O0):
<plugin_api_info_weechat_site_cb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    0xee5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"https://weechat.org/\00"
define i8* @plugin_api_info_weechat_site_cb(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"https://weechat.org/\00"
define i8* @plugin_api_info_weechat_site_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}
int func2(float f) { return 1; }


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func2(float %0) {
ret i32 1
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ sigset_t;
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int _NSIG;
int __rt_sigtimedwait(int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                      struct timespec const *, int);
int sigtimedwait(const sigset_t *set, siginfo_t *info,
                 const struct timespec *ts) {
  return __rt_sigtimedwait(set, info, ts, _NSIG / 8);
}


x86 assembly (clang, -O0):
<sigtimedwait>:
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),%rax
mov    %rax,-0x20(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1030 <__rt_sigtimedwait@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigtimedwait>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
lea    0x7(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
sar    $0x3,%ecx
jmp    1030 <__rt_sigtimedwait@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@_NSIG = global i32 0
define i32 @sigtimedwait(i32* %0, i32* %1, %struct.timespec* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca %struct.timespec*
store i32* %0, i32** %4
store i32* %1, i32** %5
store %struct.timespec* %2, %struct.timespec** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load %struct.timespec*, %struct.timespec** %6
%10 = load i32, i32* @_NSIG
%11 = sdiv i32 %10, 8
%12 = call i32 @__rt_sigtimedwait(i32* %7, i32* %8, %struct.timespec* %9, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@_NSIG = global i32 0
define i32 @sigtimedwait(i32* %0, i32* %1, %struct.timespec* %2) {
%4 = load i32, i32* @_NSIG
%5 = sdiv i32 %4, 8
%6 = tail call i32 @__rt_sigtimedwait(i32* %0, i32* %1, %struct.timespec* %2, i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void func3() {
  int a = 3;
  int b = 6;
  printf("%d\n", a + b);
}


x86 assembly (clang, -O0):
<func3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
mov    -0x4(%rbp),%esi
add    -0x8(%rbp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func3>:
lea    0xee9(%rip),%rdi
mov    $0x9,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @func3() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 9)
ret void
}
int f_blt_mm1(float *a1, float *a2) { return (__builtin_isless(*a1, *a2)); }


x86 assembly (clang, -O0):
<f_blt_mm1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_blt_mm1>:
movss  (%rsi),%xmm0
xor    %eax,%eax
ucomiss (%rdi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @f_blt_mm1(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fcmp olt float %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @f_blt_mm1(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fcmp olt float %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int strlen(char *);
void RemoveBlanks(char *p) {
  int l;
  l = strlen(p);
  while (l && p[l - 1] == ' ')
    p[--l] = 0;
}


x86 assembly (clang, -O0):
<RemoveBlanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1151 <RemoveBlanks+0x41>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1161 <RemoveBlanks+0x51>
jmp    117a <RemoveBlanks+0x6a>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1128 <RemoveBlanks+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemoveBlanks>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
je     1142 <RemoveBlanks+0x32>
movslq %eax,%rcx
neg    %eax
add    %rbx,%rcx
add    $0xffffffffffffffff,%rcx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
cmpb   $0x20,(%rcx,%rdx,1)
jne    1142 <RemoveBlanks+0x32>
movb   $0x0,(%rcx,%rdx,1)
add    $0xffffffffffffffff,%rdx
cmp    %edx,%eax
jne    1130 <RemoveBlanks+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @RemoveBlanks(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1
%5 = sext i32 %2 to i64
br label %6
6: ; preds = %4, %12
%7 = phi i64 [ %5, %4 ], [ %8, %12 ]
%8 = add nsw i64 %7, -1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 32
br i1 %11, label %12, label %15
12: ; preds = %6
store i8 0, i8* %9
%13 = trunc i64 %8 to i32
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %6, %12, %1
ret void
}
void test14() {
  typedef long long __m64 __attribute__((__vector_size__(8)));
  typedef short __v4hi __attribute__((__vector_size__(8)));
  __v4hi a;
  __m64 mask = (__m64)((__v4hi)a > (__v4hi)a);
}


x86 assembly (clang, -O0):
<test14>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test14() {
%1 = alloca <4 x i16>
%2 = alloca <1 x i64>
%3 = load <4 x i16>, <4 x i16>* %1
%4 = load <4 x i16>, <4 x i16>* %1
%5 = icmp sgt <4 x i16> %3, %4
%6 = sext <4 x i1> %5 to <4 x i16>
%7 = bitcast <4 x i16> %6 to <1 x i64>
store <1 x i64> %7, <1 x i64>* %2
ret void
}

LLVM IR (-O2):
define void @test14() {
ret void
}
void PyThread_delete_key_value(int key) {}


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

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

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

LLVM IR (-O2):
define void @PyThread_delete_key_value(i32 %0) {
ret void
}
/* Variables and functions */
int readlink(char const *, char *, int);
int Sys_Readlink(const char *path, char *buf, int bufsiz) {
  return readlink(path, buf, bufsiz);
}


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

x86 assembly (clang, -O2):
<Sys_Readlink>:
jmp    1030 <readlink@plt>

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

LLVM IR (-O2):
define i32 @Sys_Readlink(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @readlink(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
int do_239() { return 239; }


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

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

LLVM IR (-O0):
define i32 @do_239() {
ret i32 239
}

LLVM IR (-O2):
define i32 @do_239() {
ret i32 239
}
int stat(const char *file_name, struct stat *buf) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @stat(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int xbp_dlclose(void *);
int __wrap_dlclose(void *handle) { return xbp_dlclose(handle); }


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

x86 assembly (clang, -O2):
<__wrap_dlclose>:
jmp    1030 <xbp_dlclose@plt>

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

LLVM IR (-O2):
define i32 @__wrap_dlclose(i8* %0) {
%2 = tail call i32 @xbp_dlclose(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
scalar_t__ unaligned_read_le16(int /*<<< orphan*/ const *);
uint32_t unaligned_read_le32(const void *_u) {
  const uint8_t *u = _u;
  return (((uint32_t)unaligned_read_le16(u + 2)) << 16) |
         ((uint32_t)unaligned_read_le16(u));
}


x86 assembly (clang, -O0):
<unaligned_read_le32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1030 <unaligned_read_le16@plt>
shl    $0x10,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <unaligned_read_le16@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unaligned_read_le32>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
add    $0x8,%rdi
call   1030 <unaligned_read_le16@plt>
mov    %rax,%rbx
shl    $0x10,%ebx
mov    %r14,%rdi
call   1030 <unaligned_read_le16@plt>
or     %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @unaligned_read_le32(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 2
%8 = call i64 @unaligned_read_le16(i32* %7)
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 16
%11 = load i32*, i32** %3
%12 = call i64 @unaligned_read_le16(i32* %11)
%13 = trunc i64 %12 to i32
%14 = or i32 %10, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @unaligned_read_le32(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i32*
%5 = tail call i64 @unaligned_read_le16(i32* %4)
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 16
%8 = tail call i64 @unaligned_read_le16(i32* %2)
%9 = trunc i64 %8 to i32
%10 = or i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRBB_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRBB_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRBB_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void exitif(int test, char *message) {
  if (test) {
    printf("Carre : %s\n", message);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<exitif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1153 <exitif+0x33>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exitif>:
test   %edi,%edi
jne    1125 <exitif+0x5>
ret
push   %rax
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"Carre : %s\0A\00"
define void @exitif(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int smunch(int, unsigned long);
int main(int argc, char **argv) {
  int ret;
  unsigned long bitpattern = 0;
  int pid = atoi(argv[1]);
  bitpattern |= 256;
  ret = smunch(pid, bitpattern);
  printf("SMUNCH RETURNED %d \n", ret);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
or     $0x100,%rax
mov    %rax,-0x20(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <smunch@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    $0x100,%esi
mov    %eax,%edi
call   1030 <smunch@plt>
lea    0xeb3(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"SMUNCH RETURNED %d \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %8
%13 = load i64, i64* %7
%14 = or i64 %13, 256
store i64 %14, i64* %7
%15 = load i32, i32* %8
%16 = load i64, i64* %7
%17 = call i32 @smunch(i32 %15, i64 %16)
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"SMUNCH RETURNED %d \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @smunch(i32 %5, i64 256)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int myfgetc(int /*<<< orphan*/ *);
int getc_unlocked(FILE *stream) { return myfgetc(stream); }


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

x86 assembly (clang, -O2):
<getc_unlocked>:
jmp    1030 <myfgetc@plt>

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

LLVM IR (-O2):
define i32 @getc_unlocked(i32* %0) {
%2 = tail call i32 @myfgetc(i32* %0)
ret i32 %2
}
/* Variables and functions */
int color_eqn(int, int, int, int, int, int);
int r_cymg_yeg_yemg(int entrycyg, int entrycymg, int entryyeg, int entryyemg) {
  return color_eqn(149, entryyemg, -56, entrycymg, -66, entryyeg);
}


x86 assembly (clang, -O0):
<r_cymg_yeg_yemg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%r9d
mov    $0x95,%edi
mov    $0xffffffc8,%edx
mov    $0xffffffbe,%r8d
call   1030 <color_eqn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_cymg_yeg_yemg>:
mov    %edx,%r9d
mov    %esi,%eax
mov    $0x95,%edi
mov    %ecx,%esi
mov    $0xffffffc8,%edx
mov    %eax,%ecx
mov    $0xffffffbe,%r8d
jmp    1030 <color_eqn@plt>

LLVM IR (-O0):
define i32 @r_cymg_yeg_yemg(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @color_eqn(i32 149, i32 %9, i32 -56, i32 %10, i32 -66, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @r_cymg_yeg_yemg(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @color_eqn(i32 149, i32 %3, i32 -56, i32 %1, i32 -66, i32 %2)
ret i32 %5
}
int dmtcp_modify_env_enabled() { return 1; }


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

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

LLVM IR (-O0):
define i32 @dmtcp_modify_env_enabled() {
ret i32 1
}

LLVM IR (-O2):
define i32 @dmtcp_modify_env_enabled() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ ROL_();
int /*<<< orphan*/ c64_memAbsoluteAddrX();
void ROL_absx(void) {
  c64_memAbsoluteAddrX();
  ROL_();
}


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

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

LLVM IR (-O0):
define void @ROL_absx() {
%1 = call i32 (...) @c64_memAbsoluteAddrX()
%2 = call i32 (...) @ROL_()
ret void
}

LLVM IR (-O2):
define void @ROL_absx() {
%1 = tail call i32 (...) @c64_memAbsoluteAddrX()
%2 = tail call i32 (...) @ROL_()
ret void
}