xunge/DecIR huggingface dataset:
void pixel_mul_by_own_alpha(float *p0, float *p1) {
  int ic;
  for (ic = 0; ic < 3; ic++)
    p1[ic] = p0[ic] * p0[3];
  p1[3] = p0[3];
}


x86 assembly (clang, -O0):
<pixel_mul_by_own_alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    114e <pixel_mul_by_own_alpha+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
mulss  0xc(%rax),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <pixel_mul_by_own_alpha+0x13>
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @pixel_mul_by_own_alpha(float* nocapture %0, float* nocapture writeonly %1) {
%3 = getelementptr inbounds float, float* %0, i64 3
%4 = load float, float* %0
%5 = load float, float* %3
%6 = fmul float %4, %5
store float %6, float* %1
%7 = getelementptr inbounds float, float* %0, i64 1
%8 = load float, float* %7
%9 = load float, float* %3
%10 = fmul float %8, %9
%11 = getelementptr inbounds float, float* %1, i64 1
store float %10, float* %11
%12 = getelementptr inbounds float, float* %0, i64 2
%13 = load float, float* %12
%14 = load float, float* %3
%15 = fmul float %13, %14
%16 = getelementptr inbounds float, float* %1, i64 2
store float %15, float* %16
%17 = load float, float* %3
%18 = getelementptr inbounds float, float* %1, i64 3
store float %17, float* %18
ret void
}
/* Variables and functions */
int fileno(int /*<<< orphan*/);
int /*<<< orphan*/ fopen(char *, char *);
int openfd(char *fname, char *mode) { return fileno(fopen(fname, mode)); }


x86 assembly (clang, -O0):
<openfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fopen@plt>
mov    %eax,%edi
call   1030 <fileno@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openfd>:
push   %rax
call   1040 <fopen@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <fileno@plt>

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

LLVM IR (-O2):
define i32 @openfd(i8* %0, i8* %1) {
%3 = tail call i32 @fopen(i8* %0, i8* %1)
%4 = tail call i32 @fileno(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int8_t sct_mouseinputy(int8_t y) {
  int ry = y - 1;
  if (ry < 0)
    ry = 0;
  return ry;
}


x86 assembly (clang, -O0):
<sct_mouseinputy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1121 <sct_mouseinputy+0x21>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sct_mouseinputy>:
test   %edi,%edi
mov    $0x1,%eax
cmovg  %edi,%eax
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @sct_mouseinputy(i32 %0) {
%2 = icmp sgt i32 %0, 1
%3 = select i1 %2, i32 %0, i32 1
%4 = add nsw i32 %3, -1
ret i32 %4
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
void sig_int_handler(int signo) {
  printf("process[%d] get SIGINT\n", getpid());
}


x86 assembly (clang, -O0):
<sig_int_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_int_handler>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"process[%d] get SIGINT\0A\00"
define void @sig_int_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @getpid()
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"process[%d] get SIGINT\0A\00"
define void @sig_int_handler(i32 %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ isnan(float);
int isinf_f(float x) { return !isnan(x) && isnan(x - x); }


x86 assembly (clang, -O0):
<isinf_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1152 <isinf_f+0x42>
movss  -0x4(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isinf_f>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <isnan@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1128 <isinf_f+0x18>
pop    %rcx
ret
movss  0x4(%rsp),%xmm0
subss  %xmm0,%xmm0
call   1030 <isnan@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isinf_f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @isnan(float %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = load float, float* %2
%8 = load float, float* %2
%9 = fsub float %7, %8
%10 = call i64 @isnan(float %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %6, %1
%13 = phi i1 [ false, %1 ], [ %11, %6 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @isinf_f(float %0) {
%2 = tail call i64 @isnan(float %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = fsub float %0, %0
%6 = tail call i64 @isnan(float %5)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %10
}
/* Type definitions */
struct stat {
  int st_size;
};
typedef int off_t;

/* Variables and functions */
int stat(char *, struct stat *);
off_t fileSize(char *filename) {
  struct stat fileStat;
  if (stat(filename, &fileStat) == -1) {
    return -1;
  }
  return fileStat.st_size;
}


x86 assembly (clang, -O0):
<fileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
jne    113e <fileSize+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1144 <fileSize+0x34>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileSize>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
je     1121 <fileSize+0x11>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @fileSize(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %12
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fileSize(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_hello(void) {
  printf("Hello World\n");
  printf("Goodbye\n");
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
@.str.1 = [9 x i8] c"Goodbye\0A\00"
define void @print_hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
@str.2 = [8 x i8] c"Goodbye\00"
define void @print_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put_char(unsigned char);
int /*<<< orphan*/ put_word(unsigned int);
void target_write_byte(unsigned addr, unsigned char data) {
  put_char('s');
  put_word(addr);
  put_char(data);
}


x86 assembly (clang, -O0):
<target_write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    $0x73,%edi
call   1030 <put_char@plt>
mov    -0x4(%rbp),%edi
call   1040 <put_word@plt>
movzbl -0x5(%rbp),%edi
call   1030 <put_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_write_byte>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x73,%edi
call   1030 <put_char@plt>
mov    %ebp,%edi
call   1040 <put_word@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put_char@plt>

LLVM IR (-O0):
define void @target_write_byte(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = call i32 @put_char(i8 zeroext 115)
%6 = load i32, i32* %3
%7 = call i32 @put_word(i32 %6)
%8 = load i8, i8* %4
%9 = call i32 @put_char(i8 zeroext %8)
ret void
}

LLVM IR (-O2):
define void @target_write_byte(i32 %0, i8 zeroext %1) {
%3 = tail call i32 @put_char(i8 zeroext 115)
%4 = tail call i32 @put_word(i32 %0)
%5 = tail call i32 @put_char(i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ basic_test(int);
int close(int);
int open(char *, int /*<<< orphan*/);
void close_logical(void) {
  int fd, rc;
  fd = open("/dev/ssr", O_RDWR);
  rc = close(fd);
  basic_test(rc == 0);
}


x86 assembly (clang, -O0):
<close_logical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <basic_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_logical>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1050 <open@plt>
mov    %eax,%edi
call   1040 <close@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1030 <basic_test@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"/dev/ssr\00"
@O_RDWR = global i32 0
define void @close_logical() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @O_RDWR
%4 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @close(i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @basic_test(i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"/dev/ssr\00"
@O_RDWR = global i32 0
define void @close_logical() {
%1 = load i32, i32* @O_RDWR
%2 = tail call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @close(i32 %2)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @basic_test(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int, int);
int /*<<< orphan*/ output_w32(int);
void emit_fcvtds(int s, int d) {
  assem_debug("fcvtds d%d,s%d", d, s);
  output_w32(0xeeb70ac0 | ((d & 7) << 12) | ((s & 14) >> 1) | ((s & 1) << 5));
}


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

x86 assembly (clang, -O2):
<emit_fcvtds>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %ebp,%edx
call   1030 <assem_debug@plt>
and    $0x7,%ebx
shl    $0xc,%ebx
mov    %ebp,%eax
shr    %eax
and    $0x7,%eax
shl    $0x5,%ebp
movzbl %bpl,%edi
or     %eax,%edi
or     %ebx,%edi
or     $0xeeb70ac0,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <output_w32@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"fcvtds d%d,s%d\00"
define void @emit_fcvtds(i32 %0, i32 %1) {
%3 = tail call i32 @assem_debug(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
%4 = shl i32 %1, 12
%5 = and i32 %4, 28672
%6 = lshr i32 %0, 1
%7 = and i32 %6, 7
%8 = shl i32 %0, 5
%9 = and i32 %8, 32
%10 = or i32 %7, %9
%11 = or i32 %10, %5
%12 = or i32 %11, -289994048
%13 = tail call i32 @output_w32(i32 %12)
ret void
}
extern __attribute__((gnu_)) int ispunct(int __c) {
  return (__c >= '!' && __c <= '/') || (__c >= ':' && __c <= '@') ||
         (__c >= '[' && __c <= '`') || (__c >= '{' && __c <= '~');
}


x86 assembly (clang, -O0):
<ispunct>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x21,-0x4(%rbp)
jl     1120 <ispunct+0x20>
mov    $0x1,%al
cmpl   $0x2f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1171 <ispunct+0x71>
cmpl   $0x3a,-0x4(%rbp)
jl     1139 <ispunct+0x39>
mov    $0x1,%al
cmpl   $0x40,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1171 <ispunct+0x71>
cmpl   $0x5b,-0x4(%rbp)
jl     1152 <ispunct+0x52>
mov    $0x1,%al
cmpl   $0x60,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1171 <ispunct+0x71>
xor    %eax,%eax
cmpl   $0x7b,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     116b <ispunct+0x6b>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispunct>:
movd   %edi,%xmm0
pshufd $0x0,%xmm0,%xmm0
paddd  0xeef(%rip),%xmm0
pxor   0xef7(%rip),%xmm0
movdqa 0xeff(%rip),%xmm1
pcmpgtd %xmm0,%xmm1
movmskps %xmm1,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
ret

LLVM IR (-O0):
define i32 @ispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 33
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 47
br i1 %7, label %28, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 58
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 64
br i1 %13, label %28, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 91
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 96
br i1 %19, label %28, label %20
20: ; preds = %17, %14
%21 = load i32, i32* %2
%22 = icmp sge i32 %21, 123
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp sle i32 %24, 126
br label %26
26: ; preds = %23, %20
%27 = phi i1 [ false, %20 ], [ %25, %23 ]
br label %28
28: ; preds = %26, %17, %11, %5
%29 = phi i1 [ true, %17 ], [ true, %11 ], [ true, %5 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = insertelement <4 x i32> poison, i32 %0, i64 0
%3 = shufflevector <4 x i32> %2, <4 x i32> poison, <4 x i32> zeroinitializer
%4 = add <4 x i32> %3, <i32 -123, i32 -91, i32 -33, i32 -58>
%5 = icmp ult <4 x i32> %4, <i32 4, i32 6, i32 15, i32 7>
%6 = bitcast <4 x i1> %5 to i4
%7 = icmp ne i4 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
void f1ias2(int a[3 - 1]) { (void)&a; }


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

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

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

LLVM IR (-O2):
define void @f1ias2(i32* nocapture %0) {
ret void
}
char *null_cmplt(i)
unsigned long i;
{ return ((i >> 1) & 1) ? ",n" : ""; }


x86 assembly (clang, -O0):
<null_cmplt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x1,%rdx
and    $0x1,%rdx
lea    0xee7(%rip),%rax
lea    0xede(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_cmplt>:
test   $0x2,%dil
lea    0xef7(%rip),%rcx
lea    0xeee(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c",n\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @null_cmplt(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 1
%5 = and i64 %4, 1
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c",n\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @null_cmplt(i64 %0) {
%2 = and i64 %0, 2
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
ret i8* %4
}
void delay(unsigned int ms) {
  int d = 0, i = 0, j = 0;
  for (d = 0; d < ms; d++)
    for (i = 0; i < 1000; i++)
      for (j = 0; j < 1000; j++) {
        j = j;
      }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1191 <delay+0x91>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    117e <delay+0x7e>
movl   $0x0,-0x10(%rbp)
cmpl   $0x3e8,-0x10(%rbp)
jge    116b <delay+0x6b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114a <delay+0x4a>
jmp    1170 <delay+0x70>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <delay+0x36>
jmp    1183 <delay+0x83>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1123 <delay+0x23>
pop    %rbp
ret

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

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

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

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *fgets(char *, int, int /*<<< orphan*/ *);
char *fgets_or_exit(char *buffer, int size, FILE *stream) {
  char *buf;
  if ((buf = fgets(buffer, size, stream)) == NULL)
    exit(EXIT_FAILURE);
  return buf;
}


x86 assembly (clang, -O0):
<fgets_or_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    115f <fgets_or_exit+0x3f>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgets_or_exit>:
push   %rax
call   1030 <fgets@plt>
test   %rax,%rax
je     112d <fgets_or_exit+0xd>
pop    %rcx
ret
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i8* @fgets_or_exit(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = call i8* @fgets(i8* %8, i32 %9, i32* %10)
store i8* %11, i8** %7
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %3
%17 = load i8*, i8** %7
ret i8* %17
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define i8* @fgets_or_exit(i8* %0, i32 %1, i32* nocapture %2) {
%4 = tail call i8* @fgets(i8* %0, i32 %1, i32* %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int a = __VERIFIER_nondet_int();
  int b = a - a;
  if (b != 0) {
    goto ERROR;
  }
  return 0;
ERROR:
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1141 <main+0x31>
jmp    114d <main+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1154 <main+0x44>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
int floatcmp(const void *p1, const void *p2) {
  float x = *(float *)p1, y = *(float *)p2;
  return (x < y) ? -1 : ((x == y) ? 0 : 1);
}


x86 assembly (clang, -O0):
<floatcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1146 <floatcmp+0x46>
mov    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    116a <floatcmp+0x6a>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
mov    $0x1,%eax
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
setnp  %sil
sete   %dl
test   %sil,%dl
cmovne %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<floatcmp>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movaps %xmm0,%xmm2
cmpneqss %xmm1,%xmm2
movd   %xmm2,%ecx
and    $0x1,%ecx
ucomiss %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @floatcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp olt float %4, %6
%8 = fcmp une float %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int ipfix_name_lookup(char *);
int string2typeid(char *s) { return ipfix_name_lookup(s); }


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

x86 assembly (clang, -O2):
<string2typeid>:
jmp    1030 <ipfix_name_lookup@plt>

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

LLVM IR (-O2):
define i32 @string2typeid(i8* %0) {
%2 = tail call i32 @ipfix_name_lookup(i8* %0)
ret i32 %2
}
/* Type definitions */
struct dirent {
  char *d_name;
};

/* Variables and functions */
int iscf(const struct dirent *d) {
  return (d->d_name[0] == 'c' && d->d_name[1] == 'f');
}


x86 assembly (clang, -O0):
<iscf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x63,%ecx
mov    %al,-0x9(%rbp)
jne    1134 <iscf+0x34>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x66,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscf>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmpb   $0x63,(%rcx)
jne    1113 <iscf+0x13>
xor    %eax,%eax
cmpb   $0x66,0x1(%rcx)
sete   %al
ret

LLVM IR (-O0):
%struct.dirent = type { i8* }
define i32 @iscf(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 99
br i1 %9, label %10, label %18
10: ; preds = %1
%11 = load %struct.dirent*, %struct.dirent** %2
%12 = getelementptr inbounds %struct.dirent, %struct.dirent* %11, i32 0, i32 0
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 102
br label %18
18: ; preds = %10, %1
%19 = phi i1 [ false, %1 ], [ %17, %10 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
%struct.dirent = type { i8* }
define i32 @iscf(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 99
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 102
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %6, %1
%12 = phi i32 [ 0, %1 ], [ %10, %6 ]
ret i32 %12
}
IEH3nodg(ch) char ch;
{
  if (IEH3digt(ch))
    return (0);
  switch (ch) {
  case 'E':
  case 'e':
  case '.':
  case '+':
  case '-':
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<IEH3nodg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
mov    $0x0,%al
call   1030 <IEH3digt@plt>
cmp    $0x0,%eax
je     113e <IEH3nodg+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    119c <IEH3nodg+0x8c>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2b,%eax
je     1189 <IEH3nodg+0x79>
jmp    1153 <IEH3nodg+0x43>
mov    -0xc(%rbp),%eax
add    $0xffffffd3,%eax
sub    $0x2,%eax
jb     1189 <IEH3nodg+0x79>
jmp    1167 <IEH3nodg+0x57>
mov    -0xc(%rbp),%eax
sub    $0x45,%eax
je     1189 <IEH3nodg+0x79>
jmp    1178 <IEH3nodg+0x68>
mov    -0xc(%rbp),%eax
sub    $0x65,%eax
jne    1195 <IEH3nodg+0x85>
jmp    1189 <IEH3nodg+0x79>
movl   $0x0,-0x4(%rbp)
jmp    119c <IEH3nodg+0x8c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IEH3nodg>:
push   %rbp
push   %rbx
push   %rax
movsbl %dil,%ebx
xor    %ebp,%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <IEH3digt@plt>
test   %eax,%eax
jne    113e <IEH3nodg+0x2e>
add    $0xffffffd5,%ebx
cmp    $0x3a,%ebx
ja     1147 <IEH3nodg+0x37>
movabs $0x40000000400000d,%rax
bt     %rbx,%rax
jae    1147 <IEH3nodg+0x37>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    $0x1,%ebp
jmp    113e <IEH3nodg+0x2e>

LLVM IR (-O0):
define i32 @IEH3nodg(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = call i32 (i32, ...) bitcast (i32 (...)* @IEH3digt to i32 (i32, ...)*)(i32 %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %15
10: ; preds = %1
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
switch i32 %12, label %14 [
i32 69, label %13
i32 101, label %13
i32 46, label %13
i32 43, label %13
i32 45, label %13
]
13: ; preds = %10, %10, %10, %10, %10
store i32 0, i32* %2
br label %15
14: ; preds = %10
store i32 1, i32* %2
br label %15
15: ; preds = %14, %13, %9
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @IEH3nodg(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @IEH3digt to i32 (i32, ...)*)(i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
switch i32 %3, label %7 [
i32 69, label %8
i32 101, label %8
i32 46, label %8
i32 43, label %8
i32 45, label %8
]
7: ; preds = %6
br label %8
8: ; preds = %6, %6, %6, %6, %6, %1, %7
%9 = phi i32 [ 1, %7 ], [ 0, %1 ], [ 0, %6 ], [ 0, %6 ], [ 0, %6 ], [ 0, %6 ], [ 0, %6 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int String_eq(const char *s1, const char *s2) {
  if (s1 == NULL || s2 == NULL) {
    if (s1 == NULL && s2 == NULL)
      return 1;
    else
      return 0;
  }
  return (strcmp(s1, s2) == 0);
}


x86 assembly (clang, -O0):
<String_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <String_eq+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1164 <String_eq+0x54>
cmpq   $0x0,-0x10(%rbp)
jne    1158 <String_eq+0x48>
cmpq   $0x0,-0x18(%rbp)
jne    1158 <String_eq+0x48>
movl   $0x1,-0x4(%rbp)
jmp    1180 <String_eq+0x70>
movl   $0x0,-0x4(%rbp)
jmp    1180 <String_eq+0x70>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<String_eq>:
test   %rdi,%rdi
je     112e <String_eq+0x1e>
test   %rsi,%rsi
je     112e <String_eq+0x1e>
push   %rax
call   1030 <strcmp@plt>
test   %rax,%rax
sete   %al
add    $0x8,%rsp
movzbl %al,%eax
ret
or     %rsi,%rdi
sete   %al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @String_eq(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = and i1 %3, %4
br label %11
8: ; preds = %2
%9 = tail call i64 @strcmp(i8* %0, i8* %1)
%10 = icmp eq i64 %9, 0
br label %11
11: ; preds = %6, %8
%12 = phi i1 [ %10, %8 ], [ %7, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double get_computer_ranking(void) {
  double value = 0.0;
  printf("What is the team's Computer Ranking? ");
  scanf("%lf", &value);
  return value;
}


x86 assembly (clang, -O0):
<get_computer_ranking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_computer_ranking>:
push   %rax
movq   $0x0,(%rsp)
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [38 x i8] c"What is the team's Computer Ranking? \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @get_computer_ranking() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%4 = load double, double* %1
ret double %4
}

LLVM IR (-O2):
@.str = [38 x i8] c"What is the team's Computer Ranking? \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @get_computer_ranking() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
ret double %5
}
/* Type definitions */
struct tnode {
  int dummy;
};

/* Variables and functions */
struct tnode *tree_prev_next(struct tnode *, int /*<<< orphan*/);
struct tnode *tree_prev(struct tnode *node) {
  return tree_prev_next(node, 0);
}


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

x86 assembly (clang, -O2):
<tree_prev>:
xor    %esi,%esi
jmp    1030 <tree_prev_next@plt>

LLVM IR (-O0):
%struct.tnode = type { i32 }
define %struct.tnode* @tree_prev(%struct.tnode* %0) {
%2 = alloca %struct.tnode*
store %struct.tnode* %0, %struct.tnode** %2
%3 = load %struct.tnode*, %struct.tnode** %2
%4 = call %struct.tnode* @tree_prev_next(%struct.tnode* %3, i32 0)
ret %struct.tnode* %4
}

LLVM IR (-O2):
%struct.tnode = type { i32 }
define %struct.tnode* @tree_prev(%struct.tnode* %0) {
%2 = tail call %struct.tnode* @tree_prev_next(%struct.tnode* %0, i32 0)
ret %struct.tnode* %2
}
int main(int argc, char *argv[]) { char str[32]; }


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [32 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int MPU_AllocateRegionDesc(void) {
  int (*p_MPU_AllocateRegionDesc)(void);
  p_MPU_AllocateRegionDesc = (int (*)(void))0x030017c1U;
  return p_MPU_AllocateRegionDesc();
}


x86 assembly (clang, -O0):
<MPU_AllocateRegionDesc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x30017c1,%eax
mov    %rax,-0x8(%rbp)
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPU_AllocateRegionDesc>:
mov    $0x30017c1,%eax
jmp    *%rax

LLVM IR (-O0):
define i32 @MPU_AllocateRegionDesc() {
%1 = alloca i32 ()*
store i32 ()* inttoptr (i64 50337729 to i32 ()*), i32 ()** %1
%2 = load i32 ()*, i32 ()** %1
%3 = call i32 %2()
ret i32 %3
}

LLVM IR (-O2):
define i32 @MPU_AllocateRegionDesc() {
%1 = tail call i32 inttoptr (i64 50337729 to i32 ()*)()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("\tCan't run this test on this platform.");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"\09Can't run this test on this platform.\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"\09Can't run this test on this platform.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int test_imm_4Dint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x4D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_4Dint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 77
%7 = icmp ne i64 %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_4Dint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 5046272
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
char *langRomTypeSc3000Cart() { return "SC-3000 Cartridge"; }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"SC-3000 Cartridge\00"
define i8* @langRomTypeSc3000Cart() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [18 x i8] c"SC-3000 Cartridge\00"
define i8* @langRomTypeSc3000Cart() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
float _mm_cvtss_f32(int /*<<< orphan*/);
int /*<<< orphan*/ _mm_set_ss(float);
int /*<<< orphan*/ _mm_sqrt_ss(int /*<<< orphan*/);
float HMM_SquareRootF(float Float) {
  float Result;
  __m128 In = _mm_set_ss(Float);
  __m128 Out = _mm_sqrt_ss(In);
  Result = _mm_cvtss_f32(Out);
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_SquareRootF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <_mm_set_ss@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <_mm_sqrt_ss@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <_mm_cvtss_f32@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_SquareRootF>:
push   %rax
call   1040 <_mm_set_ss@plt>
mov    %eax,%edi
call   1050 <_mm_sqrt_ss@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <_mm_cvtss_f32@plt>

LLVM IR (-O0):
define float @HMM_SquareRootF(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
store float %0, float* %2
%6 = load float, float* %2
%7 = call i32 @_mm_set_ss(float %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 @_mm_sqrt_ss(i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = call float @_mm_cvtss_f32(i32 %10)
store float %11, float* %3
%12 = load float, float* %3
ret float %12
}

LLVM IR (-O2):
define float @HMM_SquareRootF(float %0) {
%2 = tail call i32 @_mm_set_ss(float %0)
%3 = tail call i32 @_mm_sqrt_ss(i32 %2)
%4 = tail call float @_mm_cvtss_f32(i32 %3)
ret float %4
}
/* Variables and functions */
int can_fit_in_four_bytes(size_t n) {
  return ((size_t)((unsigned long)n) == n);
}


x86 assembly (clang, -O0):
<can_fit_in_four_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x8(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @can_fit_in_four_bytes(i64 %0) {
ret i32 1
}
void rop3_110_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = ~S;
  stk3 = T | stk4;
  stk2 = *D & stk3;
  stk1 = S ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_110_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xe(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xe(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_110_0_0>:
mov    %esi,%eax
not    %al
or     %dl,%al
and    (%rdi),%al
xor    %sil,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_110_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %10
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = load i8, i8* %10
%18 = zext i8 %17 to i32
%19 = or i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %9
%21 = load i8*, i8** %4
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = load i8, i8* %9
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %8
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = load i8, i8* %8
%31 = zext i8 %30 to i32
%32 = xor i32 %29, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %7
%34 = load i8, i8* %7
%35 = load i8*, i8** %4
store i8 %34, i8* %35
ret void
}

LLVM IR (-O2):
define void @rop3_110_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = or i8 %4, %2
%6 = load i8, i8* %0
%7 = and i8 %6, %5
%8 = xor i8 %7, %1
store i8 %8, i8* %0
ret void
}