xunge/DecIR huggingface dataset:
unsigned xrop3_178_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk2 = S ^ T;
  stk3 = D ^ S;
  stk2 = stk2 | stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_178_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_178_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
xor    %eax,%ecx
mov    %eax,%edx
xor    $0xff,%edx
or     %ecx,%edx
not    %eax
and    %edx,%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_178_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, %4
%8 = xor i32 %4, 255
%9 = or i32 %7, %8
%10 = xor i32 %4, -1
%11 = and i32 %9, %10
%12 = or i32 %11, %3
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ ushort;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, long);
void dup_usvector(ushort *src, long nl, long nh, ushort *dst) {
  long len = nh - nl + 1;
  static long size = sizeof(ushort);
  memcpy(dst + nl, src + nl, len * size);
}


x86 assembly (clang, -O0):
<dup_usvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x28(%rbp),%rdx
imul   0x2ec6(%rip),%rdx
call   1030 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup_usvector>:
sub    %rsi,%rdx
lea    (%rcx,%rsi,4),%rax
lea    (%rdi,%rsi,4),%rsi
lea    0x4(,%rdx,4),%rdx
mov    %rax,%rdi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
@dup_usvector.size = internal global i64 4
define void @dup_usvector(i32* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i64
store i32* %0, i32** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%10 = load i64, i64* %7
%11 = load i64, i64* %6
%12 = sub nsw i64 %10, %11
%13 = add nsw i64 %12, 1
store i64 %13, i64* %9
%14 = load i32*, i32** %8
%15 = load i64, i64* %6
%16 = getelementptr inbounds i32, i32* %14, i64 %15
%17 = load i32*, i32** %5
%18 = load i64, i64* %6
%19 = getelementptr inbounds i32, i32* %17, i64 %18
%20 = load i64, i64* %9
%21 = load i64, i64* @dup_usvector.size
%22 = mul nsw i64 %20, %21
%23 = call i32 @memcpy(i32* %16, i32* %19, i64 %22)
ret void
}

LLVM IR (-O2):
define void @dup_usvector(i32* %0, i64 %1, i64 %2, i32* %3) {
%5 = sub nsw i64 %2, %1
%6 = getelementptr inbounds i32, i32* %3, i64 %1
%7 = getelementptr inbounds i32, i32* %0, i64 %1
%8 = shl i64 %5, 2
%9 = add i64 %8, 4
%10 = tail call i32 @memcpy(i32* %6, i32* %7, i64 %9)
ret void
}
/* Type definitions */
struct field {
  int dummy;
};

/* Variables and functions */
int __update_bin(struct field *, char *, int);
int update_bin_rev(struct field *field, char *value) {
  return __update_bin(field, value, true);
}


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

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

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

LLVM IR (-O2):
%struct.field = type { i32 }
define i32 @update_bin_rev(%struct.field* %0, i8* %1) {
%3 = tail call i32 @__update_bin(%struct.field* %0, i8* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int a = 1, b = 2;
  assert(b > a);
  assert(a < b);
  assert(b >= a);
  assert(b >= b);
  assert(a <= b);
  assert(b <= b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%eax
cmp    -0xc(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@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
store i32 1, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %2
%6 = icmp sgt i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = icmp sge i32 %14, %15
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i32, i32* %3
%20 = load i32, i32* %3
%21 = icmp sge i32 %19, %20
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = icmp sle i32 %24, %25
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = load i32, i32* %3
%30 = load i32, i32* %3
%31 = icmp sle i32 %29, %30
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
%6 = tail call i32 @assert(i32 1)
ret i32 0
}
int condition_greaterThan(char c) { return c == '>'; }


x86 assembly (clang, -O0):
<condition_greaterThan>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x3e,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<condition_greaterThan>:
xor    %eax,%eax
cmp    $0x3e,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @condition_greaterThan(i8 signext %0) {
%2 = icmp eq i8 %0, 62
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
float exp(float);
float EXP(float x) { return exp(x); }


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

x86 assembly (clang, -O2):
<EXP>:
jmp    1030 <exp@plt>

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

LLVM IR (-O2):
define float @EXP(float %0) {
%2 = tail call float @exp(float %0)
ret float %2
}
/* Type definitions */
typedef int time_t;
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
scalar_t__ nanosleep(struct timespec *, struct timespec *);
extern int os_sleep(time_t time) {
  struct timespec ts;
  ts.tv_sec = (time / 1000);
  ts.tv_nsec = (time % 1000) * 1000000L;
  while (nanosleep(&ts, &ts) < 0) {
    continue;
  }
  return 0;
}


x86 assembly (clang, -O0):
<os_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
imul   $0xf4240,%rax,%rax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rsi
mov    %rsi,%rdi
call   1030 <nanosleep@plt>
cmp    $0x0,%rax
jge    115c <os_sleep+0x4c>
jmp    1141 <os_sleep+0x31>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_sleep>:
push   %rbx
sub    $0x10,%rsp
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
mov    %ecx,0x8(%rsp)
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
imul   $0xf4240,%eax,%eax
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <nanosleep@plt>
test   %rax,%rax
js     1150 <os_sleep+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define i32 @os_sleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 1000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = load i32, i32* %2
%8 = srem i32 %7, 1000
%9 = sext i32 %8 to i64
%10 = mul nsw i64 %9, 1000000
%11 = trunc i64 %10 to i32
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 %11, i32* %12
br label %13
13: ; preds = %16, %1
%14 = call i64 @nanosleep(%struct.timespec* %3, %struct.timespec* %3)
%15 = icmp slt i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
br label %13
17: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define i32 @os_sleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = sdiv i32 %0, 1000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = srem i32 %0, 1000
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %7, i32* %8
br label %9
9: ; preds = %9, %1
%10 = call i64 @nanosleep(%struct.timespec* %2, %struct.timespec* %2)
%11 = icmp slt i64 %10, 0
br i1 %11, label %9, label %12
12: ; preds = %9
ret i32 0
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_accept;
int syscall(int /*<<< orphan*/, int, struct sockaddr *, int /*<<< orphan*/ *);
__attribute__((always_)) int _syscall_accept(int fd, struct sockaddr *addr,
                                             socklen_t *len) {
  return syscall(__NR_accept, fd, addr, len);
}


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

x86 assembly (clang, -O2):
<_syscall_accept>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@__NR_accept = global i32 0
define i32 @_syscall_accept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%7 = load i32, i32* @__NR_accept
%8 = load i32, i32* %4
%9 = load %struct.sockaddr*, %struct.sockaddr** %5
%10 = load i32*, i32** %6
%11 = call i32 @syscall(i32 %7, i32 %8, %struct.sockaddr* %9, i32* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@__NR_accept = global i32 0
define i32 @_syscall_accept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = load i32, i32* @__NR_accept
%5 = tail call i32 @syscall(i32 %4, i32 %0, %struct.sockaddr* %1, i32* %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ FileError(char *);
int /*<<< orphan*/ done(int);
void unexpected_EOF() {
  FileError("unexpected end-of-file");
  done(1);
}


x86 assembly (clang, -O0):
<unexpected_EOF>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <FileError@plt>
mov    $0x1,%edi
call   1030 <done@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<unexpected_EOF>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <FileError@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <done@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"unexpected end-of-file\00"
define void @unexpected_EOF() {
%1 = call i32 @FileError(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @done(i32 1)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"unexpected end-of-file\00"
define void @unexpected_EOF() {
%1 = tail call i32 @FileError(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @done(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wRelative(int, int);
void wRelative7(int i, int code) {
  if (code & 0x40) {
    wRelative(i, ((code & 0x3f) - 0x40) + 1);
  } else {
    wRelative(i, (code & 0x3f) + 1);
  }
}


x86 assembly (clang, -O0):
<wRelative7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1146 <wRelative7+0x36>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
and    $0x3f,%esi
sub    $0x40,%esi
add    $0x1,%esi
call   1030 <wRelative@plt>
jmp    1157 <wRelative7+0x47>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
and    $0x3f,%esi
add    $0x1,%esi
call   1030 <wRelative@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wRelative7>:
mov    %esi,%eax
shl    $0x19,%eax
sar    $0x1f,%eax
and    $0x3f,%esi
and    $0xffffffc0,%eax
add    %eax,%esi
add    $0x1,%esi
jmp    1030 <wRelative@plt>

LLVM IR (-O0):
define void @wRelative7(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 = and i32 %5, 64
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = and i32 %10, 63
%12 = sub nsw i32 %11, 64
%13 = add nsw i32 %12, 1
%14 = call i32 @wRelative(i32 %9, i32 %13)
br label %21
15: ; preds = %2
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = and i32 %17, 63
%19 = add nsw i32 %18, 1
%20 = call i32 @wRelative(i32 %16, i32 %19)
br label %21
21: ; preds = %15, %8
ret void
}

LLVM IR (-O2):
define void @wRelative7(i32 %0, i32 %1) {
%3 = and i32 %1, 64
%4 = icmp eq i32 %3, 0
%5 = and i32 %1, 63
%6 = select i1 %4, i32 0, i32 -64
%7 = or i32 %5, %6
%8 = add nsw i32 %7, 1
%9 = tail call i32 @wRelative(i32 %0, i32 %8)
ret void
}
/* Type definitions */
struct _stor_lookup_destroy_req {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _stor_lookup_destroy_req *);
void stor_lookup_destroy_req_free(struct _stor_lookup_destroy_req *ptr) {
  free(ptr);
}


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

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

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

LLVM IR (-O2):
%struct._stor_lookup_destroy_req = type { i32 }
define void @stor_lookup_destroy_req_free(%struct._stor_lookup_destroy_req* nocapture %0) {
%2 = tail call i32 @free(%struct._stor_lookup_destroy_req* %0)
ret void
}
/* Variables and functions */
int hmac_sm3_test();
int main() { return hmac_sm3_test(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @hmac_sm3_test()
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hmac_sm3_test()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ map(char *, char *);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Inicio \n");
  char *name = "frutas";
  char *text = "PERA MAA BANANA UVA MELANCIA LARANJA PERA UVA MORANDO "
               "LARANJA ACEROLA CAQUI UVA";
  map(name, text);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"Inicio \0A\00"
@.str.1 = [7 x i8] c"frutas\00"
@.str.2 = [82 x i8] c"PERA MA\C2\82A BANANA UVA MELANCIA LARANJA PERA UVA MORANDO LARANJA ACEROLA CAQUI UVA\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.2, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = call i32 @map(i8* %5, i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"frutas\00"
@.str.2 = [82 x i8] c"PERA MA\C2\82A BANANA UVA MELANCIA LARANJA PERA UVA MORANDO LARANJA ACEROLA CAQUI UVA\00"
@str = [8 x i8] c"Inicio \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @map(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
void *mem_alloc_c(size_t n, const char *name) {
  (void)name;
  return malloc(n);
}


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

x86 assembly (clang, -O2):
<mem_alloc_c>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @mem_alloc_c(i64 %0, i8* nocapture readnone %1) {
%3 = tail call i8* @malloc(i64 %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ INFINITY;
double nextafter(double, int /*<<< orphan*/);
double coq_next_down(double x) { return nextafter(x, -INFINITY); }


x86 assembly (clang, -O0):
<coq_next_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %edi,%edi
mov    0x2ebd(%rip),%rax
sub    (%rax),%edi
call   1030 <nextafter@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coq_next_down>:
mov    0x2ed1(%rip),%rax
xor    %edi,%edi
sub    (%rax),%edi
jmp    1030 <nextafter@plt>

LLVM IR (-O0):
@INFINITY = global i32 0
define double @coq_next_down(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load i32, i32* @INFINITY
%5 = sub nsw i32 0, %4
%6 = call double @nextafter(double %3, i32 %5)
ret double %6
}

LLVM IR (-O2):
@INFINITY = global i32 0
define double @coq_next_down(double %0) {
%2 = load i32, i32* @INFINITY
%3 = sub nsw i32 0, %2
%4 = tail call double @nextafter(double %0, i32 %3)
ret double %4
}
/* Variables and functions */
long long foo(char *, int, int);
int main(void) {
  char buf[8096];
  long long l;
  l = foo(buf, -0x7fffffffffffffffLL - 1, 0x7fffffffffffffffLL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1fc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1fb0(%rbp),%rdi
xor    %esi,%esi
mov    $0xffffffff,%edx
call   1030 <foo@plt>
mov    %rax,-0x1fb8(%rbp)
xor    %eax,%eax
add    $0x1fc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1fa8,%rsp
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0xffffffff,%edx
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x1fa8,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [8096 x i8]
%3 = alloca i64
store i32 0, i32* %1
%4 = getelementptr inbounds [8096 x i8], [8096 x i8]* %2, i64 0, i64 0
%5 = call i64 @foo(i8* %4, i32 0, i32 -1)
store i64 %5, i64* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [8096 x i8]
%2 = getelementptr inbounds [8096 x i8], [8096 x i8]* %1, i64 0, i64 0
%3 = call i64 @foo(i8* %2, i32 0, i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int strlen(char *);
void processarNumeroInteiro(char *yytext) {
  if (strlen(yytext) > 10) {
    printf("%s - erro - numero inteiro muito grande - Integer overflow\n",
           yytext);
  } else {
    printf("%s - numero inteiro\n", yytext);
  }
}


x86 assembly (clang, -O0):
<processarNumeroInteiro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0xa,%eax
jle    1153 <processarNumeroInteiro+0x33>
mov    -0x8(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
jmp    1163 <processarNumeroInteiro+0x43>
mov    -0x8(%rbp),%rsi
lea    0xede(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processarNumeroInteiro>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0xb,%eax
lea    0xecd(%rip),%rax
lea    0xf02(%rip),%rdi
cmovge %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"%s - erro - numero inteiro muito grande - Integer overflow\0A\00"
@.str.1 = [21 x i8] c"%s - numero inteiro\0A\00"
define void @processarNumeroInteiro(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = icmp sgt i32 %4, 10
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %12
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@.str = [60 x i8] c"%s - erro - numero inteiro muito grande - Integer overflow\0A\00"
@.str.1 = [21 x i8] c"%s - numero inteiro\0A\00"
define void @processarNumeroInteiro(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 10
%4 = select i1 %3, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i8* %0)
ret void
}
/* Variables and functions */
int time(int /*<<< orphan*/);
int System_time() { return time(0); }


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

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

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

LLVM IR (-O2):
define i32 @System_time() {
%1 = tail call i32 @time(i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ g(int, int, int, int);
main() {
  int (*f)();
  f(1, 2, 3, 4);
  g(1, 2, 3, 4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x0,%al
call   *-0x8(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <g@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32 (...)*
%2 = load i32 (...)*, i32 (...)** %1
%3 = bitcast i32 (...)* %2 to i32 (i32, i32, i32, i32, ...)*
%4 = call i32 (i32, i32, i32, i32, ...) %3(i32 1, i32 2, i32 3, i32 4)
%5 = call i32 @g(i32 1, i32 2, i32 3, i32 4)
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x83() {
  Assert_real((isxdigit(131) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              660, ("isxdigit should be 0 for 0x83"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x83>:
push   %rbp
mov    %rsp,%rbp
mov    $0x83,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x294,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x83>:
push   %rax
mov    $0x83,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x294,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x83\00"
define void @t_isxdigit_0x83() {
%1 = call i64 @isxdigit(i32 131)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 660, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x83\00"
define void @t_isxdigit_0x83() {
%1 = tail call i64 @isxdigit(i32 131)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 660, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int getchar();
int get_single_char() {
  int c = getchar();
  getchar();
  return c;
}


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

x86 assembly (clang, -O2):
<get_single_char>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @get_single_char() {
%1 = tail call i32 (...) @getchar()
%2 = tail call i32 (...) @getchar()
ret i32 %1
}
/* Variables and functions */
int hash(char *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int h = hash("hello world", 5);
  printf("%d", h);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x5,%esi
call   1030 <hash@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @hash(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
unsigned long LLVMReporter_getThreadId() {
  unsigned long retval = 0;
  return retval;
}


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

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

LLVM IR (-O0):
define i64 @LLVMReporter_getThreadId() {
%1 = alloca i64
store i64 0, i64* %1
%2 = load i64, i64* %1
ret i64 %2
}

LLVM IR (-O2):
define i64 @LLVMReporter_getThreadId() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ __NR_exit;
long syscall(int /*<<< orphan*/, int);
long int __exit(int x) { return syscall(__NR_exit, x); }


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

x86 assembly (clang, -O2):
<__exit>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_exit = global i32 0
define i64 @__exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @__NR_exit
%4 = load i32, i32* %2
%5 = call i64 @syscall(i32 %3, i32 %4)
ret i64 %5
}

LLVM IR (-O2):
@__NR_exit = global i32 0
define i64 @__exit(i32 %0) {
%2 = load i32, i32* @__NR_exit
%3 = tail call i64 @syscall(i32 %2, i32 %0)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int socket(int, int, int);
int i_socket(int domain, int type, int protocol) {
  int fd;
  if ((fd = socket(domain, type, protocol)) == -1) {
    perror("creat socket error:");
    exit(1);
  }
  return (fd);
}


x86 assembly (clang, -O0):
<i_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1050 <socket@plt>
mov    %eax,-0x10(%rbp)
cmp    $0xffffffff,%eax
jne    1171 <i_socket+0x41>
lea    0xe9e(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_socket>:
push   %rax
call   1050 <socket@plt>
cmp    $0xffffffff,%eax
je     113d <i_socket+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [20 x i8] c"creat socket error:\00"
define i32 @i_socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret i32 %4
}
extern void libvampsdk_v_2_5_present(void) {}


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

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

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

LLVM IR (-O2):
define void @libvampsdk_v_2_5_present() {
ret void
}
int ft_isdigit(int c) { return ((c >= 060) && (c <= 071)); }


x86 assembly (clang, -O0):
<ft_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <ft_isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ft_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
void lgtd_daemon_update_proctitle(void) {}


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

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

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

LLVM IR (-O2):
define void @lgtd_daemon_update_proctitle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello distcc\n");
  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 <printf@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 = [14 x i8] c"Hello distcc\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello distcc\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ return_struct_vf2();
int /*<<< orphan*/ take_struct_vf2(int /*<<< orphan*/);
void test_struct_vf2() { take_struct_vf2(return_struct_vf2()); }


x86 assembly (clang, -O0):
<test_struct_vf2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <return_struct_vf2@plt>
mov    %eax,%edi
call   1040 <take_struct_vf2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_struct_vf2>:
push   %rax
xor    %eax,%eax
call   1030 <return_struct_vf2@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <take_struct_vf2@plt>

LLVM IR (-O0):
define void @test_struct_vf2() {
%1 = call i32 (...) @return_struct_vf2()
%2 = call i32 @take_struct_vf2(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_struct_vf2() {
%1 = tail call i32 (...) @return_struct_vf2()
%2 = tail call i32 @take_struct_vf2(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ temp();
void testTortureExecute(void) {
  temp();
  return;
}


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

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

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

LLVM IR (-O2):
define void @testTortureExecute() {
%1 = tail call i32 (...) @temp()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void error_quit(const char *msg) {
  perror(msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<error_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error_quit>:
push   %rax
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @error_quit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @error_quit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int getScaledValue(uint8_t *encodedValue) {
  int value;
  value = encodedValue[0];
  value += (encodedValue[1] * 0x100);
  if (value > 32767)
    value = value - 65536;
  return value;
}


x86 assembly (clang, -O0):
<getScaledValue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x8,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7fff,-0xc(%rbp)
jle    1139 <getScaledValue+0x39>
mov    -0xc(%rbp),%eax
sub    $0x10000,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getScaledValue>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x8,%ecx
lea    (%rcx,%rax,1),%edx
cmp    $0x8000,%edx
lea    -0x10000(%rcx,%rax,1),%eax
cmovl  %edx,%eax
ret

LLVM IR (-O0):
define i32 @getScaledValue(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 256
%11 = load i32, i32* %3
%12 = add nsw i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 32767
br i1 %14, label %15, label %18
15: ; preds = %1
%16 = load i32, i32* %3
%17 = sub nsw i32 %16, 65536
store i32 %17, i32* %3
br label %18
18: ; preds = %15, %1
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @getScaledValue(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = shl nsw i32 %4, 8
%6 = add nsw i32 %5, %2
%7 = icmp sgt i32 %6, 32767
%8 = add nsw i32 %6, -65536
%9 = select i1 %7, i32 %8, i32 %6
ret i32 %9
}
/* Variables and functions */
void recursive_group_task(const size_t depth) {
  if (depth < 1000) {
#pragma omp taskgroup
    {
#pragma omp task default(none) firstprivate(depth)
      { recursive_group_task(depth + 1); }
    }
  }
}


x86 assembly (clang, -O0):
<recursive_group_task>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x3e8,-0x8(%rbp)
jae    1137 <recursive_group_task+0x27>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <recursive_group_task@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @recursive_group_task(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ult i64 %3, 1000
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = add i64 %6, 1
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @recursive_group_task(i64 %0) {
ret void
}
/* Variables and functions */
int f(int);
int g(int x) {
  if (x % 2 == 0)
    return f(x);
  else
    return f(x + 1);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    113f <g+0x2f>
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
mov    %eax,-0x4(%rbp)
jmp    114d <g+0x3d>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <f@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
mov    %edi,%eax
and    $0x1,%eax
add    %eax,%edi
jmp    1030 <f@plt>

LLVM IR (-O0):
define i32 @g(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @f(i32 %8)
store i32 %9, i32* %2
br label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
%13 = call i32 @f(i32 %12)
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @g(i32 %0) {
%2 = and i32 %0, 1
%3 = add nsw i32 %2, %0
%4 = tail call i32 @f(i32 %3)
ret i32 %4
}
unsigned hash_str(const void *key) {
  char *s = (char *)key;
  unsigned int h = 31;
  for (; *s; s++) {
    h ^= ((h << 5) + (*s) + (h >> 2));
  }
  return h & 0x7fffffff;
}


x86 assembly (clang, -O0):
<hash_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1f,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <hash_str+0x52>
mov    -0x14(%rbp),%eax
shl    $0x5,%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
shr    $0x2,%ecx
add    %ecx,%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1117 <hash_str+0x17>
mov    -0x14(%rbp),%eax
and    $0x7fffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_str>:
mov    (%rdi),%cl
test   %cl,%cl
je     1134 <hash_str+0x34>
add    $0x1,%rdi
mov    $0x1f,%eax
nop
mov    %eax,%edx
mov    %eax,%esi
shl    $0x5,%esi
movsbl %cl,%ecx
shr    $0x2,%eax
add    %esi,%eax
add    %ecx,%eax
xor    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_str+0x10>
and    $0x7fffffff,%eax
ret
mov    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @hash_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
store i32 31, i32* %4
br label %6
6: ; preds = %22, %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %25
10: ; preds = %6
%11 = load i32, i32* %4
%12 = shl i32 %11, 5
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = add i32 %12, %15
%17 = load i32, i32* %4
%18 = lshr i32 %17, 2
%19 = add i32 %16, %18
%20 = load i32, i32* %4
%21 = xor i32 %20, %19
store i32 %21, i32* %4
br label %22
22: ; preds = %10
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %3
br label %6
25: ; preds = %6
%26 = load i32, i32* %4
%27 = and i32 %26, 2147483647
ret i32 %27
}

LLVM IR (-O2):
define i32 @hash_str(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %19, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %15, %4 ], [ %2, %1 ]
%6 = phi i32 [ %13, %4 ], [ 31, %1 ]
%7 = phi i8* [ %14, %4 ], [ %0, %1 ]
%8 = shl i32 %6, 5
%9 = sext i8 %5 to i32
%10 = lshr i32 %6, 2
%11 = add i32 %10, %8
%12 = add i32 %11, %9
%13 = xor i32 %12, %6
%14 = getelementptr inbounds i8, i8* %7, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %4
%18 = and i32 %13, 2147483647
br label %19
19: ; preds = %17, %1
%20 = phi i32 [ 31, %1 ], [ %18, %17 ]
ret i32 %20
}