xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ GL_FLAT;
int /*<<< orphan*/ GL_UNPACK_ROW_LENGTH;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glPixelStorei(int /*<<< orphan*/, int);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ loadImage();
void init(void) {
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glShadeModel(GL_FLAT);
  loadImage();
  glPixelStorei(GL_UNPACK_ROW_LENGTH, 700);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1040 <glClearColor@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
mov    $0x0,%al
call   1050 <loadImage@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
mov    $0x2bc,%esi
call   1030 <glPixelStorei@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1040 <glClearColor@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
xor    %eax,%eax
call   1050 <loadImage@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
mov    $0x2bc,%esi
pop    %rax
jmp    1030 <glPixelStorei@plt>

LLVM IR (-O0):
@GL_FLAT = global i32 0
@GL_UNPACK_ROW_LENGTH = global i32 0
define void @init() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_FLAT
%3 = call i32 @glShadeModel(i32 %2)
%4 = call i32 (...) @loadImage()
%5 = load i32, i32* @GL_UNPACK_ROW_LENGTH
%6 = call i32 @glPixelStorei(i32 %5, i32 700)
ret void
}

LLVM IR (-O2):
@GL_FLAT = global i32 0
@GL_UNPACK_ROW_LENGTH = global i32 0
define void @init() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_FLAT
%3 = tail call i32 @glShadeModel(i32 %2)
%4 = tail call i32 (...) @loadImage()
%5 = load i32, i32* @GL_UNPACK_ROW_LENGTH
%6 = tail call i32 @glPixelStorei(i32 %5, i32 700)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_head_licence_snmf();
int /*<<< orphan*/ printf(char *);
void print_head_snmf() {
  print_head_licence_snmf();
  printf("****                      TESS3 version 1.0                          "
         "           *****\n"
         "****   K. Caye, T. Deist, H. Martins, O. Michel, O. Francois         "
         "*****\n"
         "****                    Please cite our paper !                      "
         "          *****\n"
         "****   Information at ????   *****\n\n");
}


x86 assembly (clang, -O0):
<print_head_snmf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <print_head_licence_snmf@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [283 x i8] c"**** TESS3 version 1.0 *****\0A**** K. Caye, T. Deist, H. Martins, O. Michel, O. Francois *****\0A**** Please cite our paper ! *****\0A**** Information at ???? *****\0A\0A\00"
define void @print_head_snmf() {
%1 = call i32 (...) @print_head_licence_snmf()
%2 = call i32 @printf(i8* getelementptr inbounds ([283 x i8], [283 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [282 x i8] c"**** TESS3 version 1.0 *****\0A**** K. Caye, T. Deist, H. Martins, O. Michel, O. Francois *****\0A**** Please cite our paper ! *****\0A**** Information at ???? *****\0A\00"
define void @print_head_snmf() {
%1 = tail call i32 (...) @print_head_licence_snmf()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([282 x i8], [282 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int my_strlen(char *str) {
  int loop;
  loop = 0;
  if (str == NULL)
    return (-1);
  while (str[loop] != '\0')
    ++loop;
  return (loop);
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1126 <my_strlen+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <my_strlen+0x54>
jmp    112b <my_strlen+0x2b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114e <my_strlen+0x4e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <my_strlen+0x2b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     111c <my_strlen+0x1c>
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <my_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ -1, %1 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
unsigned int ARRAY_SIZE(unsigned int const *);
int /*<<< orphan*/ assert(int);
unsigned int tlb_decode_size(unsigned int f) {
  static const unsigned int sizes[] = {
      1 * 1024,   4 * 1024,        16 * 1024,       64 * 1024,
      256 * 1024, 1 * 1024 * 1024, 4 * 1024 * 1024, 16 * 1024 * 1024};
  assert(f < ARRAY_SIZE(sizes));
  return sizes[f];
}


x86 assembly (clang, -O0):
<tlb_decode_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    0xec8(%rip),%rdi
call   1040 <ARRAY_SIZE@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0xea3(%rip),%rax
mov    (%rax,%rcx,4),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tlb_decode_size>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xed3(%rip),%r14
mov    %r14,%rdi
call   1040 <ARRAY_SIZE@plt>
xor    %edi,%edi
cmp    %ebx,%eax
seta   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
mov    (%r14,%rax,4),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@tlb_decode_size.sizes = internal constant [8 x i32] [i32 1024, i32 4096, i32 16384, i32 65536, i32 262144, i32 1048576, i32 4194304, i32 16777216]
define i32 @tlb_decode_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ARRAY_SIZE(i32* getelementptr inbounds ([8 x i32], [8 x i32]* @tlb_decode_size.sizes, i64 0, i64 0))
%5 = icmp ult i32 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [8 x i32], [8 x i32]* @tlb_decode_size.sizes, i64 0, i64 %9
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
@tlb_decode_size.sizes = internal constant [8 x i32] [i32 1024, i32 4096, i32 16384, i32 65536, i32 262144, i32 1048576, i32 4194304, i32 16777216]
define i32 @tlb_decode_size(i32 %0) {
%2 = tail call i32 @ARRAY_SIZE(i32* getelementptr inbounds ([8 x i32], [8 x i32]* @tlb_decode_size.sizes, i64 0, i64 0))
%3 = icmp ugt i32 %2, %0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = zext i32 %0 to i64
%7 = getelementptr inbounds [8 x i32], [8 x i32]* @tlb_decode_size.sizes, i64 0, i64 %6
%8 = load i32, i32* %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
int /*<<< orphan*/ memcpy(void *, void *, int);
void *realloc_(void *x, int m, int n) {
  void *y = malloc(n);
  if (!y)
    return NULL;
  memcpy(y, x, m);
  free(x);
  return y;
}


x86 assembly (clang, -O0):
<realloc_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1166 <realloc_+0x36>
movq   $0x0,-0x8(%rbp)
jmp    1187 <realloc_+0x57>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc_>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %edx,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115d <realloc_+0x2d>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @realloc_(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @malloc(i32 %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 @memcpy(i8* %4, i8* %0, i32 %1)
%8 = tail call i32 @free(i8* %0)
br label %9
9: ; preds = %3, %6
ret i8* %4
}
void sol_ptr_vector_steal(struct sol_ptr_vector *to,
                          struct sol_ptr_vector *from) {}


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

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

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

LLVM IR (-O2):
%struct.sol_ptr_vector = type opaque
define void @sol_ptr_vector_steal(%struct.sol_ptr_vector* nocapture %0, %struct.sol_ptr_vector* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void display_help() {
  printf("Usage: dnsproxy [options]\n"
         "  -d or --daemon\n"
         "                       (daemon mode)\n"
         "  -p <port> or --port=<port>\n"
         "                       (local bind port, default 53)\n"
         "  -R <ip> or --remote-addr=<ip>\n"
         "                       (remote server ip, default 8.8.8.8)\n"
         "  -P <port> or --remote-port=<port>\n"
         "                       (remote server port, default 53)\n"
         "  -T or --remote-tcp\n"
         "                       (connect remote server in tcp, default no)\n"
         "  -f <file> or --hosts-file=<file>\n"
         "                       (user-defined hosts file)\n"
         "  -h, --help           (print help and exit)\n"
         "  -v, --version        (print version and exit)\n");
}


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

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

LLVM IR (-O0):
@.str = [610 x i8] c"Usage: dnsproxy [options]\0A -d or --daemon\0A (daemon mode)\0A -p <port> or --port=<port>\0A (local bind port, default 53)\0A -R <ip> or --remote-addr=<ip>\0A (remote server ip, default 8.8.8.8)\0A -P <port> or --remote-port=<port>\0A (remote server port, default 53)\0A -T or --remote-tcp\0A (connect remote server in tcp, default no)\0A -f <file> or --hosts-file=<file>\0A (user-defined hosts file)\0A -h, --help (print help and exit)\0A -v, --version (print version and exit)\0A\00"
define void @display_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([610 x i8], [610 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [609 x i8] c"Usage: dnsproxy [options]\0A -d or --daemon\0A (daemon mode)\0A -p <port> or --port=<port>\0A (local bind port, default 53)\0A -R <ip> or --remote-addr=<ip>\0A (remote server ip, default 8.8.8.8)\0A -P <port> or --remote-port=<port>\0A (remote server port, default 53)\0A -T or --remote-tcp\0A (connect remote server in tcp, default no)\0A -f <file> or --hosts-file=<file>\0A (user-defined hosts file)\0A -h, --help (print help and exit)\0A -v, --version (print version and exit)\00"
define void @display_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([609 x i8], [609 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *TrioDuplicateMax(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ trio_length(char const *);
char *trio_duplicate(const char *source) {
  return TrioDuplicateMax(source, trio_length(source));
}


x86 assembly (clang, -O0):
<trio_duplicate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <trio_length@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <TrioDuplicateMax@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trio_duplicate>:
push   %rbx
mov    %rdi,%rbx
call   1040 <trio_length@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <TrioDuplicateMax@plt>

LLVM IR (-O0):
define i8* @trio_duplicate(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @trio_length(i8* %4)
%6 = call i8* @TrioDuplicateMax(i8* %3, i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @trio_duplicate(i8* %0) {
%2 = tail call i32 @trio_length(i8* %0)
%3 = tail call i8* @TrioDuplicateMax(i8* %0, i32 %2)
ret i8* %3
}
int main(int argc, char *argv[]) {
#pragma starpu initialize
  int x[123] __attribute__((unused));
  static char z[345] __attribute__((unused));
#pragma starpu register x
#pragma starpu unregister
#pragma starpu unregister 123
#pragma starpu unregister does_not_exit
#pragma starpu unregister argc
#pragma starpu unregister y
#pragma starpu unregister x
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
add    $0x180,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@main.z = internal global [345 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [123 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
ret i32 1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 1
}
double s2d(s)
int s;
{ return s; }


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

x86 assembly (clang, -O2):
<s2d>:
cvtsi2sd %edi,%xmm0
ret

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

LLVM IR (-O2):
define double @s2d(i32 %0) {
%2 = sitofp i32 %0 to double
ret double %2
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TCGETS;
int ioctl(int, int /*<<< orphan*/, struct termios *);
int tcgetattr(int fd, struct termios *termios_p) {
  return ioctl(fd, TCGETS, termios_p);
}


x86 assembly (clang, -O0):
<tcgetattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcgetattr>:
mov    %rsi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
%struct.termios = type { i32 }
@TCGETS = global i32 0
define i32 @tcgetattr(i32 %0, %struct.termios* %1) {
%3 = alloca i32
%4 = alloca %struct.termios*
store i32 %0, i32* %3
store %struct.termios* %1, %struct.termios** %4
%5 = load i32, i32* %3
%6 = load i32, i32* @TCGETS
%7 = load %struct.termios*, %struct.termios** %4
%8 = call i32 @ioctl(i32 %5, i32 %6, %struct.termios* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@TCGETS = global i32 0
define i32 @tcgetattr(i32 %0, %struct.termios* %1) {
%3 = load i32, i32* @TCGETS
%4 = tail call i32 @ioctl(i32 %0, i32 %3, %struct.termios* %1)
ret i32 %4
}
int test_parse(int number, char *test, char *result) { return 0; }


x86 assembly (clang, -O0):
<test_parse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_parse(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @test_parse(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Type definitions */
struct mg_connection {
  int dummy;
};

/* Variables and functions */
void mg_if_recved(struct mg_connection *nc, size_t len) {
  (void)nc;
  (void)len;
}


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

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

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
define void @mg_if_recved(%struct.mg_connection* %0, i64 %1) {
%3 = alloca %struct.mg_connection*
%4 = alloca i64
store %struct.mg_connection* %0, %struct.mg_connection** %3
store i64 %1, i64* %4
%5 = load %struct.mg_connection*, %struct.mg_connection** %3
%6 = load i64, i64* %4
ret void
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
define void @mg_if_recved(%struct.mg_connection* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
float getDistanceFromApi();
int /*<<< orphan*/ printf(char *, float);
int main(int argc, char **argv) {
  float distance;
  distance = getDistanceFromApi();
  printf("distance=%0.1f\n", distance);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getDistanceFromApi@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"distance=%0.1f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call float (...) @getDistanceFromApi()
store float %7, float* %6
%8 = load float, float* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"distance=%0.1f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call float (...) @getDistanceFromApi()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), float %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("ha"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"ha\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ eliminate();
int /*<<< orphan*/ f2(void *, void *);
void g2(void *p, void *q) {
  f2(q, p);
  if (p == 0)
    eliminate();
}


x86 assembly (clang, -O0):
<g2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <f2@plt>
cmpq   $0x0,-0x8(%rbp)
jne    114f <g2+0x2f>
mov    $0x0,%al
call   1040 <eliminate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1030 <f2@plt>
test   %rbx,%rbx
je     1136 <g2+0x16>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
jmp    1040 <eliminate@plt>

LLVM IR (-O0):
define void @g2(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @f2(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @eliminate()
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
define void @g2(i8* %0, i8* %1) {
%3 = tail call i32 @f2(i8* %1, i8* %0)
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @eliminate()
br label %7
7: ; preds = %5, %2
ret void
}
void prefetcht0(const void *v) {
  __asm__ volatile("prefetcht0 %0" : : "m"(*(const char *)v));
}


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

x86 assembly (clang, -O2):
<prefetcht0>:
prefetcht0 (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetcht0(i8* %0) {
tail call void asm sideeffect "prefetcht0 $0", "*m,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %0)
ret void
}
int test_imm_7Fuint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x7F << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_7Fuint64_highword_reg>:
movabs $0x7f00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_7Fuint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 127
%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_7Fuint64_highword_reg(i64 %0) {
%2 = and i64 %0, 545460846592
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void EGdisplayString(void *str, FILE *file) {
  fprintf(file, "%s", (char *)str);
}


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

x86 assembly (clang, -O2):
<EGdisplayString>:
jmp    1030 <fputs@plt>

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

LLVM IR (-O2):
define void @EGdisplayString(i8* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @fputs(i8* %0, i32* %1)
ret void
}
/* Variables and functions */
double exp(double);
double pow(int, int);
int q9(int ox) {
  double a = 100.8, b = -106.0, c = -3745.0, q9;
  q9 = a * exp(pow((ox + b), 2) / c);
}


x86 assembly (clang, -O0):
<q9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
movsd  0xedd(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
divsd  -0x20(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q9>:
push   %rax
add    $0xffffff96,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
divsd  0xeca(%rip),%xmm0
ucomisd 0xeca(%rip),%xmm0
ja     1150 <q9+0x30>
movsd  0xec8(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1150 <q9+0x30>
pop    %rcx
ret
call   1030 <exp@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @q9(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 %0, i32* %3
store double 1.008000e+02, double* %4
store double -1.060000e+02, double* %5
store double -3.745000e+03, double* %6
%8 = load double, double* %4
%9 = load i32, i32* %3
%10 = sitofp i32 %9 to double
%11 = load double, double* %5
%12 = fadd double %10, %11
%13 = fptosi double %12 to i32
%14 = call double @pow(i32 %13, i32 2)
%15 = load double, double* %6
%16 = fdiv double %14, %15
%17 = call double @exp(double %16)
%18 = fmul double %8, %17
store double %18, double* %7
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @q9(i32 %0) {
%2 = add i32 %0, -106
%3 = tail call double @pow(i32 %2, i32 2)
%4 = fdiv double %3, -3.745000e+03
%5 = fcmp olt double %4, -7.450000e+02
%6 = fcmp ogt double %4, 7.090000e+02
%7 = or i1 %6, %5
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = tail call double @exp(double %4)
br label %10
10: ; preds = %1, %8
ret i32 undef
}
int test_imm_95uint16_mem(unsigned short *val) {
  return ((*val) & (-0x95 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_95uint16_mem>:
movzwl (%rdi),%eax
test   $0xff6b,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_95uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -149
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int comparator_for_bsearch_id64(const void *key, const void *member) {
  const int *keyptr = key;
  const int *memptr = member;
  const int keyval = *keyptr;
  const int memval = *memptr;
  return (keyval < memval) ? -1 : ((keyval == memval) ? 0 : 1);
}


x86 assembly (clang, -O0):
<comparator_for_bsearch_id64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1147 <comparator_for_bsearch_id64+0x47>
mov    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
jmp    115c <comparator_for_bsearch_id64+0x5c>
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparator_for_bsearch_id64>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @comparator_for_bsearch_id64(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %5
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %6
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
store i32 %14, i32* %7
%15 = load i32*, i32** %6
%16 = load i32, i32* %15
store i32 %16, i32* %8
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %2
br label %27
21: ; preds = %2
%22 = load i32, i32* %7
%23 = load i32, i32* %8
%24 = icmp eq i32 %22, %23
%25 = zext i1 %24 to i64
%26 = select i1 %24, i32 0, i32 1
br label %27
27: ; preds = %21, %20
%28 = phi i32 [ -1, %20 ], [ %26, %21 ]
ret i32 %28
}

LLVM IR (-O2):
define i32 @comparator_for_bsearch_id64(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = icmp ne i32 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void gtk_separator_menu_item_new() {}


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

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

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

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

/* Variables and functions */
int sys_newfstatat(int, char const *, struct kernel_stat *, int /*<<< orphan*/);
int sys_stat(const char *pathname, struct kernel_stat *buf) {
  return sys_newfstatat((-100), pathname, buf, 0);
}


x86 assembly (clang, -O0):
<sys_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0xffffff9c,%edi
xor    %ecx,%ecx
call   1030 <sys_newfstatat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_stat>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xffffff9c,%edi
xor    %ecx,%ecx
jmp    1030 <sys_newfstatat@plt>

LLVM IR (-O0):
%struct.kernel_stat = type { i32 }
define i32 @sys_stat(i8* %0, %struct.kernel_stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.kernel_stat*
store i8* %0, i8** %3
store %struct.kernel_stat* %1, %struct.kernel_stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.kernel_stat*, %struct.kernel_stat** %4
%7 = call i32 @sys_newfstatat(i32 -100, i8* %5, %struct.kernel_stat* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.kernel_stat = type { i32 }
define i32 @sys_stat(i8* %0, %struct.kernel_stat* %1) {
%3 = tail call i32 @sys_newfstatat(i32 -100, i8* %0, %struct.kernel_stat* %1, i32 0)
ret i32 %3
}
char *strcpy(char *d, const char *s) {
  char *saved = d;
  while ((*d++ = *s++) != '\0')
    ;
  return saved;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1147 <strcpy+0x47>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
br label %7
7: ; preds = %15, %2
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %4
%10 = load i8, i8* %8
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
store i8 %10, i8* %11
%13 = sext i8 %10 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %7
br label %7
16: ; preds = %7
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
int test_imm_1Euint16_mem(unsigned short *val) {
  return ((*val) & (0x1E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_1Euint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 30
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned int utf8_size(char *s) {
  unsigned char c = *s;
  if (~c & 0x80)
    return 1;
  else if ((c & 0xE0) == 0xC0)
    return 2;
  else if ((c & 0xF0) == 0xE0)
    return 3;
  else
    return 4;
}


x86 assembly (clang, -O0):
<utf8_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
xor    $0xffffffff,%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1132 <utf8_size+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1179 <utf8_size+0x79>
movzbl -0x11(%rbp),%eax
and    $0xe0,%eax
cmp    $0xc0,%eax
jne    1152 <utf8_size+0x52>
movl   $0x2,-0x4(%rbp)
jmp    1179 <utf8_size+0x79>
movzbl -0x11(%rbp),%eax
and    $0xf0,%eax
cmp    $0xe0,%eax
jne    1172 <utf8_size+0x72>
movl   $0x3,-0x4(%rbp)
jmp    1179 <utf8_size+0x79>
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_size>:
movzbl (%rdi),%ecx
mov    $0x1,%eax
test   $0x80,%cl
je     1134 <utf8_size+0x34>
mov    %ecx,%edx
and    $0xffffffe0,%edx
mov    $0x2,%eax
cmp    $0xc0,%edx
je     1134 <utf8_size+0x34>
and    $0xfffffff0,%ecx
xor    %edx,%edx
cmp    $0xe0,%ecx
sete   %dl
mov    $0x4,%eax
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @utf8_size(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
store i8 %6, i8* %4
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = xor i32 %8, -1
%10 = and i32 %9, 128
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 1, i32* %2
br label %26
13: ; preds = %1
%14 = load i8, i8* %4
%15 = zext i8 %14 to i32
%16 = and i32 %15, 224
%17 = icmp eq i32 %16, 192
br i1 %17, label %18, label %19
18: ; preds = %13
store i32 2, i32* %2
br label %26
19: ; preds = %13
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = and i32 %21, 240
%23 = icmp eq i32 %22, 224
br i1 %23, label %24, label %25
24: ; preds = %19
store i32 3, i32* %2
br label %26
25: ; preds = %19
store i32 4, i32* %2
br label %26
26: ; preds = %25, %24, %18, %12
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @utf8_size(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = and i32 %3, 128
%5 = icmp eq i32 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %1
%7 = and i32 %3, 224
%8 = icmp eq i32 %7, 192
br i1 %8, label %13, label %9
9: ; preds = %6
%10 = and i32 %3, 240
%11 = icmp eq i32 %10, 224
%12 = select i1 %11, i32 3, i32 4
br label %13
13: ; preds = %9, %6, %1
%14 = phi i32 [ 1, %1 ], [ 2, %6 ], [ %12, %9 ]
ret i32 %14
}
/* Variables and functions */
char *dcop_register(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int main(int argc, char **argv) {
  const char *name;
  name = dcop_register("test", 0);
  printf("dcop_register returns \"%s\"\n", name);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
xor    %esi,%esi
call   1030 <dcop_register@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
@.str.1 = [28 x i8] c"dcop_register returns \22%s\22\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @dcop_register(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pipegen();
int main(int argc, char **argv) {
  pipegen();
  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    $0x0,%al
call   1030 <pipegen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <pipegen@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 = call i32 (...) @pipegen()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @pipegen()
ret i32 0
}
long rotateL_fun_long(long x, int i) {
  if ((i %= 40) == 0)
    return x;
  return (x << i) | ((0x7fffffffffl >> (39 - i)) & (x >> (40 - i)));
}


x86 assembly (clang, -O0):
<rotateL_fun_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
cmp    $0x0,%edx
jne    112f <rotateL_fun_long+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1173 <rotateL_fun_long+0x73>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    %cl,%rax
mov    $0x27,%ecx
sub    -0x14(%rbp),%ecx
mov    %ecx,%ecx
movabs $0x7fffffffff,%rdx
sar    %cl,%rdx
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdx
mov    $0x28,%ecx
sub    -0x14(%rbp),%ecx
mov    %ecx,%ecx
sar    %cl,%rdx
mov    -0x20(%rbp),%rcx
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateL_fun_long>:
mov    %rdi,%rax
movslq %esi,%rdx
imul   $0x66666667,%rdx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x24,%rcx
add    %esi,%ecx
shl    $0x3,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%edx
je     114a <rotateL_fun_long+0x4a>
mov    %rax,%rsi
mov    %edx,%ecx
shl    %cl,%rsi
mov    $0x27,%cl
sub    %dl,%cl
movabs $0x7fffffffff,%rdi
shr    %cl,%rdi
mov    $0x28,%cl
sub    %dl,%cl
sar    %cl,%rax
and    %rdi,%rax
or     %rsi,%rax
ret

LLVM IR (-O0):
define i64 @rotateL_fun_long(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = srem i32 %6, 40
store i32 %7, i32* %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i64, i64* %4
store i64 %10, i64* %3
br label %27
11: ; preds = %2
%12 = load i64, i64* %4
%13 = load i32, i32* %5
%14 = zext i32 %13 to i64
%15 = shl i64 %12, %14
%16 = load i32, i32* %5
%17 = sub nsw i32 39, %16
%18 = zext i32 %17 to i64
%19 = ashr i64 549755813887, %18
%20 = load i64, i64* %4
%21 = load i32, i32* %5
%22 = sub nsw i32 40, %21
%23 = zext i32 %22 to i64
%24 = ashr i64 %20, %23
%25 = and i64 %19, %24
%26 = or i64 %15, %25
store i64 %26, i64* %3
br label %27
27: ; preds = %11, %9
%28 = load i64, i64* %3
ret i64 %28
}

LLVM IR (-O2):
define i64 @rotateL_fun_long(i64 %0, i32 %1) {
%3 = srem i32 %1, 40
%4 = icmp eq i32 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2
%6 = zext i32 %3 to i64
%7 = shl i64 %0, %6
%8 = sub nsw i32 39, %3
%9 = zext i32 %8 to i64
%10 = lshr i64 549755813887, %9
%11 = sub nsw i32 40, %3
%12 = zext i32 %11 to i64
%13 = ashr i64 %0, %12
%14 = and i64 %10, %13
%15 = or i64 %14, %7
br label %16
16: ; preds = %2, %5
%17 = phi i64 [ %15, %5 ], [ %0, %2 ]
ret i64 %17
}
void foo626() {}


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

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

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

LLVM IR (-O2):
define void @foo626() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_45(int /*<<< orphan*/);
int gen_45(void) {
  handle_45(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_45>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_45@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_45() {
%1 = call i32 @handle_45(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_45() {
%1 = tail call i32 @handle_45(i32 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ memcpy(char *, char const *, size_t);
char *cat_lstr(char *src, const char *app, size_t len) {
  return (char *)memcpy(src, app, len) + len;
}


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

x86 assembly (clang, -O2):
<cat_lstr>:
push   %rbx
mov    %rdx,%rbx
call   1030 <memcpy@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @cat_lstr(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @memcpy(i8* %7, i8* %8, i64 %9)
%11 = inttoptr i64 %10 to i8*
%12 = load i64, i64* %6
%13 = getelementptr inbounds i8, i8* %11, i64 %12
ret i8* %13
}

LLVM IR (-O2):
define i8* @cat_lstr(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @memcpy(i8* %0, i8* %1, i64 %2)
%5 = inttoptr i64 %4 to i8*
%6 = getelementptr inbounds i8, i8* %5, i64 %2
ret i8* %6
}
void av_color_range_from_name() {}


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

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

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

LLVM IR (-O2):
define void @av_color_range_from_name() {
ret void
}
double r9(void *x) { return *(double *)(x + 32759); }


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

x86 assembly (clang, -O2):
<r9>:
movsd  0x7ff7(%rdi),%xmm0
ret

LLVM IR (-O0):
define double @r9(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32759
%5 = bitcast i8* %4 to double*
%6 = load double, double* %5
ret double %6
}

LLVM IR (-O2):
define double @r9(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32759
%3 = bitcast i8* %2 to double*
%4 = load double, double* %3
ret double %4
}
int arch_intsize() { return 4; }


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

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

LLVM IR (-O0):
define i32 @arch_intsize() {
ret i32 4
}

LLVM IR (-O2):
define i32 @arch_intsize() {
ret i32 4
}
void ft_add_test_case(char **data, char *s1, char *s2, char *result) {
  data[0] = s1;
  data[1] = s2;
  data[2] = result;
}


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

x86 assembly (clang, -O2):
<ft_add_test_case>:
mov    %rsi,(%rdi)
mov    %rdx,0x8(%rdi)
mov    %rcx,0x10(%rdi)
ret

LLVM IR (-O0):
define void @ft_add_test_case(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** %6
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
store i8* %9, i8** %11
%12 = load i8*, i8** %7
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
store i8* %12, i8** %14
%15 = load i8*, i8** %8
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 2
store i8* %15, i8** %17
ret void
}

LLVM IR (-O2):
define void @ft_add_test_case(i8** nocapture writeonly %0, i8* %1, i8* %2, i8* %3) {
store i8* %1, i8** %0
%5 = getelementptr inbounds i8*, i8** %0, i64 1
store i8* %2, i8** %5
%6 = getelementptr inbounds i8*, i8** %0, i64 2
store i8* %3, i8** %6
ret void
}