xunge/DecIR huggingface dataset:
int plusStrandPos(int pos, int size, char strand, int isEnd) {
  if (strand == '-') {
    pos = size - pos;
    if (isEnd)
      ++pos;
  } else {
    if (!isEnd)
      ++pos;
  }
  return pos;
}


x86 assembly (clang, -O0):
<plusStrandPos>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %ecx,-0x10(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x2d,%eax
jne    1140 <plusStrandPos+0x40>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     113b <plusStrandPos+0x3b>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <plusStrandPos+0x58>
cmpl   $0x0,-0x10(%rbp)
jne    1153 <plusStrandPos+0x53>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <plusStrandPos+0x58>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plusStrandPos>:
mov    %edi,%eax
cmp    $0x2d,%dl
jne    1113 <plusStrandPos+0x13>
sub    %eax,%esi
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
add    %esi,%eax
ret
xor    %esi,%esi
test   %ecx,%ecx
sete   %sil
add    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @plusStrandPos(i32 %0, i32 %1, i8 signext %2, i32 %3) {
%5 = icmp eq i8 %2, 45
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = sub i32 %1, %0
%8 = icmp ne i32 %3, 0
%9 = zext i1 %8 to i32
br label %13
10: ; preds = %4
%11 = icmp eq i32 %3, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %0, %10 ], [ %9, %6 ]
%15 = phi i32 [ %12, %10 ], [ %7, %6 ]
%16 = add nsw i32 %15, %14
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ SIGTSTP;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ getpid();
scalar_t__ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int main() {
  if (kill(getpid(), SIGTSTP) < 0) {
    perror("kill");
    exit(1);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2e89(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
cmp    $0x0,%rax
jge    1186 <main+0x46>
lea    0xe89(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2e99(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1040 <kill@plt>
test   %rax,%rax
jns    1173 <main+0x33>
lea    0xe9c(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@SIGTSTP = global i32 0
@.str = [5 x i8] c"kill\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpid()
%3 = load i32, i32* @SIGTSTP
%4 = call i64 @kill(i32 %2, i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@SIGTSTP = global i32 0
@.str = [5 x i8] c"kill\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = load i32, i32* @SIGTSTP
%3 = tail call i64 @kill(i32 %1, i32 %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = tail call i32 @exit(i32 0)
unreachable
}
int countset(int num) {
  int count = 0;
  while (num) {
    if (((num)&1) == 1)
      count++;
    num = num >> 1;
  }
  return count;
}


x86 assembly (clang, -O0):
<countset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113e <countset+0x3e>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    1130 <countset+0x30>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <countset+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countset>:
xor    %eax,%eax
test   %edi,%edi
je     1120 <countset+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
sar    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <countset+0x10>
ret

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

LLVM IR (-O2):
define i32 @countset(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = add nuw nsw i32 %4, %6
%8 = ashr i32 %5, 1
%9 = icmp ult i32 %5, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
int serial_in(unsigned int, int);
bool serial_txnotfull(unsigned dev) {
  return ((serial_in(dev, 0x18)) & 0x20) == 0U;
}


x86 assembly (clang, -O0):
<serial_txnotfull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x18,%esi
call   1030 <serial_in@plt>
and    $0x20,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_txnotfull>:
push   %rax
mov    $0x18,%esi
call   1030 <serial_in@plt>
xor    %ecx,%ecx
test   $0x20,%al
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @serial_txnotfull(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @serial_in(i32 %3, i32 24)
%5 = and i32 %4, 32
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @serial_txnotfull(i32 %0) {
%2 = tail call i32 @serial_in(i32 %0, i32 24)
%3 = lshr i32 %2, 5
%4 = and i32 %3, 1
%5 = xor i32 %4, 1
ret i32 %5
}
/* Variables and functions */
scalar_t__ is_geode_gx();
scalar_t__ is_geode_lx();
int is_geode(void) { return (is_geode_gx() || is_geode_lx()); }


x86 assembly (clang, -O0):
<is_geode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <is_geode_gx@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    1152 <is_geode+0x32>
mov    $0x0,%al
call   1040 <is_geode_lx@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_geode>:
push   %rax
xor    %eax,%eax
call   1030 <is_geode_gx@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <is_geode+0x17>
pop    %rcx
ret
xor    %eax,%eax
call   1040 <is_geode_lx@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_geode() {
%1 = call i64 (...) @is_geode_gx()
%2 = icmp ne i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i64 (...) @is_geode_lx()
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ true, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_geode() {
%1 = tail call i64 (...) @is_geode_gx()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 (...) @is_geode_lx()
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_tick_hold(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_tick_hold>:
jmp    1030 <mock@plt>

LLVM IR (-O0):
define i8* @cf_s_tick_hold(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mock(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @cf_s_tick_hold(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int fn2();
int fn1() { return fn2(); }


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

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

LLVM IR (-O0):
define i32 @fn1() {
%1 = call i32 (...) @fn2()
ret i32 %1
}

LLVM IR (-O2):
define i32 @fn1() {
%1 = tail call i32 (...) @fn2()
ret i32 %1
}
remove_one_line_comment(c) char c;
{
  if ((c == '/') && (ch() == '/')) {
    while (gch())
      ;
    return 0;
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<remove_one_line_comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    1171 <remove_one_line_comment+0x51>
mov    $0x0,%al
call   1030 <ch@plt>
cmp    $0x2f,%eax
jne    1171 <remove_one_line_comment+0x51>
jmp    1150 <remove_one_line_comment+0x30>
mov    $0x0,%al
call   1040 <gch@plt>
cmp    $0x0,%eax
je     1165 <remove_one_line_comment+0x45>
jmp    1150 <remove_one_line_comment+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1178 <remove_one_line_comment+0x58>
movsbl -0x5(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_one_line_comment>:
push   %rbx
mov    %edi,%eax
shl    $0x18,%eax
cmp    $0x2f000000,%eax
jne    114d <remove_one_line_comment+0x2d>
xor    %eax,%eax
call   1030 <ch@plt>
mov    $0x2f,%ebx
cmp    $0x2f,%eax
jne    1151 <remove_one_line_comment+0x31>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <gch@plt>
test   %eax,%eax
jne    1140 <remove_one_line_comment+0x20>
jmp    1151 <remove_one_line_comment+0x31>
movsbl %dil,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @remove_one_line_comment(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
br i1 %7, label %8, label %17
8: ; preds = %1
%9 = call i32 (...) @ch()
%10 = icmp eq i32 %9, 47
br i1 %10, label %11, label %17
11: ; preds = %8
br label %12
12: ; preds = %15, %11
%13 = call i32 (...) @gch()
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
br label %12
16: ; preds = %12
store i32 0, i32* %2
br label %20
17: ; preds = %8, %1
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %16
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @remove_one_line_comment(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = icmp eq i32 %2, 788529152
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = tail call i32 (...) @ch()
%7 = icmp eq i32 %6, 47
br i1 %7, label %8, label %11
8: ; preds = %5, %8
%9 = tail call i32 (...) @gch()
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %8
11: ; preds = %8, %1, %5
%12 = phi i32 [ 47, %5 ], [ %3, %1 ], [ 0, %8 ]
ret i32 %12
}
void syntax_check() {}


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

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

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

LLVM IR (-O2):
define void @syntax_check() {
ret void
}
/* Variables and functions */
float fclamp(float, float, float);
float fsaturate(float _a) { return fclamp(_a, 0.0f, 1.0f); }


x86 assembly (clang, -O0):
<fsaturate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
movss  0xed3(%rip),%xmm2
call   1030 <fclamp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsaturate>:
movss  0xee8(%rip),%xmm2
xorps  %xmm1,%xmm1
jmp    1030 <fclamp@plt>

LLVM IR (-O0):
define float @fsaturate(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @fclamp(float %3, float 0.000000e+00, float 1.000000e+00)
ret float %4
}

LLVM IR (-O2):
define float @fsaturate(float %0) {
%2 = tail call float @fclamp(float %0, float 0.000000e+00, float 1.000000e+00)
ret float %2
}
/* Type definitions */
typedef int uint8_t;
typedef int int8_t;

/* Variables and functions */
int8_t check_alarm(uint8_t *regs, int8_t addr) {
  return ((regs[addr + 1] == regs[addr]) || ((regs[addr + 1] & 0xc0) == 0xc0));
}


x86 assembly (clang, -O0):
<check_alarm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rsi
mov    $0x1,%al
cmp    (%rdx,%rsi,4),%ecx
mov    %al,-0xd(%rbp)
je     1151 <check_alarm+0x51>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
and    $0xc0,%eax
cmp    $0xc0,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_alarm>:
movslq %esi,%rax
mov    0x4(%rdi,%rax,4),%ecx
cmp    (%rdi,%rax,4),%ecx
sete   %al
not    %ecx
test   $0xc0,%cl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @check_alarm(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 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
%11 = load i32*, i32** %3
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = icmp eq i32 %10, %15
br i1 %16, label %26, label %17
17: ; preds = %2
%18 = load i32*, i32** %3
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %18, i64 %21
%23 = load i32, i32* %22
%24 = and i32 %23, 192
%25 = icmp eq i32 %24, 192
br label %26
26: ; preds = %17, %2
%27 = phi i1 [ true, %2 ], [ %25, %17 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @check_alarm(i32* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = icmp eq i32 %6, %9
%11 = and i32 %6, 192
%12 = icmp eq i32 %11, 192
%13 = or i1 %10, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
unsigned long int htonl(unsigned long int x) {
  return ((x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24));
}


x86 assembly (clang, -O0):
<htonl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x18,%rax
mov    -0x8(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0xff0000,%rcx
shr    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x18,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<htonl>:
mov    %rdi,%rax
shl    $0x18,%rax
mov    %edi,%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %rax,%rcx
mov    %rdi,%rax
shr    $0x8,%rax
and    $0xff00,%eax
or     %rcx,%rax
shr    $0x18,%rdi
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @htonl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 24
%5 = load i64, i64* %2
%6 = and i64 %5, 65280
%7 = shl i64 %6, 8
%8 = or i64 %4, %7
%9 = load i64, i64* %2
%10 = and i64 %9, 16711680
%11 = lshr i64 %10, 8
%12 = or i64 %8, %11
%13 = load i64, i64* %2
%14 = lshr i64 %13, 24
%15 = or i64 %12, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @htonl(i64 %0) {
%2 = shl i64 %0, 24
%3 = shl i64 %0, 8
%4 = and i64 %3, 16711680
%5 = or i64 %4, %2
%6 = lshr i64 %0, 8
%7 = and i64 %6, 65280
%8 = or i64 %5, %7
%9 = lshr i64 %0, 24
%10 = or i64 %8, %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ unsigned_prune_ge3_Good(int /*<<< orphan*/, int);
void call_unsigned_prune_ge3_Good() { unsigned_prune_ge3_Good(0, 1); }


x86 assembly (clang, -O0):
<call_unsigned_prune_ge3_Good>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <unsigned_prune_ge3_Good@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_unsigned_prune_ge3_Good>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <unsigned_prune_ge3_Good@plt>

LLVM IR (-O0):
define void @call_unsigned_prune_ge3_Good() {
%1 = call i32 @unsigned_prune_ge3_Good(i32 0, i32 1)
ret void
}

LLVM IR (-O2):
define void @call_unsigned_prune_ge3_Good() {
%1 = tail call i32 @unsigned_prune_ge3_Good(i32 0, i32 1)
ret void
}
/* Variables and functions */
int cmp_double(char *, char *, char *);
int cmp_integer(char *, char *, char *);
scalar_t__ strchr(char *, char);
int cmp_number(char *op, char *l, char *r) {
  return strchr(l, '.') ? cmp_double(op, l, r) : cmp_integer(op, l, r);
}


x86 assembly (clang, -O0):
<cmp_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     1175 <cmp_number+0x45>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <cmp_double@plt>
mov    %eax,-0x1c(%rbp)
jmp    1189 <cmp_number+0x59>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <cmp_integer@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_number>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
mov    $0x2e,%esi
call   1040 <strchr@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
test   %rax,%rax
je     1163 <cmp_number+0x33>
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <cmp_double@plt>
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <cmp_integer@plt>

LLVM IR (-O0):
define i32 @cmp_number(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = call i64 @strchr(i8* %7, i8 signext 46)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i8*, i8** %6
%14 = call i32 @cmp_double(i8* %11, i8* %12, i8* %13)
br label %20
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = load i8*, i8** %5
%18 = load i8*, i8** %6
%19 = call i32 @cmp_integer(i8* %16, i8* %17, i8* %18)
br label %20
20: ; preds = %15, %10
%21 = phi i32 [ %14, %10 ], [ %19, %15 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @cmp_number(i8* %0, i8* %1, i8* %2) {
%4 = tail call i64 @strchr(i8* %1, i8 signext 46)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @cmp_double(i8* %0, i8* %1, i8* %2)
br label %10
8: ; preds = %3
%9 = tail call i32 @cmp_integer(i8* %0, i8* %1, i8* %2)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void forLoop(void) {
  for (int i = 0; i < 10; i += 2) {
    printf("%d\n", i);
  };
}


x86 assembly (clang, -O0):
<forLoop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1146 <forLoop+0x36>
mov    -0x4(%rbp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <forLoop+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forLoop>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @forLoop() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
ret void
}
void INT_Excep_USBA_D1FIFO2(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_USBA_D1FIFO2() {
ret void
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ random();
float randomFloat(float a, float b) {
  return a + (b - a) * ((float)random() / (float)RAND_MAX);
}


x86 assembly (clang, -O0):
<randomFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
movss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
cvtsi2ss %rax,%xmm2
mov    0x2e90(%rip),%rax
cvtsi2ssq (%rax),%xmm3
divss  %xmm3,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomFloat>:
push   %rax
movss  %xmm0,0x4(%rsp)
subss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
xor    %eax,%eax
call   1030 <random@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mov    0x2eb2(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
mulss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @randomFloat(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = load float, float* %3
%8 = fsub float %6, %7
%9 = call i64 (...) @random()
%10 = sitofp i64 %9 to float
%11 = load i64, i64* @RAND_MAX
%12 = sitofp i64 %11 to float
%13 = fdiv float %10, %12
%14 = call float @llvm.fmuladd.f32(float %8, float %13, float %5)
ret float %14
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @randomFloat(float %0, float %1) {
%3 = fsub float %1, %0
%4 = tail call i64 (...) @random()
%5 = sitofp i64 %4 to float
%6 = load i64, i64* @RAND_MAX
%7 = sitofp i64 %6 to float
%8 = fdiv float %5, %7
%9 = tail call float @llvm.fmuladd.f32(float %3, float %8, float %0)
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
main() {
  char str1[10];
  strcpy(str1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xa(%rbp),%rdi
lea    0xedd(%rip),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rsi
lea    0xe(%rsp),%rdi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [36 x i8] c"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int check_files() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @check_files() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, long);
void free_aligned(void *addr, long size) { munmap(addr, size); }


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

x86 assembly (clang, -O2):
<free_aligned>:
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define void @free_aligned(i8* %0, i64 %1) {
%3 = tail call i32 @munmap(i8* %0, i64 %1)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};
struct bionic_stat64 {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
int /*<<< orphan*/ stat_to_bionic_stat(struct stat *, struct bionic_stat64 *);
int my_stat(const char *path, struct bionic_stat64 *s) {
  struct stat tmp;
  int ret = stat(path, &tmp);
  stat_to_bionic_stat(&tmp, s);
  return ret;
}


x86 assembly (clang, -O0):
<my_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdi
call   1030 <stat_to_bionic_stat@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_stat>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%r14
mov    %r14,%rsi
call   1040 <stat@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <stat_to_bionic_stat@plt>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.bionic_stat64 = type { i32 }
%struct.stat = type { i32 }
define i32 @my_stat(i8* %0, %struct.bionic_stat64* %1) {
%3 = alloca i8*
%4 = alloca %struct.bionic_stat64*
%5 = alloca %struct.stat
%6 = alloca i32
store i8* %0, i8** %3
store %struct.bionic_stat64* %1, %struct.bionic_stat64** %4
%7 = load i8*, i8** %3
%8 = call i32 @stat(i8* %7, %struct.stat* %5)
store i32 %8, i32* %6
%9 = load %struct.bionic_stat64*, %struct.bionic_stat64** %4
%10 = call i32 @stat_to_bionic_stat(%struct.stat* %5, %struct.bionic_stat64* %9)
%11 = load i32, i32* %6
ret i32 %11
}

LLVM IR (-O2):
%struct.bionic_stat64 = type { i32 }
%struct.stat = type { i32 }
define i32 @my_stat(i8* nocapture %0, %struct.bionic_stat64* %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = call i32 @stat(i8* %0, %struct.stat* %3)
%6 = call i32 @stat_to_bionic_stat(%struct.stat* %3, %struct.bionic_stat64* %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ cPrintf(char *);
void help00(void) {
  cPrintf("  help              show a list of commands\n");
  cPrintf("  help <cmd>        show help for <cmd>\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c" help show a list of commands\0A\00"
@.str.1 = [41 x i8] c" help <cmd> show help for <cmd>\0A\00"
define void @help00() {
%1 = call i32 @cPrintf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @cPrintf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c" help show a list of commands\0A\00"
@.str.1 = [41 x i8] c" help <cmd> show help for <cmd>\0A\00"
define void @help00() {
%1 = tail call i32 @cPrintf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @cPrintf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void option_set_unit2MODIF_DOTALL() {}


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

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

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

LLVM IR (-O2):
define void @option_set_unit2MODIF_DOTALL() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() { printf("\nUsage:\n\ncode_cleaner file1 [file2] ...\n\n"); }


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"\0AUsage:\0A\0Acode_cleaner file1 [file2] ...\0A\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [41 x i8] c"\0AUsage:\0A\0Acode_cleaner file1 [file2] ...\0A\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InitTTY();
void InitPAD(void) { InitTTY(); }


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

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

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

LLVM IR (-O2):
define void @InitPAD() {
%1 = tail call i32 (...) @InitTTY()
ret void
}
int valid_party(int p) { return 0 <= p && p < 10; }


x86 assembly (clang, -O0):
<valid_party>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
xor    %ecx,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1121 <valid_party+0x21>
cmpl   $0xa,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @valid_party(i32 %0) {
%2 = icmp ult i32 %0, 10
%3 = zext i1 %2 to i32
ret i32 %3
}
int sock_init(char *errbuf, int errbuflen) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sock_init(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int get_ticks();
int /*<<< orphan*/ milli_delay(int);
int /*<<< orphan*/ printf(char *, int);
void TestA() {
  while (1) {
    printf("<Ticks:%x>", get_ticks());
    milli_delay(200);
  }
}


x86 assembly (clang, -O0):
<TestA>:
push   %rbp
mov    %rsp,%rbp
jmp    1139 <TestA+0x9>
mov    $0x0,%al
call   1040 <get_ticks@plt>
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    $0xc8,%edi
call   1050 <milli_delay@plt>
jmp    1139 <TestA+0x9>

x86 assembly (clang, -O2):
<TestA>:
push   %rbx
lea    0xec8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <get_ticks@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xc8,%edi
call   1050 <milli_delay@plt>
jmp    1140 <TestA+0x10>

LLVM IR (-O0):
@.str = [11 x i8] c"<Ticks:%x>\00"
define void @TestA() {
br label %1
1: ; preds = %0, %1
%2 = call i32 (...) @get_ticks()
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @milli_delay(i32 200)
br label %1
}

LLVM IR (-O2):
@.str = [11 x i8] c"<Ticks:%x>\00"
define void @TestA() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @get_ticks()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @milli_delay(i32 200)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i;
  f();
  printf("i=%d/n", i);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"i=%d/n\00"
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
int Bematech_FI_AbreGaveta(Retorno) {
  char Var[3];
  Formata("\x1b|22|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_AbreGaveta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    -0xb(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_AbreGaveta>:
push   %rax
mov    %edi,%edx
lea    0xee6(%rip),%rdi
lea    0x5(%rsp),%rsi
xor    %eax,%eax
call   1030 <Formata@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"\1B|22|\1B\00"
define i32 @Bematech_FI_AbreGaveta(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [3 x i8]
store i32 %0, i32* %3
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B|22|\1B\00"
define i32 @Bematech_FI_AbreGaveta(i32 %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %0)
ret i32 undef
}
int test_imm_51int8_mem(signed char *val) {
  return ((*val) & (0x51 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_51int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 81
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ clearReceiveStruct();
int /*<<< orphan*/ resetReceiveMachine();
void initDataXfer() {
  resetReceiveMachine();
  clearReceiveStruct();
}


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

x86 assembly (clang, -O2):
<initDataXfer>:
push   %rax
xor    %eax,%eax
call   1030 <resetReceiveMachine@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <clearReceiveStruct@plt>

LLVM IR (-O0):
define void @initDataXfer() {
%1 = call i32 (...) @resetReceiveMachine()
%2 = call i32 (...) @clearReceiveStruct()
ret void
}

LLVM IR (-O2):
define void @initDataXfer() {
%1 = tail call i32 (...) @resetReceiveMachine()
%2 = tail call i32 (...) @clearReceiveStruct()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, unsigned char);
int main() {
  unsigned char i = 1, y;
  y = ~i;
  printf("%d\n", y);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x1,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0x2(%rbp)
lea    0xec3(%rip),%rdi
movzbl -0x2(%rbp),%esi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
store i8 1, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = xor i32 %4, -1
%6 = trunc i32 %5 to i8
store i8 %6, i8* %2
%7 = load i8, i8* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 zeroext %7)
%9 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 zeroext -2)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerCapComP__3__Control__disableEvents();
void Msp430AlarmC__0__Msp430TimerControl__disableEvents(void) {
  Msp430TimerCapComP__3__Control__disableEvents();
}


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

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

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

LLVM IR (-O2):
define void @Msp430AlarmC__0__Msp430TimerControl__disableEvents() {
%1 = tail call i32 (...) @Msp430TimerCapComP__3__Control__disableEvents()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;

/* Variables and functions */
int /*<<< orphan*/ NID_sha384;
int jksengine_digests_final(int /*<<< orphan*/ *, unsigned char *,
                            int /*<<< orphan*/);
int jksengine_sha384_final(EVP_MD_CTX *ctx, unsigned char *md) {
  ;
  return (jksengine_digests_final(ctx, md, NID_sha384));
}


x86 assembly (clang, -O0):
<jksengine_sha384_final>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
call   1030 <jksengine_digests_final@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jksengine_sha384_final>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
jmp    1030 <jksengine_digests_final@plt>

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

LLVM IR (-O2):
@NID_sha384 = global i32 0
define i32 @jksengine_sha384_final(i32* %0, i8* %1) {
%3 = load i32, i32* @NID_sha384
%4 = tail call i32 @jksengine_digests_final(i32* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printw(char *);
void print_instructions() {
  printw("hit q to run simulation\tArrow keys to move\n");
  printw("Enter to toggle alive/dead and move down a row\n");
  printw("Space to toggle alive/dead and move right a column\n");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"hit q to run simulation\09Arrow keys to move\0A\00"
@.str.1 = [48 x i8] c"Enter to toggle alive/dead and move down a row\0A\00"
@.str.2 = [52 x i8] c"Space to toggle alive/dead and move right a column\0A\00"
define void @print_instructions() {
%1 = call i32 @printw(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printw(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printw(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"hit q to run simulation\09Arrow keys to move\0A\00"
@.str.1 = [48 x i8] c"Enter to toggle alive/dead and move down a row\0A\00"
@.str.2 = [52 x i8] c"Space to toggle alive/dead and move right a column\0A\00"
define void @print_instructions() {
%1 = tail call i32 @printw(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printw(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printw(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int ssds_get_gen_num(int, char *, char *, char *);
int ssds_get_field_num(int pcfd, char *class_def) {
  return ssds_get_gen_num(pcfd, class_def, "gf", "f_num");
}


x86 assembly (clang, -O0):
<ssds_get_field_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xed3(%rip),%rdx
lea    0xecf(%rip),%rcx
call   1030 <ssds_get_gen_num@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssds_get_field_num>:
lea    0xee9(%rip),%rdx
lea    0xee5(%rip),%rcx
jmp    1030 <ssds_get_gen_num@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"gf\00"
@.str.1 = [6 x i8] c"f_num\00"
define i32 @ssds_get_field_num(i32 %0, i8* %1) {
%3 = tail call i32 @ssds_get_gen_num(i32 %0, i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ vsscanf(char *, char *, int /*<<< orphan*/);
void uninitvar_vsscanf(void) {
  char *s;
  char *format;
  va_list arg;
  (void)vsscanf(s, format, arg);
}


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

x86 assembly (clang, -O2):
<uninitvar_vsscanf>:
jmp    1030 <vsscanf@plt>

LLVM IR (-O0):
define void @uninitvar_vsscanf() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i32
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = call i32 @vsscanf(i8* %4, i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @uninitvar_vsscanf() {
%1 = tail call i32 @vsscanf(i8* undef, i8* undef, i32 undef)
ret void
}
unsigned int mode_idx(const unsigned int mode) { return (mode / 32); }


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

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

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

LLVM IR (-O2):
define i32 @mode_idx(i32 %0) {
%2 = lshr i32 %0, 5
ret i32 %2
}
/* Variables and functions */
int iptables_do_command(char *, char const *);
int iptables_allow_mac(const char mac[]) {
  return iptables_do_command("-t mangle -I "
                             "ndsBLK"
                             " -m mac --mac-source %s -j RETURN",
                             mac);
}


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

x86 assembly (clang, -O2):
<iptables_allow_mac>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <iptables_do_command@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"-t mangle -I ndsBLK -m mac --mac-source %s -j RETURN\00"
define i32 @iptables_allow_mac(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @iptables_do_command(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [53 x i8] c"-t mangle -I ndsBLK -m mac --mac-source %s -j RETURN\00"
define i32 @iptables_allow_mac(i8* %0) {
%2 = tail call i32 @iptables_do_command(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %2
}