xunge/DecIR huggingface dataset:
char escape_char(char c) {
  switch (c) {
  case 'n':
    c = '\n';
    break;
  case 'r':
    c = '\r';
    break;
  case 't':
    c = '\t';
    break;
  default:
    break;
  }
  return c;
}


x86 assembly (clang, -O0):
<escape_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x6e,%eax
je     1141 <escape_char+0x41>
jmp    111f <escape_char+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x72,%eax
je     114a <escape_char+0x4a>
jmp    1130 <escape_char+0x30>
mov    -0x8(%rbp),%eax
sub    $0x74,%eax
je     1153 <escape_char+0x53>
jmp    115c <escape_char+0x5c>
movb   $0xa,-0x1(%rbp)
jmp    1161 <escape_char+0x61>
movb   $0xd,-0x1(%rbp)
jmp    1161 <escape_char+0x61>
movb   $0x9,-0x1(%rbp)
jmp    1161 <escape_char+0x61>
jmp    1161 <escape_char+0x61>
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<escape_char>:
cmp    $0x74,%edi
je     1114 <escape_char+0x14>
mov    %edi,%eax
cmp    $0x72,%edi
je     1117 <escape_char+0x17>
cmp    $0x6e,%eax
jne    1116 <escape_char+0x16>
mov    $0xa,%al
ret
mov    $0x9,%al
ret
mov    $0xd,%al
ret

LLVM IR (-O0):
define signext i8 @escape_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %8 [
i32 110, label %5
i32 114, label %6
i32 116, label %7
]
5: ; preds = %1
store i8 10, i8* %2
br label %9
6: ; preds = %1
store i8 13, i8* %2
br label %9
7: ; preds = %1
store i8 9, i8* %2
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8, i8* %2
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @escape_char(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %6 [
i32 110, label %3
i32 114, label %4
i32 116, label %5
]
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3
%7 = phi i8 [ %0, %1 ], [ 9, %5 ], [ 13, %4 ], [ 10, %3 ]
ret i8 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ pexit(char *);
int /*<<< orphan*/ sigdelset(int /*<<< orphan*/ *, int);
int sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int sigsuspend(int /*<<< orphan*/ *);
int _sigpause(int sig) {
  sigset_t mask;
  if (sigprocmask(SIG_SETMASK, NULL, &mask) == -1) {
    pexit("sigprocmask");
  }
  sigdelset(&mask, sig);
  return sigsuspend(&mask);
}


x86 assembly (clang, -O0):
<_sigpause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
lea    -0x8(%rbp),%rdx
call   1030 <sigprocmask@plt>
cmp    $0xffffffff,%eax
jne    1176 <_sigpause+0x36>
lea    0xe8f(%rip),%rdi
call   1060 <pexit@plt>
mov    -0x4(%rbp),%esi
lea    -0x8(%rbp),%rdi
call   1050 <sigdelset@plt>
lea    -0x8(%rbp),%rdi
call   1040 <sigsuspend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sigpause>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rdx
xor    %esi,%esi
call   1030 <sigprocmask@plt>
cmp    $0xffffffff,%eax
jne    116b <_sigpause+0x2b>
lea    0xe9a(%rip),%rdi
call   1060 <pexit@plt>
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <sigdelset@plt>
mov    %rbx,%rdi
call   1040 <sigsuspend@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@SIG_SETMASK = global i32 0
@.str = [12 x i8] c"sigprocmask\00"
define i32 @_sigpause(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @SIG_SETMASK
%5 = call i32 @sigprocmask(i32 %4, i32* null, i32* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @pexit(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %2
%11 = call i32 @sigdelset(i32* %3, i32 %10)
%12 = call i32 @sigsuspend(i32* %3)
ret i32 %12
}

LLVM IR (-O2):
@SIG_SETMASK = global i32 0
@.str = [12 x i8] c"sigprocmask\00"
define i32 @_sigpause(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @SIG_SETMASK
%5 = call i32 @sigprocmask(i32 %4, i32* null, i32* %2)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @pexit(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = call i32 @sigdelset(i32* %2, i32 %0)
%11 = call i32 @sigsuspend(i32* %2)
ret i32 %11
}
void rtw_proc_remove_one(struct net_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.net_device = type opaque
define void @rtw_proc_remove_one(%struct.net_device* nocapture %0) {
ret void
}
struct internal_ibv_cq *ibv_cq_to_internal(struct ibv_cq *cq) {
  return (struct internal_ibv_cq *)cq;
}


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

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

LLVM IR (-O0):
%struct.internal_ibv_cq = type opaque
%struct.ibv_cq = type opaque
define %struct.internal_ibv_cq* @ibv_cq_to_internal(%struct.ibv_cq* %0) {
%2 = alloca %struct.ibv_cq*
store %struct.ibv_cq* %0, %struct.ibv_cq** %2
%3 = load %struct.ibv_cq*, %struct.ibv_cq** %2
%4 = bitcast %struct.ibv_cq* %3 to %struct.internal_ibv_cq*
ret %struct.internal_ibv_cq* %4
}

LLVM IR (-O2):
%struct.internal_ibv_cq = type opaque
%struct.ibv_cq = type opaque
define %struct.internal_ibv_cq* @ibv_cq_to_internal(%struct.ibv_cq* readnone %0) {
%2 = bitcast %struct.ibv_cq* %0 to %struct.internal_ibv_cq*
ret %struct.internal_ibv_cq* %2
}
/* Variables and functions */
int /*<<< orphan*/ fd_motor(int);
int /*<<< orphan*/ fd_sendbyte(int);
int /*<<< orphan*/ fd_wait(int);
void fd_recalibrate(void) {
  fd_motor(1);
  fd_sendbyte((0x07));
  fd_sendbyte(0);
  fd_wait(1);
  fd_motor(0);
}


x86 assembly (clang, -O0):
<fd_recalibrate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <fd_motor@plt>
mov    $0x7,%edi
call   1040 <fd_sendbyte@plt>
xor    %edi,%edi
call   1040 <fd_sendbyte@plt>
mov    $0x1,%edi
call   1050 <fd_wait@plt>
xor    %edi,%edi
call   1030 <fd_motor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_recalibrate>:
push   %rax
mov    $0x1,%edi
call   1030 <fd_motor@plt>
mov    $0x7,%edi
call   1040 <fd_sendbyte@plt>
xor    %edi,%edi
call   1040 <fd_sendbyte@plt>
mov    $0x1,%edi
call   1050 <fd_wait@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <fd_motor@plt>

LLVM IR (-O0):
define void @fd_recalibrate() {
%1 = call i32 @fd_motor(i32 1)
%2 = call i32 @fd_sendbyte(i32 7)
%3 = call i32 @fd_sendbyte(i32 0)
%4 = call i32 @fd_wait(i32 1)
%5 = call i32 @fd_motor(i32 0)
ret void
}

LLVM IR (-O2):
define void @fd_recalibrate() {
%1 = tail call i32 @fd_motor(i32 1)
%2 = tail call i32 @fd_sendbyte(i32 7)
%3 = tail call i32 @fd_sendbyte(i32 0)
%4 = tail call i32 @fd_wait(i32 1)
%5 = tail call i32 @fd_motor(i32 0)
ret void
}
/* Variables and functions */
int egetc();
int to16bit(int, int);
int read16bit() {
  int c1, c2;
  c1 = egetc();
  c2 = egetc();
  return to16bit(c1, c2);
}


x86 assembly (clang, -O0):
<read16bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <egetc@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <egetc@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <to16bit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read16bit>:
push   %rbx
xor    %eax,%eax
call   1030 <egetc@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <egetc@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <to16bit@plt>

LLVM IR (-O0):
define i32 @read16bit() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @egetc()
store i32 %3, i32* %1
%4 = call i32 (...) @egetc()
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @to16bit(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @read16bit() {
%1 = tail call i32 (...) @egetc()
%2 = tail call i32 (...) @egetc()
%3 = tail call i32 @to16bit(i32 %1, i32 %2)
ret i32 %3
}
/* Type definitions */
struct katcl_line {
  int dummy;
};

/* Variables and functions */
struct katcl_line *create_extended_rpc_katcl(char *, int /*<<< orphan*/);
struct katcl_line *create_name_rpc_katcl(char *name) {
  return create_extended_rpc_katcl(name, 0);
}


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

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

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

LLVM IR (-O2):
%struct.katcl_line = type { i32 }
define %struct.katcl_line* @create_name_rpc_katcl(i8* %0) {
%2 = tail call %struct.katcl_line* @create_extended_rpc_katcl(i8* %0, i32 0)
ret %struct.katcl_line* %2
}
double toDegrees(double d) { return d * (180.0 / 3.14159265358979323846); }


x86 assembly (clang, -O0):
<toDegrees>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<toDegrees>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @toDegrees(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x404CA5DC1A63C1F8
ret double %4
}

LLVM IR (-O2):
define double @toDegrees(double %0) {
%2 = fmul double %0, 0x404CA5DC1A63C1F8
ret double %2
}
int dec(int x) { return x - 1; }


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

x86 assembly (clang, -O2):
<dec>:
lea    -0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @dec(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @dec(i32 %0) {
%2 = add nsw i32 %0, -1
ret i32 %2
}
/* Variables and functions */
int time(int /*<<< orphan*/);
int main(int argc, char *argv[]) { return time(0); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @time(i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ check_sknobs_init();
unsigned long long sknobs_eval(char *);
char *sknobs_get_string(char *, int /*<<< orphan*/);
unsigned long long sknobs_get_dynamic_value(char *name,
                                            unsigned long long defaultValue) {
  char *expr = sknobs_get_string(name, 0);
  unsigned long long value;
  check_sknobs_init();
  if (!expr)
    return defaultValue;
  value = sknobs_eval(expr);
  return value;
}


x86 assembly (clang, -O0):
<sknobs_get_dynamic_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1050 <sknobs_get_string@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <check_sknobs_init@plt>
cmpq   $0x0,-0x20(%rbp)
jne    116e <sknobs_get_dynamic_value+0x3e>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1183 <sknobs_get_dynamic_value+0x53>
mov    -0x20(%rbp),%rdi
call   1030 <sknobs_eval@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sknobs_get_dynamic_value>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
xor    %esi,%esi
call   1050 <sknobs_get_string@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <check_sknobs_init@plt>
test   %rbx,%rbx
je     115c <sknobs_get_dynamic_value+0x2c>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sknobs_eval@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @sknobs_get_dynamic_value(i8* %0, i64 %1) {
%3 = tail call i8* @sknobs_get_string(i8* %0, i32 0)
%4 = tail call i32 (...) @check_sknobs_init()
%5 = icmp eq i8* %3, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i64 @sknobs_eval(i8* %3)
br label %8
8: ; preds = %2, %6
%9 = phi i64 [ %7, %6 ], [ %1, %2 ]
ret i64 %9
}
/* Variables and functions */
int LZ5_compress_fast_extState(void *, char const *, char *, int, int, int);
int LZ5_compress_limitedOutput_withState(void *state, const char *src,
                                         char *dst, int srcSize, int dstSize) {
  return LZ5_compress_fast_extState(state, src, dst, srcSize, dstSize, 1);
}


x86 assembly (clang, -O0):
<LZ5_compress_limitedOutput_withState>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    $0x1,%r9d
call   1030 <LZ5_compress_fast_extState@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ5_compress_limitedOutput_withState>:
mov    $0x1,%r9d
jmp    1030 <LZ5_compress_fast_extState@plt>

LLVM IR (-O0):
define i32 @LZ5_compress_limitedOutput_withState(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @LZ5_compress_fast_extState(i8* %11, i8* %12, i8* %13, i32 %14, i32 %15, i32 1)
ret i32 %16
}

LLVM IR (-O2):
define i32 @LZ5_compress_limitedOutput_withState(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call i32 @LZ5_compress_fast_extState(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void respond(void) {
  outb(0x1, 0x378);
  printf("Set pin 2 (pin 0 data register) high\n");
  sleep(1);
  outb(0x0, 0x378);
  printf("Set data register low\n");
  return;
}


x86 assembly (clang, -O0):
<respond>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x378,%esi
call   1040 <outb@plt>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
mov    $0x378,%esi
call   1040 <outb@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<respond>:
push   %rax
mov    $0x1,%edi
mov    $0x378,%esi
call   1040 <outb@plt>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
mov    $0x378,%esi
call   1040 <outb@plt>
lea    0xebc(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Set pin 2 (pin 0 data register) high\0A\00"
@.str.1 = [23 x i8] c"Set data register low\0A\00"
define void @respond() {
%1 = call i32 @outb(i32 1, i32 888)
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @sleep(i32 1)
%4 = call i32 @outb(i32 0, i32 888)
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"Set pin 2 (pin 0 data register) high\00"
@str.2 = [22 x i8] c"Set data register low\00"
define void @respond() {
%1 = tail call i32 @outb(i32 1, i32 888)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 @outb(i32 0, i32 888)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ close(int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  close(STDOUT_FILENO);
  sleep(1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1030 <close@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <close@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @STDOUT_FILENO
%7 = call i32 @close(i32 %6)
%8 = call i32 @sleep(i32 1)
ret i32 0
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @STDOUT_FILENO
%4 = tail call i32 @close(i32 %3)
%5 = tail call i32 @sleep(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void free_wrapper(int *p, int b) {
  if (b) {
    free(p);
  }
}


x86 assembly (clang, -O0):
<free_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1132 <free_wrapper+0x22>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_wrapper>:
test   %esi,%esi
je     1119 <free_wrapper+0x9>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @free_wrapper(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = call i32 @free(i32* %8)
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @free_wrapper(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @free(i32* %0)
br label %6
6: ; preds = %4, %2
ret void
}
int abs(const int value) { return (value & 0x80000000); }


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

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
and    $0x80000000,%eax
ret

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = and i32 %0, -2147483648
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Gets(char *);
int getbufn() {
  char buf[512];
  Gets(buf);
  return 1;
}


x86 assembly (clang, -O0):
<getbufn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    -0x200(%rbp),%rdi
call   1030 <Gets@plt>
mov    $0x1,%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbufn>:
sub    $0x208,%rsp
mov    %rsp,%rdi
call   1030 <Gets@plt>
mov    $0x1,%eax
add    $0x208,%rsp
ret

LLVM IR (-O0):
define i32 @getbufn() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @Gets(i8* %2)
ret i32 1
}

LLVM IR (-O2):
define i32 @getbufn() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @Gets(i8* %2)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ error(char *, int);
int getMaxH();
int getMaxW();
int getWidth();
int getCoor(int h, int w) {
  if ((h > getMaxH()) || (w > getMaxW()))
    error("Map overflow: getCoor()", 10);
  return (h * getWidth()) + w;
}


x86 assembly (clang, -O0):
<getCoor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1060 <getMaxH@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jg     1182 <getCoor+0x42>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getMaxW@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jle    1193 <getCoor+0x53>
lea    0xe77(%rip),%rdi
mov    $0xa,%esi
call   1050 <error@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <getWidth@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
add    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCoor>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1060 <getMaxH@plt>
cmp    %ebp,%eax
jl     115d <getCoor+0x1d>
xor    %eax,%eax
call   1040 <getMaxW@plt>
cmp    %ebx,%eax
jge    116e <getCoor+0x2e>
lea    0xe9c(%rip),%rdi
mov    $0xa,%esi
call   1050 <error@plt>
xor    %eax,%eax
call   1030 <getWidth@plt>
imul   %ebp,%eax
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Map overflow: getCoor()\00"
define i32 @getCoor(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 (...) @getMaxH()
%7 = icmp sgt i32 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 (...) @getMaxW()
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8, %2
%13 = call i32 @error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 10)
br label %14
14: ; preds = %12, %8
%15 = load i32, i32* %3
%16 = call i32 (...) @getWidth()
%17 = mul nsw i32 %15, %16
%18 = load i32, i32* %4
%19 = add nsw i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
@.str = [24 x i8] c"Map overflow: getCoor()\00"
define i32 @getCoor(i32 %0, i32 %1) {
%3 = tail call i32 (...) @getMaxH()
%4 = icmp slt i32 %3, %0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 (...) @getMaxW()
%7 = icmp slt i32 %6, %1
br i1 %7, label %8, label %10
8: ; preds = %5, %2
%9 = tail call i32 @error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 10)
br label %10
10: ; preds = %8, %5
%11 = tail call i32 (...) @getWidth()
%12 = mul nsw i32 %11, %0
%13 = add nsw i32 %12, %1
ret i32 %13
}
/* Type definitions */
struct BoolExpr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _bx_mark_flags(struct BoolExpr *, int);
struct BoolExpr *_bx_simplify(struct BoolExpr *);
struct BoolExpr *BX_Simplify(struct BoolExpr *ex) {
  struct BoolExpr *y;
  do {
    if ((y = _bx_simplify(ex)) == NULL)
      return NULL;
  } while (0);
  _bx_mark_flags(y, 0x01);
  return y;
}


x86 assembly (clang, -O0):
<BX_Simplify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_bx_simplify@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1150 <BX_Simplify+0x30>
movq   $0x0,-0x8(%rbp)
jmp    116b <BX_Simplify+0x4b>
jmp    1155 <BX_Simplify+0x35>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
call   1040 <_bx_mark_flags@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BX_Simplify>:
push   %rbx
call   1030 <_bx_simplify@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113b <BX_Simplify+0x1b>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <_bx_mark_flags@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.BoolExpr = type { i32 }
define %struct.BoolExpr* @BX_Simplify(%struct.BoolExpr* %0) {
%2 = alloca %struct.BoolExpr*
%3 = alloca %struct.BoolExpr*
%4 = alloca %struct.BoolExpr*
store %struct.BoolExpr* %0, %struct.BoolExpr** %3
br label %5
5: ; preds = %1
%6 = load %struct.BoolExpr*, %struct.BoolExpr** %3
%7 = call %struct.BoolExpr* @_bx_simplify(%struct.BoolExpr* %6)
store %struct.BoolExpr* %7, %struct.BoolExpr** %4
%8 = icmp eq %struct.BoolExpr* %7, null
br i1 %8, label %9, label %10
9: ; preds = %5
store %struct.BoolExpr* null, %struct.BoolExpr** %2
br label %15
10: ; preds = %5
br label %11
11: ; preds = %10
%12 = load %struct.BoolExpr*, %struct.BoolExpr** %4
%13 = call i32 @_bx_mark_flags(%struct.BoolExpr* %12, i32 1)
%14 = load %struct.BoolExpr*, %struct.BoolExpr** %4
store %struct.BoolExpr* %14, %struct.BoolExpr** %2
br label %15
15: ; preds = %11, %9
%16 = load %struct.BoolExpr*, %struct.BoolExpr** %2
ret %struct.BoolExpr* %16
}

LLVM IR (-O2):
%struct.BoolExpr = type { i32 }
define %struct.BoolExpr* @BX_Simplify(%struct.BoolExpr* %0) {
%2 = tail call %struct.BoolExpr* @_bx_simplify(%struct.BoolExpr* %0)
%3 = icmp eq %struct.BoolExpr* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @_bx_mark_flags(%struct.BoolExpr* %2, i32 1)
br label %6
6: ; preds = %1, %4
ret %struct.BoolExpr* %2
}
/* Variables and functions */
int f437(int *);
int f438(int *p) { return f437(p); }


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

x86 assembly (clang, -O2):
<f438>:
jmp    1030 <f437@plt>

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

LLVM IR (-O2):
define i32 @f438(i32* %0) {
%2 = tail call i32 @f437(i32* %0)
ret i32 %2
}
int crawlcanconect(struct collectionFormat *collection) { return 1; }


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

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

LLVM IR (-O0):
%struct.collectionFormat = type opaque
define i32 @crawlcanconect(%struct.collectionFormat* %0) {
%2 = alloca %struct.collectionFormat*
store %struct.collectionFormat* %0, %struct.collectionFormat** %2
ret i32 1
}

LLVM IR (-O2):
%struct.collectionFormat = type opaque
define i32 @crawlcanconect(%struct.collectionFormat* nocapture readnone %0) {
ret i32 1
}
int main() {
  if (0) {
  }
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ debug_print(char *, void *, char const *, int, size_t);
void *malloc(size_t);
void *debug_malloc(size_t size, const char *filename, int line) {
  void *p = malloc(size);
  debug_print("+malloc", p, filename, line, size);
  return p;
}


x86 assembly (clang, -O0):
<debug_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%r8
lea    0xeaa(%rip),%rdi
call   1040 <debug_print@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_malloc>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rdi,%rbp
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %rbp,%r8
call   1040 <debug_print@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"+malloc\00"
define i8* @debug_malloc(i64 %0, i8* %1, i32 %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i64 %0, i64* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i64, i64* %4
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = load i64, i64* %4
%14 = call i32 @debug_print(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i32 %12, i64 %13)
%15 = load i8*, i8** %7
ret i8* %15
}

LLVM IR (-O2):
@.str = [8 x i8] c"+malloc\00"
define i8* @debug_malloc(i64 %0, i8* %1, i32 %2) {
%4 = tail call i8* @malloc(i64 %0)
%5 = tail call i32 @debug_print(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %1, i32 %2, i64 %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
long double __tanhl(long double x) {
  fputs("__tanhl not implemented\n", stderr);
  __set_errno(ENOSYS);
  return 0.0;
}


x86 assembly (clang, -O0):
<__tanhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__tanhl>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
pop    %rax
ret

LLVM IR (-O0):
@.str = [25 x i8] c"__tanhl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__tanhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
@.str = [25 x i8] c"__tanhl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__tanhl(x86_fp80 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret x86_fp80 0xK00000000000000000000
}
int test_imm_85uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x85 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_85uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 133
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int judge(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a = -1;
  scanf("%d", &a);
  while (a != 0) {
    printf("%d\n", judge(a));
    scanf("%d", &a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
je     118b <main+0x5b>
mov    -0x8(%rbp),%edi
call   1040 <judge@plt>
mov    %eax,%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
lea    0xe83(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
jmp    1156 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0xffffffff,0xc(%rsp)
ff
lea    0xeb8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
test   %edi,%edi
je     1192 <main+0x62>
lea    0xea2(%rip),%r14
lea    0xe98(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   (%rax)
call   1040 <judge@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
test   %edi,%edi
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 -1, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %0, %6
%7 = phi i32 [ %11, %6 ], [ %4, %0 ]
%8 = call i32 @judge(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%11 = load i32, i32* %1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
size_t str_hash(const char *s, size_t nr_bits) {
  size_t c, h = 0;
  for (; *s != 0; s++) {
    c = *(unsigned char *)s;
    h = (h + (c << 8) + c) * 11;
  }
  return h;
}


x86 assembly (clang, -O0):
<str_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115b <str_hash+0x5b>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
shl    $0x8,%rcx
add    %rcx,%rax
add    -0x18(%rbp),%rax
imul   $0xb,%rax,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <str_hash+0x14>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1131 <str_hash+0x31>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
add    %rcx,%rax
shl    $0x8,%rcx
add    %rax,%rcx
lea    (%rcx,%rcx,4),%rax
lea    (%rcx,%rax,2),%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <str_hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @str_hash(i8* nocapture %0, i64 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %15, %5 ], [ %3, %2 ]
%7 = phi i64 [ %13, %5 ], [ 0, %2 ]
%8 = phi i8* [ %14, %5 ], [ %0, %2 ]
%9 = zext i8 %6 to i64
%10 = shl nuw nsw i64 %9, 8
%11 = add i64 %7, %9
%12 = add i64 %11, %10
%13 = mul i64 %12, 11
%14 = getelementptr inbounds i8, i8* %8, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %5
17: ; preds = %5, %2
%18 = phi i64 [ 0, %2 ], [ %13, %5 ]
ret i64 %18
}
void em5_debugfs_free(void) {}


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

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

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

LLVM IR (-O2):
define void @em5_debugfs_free() {
ret void
}
/* Type definitions */
typedef scalar_t__ wchar_t;

/* Variables and functions */
wchar_t *wcscpy(wchar_t *dst, const wchar_t *src) {
  wchar_t *rev = dst;
  while (*src)
    *(dst++) = *(src++);
  return rev;
}


x86 assembly (clang, -O0):
<wcscpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114b <wcscpy+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x8(%rbp)
mov    %rcx,(%rax)
jmp    1114 <wcscpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcscpy>:
mov    %rdi,%rax
mov    (%rsi),%rcx
test   %rcx,%rcx
je     1122 <wcscpy+0x22>
xor    %edx,%edx
nopl   (%rax)
mov    %rcx,(%rax,%rdx,1)
mov    0x8(%rsi,%rdx,1),%rcx
add    $0x8,%rdx
test   %rcx,%rcx
jne    1110 <wcscpy+0x10>
ret

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

LLVM IR (-O2):
define i64* @wcscpy(i64* returned writeonly %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = icmp eq i64 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %11, %5 ], [ %3, %2 ]
%7 = phi i64* [ %10, %5 ], [ %0, %2 ]
%8 = phi i64* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = getelementptr inbounds i64, i64* %7, i64 1
store i64 %6, i64* %7
%11 = load i64, i64* %9
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret i64* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("Hello World\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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 = [13 x i8] c"Hello World\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ flusha();
int /*<<< orphan*/ printf(char *, char const *);
void ok(const char *msg) {
  printf("+OK %s\r\n", msg);
  flusha();
}


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

x86 assembly (clang, -O2):
<ok>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <flusha@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"+OK %s\0D\0A\00"
define void @ok(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @flusha()
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"+OK %s\0D\0A\00"
define void @ok(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @flusha()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdout;
void print(int data) {
  printf("print: %d\n", data);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"print: %d\0A\00"
@stdout = global i32 0
define void @print(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_reversed(int *reversed, int len) {
  for (int i = len - 1; i >= 0; i--) {
    printf("%d\n", reversed[i]);
  }
}


x86 assembly (clang, -O0):
<print_reversed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <print_reversed+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <print_reversed+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_reversed>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1149 <print_reversed+0x39>
mov    %rdi,%r15
mov    %esi,%ebx
add    $0x1,%rbx
lea    0xed7(%rip),%r14
nopl   0x0(%rax)
lea    -0x2(%rbx),%eax
mov    (%r15,%rax,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <print_reversed+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @print_reversed(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %5
br label %8
8: ; preds = %18, %2
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, -1
store i32 %20, i32* %5
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @print_reversed(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ %5, %4 ], [ %9, %7 ]
%9 = add nsw i64 %8, -1
%10 = and i64 %9, 4294967295
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = icmp ugt i64 %8, 1
br i1 %14, label %7, label %6
}
/* Variables and functions */
void *LAEvaluatePolicy() { return NULL; }


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

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

LLVM IR (-O0):
define i8* @LAEvaluatePolicy() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @LAEvaluatePolicy() {
ret i8* null
}