xunge/DecIR huggingface dataset:
int _falmbDefaultTextEscapement() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_falmbDefaultTextEscapement() {
ret i32 0
}
/* Type definitions */
struct utmpx {
  int dummy;
};

/* Variables and functions */
struct utmpx *pututxline(const struct utmpx *ut) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.utmpx = type { i32 }
define %struct.utmpx* @pututxline(%struct.utmpx* %0) {
%2 = alloca %struct.utmpx*
store %struct.utmpx* %0, %struct.utmpx** %2
ret %struct.utmpx* null
}

LLVM IR (-O2):
%struct.utmpx = type { i32 }
define noalias %struct.utmpx* @pututxline(%struct.utmpx* nocapture readnone %0) {
ret %struct.utmpx* null
}
/* Variables and functions */
int /*<<< orphan*/ _io_out8(int, int);
void inthandler27(int *esp) {
  _io_out8(0x0020, 0x67);
  return;
}


x86 assembly (clang, -O0):
<inthandler27>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x20,%edi
mov    $0x67,%esi
call   1030 <_io_out8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inthandler27>:
mov    $0x20,%edi
mov    $0x67,%esi
jmp    1030 <_io_out8@plt>

LLVM IR (-O0):
define void @inthandler27(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @_io_out8(i32 32, i32 103)
ret void
}

LLVM IR (-O2):
define void @inthandler27(i32* nocapture readnone %0) {
%2 = tail call i32 @_io_out8(i32 32, i32 103)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ config_save();
void config_save_select(void *priv, int delta) { config_save(); }


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

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

LLVM IR (-O0):
define void @config_save_select(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @config_save()
ret void
}

LLVM IR (-O2):
define void @config_save_select(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @config_save()
ret void
}
testPointerIndirection() {
  int a, b;
  a = &b;
  b = 17;
  printf("*%d  = %d =?= %d\n", a, *(int *)a, b);
}


x86 assembly (clang, -O0):
<testPointerIndirection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rax
mov    %eax,-0x8(%rbp)
movl   $0x11,-0xc(%rbp)
mov    -0x8(%rbp),%esi
movslq -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0xc(%rbp),%ecx
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testPointerIndirection>:
push   %rax
lea    0x4(%rsp),%rax
movl   $0x11,0x4(%rsp)
movslq %eax,%rsi
mov    (%rsi),%edx
lea    0xed6(%rip),%rdi
mov    $0x11,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"*%d = %d =?= %d\0A\00"
define i32 @testPointerIndirection() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = ptrtoint i32* %3 to i32
store i32 %4, i32* %2
store i32 17, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load i32, i32* %8
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %9, i32 %10)
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [18 x i8] c"*%d = %d =?= %d\0A\00"
define i32 @testPointerIndirection() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = ptrtoint i32* %1 to i64
%4 = trunc i64 %3 to i32
store i32 17, i32* %1
%5 = shl i64 %3, 32
%6 = ashr exact i64 %5, 32
%7 = inttoptr i64 %6 to i32*
%8 = load i32, i32* %7
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %8, i32 17)
ret i32 undef
}
void switchStmt() {
  int x, y, z;
  switch (x) {
  case 1:
  case 2:
    x = y;
    break;
  case 3:
    x = z;
  default:
    z = y;
  }
}


x86 assembly (clang, -O0):
<switchStmt>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
add    $0xffffffff,%eax
sub    $0x2,%eax
jb     112c <switchStmt+0x2c>
jmp    111b <switchStmt+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     1137 <switchStmt+0x37>
jmp    113d <switchStmt+0x3d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <switchStmt+0x43>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @switchStmt() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = load i32, i32* %1
switch i32 %4, label %9 [
i32 1, label %5
i32 2, label %5
i32 3, label %7
]
5: ; preds = %0, %0
%6 = load i32, i32* %2
store i32 %6, i32* %1
br label %11
7: ; preds = %0
%8 = load i32, i32* %3
store i32 %8, i32* %1
br label %9
9: ; preds = %0, %7
%10 = load i32, i32* %2
store i32 %10, i32* %3
br label %11
11: ; preds = %9, %5
ret void
}

LLVM IR (-O2):
define void @switchStmt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cls() { printf("\033[2J\033[1;1H"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @cls() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @cls() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t mp_sizeof_float(float num) {
  (void)num;
  return 1 + sizeof(float);
}


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

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

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

LLVM IR (-O2):
define i32 @mp_sizeof_float(float %0) {
ret i32 5
}
unsigned md5_rotate(unsigned x, unsigned y) {
  volatile unsigned high, low;
  high = x << y;
  low = x >> (32 - y);
  return high | low;
}


x86 assembly (clang, -O0):
<md5_rotate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<md5_rotate>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
mov    %eax,-0x4(%rsp)
neg    %cl
shr    %cl,%edi
mov    %edi,-0x8(%rsp)
mov    -0x4(%rsp),%eax
or     -0x8(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @md5_rotate(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = shl i32 %7, %8
store volatile i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub i32 32, %11
%13 = lshr i32 %10, %12
store volatile i32 %13, i32* %6
%14 = load volatile i32, i32* %5
%15 = load volatile i32, i32* %6
%16 = or i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @md5_rotate(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = shl i32 %0, %1
store volatile i32 %7, i32* %3
%8 = sub i32 32, %1
%9 = lshr i32 %0, %8
store volatile i32 %9, i32* %4
%10 = load volatile i32, i32* %3
%11 = load volatile i32, i32* %4
%12 = or i32 %11, %10
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_seat_get_active(const char *seat, char **session, uid_t *uid) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_seat_get_active>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    0x2ec7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_seat_get_active>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_seat_get_active(i8* %0, i8** %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32*
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32* %2, i32** %6
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_seat_get_active(i8* nocapture readnone %0, i8** nocapture readnone %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Type definitions */
struct epoll_event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int epoll_wait(int const, struct epoll_event *, int, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int waitForEpollEvent(const int epollfd, struct epoll_event *events) {
  int nevents;
  if ((nevents = epoll_wait(epollfd, events, 100, -1)) == -1) {
    perror("epoll_wait");
    exit(EXIT_FAILURE);
  }
  return nevents;
}


x86 assembly (clang, -O0):
<waitForEpollEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x64,%edx
mov    $0xffffffff,%ecx
call   1030 <epoll_wait@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    117b <waitForEpollEvent+0x4b>
lea    0xe98(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitForEpollEvent>:
push   %rax
mov    $0x64,%edx
mov    $0xffffffff,%ecx
call   1030 <epoll_wait@plt>
cmp    $0xffffffff,%eax
je     1147 <waitForEpollEvent+0x17>
pop    %rcx
ret
lea    0xeb2(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
%struct.epoll_event = type { i32 }
@.str = [11 x i8] c"epoll_wait\00"
@EXIT_FAILURE = global i32 0
define i32 @waitForEpollEvent(i32 %0, %struct.epoll_event* %1) {
%3 = tail call i32 @epoll_wait(i32 %0, %struct.epoll_event* %1, i32 100, i32 -1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret i32 %3
}
double tent(double r, double x) {
  if (x < 1 / r) {
    return r * x;
  } else {
    return r * (x - 1) / (1 - r);
  }
}


x86 assembly (clang, -O0):
<tent>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xee5(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    113e <tent+0x3e>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116e <tent+0x6e>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xeb0(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<tent>:
movsd  0xef8(%rip),%xmm2
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
ucomisd %xmm1,%xmm3
jbe    111b <tent+0x1b>
mulsd  %xmm1,%xmm0
ret
addsd  0xee5(%rip),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @tent(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %5
%7 = load double, double* %4
%8 = fdiv double 1.000000e+00, %7
%9 = fcmp olt double %6, %8
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load double, double* %4
%12 = load double, double* %5
%13 = fmul double %11, %12
store double %13, double* %3
br label %22
14: ; preds = %2
%15 = load double, double* %4
%16 = load double, double* %5
%17 = fsub double %16, 1.000000e+00
%18 = fmul double %15, %17
%19 = load double, double* %4
%20 = fsub double 1.000000e+00, %19
%21 = fdiv double %18, %20
store double %21, double* %3
br label %22
22: ; preds = %14, %10
%23 = load double, double* %3
ret double %23
}

LLVM IR (-O2):
define double @tent(double %0, double %1) {
%3 = fdiv double 1.000000e+00, %0
%4 = fcmp ogt double %3, %1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = fmul double %0, %1
br label %12
7: ; preds = %2
%8 = fadd double %1, -1.000000e+00
%9 = fmul double %8, %0
%10 = fsub double 1.000000e+00, %0
%11 = fdiv double %9, %10
br label %12
12: ; preds = %7, %5
%13 = phi double [ %6, %5 ], [ %11, %7 ]
ret double %13
}
/* Variables and functions */
int /*<<< orphan*/ rightDropAtPos(int);
int /*<<< orphan*/ writeDebugStreamLine(char *);
void rightOuterCrate4() {
  writeDebugStreamLine("Crate 4");
  rightDropAtPos(3);
}


x86 assembly (clang, -O0):
<rightOuterCrate4>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <writeDebugStreamLine@plt>
mov    $0x3,%edi
call   1040 <rightDropAtPos@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightOuterCrate4>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <writeDebugStreamLine@plt>
mov    $0x3,%edi
pop    %rax
jmp    1040 <rightDropAtPos@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Crate 4\00"
define void @rightOuterCrate4() {
%1 = call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @rightDropAtPos(i32 3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Crate 4\00"
define void @rightOuterCrate4() {
%1 = tail call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @rightDropAtPos(i32 3)
ret void
}
int hash(const char *name) {
  int h = 0;
  while (*name != '\0') {
    h <<= 2;
    h += *name++;
  }
  if (h < 0 && (h = -h) < 0)
    h = 0;
  return (h % 59);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1145 <hash+0x45>
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash+0xf>
cmpl   $0x0,-0xc(%rbp)
jge    1167 <hash+0x67>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1167 <hash+0x67>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3b,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%al
test   %al,%al
je     1140 <hash+0x40>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
lea    (%rax,%rcx,4),%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash+0x10>
xor    %edx,%edx
mov    %ecx,%eax
neg    %eax
cmovs  %edx,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
imul   $0x22b63cbf,%rax,%rcx
shr    $0x23,%rcx
imul   $0x3b,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %21, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = shl i32 %6, 2
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = add nsw i32 %9, %8
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = icmp slt i32 %11, 0
%16 = sub nsw i32 0, %11
%17 = icmp sgt i32 %16, 0
%18 = select i1 %17, i32 %16, i32 0
%19 = select i1 %15, i32 %18, i32 %11
%20 = urem i32 %19, 59
br label %21
21: ; preds = %14, %1
%22 = phi i32 [ 0, %1 ], [ %20, %14 ]
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ DoUnexpected();
int /*<<< orphan*/ InMacExpansion();
int /*<<< orphan*/ MacAbort();
void DoExitMacro(void) {
  if (!InMacExpansion()) {
    DoUnexpected();
  } else {
    MacAbort();
  }
}


x86 assembly (clang, -O0):
<DoExitMacro>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <InMacExpansion@plt>
cmp    $0x0,%eax
jne    1150 <DoExitMacro+0x20>
mov    $0x0,%al
call   1050 <DoUnexpected@plt>
jmp    1157 <DoExitMacro+0x27>
mov    $0x0,%al
call   1030 <MacAbort@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoExitMacro>:
push   %rax
xor    %eax,%eax
call   1040 <InMacExpansion@plt>
test   %eax,%eax
je     1144 <DoExitMacro+0x14>
xor    %eax,%eax
pop    %rcx
jmp    1030 <MacAbort@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <DoUnexpected@plt>

LLVM IR (-O0):
define void @DoExitMacro() {
%1 = call i32 (...) @InMacExpansion()
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 (...) @DoUnexpected()
br label %7
5: ; preds = %0
%6 = call i32 (...) @MacAbort()
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
define void @DoExitMacro() {
%1 = tail call i32 (...) @InMacExpansion()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @DoUnexpected()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @MacAbort()
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_rsh(void) { write_instr(0x25); }


x86 assembly (clang, -O0):
<eval_rsh>:
push   %rbp
mov    %rsp,%rbp
mov    $0x25,%edi
call   1030 <write_instr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_rsh>:
mov    $0x25,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_rsh() {
%1 = call i32 @write_instr(i32 37)
ret void
}

LLVM IR (-O2):
define void @eval_rsh() {
%1 = tail call i32 @write_instr(i32 37)
ret void
}
void bwb_Warning_AdvancedFeature(char *Message) {
  bwx_DEBUG(__FUNCTION__);
  bwb_Warning(73, Message);
}


x86 assembly (clang, -O0):
<bwb_Warning_AdvancedFeature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <bwx_DEBUG@plt>
mov    -0x8(%rbp),%rsi
mov    $0x49,%edi
mov    $0x0,%al
call   1040 <bwb_Warning@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwb_Warning_AdvancedFeature>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <bwx_DEBUG@plt>
mov    $0x49,%edi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <bwb_Warning@plt>

LLVM IR (-O0):
@__FUNCTION__.bwb_Warning_AdvancedFeature = [28 x i8] c"bwb_Warning_AdvancedFeature\00"
define void @bwb_Warning_AdvancedFeature(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__FUNCTION__.bwb_Warning_AdvancedFeature, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @bwb_Warning to i32 (i32, i8*, ...)*)(i32 73, i8* %4)
ret void
}

LLVM IR (-O2):
@__FUNCTION__.bwb_Warning_AdvancedFeature = [28 x i8] c"bwb_Warning_AdvancedFeature\00"
define void @bwb_Warning_AdvancedFeature(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__FUNCTION__.bwb_Warning_AdvancedFeature, i64 0, i64 0))
%3 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @bwb_Warning to i32 (i32, i8*, ...)*)(i32 73, i8* %0)
ret void
}
/* Variables and functions */
int draw_block4x4_signed_rgtc1_shared(unsigned char const *, unsigned int *,
                                      int /*<<< orphan*/, int);
int /*<<< orphan*/ memset(unsigned int *, int /*<<< orphan*/, int);
int draw_block4x4_signed_rgtc1(const unsigned char *bitstring,
                               unsigned int *image_buffer, int flags) {
  memset(image_buffer, 0, 64);
  return draw_block4x4_signed_rgtc1_shared(bitstring, image_buffer, 0, flags);
}


x86 assembly (clang, -O0):
<draw_block4x4_signed_rgtc1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
xor    %edx,%edx
call   1030 <draw_block4x4_signed_rgtc1_shared@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_block4x4_signed_rgtc1>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <draw_block4x4_signed_rgtc1_shared@plt>

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

LLVM IR (-O2):
define i32 @draw_block4x4_signed_rgtc1(i8* %0, i32* %1, i32 %2) {
%4 = tail call i32 @memset(i32* %1, i32 0, i32 64)
%5 = tail call i32 @draw_block4x4_signed_rgtc1_shared(i8* %0, i32* %1, i32 0, i32 %2)
ret i32 %5
}
/* Variables and functions */
int i386_autoload(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @i386_autoload() {
ret i32 0
}
/* Variables and functions */
scalar_t__ EPERM;
scalar_t__ errno;
int rmdir(char const *);
int unlink(char const *);
int remove(const char *filename) {
  int ret;
  ret = unlink(filename);
  if (ret == -1 && errno == EPERM) {
    return rmdir(filename);
  }
  return ret;
}


x86 assembly (clang, -O0):
<remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    116d <remove+0x4d>
mov    0x2e97(%rip),%rax
mov    (%rax),%rax
mov    0x2e7d(%rip),%rcx
cmp    (%rcx),%rax
jne    116d <remove+0x4d>
mov    -0x10(%rbp),%rdi
call   1040 <rmdir@plt>
mov    %eax,-0x4(%rbp)
jmp    1173 <remove+0x53>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove>:
push   %rbx
mov    %rdi,%rbx
call   1030 <unlink@plt>
cmp    $0xffffffff,%eax
jne    1152 <remove+0x32>
mov    0x2eab(%rip),%rax
mov    (%rax),%rcx
mov    0x2e91(%rip),%rdx
mov    $0xffffffff,%eax
cmp    (%rdx),%rcx
jne    1152 <remove+0x32>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <rmdir@plt>
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
@EPERM = global i64 0
define i32 @remove(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @unlink(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i64, i64* @errno
%11 = load i64, i64* @EPERM
%12 = icmp eq i64 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i8*, i8** %3
%15 = call i32 @rmdir(i8* %14)
store i32 %15, i32* %2
br label %18
16: ; preds = %9, %1
%17 = load i32, i32* %4
store i32 %17, i32* %2
br label %18
18: ; preds = %16, %13
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@errno = global i64 0
@EPERM = global i64 0
define i32 @remove(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i64, i64* @errno
%6 = load i64, i64* @EPERM
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @rmdir(i8* %0)
br label %10
10: ; preds = %1, %4, %8
%11 = phi i32 [ %9, %8 ], [ -1, %4 ], [ %2, %1 ]
ret i32 %11
}
unsigned char thermo_threshold_inc(unsigned char thres) {
  char value;
  unsigned char ret;
  if (thres != (128)) {
    value = (char)thres;
    if (value < (85)) {
      value++;
      ret = (unsigned char)value;
    } else {
      ret = (unsigned char)(128);
    }
  } else {
    ret = (unsigned char)(-55);
  };
  return ret;
}


x86 assembly (clang, -O0):
<thermo_threshold_inc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x80,%eax
je     1148 <thermo_threshold_inc+0x48>
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x55,%eax
jge    113f <thermo_threshold_inc+0x3f>
mov    -0x2(%rbp),%al
add    $0x1,%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x3(%rbp)
jmp    1143 <thermo_threshold_inc+0x43>
movb   $0x80,-0x3(%rbp)
jmp    114c <thermo_threshold_inc+0x4c>
movb   $0xc9,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<thermo_threshold_inc>:
lea    0x1(%rdi),%eax
cmp    $0x55,%dil
movzbl %al,%eax
mov    $0x80,%ecx
cmovl  %eax,%ecx
cmp    $0x80,%dil
mov    $0xc9,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @thermo_threshold_inc(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = icmp ne i32 %6, 128
br i1 %7, label %8, label %19
8: ; preds = %1
%9 = load i8, i8* %2
store i8 %9, i8* %3
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp slt i32 %11, 85
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = load i8, i8* %3
%15 = add i8 %14, 1
store i8 %15, i8* %3
%16 = load i8, i8* %3
store i8 %16, i8* %4
br label %18
17: ; preds = %8
store i8 -128, i8* %4
br label %18
18: ; preds = %17, %13
br label %20
19: ; preds = %1
store i8 -55, i8* %4
br label %20
20: ; preds = %19, %18
%21 = load i8, i8* %4
ret i8 %21
}

LLVM IR (-O2):
define zeroext i8 @thermo_threshold_inc(i8 zeroext %0) {
%2 = icmp eq i8 %0, -128
%3 = icmp slt i8 %0, 85
%4 = add i8 %0, 1
%5 = select i1 %3, i8 %4, i8 -128
%6 = select i1 %2, i8 -55, i8 %5
ret i8 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ duration;
};
union bpf_attr {
  TYPE_1__ test;
};
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
__u32 bpf_attr_prog_run_duration(union bpf_attr *attr) {
  return attr->test.duration;
}


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

x86 assembly (clang, -O2):
<bpf_attr_prog_run_duration>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%union.bpf_attr = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
define i32 @bpf_attr_prog_run_duration(%union.bpf_attr* %0) {
%2 = alloca %union.bpf_attr*
store %union.bpf_attr* %0, %union.bpf_attr** %2
%3 = load %union.bpf_attr*, %union.bpf_attr** %2
%4 = bitcast %union.bpf_attr* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%union.bpf_attr = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
define i32 @bpf_attr_prog_run_duration(%union.bpf_attr* nocapture %0) {
%2 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %0, i64 0, i32 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
void S_ClearBuffer(void) {}


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

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

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

LLVM IR (-O2):
define void @S_ClearBuffer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
int pipe(int *);
void do_pipe(int fd[]) {
  int status = pipe(fd);
  if (status == -1)
    die("pipe failed");
}


x86 assembly (clang, -O0):
<do_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pipe@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    114e <do_pipe+0x2e>
lea    0xeb7(%rip),%rdi
call   1040 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_pipe>:
push   %rax
call   1030 <pipe@plt>
cmp    $0xffffffff,%eax
je     112d <do_pipe+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <die@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"pipe failed\00"
define void @do_pipe(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @pipe(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"pipe failed\00"
define void @do_pipe(i32* %0) {
%2 = tail call i32 @pipe(i32* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
int fi_(int *const i) { return (42); }


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

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

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

LLVM IR (-O2):
define i32 @fi_(i32* nocapture readnone %0) {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ link_error();
void foo(char *p) {
  if (!p)
    return;
  p += 3;
  if (!p)
    link_error();
  p -= 6;
  if (!p)
    bar();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <foo+0x1c>
jmp    1178 <foo+0x58>
mov    -0x8(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115a <foo+0x3a>
mov    $0x0,%al
call   1040 <link_error@plt>
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffa,%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1178 <foo+0x58>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %20
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 3
store i8* %8, i8** %2
%9 = load i8*, i8** %2
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %6
%12 = call i32 (...) @link_error()
br label %13
13: ; preds = %11, %6
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 -6
store i8* %15, i8** %2
%16 = load i8*, i8** %2
%17 = icmp ne i8* %16, null
br i1 %17, label %20, label %18
18: ; preds = %13
%19 = call i32 (...) @bar()
br label %20
20: ; preds = %5, %18, %13
ret void
}

LLVM IR (-O2):
define void @foo(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UI_PopMenu();
void UI_SaveConfigMenu_BackEvent(void *ptr, int event) {
  if (event != 3) {
    return;
  }
  UI_PopMenu();
}


x86 assembly (clang, -O0):
<UI_SaveConfigMenu_BackEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
je     112e <UI_SaveConfigMenu_BackEvent+0x1e>
jmp    1135 <UI_SaveConfigMenu_BackEvent+0x25>
mov    $0x0,%al
call   1030 <UI_PopMenu@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_SaveConfigMenu_BackEvent>:
cmp    $0x3,%esi
jne    111c <UI_SaveConfigMenu_BackEvent+0xc>
xor    %eax,%eax
jmp    1030 <UI_PopMenu@plt>
ret

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

LLVM IR (-O2):
define void @UI_SaveConfigMenu_BackEvent(i8* nocapture readnone %0, i32 %1) {
%3 = icmp eq i32 %1, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @UI_PopMenu()
br label %6
6: ; preds = %2, %4
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  struct timeval gt;
  gettimeofday(&gt, NULL);
  printf("sec is %d,usec is %d\n", gt.tv_sec, gt.tv_usec);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%edx
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@.str = [22 x i8] c"sec is %d,usec is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval
store i32 0, i32* %1
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@.str = [22 x i8] c"sec is %d,usec is %d\0A\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}
void ff_hevc_put_hevc_uni_w_pel_pixels4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_pel_pixels4_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *real_path(char const *);
int fs_exists(const char *path) {
  char *real;
  if ((real = real_path(path))) {
    free(real);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<fs_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <real_path@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1158 <fs_exists+0x38>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movl   $0x1,-0x4(%rbp)
jmp    115f <fs_exists+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_exists>:
push   %rax
call   1040 <real_path@plt>
test   %rax,%rax
je     113a <fs_exists+0x1a>
mov    %rax,%rdi
call   1030 <free@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fs_exists(i8* %0) {
%2 = tail call i8* @real_path(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
__attribute__((always_)) int ebcdic_isdigit(char c) {
  return (c >= 0xf0) && (c <= 0xf9);
}


x86 assembly (clang, -O0):
<ebcdic_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0xf0,%ecx
mov    %al,-0x2(%rbp)
jl     112e <ebcdic_isdigit+0x2e>
movsbl -0x1(%rbp),%eax
cmp    $0xf9,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ebcdic_isdigit(i8 signext %0) {
ret i32 0
}
void protocol_http_free_client_data(struct client *c) {}


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

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

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

LLVM IR (-O2):
%struct.client = type opaque
define void @protocol_http_free_client_data(%struct.client* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;
typedef int /*<<< orphan*/ EVP_MD;

/* Variables and functions */
int EVP_DigestInit_ex(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                      int /*<<< orphan*/ *);
int /*<<< orphan*/ EVP_MD_CTX_init(int /*<<< orphan*/ *);
int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type) {
  EVP_MD_CTX_init(ctx);
  return EVP_DigestInit_ex(ctx, type, NULL);
}


x86 assembly (clang, -O0):
<EVP_DigestInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <EVP_MD_CTX_init@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <EVP_DigestInit_ex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_DigestInit>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <EVP_MD_CTX_init@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <EVP_DigestInit_ex@plt>

LLVM IR (-O0):
define i32 @EVP_DigestInit(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = call i32 @EVP_MD_CTX_init(i32* %5)
%7 = load i32*, i32** %3
%8 = load i32*, i32** %4
%9 = call i32 @EVP_DigestInit_ex(i32* %7, i32* %8, i32* null)
ret i32 %9
}

LLVM IR (-O2):
define i32 @EVP_DigestInit(i32* %0, i32* %1) {
%3 = tail call i32 @EVP_MD_CTX_init(i32* %0)
%4 = tail call i32 @EVP_DigestInit_ex(i32* %0, i32* %1, i32* null)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ zpci_event_log_avail(void *);
void zpci_event_availability(void *data) { zpci_event_log_avail(data); }


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

x86 assembly (clang, -O2):
<zpci_event_availability>:
jmp    1030 <zpci_event_log_avail@plt>

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

LLVM IR (-O2):
define void @zpci_event_availability(i8* %0) {
%2 = tail call i32 @zpci_event_log_avail(i8* %0)
ret void
}
extern long long shmem_longlong_finc(long long *target, int pe) {
  return *target;
}


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

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

LLVM IR (-O0):
define i64 @shmem_longlong_finc(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @shmem_longlong_finc(i64* nocapture %0, i32 %1) {
%3 = load i64, i64* %0
ret i64 %3
}
/* Type definitions */
struct sabir {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct sabir *);
void sb_dealloc(struct sabir *sb) { free(sb); }


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

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

LLVM IR (-O2):
%struct.sabir = type { i32 }
define void @sb_dealloc(%struct.sabir* nocapture %0) {
%2 = tail call i32 @free(%struct.sabir* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version() {
  printf("move version 1.0\n"
         "Hitlion King\n");
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"move version 1.0\0AHitlion King\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"move version 1.0\0AHitlion King\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int STRCMP(const char *_Str1, const char *_Str2) {
  return strcmp(_Str1, _Str2);
}


x86 assembly (clang, -O0):
<STRCMP>:
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   1030 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STRCMP>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @STRCMP(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 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @STRCMP(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void ECDSA_size(void) {}


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

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

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

LLVM IR (-O2):
define void @ECDSA_size() {
ret void
}
void ex4() {}


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

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

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

LLVM IR (-O2):
define void @ex4() {
ret void
}
int uproc_features_openmp(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @uproc_features_openmp() {
ret i32 0
}
/* Type definitions */
struct document {
  int dummy;
};

/* Variables and functions */
struct document **calloc(int, int);
struct document **hv_aloc_doc_matrix(int ndocs) {
  return (calloc(ndocs, sizeof(struct document *)));
}


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

x86 assembly (clang, -O2):
<hv_aloc_doc_matrix>:
mov    $0x8,%esi
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
%struct.document = type { i32 }
define noalias %struct.document** @hv_aloc_doc_matrix(i32 %0) {
%2 = tail call %struct.document** @calloc(i32 %0, i32 8)
ret %struct.document** %2
}