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


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

x86 assembly (clang, -O2):
<xrop3_39_0_0>:
shl    $0x8,%esi
lea    (%rsi,%rdi,1),%eax
not    %eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_39_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = or i32 %5, %3
%7 = xor i32 %6, -1
ret i32 %7
}
/* Variables and functions */
int mkstemp(char *);
int /*<<< orphan*/ unlink(char *);
int create_fd(void) {
  char filename[] = "/tmp/dupoffsXXXXXX";
  int fd = mkstemp(filename);
  if (fd != -1) {
    unlink(filename);
  }
  return fd;
}


x86 assembly (clang, -O0):
<create_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xec3(%rip),%al
mov    %al,-0xe(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <mkstemp@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
je     1171 <create_fd+0x51>
lea    -0x20(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_fd>:
push   %rbx
sub    $0x20,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x585858,0xf(%rsp)
mov    %rsp,%rdi
call   1040 <mkstemp@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     114f <create_fd+0x2f>
mov    %rsp,%rdi
call   1030 <unlink@plt>
mov    %ebx,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.create_fd.filename = [19 x i8] c"/tmp/dupoffsXXXXXX\00"
define i32 @create_fd() {
%1 = alloca [19 x i8]
%2 = alloca i32
%3 = bitcast [19 x i8]* %1 to i8*
%4 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%5 = call i32 @mkstemp(i8* %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%10 = call i32 @unlink(i8* %9)
br label %11
11: ; preds = %8, %0
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@__const.create_fd.filename = [19 x i8] c"/tmp/dupoffsXXXXXX\00"
define i32 @create_fd() {
%1 = alloca [19 x i8]
%2 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%3 = call i32 @mkstemp(i8* %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @unlink(i8* %2)
br label %7
7: ; preds = %5, %0
ret i32 %3
}
void noaction(char *line) { line = line; }


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

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

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

LLVM IR (-O2):
define void @noaction(i8* nocapture %0) {
ret void
}
unsigned int compute_Indmf(unsigned int const Indfh) { return Indfh / 9; }


x86 assembly (clang, -O0):
<compute_Indmf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x9,%ecx
xor    %edx,%edx
div    %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_Indmf>:
mov    %edi,%eax
imul   $0x38e38e39,%rax,%rax
shr    $0x21,%rax
ret

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

LLVM IR (-O2):
define i32 @compute_Indmf(i32 %0) {
%2 = udiv i32 %0, 9
ret i32 %2
}
/* Variables and functions */
int INT_MAX;
int /*<<< orphan*/ this_comparison_is_not_decidable();
void bla4lt(int var) {
  if (var - 10 < INT_MAX - 10)
    this_comparison_is_not_decidable();
}


x86 assembly (clang, -O0):
<bla4lt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
sub    $0xa,%ecx
cmp    %ecx,%eax
jge    113c <bla4lt+0x2c>
mov    $0x0,%al
call   1030 <this_comparison_is_not_decidable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla4lt>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jle    1122 <bla4lt+0x12>
xor    %eax,%eax
jmp    1030 <this_comparison_is_not_decidable@plt>
ret

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

LLVM IR (-O2):
@INT_MAX = global i32 0
define void @bla4lt(i32 %0) {
%2 = load i32, i32* @INT_MAX
%3 = icmp sgt i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @this_comparison_is_not_decidable()
br label %6
6: ; preds = %4, %1
ret void
}
double UC_11_1_3(double F_t_s_d, double F_t_u_d) { return (F_t_s_d / F_t_u_d); }


x86 assembly (clang, -O0):
<UC_11_1_3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<UC_11_1_3>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @UC_11_1_3(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @UC_11_1_3(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ doSomething();
int main(void) {
  doSomething();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @doSomething()
ret i32 0
}
/* Variables and functions */
int strncasecmp(char const *, char const *, int const);
int str_comp_nocase_num(const char *a, const char *b, const int num) {
  return strncasecmp(a, b, num);
}


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

x86 assembly (clang, -O2):
<str_comp_nocase_num>:
jmp    1030 <strncasecmp@plt>

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

LLVM IR (-O2):
define i32 @str_comp_nocase_num(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @strncasecmp(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int int32_t;
typedef int int16_t;

/* Variables and functions */
int16_t tms_get_type(uint8_t *msg, int32_t n) {
  if (n < 4)
    return -1;
  int16_t rv = (int16_t)msg[3];
  return (rv);
}


x86 assembly (clang, -O0):
<tms_get_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1121 <tms_get_type+0x21>
movl   $0xffffffff,-0x4(%rbp)
jmp    1131 <tms_get_type+0x31>
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tms_get_type>:
mov    $0xffffffff,%eax
cmp    $0x4,%esi
jl     110d <tms_get_type+0xd>
mov    0xc(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @tms_get_type(i32* nocapture %0, i32 %1) {
%3 = icmp slt i32 %1, 4
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = getelementptr inbounds i32, i32* %0, i64 3
%6 = load i32, i32* %5
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ %6, %4 ], [ -1, %2 ]
ret i32 %8
}
int test_imm_43uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x43 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_43uint64_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, 67
%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_43uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 67
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __is_big_endian();
int __swab16(int);
extern int be16_to_native(uint16_t i) {
  if (!__is_big_endian()) {
    return __swab16(i);
  } else {
    return i;
  }
}


x86 assembly (clang, -O0):
<be16_to_native>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__is_big_endian@plt>
cmp    $0x0,%eax
jne    114b <be16_to_native+0x2b>
mov    -0x8(%rbp),%edi
call   1040 <__swab16@plt>
mov    %eax,-0x4(%rbp)
jmp    1151 <be16_to_native+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be16_to_native>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <__is_big_endian@plt>
test   %eax,%eax
je     1132 <be16_to_native+0x12>
mov    %ebx,%eax
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1040 <__swab16@plt>

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

LLVM IR (-O2):
define i32 @be16_to_native(i32 %0) {
%2 = tail call i32 (...) @__is_big_endian()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @__swab16(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xc9() {
  Assert_real((isbdigit(201) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              1010, ("isbdigit should be 0 for 0xc9"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xc9\00"
define void @t_isbdigit_0xc9() {
%1 = tail call i64 @isbdigit(i32 201)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1010, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ caesar_decode(unsigned char *, unsigned char *, unsigned int,
                                 unsigned char);
void decode_cipher(unsigned char *cipher, unsigned char *decoded_cipher,
                   unsigned int len, unsigned char ekey) {
  caesar_decode(decoded_cipher, cipher, len, ekey);
}


x86 assembly (clang, -O0):
<decode_cipher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %al,-0x15(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
movzbl -0x15(%rbp),%ecx
call   1030 <caesar_decode@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_cipher>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <caesar_decode@plt>

LLVM IR (-O0):
define void @decode_cipher(i8* %0, i8* %1, i32 %2, i8 zeroext %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8 %3, i8* %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %5
%11 = load i32, i32* %7
%12 = load i8, i8* %8
%13 = call i32 @caesar_decode(i8* %9, i8* %10, i32 %11, i8 zeroext %12)
ret void
}

LLVM IR (-O2):
define void @decode_cipher(i8* %0, i8* %1, i32 %2, i8 zeroext %3) {
%5 = tail call i32 @caesar_decode(i8* %1, i8* %0, i32 %2, i8 zeroext %3)
ret void
}
const char *Format_Bool(long value) {
  if (!value)
    return "False";
  return "True";
}


x86 assembly (clang, -O0):
<Format_Bool>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1123 <Format_Bool+0x23>
lea    0xee6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112e <Format_Bool+0x2e>
lea    0xedc(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Format_Bool>:
test   %rdi,%rdi
lea    0xef6(%rip),%rcx
lea    0xef5(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"False\00"
@.str.1 = [5 x i8] c"True\00"
define i8* @Format_Bool(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ne i64 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [6 x i8] c"False\00"
@.str.1 = [5 x i8] c"True\00"
define i8* @Format_Bool(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int floor(double);
double modf(double, double *);
double degtodm(double angle) {
  double fraction, integer;
  fraction = modf(angle, &integer);
  return floor(angle) * 100 + fraction * 60;
}


x86 assembly (clang, -O0):
<degtodm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
imul   $0x64,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xea2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<degtodm>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
lea    0x10(%rsp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1040 <floor@plt>
imul   $0x64,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  0xea8(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @degtodm(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call double @modf(double %5, double* %4)
store double %6, double* %3
%7 = load double, double* %2
%8 = call i32 @floor(double %7)
%9 = mul nsw i32 %8, 100
%10 = sitofp i32 %9 to double
%11 = load double, double* %3
%12 = call double @llvm.fmuladd.f64(double %11, double 6.000000e+01, double %10)
ret double %12
}

LLVM IR (-O2):
define double @degtodm(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call double @modf(double %0, double* %2)
%5 = tail call i32 @floor(double %0)
%6 = mul nsw i32 %5, 100
%7 = sitofp i32 %6 to double
%8 = tail call double @llvm.fmuladd.f64(double %4, double 6.000000e+01, double %7)
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ exact_square(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  exact_square(num);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <exact_square@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%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 = call i32 @exact_square(i32 %4)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
struct timespec {
  int tv_sec;
  int tv_nsec;
  int /*<<< orphan*/ member_1;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ SYS_clock_gettime;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int /*<<< orphan*/,
                           struct timespec *);
uint64_t odhcp6c_get_milli_time(void) {
  struct timespec t = {0, 0};
  syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &t);
  return t.tv_sec * 1000 + t.tv_nsec / 1000000;
}


x86 assembly (clang, -O0):
<odhcp6c_get_milli_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1040 <syscall@plt>
imul   $0x3e8,-0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odhcp6c_get_milli_time>:
sub    $0x18,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <syscall@plt>
imul   $0x3e8,(%rsp),%ecx
movslq 0x4(%rsp),%rax
imul   $0x431bde83,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rax
add    %edx,%eax
add    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32, i32, i32 }
@SYS_clock_gettime = global i32 0
@CLOCK_MONOTONIC = global i32 0
define i32 @odhcp6c_get_milli_time() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @SYS_clock_gettime
%4 = load i32, i32* @CLOCK_MONOTONIC
%5 = call i32 @syscall(i32 %3, i32 %4, %struct.timespec* %1)
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%10 = load i32, i32* %9
%11 = sdiv i32 %10, 1000000
%12 = add nsw i32 %8, %11
ret i32 %12
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32, i32, i32 }
@SYS_clock_gettime = global i32 0
@CLOCK_MONOTONIC = global i32 0
define i32 @odhcp6c_get_milli_time() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @SYS_clock_gettime
%4 = load i32, i32* @CLOCK_MONOTONIC
%5 = call i32 @syscall(i32 %3, i32 %4, %struct.timespec* %1)
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%10 = load i32, i32* %9
%11 = sdiv i32 %10, 1000000
%12 = add nsw i32 %11, %8
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int ph_ssl_destroy(void *handler) {
  free(handler);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ph_ssl_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
/* Variables and functions */
int kill(int, int);
int sys_kill(int pid, int signum) { return kill(pid, signum); }


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

x86 assembly (clang, -O2):
<sys_kill>:
jmp    1030 <kill@plt>

LLVM IR (-O0):
define i32 @sys_kill(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 = call i32 @kill(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @sys_kill(i32 %0, i32 %1) {
%3 = tail call i32 @kill(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
void showbits(unsigned int x) {
  int i;
  for (i = (sizeof(int) * 8) - 1; i >= 0; i--)
    (x & (1 << i)) ? putchar('1') : putchar('0');
  printf("\n");
}


x86 assembly (clang, -O0):
<showbits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1f,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     117d <showbits+0x5d>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1165 <showbits+0x45>
mov    $0x31,%edi
call   1030 <putchar@plt>
jmp    116f <showbits+0x4f>
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <showbits+0x12>
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showbits>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x1f,%ebp
nopw   0x0(%rax,%rax,1)
bt     %ebp,%ebx
mov    $0x31,%edi
adc    $0xffffffff,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jb     1120 <showbits+0x10>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @showbits(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 31, %1 ], [ %9, %2 ]
%4 = shl nuw i32 1, %3
%5 = and i32 %4, %0
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i8 48, i8 49
%8 = tail call i32 @putchar(i8 signext %7)
%9 = add nsw i32 %3, -1
%10 = icmp eq i32 %3, 0
br i1 %10, label %11, label %2
11: ; preds = %2
%12 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
ret void
}
/* Variables and functions */
scalar_t__ ungetch(char);
void ungets(char s[]) {
  int i = 0;
  while ((ungetch(s[i])))
    i++;
}


x86 assembly (clang, -O0):
<ungets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <ungetch@plt>
cmp    $0x0,%rax
je     114c <ungets+0x3c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ungets+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungets>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
call   1030 <ungetch@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <ungets+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @ungets(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = call i64 @ungetch(i8 signext %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @ungets(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %8, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = tail call i64 @ungetch(i8 signext %5)
%7 = icmp eq i64 %6, 0
%8 = add nuw i64 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ decode_id(unsigned char *, unsigned char *, unsigned int *,
                             unsigned long long *);
int /*<<< orphan*/ printf(char *, unsigned char, unsigned int,
                          unsigned long long);
void print_result_id(unsigned char result_id[5]) {
  unsigned char table_type;
  unsigned int table_i;
  unsigned long long row_i;
  decode_id(result_id, &table_type, &table_i, &row_i);
  printf("Result_id:: table_type='%u', table_i='%u', row_i='%llu'\n",
         table_type, table_i, row_i);
}


x86 assembly (clang, -O0):
<print_result_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x9(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1030 <decode_id@plt>
mov    -0x9(%rbp),%al
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xeae(%rip),%rdi
movzbl %al,%esi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_result_id>:
sub    $0x18,%rsp
lea    0xb(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1030 <decode_id@plt>
movzbl 0xb(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x10(%rsp),%rcx
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [57 x i8] c"Result_id:: table_type='%u', table_i='%u', row_i='%llu'\0A\00"
define void @print_result_id(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i32
%5 = alloca i64
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @decode_id(i8* %6, i8* %3, i32* %4, i64* %5)
%8 = load i8, i8* %3
%9 = load i32, i32* %4
%10 = load i64, i64* %5
%11 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8 zeroext %8, i32 %9, i64 %10)
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"Result_id:: table_type='%u', table_i='%u', row_i='%llu'\0A\00"
define void @print_result_id(i8* %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca i64
%5 = bitcast i32* %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = call i32 @decode_id(i8* %0, i8* %2, i32* %3, i64* %4)
%8 = load i8, i8* %2
%9 = load i32, i32* %3
%10 = load i64, i64* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8 zeroext %8, i32 %9, i64 %10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char const *roadmap_time_get_hours_minutes(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
const char *get_time_str(void) {
  time_t now;
  now = time(NULL);
  return roadmap_time_get_hours_minutes(now);
}


x86 assembly (clang, -O0):
<get_time_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <roadmap_time_get_hours_minutes@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @get_time_str() {
%1 = alloca i32
%2 = call i32 @time(i32* null)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i8* @roadmap_time_get_hours_minutes(i32 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @get_time_str() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i8* @roadmap_time_get_hours_minutes(i32 %1)
ret i8* %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t av_clip_uint8(int a) {
  if (a & (~255))
    return (-a) >> 31;
  else
    return a;
}


x86 assembly (clang, -O0):
<av_clip_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffffff00,%eax
cmp    $0x0,%eax
je     1128 <av_clip_uint8+0x28>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x4(%rbp)
jmp    112e <av_clip_uint8+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_clip_uint8>:
xor    %eax,%eax
test   %edi,%edi
setg   %al
neg    %eax
cmp    $0x100,%edi
cmovb  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @av_clip_uint8(i32 %0) {
%2 = icmp ult i32 %0, 256
%3 = icmp sgt i32 %0, 0
%4 = sext i1 %3 to i32
%5 = select i1 %2, i32 %0, i32 %4
ret i32 %5
}
void op0xFD(void) {}


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

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

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

LLVM IR (-O2):
define void @op0xFD() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ run_client(char *);
int main(int argc, char *argv[]) {
  if (argv[1])
    run_client(argv[1]);
  else
    printf("Usage: %s <message>\n", argv[0]);
  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    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     1157 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <run_client@plt>
jmp    116a <main+0x4a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     1131 <main+0x11>
call   1040 <run_client@plt>
jmp    1140 <main+0x20>
mov    (%rsi),%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s <message>\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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @run_client(i8* %13)
br label %20
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %15, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s <message>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @run_client(i8* %4)
br label %11
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %6
ret i32 0
}
/* Variables and functions */
int level3(int, int);
__attribute__((no)) int level2(int a, int b) { return level3(a - b, a + b); }


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

x86 assembly (clang, -O2):
<level2>:
mov    %edi,%eax
sub    %esi,%eax
add    %edi,%esi
mov    %eax,%edi
jmp    1030 <level3@plt>

LLVM IR (-O0):
define i32 @level2(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 = sub nsw i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
%11 = call i32 @level3(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @level2(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = add nsw i32 %1, %0
%5 = tail call i32 @level3(i32 %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ movem(double *, double *, int, int const);
void ivq(const int index, double *cb, const int l, double *x) {
  movem((cb + index * l), x, sizeof(*cb), l);
  return;
}


x86 assembly (clang, -O0):
<ivq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%eax
imul   -0x14(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    $0x8,%edx
call   1030 <movem@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivq>:
mov    %edx,%eax
imul   %edx,%edi
movslq %edi,%rdx
lea    (%rsi,%rdx,8),%rdi
mov    %rcx,%rsi
mov    $0x8,%edx
mov    %eax,%ecx
jmp    1030 <movem@plt>

LLVM IR (-O0):
define void @ivq(i32 %0, double* %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
store i32 %0, i32* %5
store double* %1, double** %6
store i32 %2, i32* %7
store double* %3, double** %8
%9 = load double*, double** %6
%10 = load i32, i32* %5
%11 = load i32, i32* %7
%12 = mul nsw i32 %10, %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %9, i64 %13
%15 = load double*, double** %8
%16 = load i32, i32* %7
%17 = call i32 @movem(double* %14, double* %15, i32 8, i32 %16)
ret void
}

LLVM IR (-O2):
define void @ivq(i32 %0, double* %1, i32 %2, double* %3) {
%5 = mul nsw i32 %2, %0
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds double, double* %1, i64 %6
%8 = tail call i32 @movem(double* %7, double* %3, i32 8, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __raw_writel(unsigned int, int);
void mv_raw_write_reg32(unsigned int addr_offset, unsigned int data) {
  __raw_writel(data, (0xF1000000 | addr_offset));
}


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

x86 assembly (clang, -O2):
<mv_raw_write_reg32>:
mov    %edi,%eax
or     $0xf1000000,%eax
mov    %esi,%edi
mov    %eax,%esi
jmp    1030 <__raw_writel@plt>

LLVM IR (-O0):
define void @mv_raw_write_reg32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = or i32 -251658240, %6
%8 = call i32 @__raw_writel(i32 %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @mv_raw_write_reg32(i32 %0, i32 %1) {
%3 = or i32 %0, -251658240
%4 = tail call i32 @__raw_writel(i32 %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ charrep(char, int);
int /*<<< orphan*/ printf(char *);
void default_cstate_table_header(__attribute__((unused)) void *report_data) {
  charrep('-', 80);
  printf("\n| C-state  |   min    |   max    |   avg    |   total  | hits  |  "
         "over | under |\n");
}


x86 assembly (clang, -O0):
<default_cstate_table_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2d,%edi
mov    $0x50,%esi
call   1040 <charrep@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_cstate_table_header>:
push   %rax
mov    $0x2d,%edi
mov    $0x50,%esi
call   1040 <charrep@plt>
lea    0xec9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [83 x i8] c"\0A| C-state | min | max | avg | total | hits | over | under |\0A\00"
define void @default_cstate_table_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @charrep(i8 signext 45, i32 80)
%4 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [82 x i8] c"\0A| C-state | min | max | avg | total | hits | over | under |\00"
define void @default_cstate_table_header(i8* nocapture readnone %0) {
%2 = tail call i32 @charrep(i8 signext 45, i32 80)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int wint_t;

/* Variables and functions */
wint_t towlower(wint_t x) {
  if (x >= L'A' && x <= L'Z')
    x = (x - L'A') + L'a';
  return x;
}


x86 assembly (clang, -O0):
<towlower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1127 <towlower+0x27>
cmpl   $0x5a,-0x4(%rbp)
jg     1127 <towlower+0x27>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<towlower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @towlower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 65
%11 = add nsw i32 %10, 97
store i32 %11, i32* %2
br label %12
12: ; preds = %8, %5, %1
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @towlower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
void RTDbgAsSymbolAdd(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDbgAsSymbolAdd() {
ret void
}
int Findvalue(char a) {
  int v = 0;
  switch (a) {
  case 'A':
    v = 14;
    break;
  case 'K':
    v = 13;
    break;
  case 'Q':
    v = 12;
    break;
  case 'J':
    v = 11;
    break;
  case 'T':
    v = 10;
    break;
  default:
    v = a - '0';
    break;
  }
  return v;
}


x86 assembly (clang, -O0):
<Findvalue>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x13,%eax
ja     1177 <Findvalue+0x77>
mov    -0x10(%rbp),%rax
lea    0xece(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xe,-0x8(%rbp)
jmp    1181 <Findvalue+0x81>
movl   $0xd,-0x8(%rbp)
jmp    1181 <Findvalue+0x81>
movl   $0xc,-0x8(%rbp)
jmp    1181 <Findvalue+0x81>
movl   $0xb,-0x8(%rbp)
jmp    1181 <Findvalue+0x81>
movl   $0xa,-0x8(%rbp)
jmp    1181 <Findvalue+0x81>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Findvalue>:
lea    -0x41(%rdi),%ecx
cmp    $0x13,%ecx
ja     1123 <Findvalue+0x23>
mov    $0xe,%eax
lea    0xeec(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0xb,%eax
ret
add    $0xffffffd0,%edi
mov    %edi,%eax
ret
mov    $0xd,%eax
ret
mov    $0xc,%eax
ret
mov    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @Findvalue(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %11 [
i32 65, label %6
i32 75, label %7
i32 81, label %8
i32 74, label %9
i32 84, label %10
]
6: ; preds = %1
store i32 14, i32* %3
br label %15
7: ; preds = %1
store i32 13, i32* %3
br label %15
8: ; preds = %1
store i32 12, i32* %3
br label %15
9: ; preds = %1
store i32 11, i32* %3
br label %15
10: ; preds = %1
store i32 10, i32* %3
br label %15
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
store i32 %14, i32* %3
br label %15
15: ; preds = %11, %10, %9, %8, %7, %6
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @Findvalue(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %7 [
i32 65, label %9
i32 75, label %3
i32 81, label %4
i32 74, label %5
i32 84, label %6
]
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = add nsw i32 %2, -48
br label %9
9: ; preds = %1, %7, %6, %5, %4, %3
%10 = phi i32 [ %8, %7 ], [ 10, %6 ], [ 11, %5 ], [ 12, %4 ], [ 13, %3 ], [ 14, %1 ]
ret i32 %10
}
/* Variables and functions */
char *xml_deserialize_(char const *, int /*<<< orphan*/);
char *xml_deserialize(const char *str) { return xml_deserialize_(str, 0); }


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

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

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

LLVM IR (-O2):
define i8* @xml_deserialize(i8* %0) {
%2 = tail call i8* @xml_deserialize_(i8* %0, i32 0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, int *);
int PRT_getInt(char opt[128]) {
  int ret;
  sscanf(opt, "%d", &ret);
  return ret;
}


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

x86 assembly (clang, -O2):
<PRT_getInt>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <sscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @PRT_getInt(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}