xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x16() {
  Assert_real((isprint(22) == 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_isprint.c",
              115, ("isprint should be 0 for 0x16"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x16>:
push   %rax
mov    $0x16,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x73,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x16\00"
define void @t_isprint_0x16() {
%1 = call i64 @isprint(i32 22)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x16\00"
define void @t_isprint_0x16() {
%1 = tail call i64 @isprint(i32 22)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
signed int _modschar(signed char x, signed char y) { return ((int)x % (int)y); }


x86 assembly (clang, -O0):
<_modschar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_modschar>:
mov    %edi,%eax
cwtd
idiv   %si
movswl %dx,%eax
ret

LLVM IR (-O0):
define i32 @_modschar(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = srem i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @_modschar(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i16
%4 = sext i8 %1 to i16
%5 = srem i16 %3, %4
%6 = sext i16 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t bcd2dec(uint8_t bcdval) {
  return (((bcdval & 0xF0) >> 4) * 10 + (bcdval & 0x0F));
}


x86 assembly (clang, -O0):
<bcd2dec>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
imul   $0xa,%eax,%eax
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcd2dec>:
mov    %edi,%eax
shr    $0x4,%eax
and    $0xf,%eax
lea    (%rax,%rax,4),%eax
and    $0xf,%edi
lea    (%rdi,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @bcd2dec(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 240
%5 = ashr i32 %4, 4
%6 = mul nsw i32 %5, 10
%7 = load i32, i32* %2
%8 = and i32 %7, 15
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @bcd2dec(i32 %0) {
%2 = lshr i32 %0, 4
%3 = and i32 %2, 15
%4 = mul nuw nsw i32 %3, 10
%5 = and i32 %0, 15
%6 = add nuw nsw i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ CompileWord(int, int);
int /*<<< orphan*/ InlineWords(int, int, int);
void DoDeferFetch(void) {
  CompileWord(95, 1);
  InlineWords(2, 11, 7);
}


x86 assembly (clang, -O0):
<DoDeferFetch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5f,%edi
mov    $0x1,%esi
call   1030 <CompileWord@plt>
mov    $0x2,%edi
mov    $0xb,%esi
mov    $0x7,%edx
call   1040 <InlineWords@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoDeferFetch>:
push   %rax
mov    $0x5f,%edi
mov    $0x1,%esi
call   1030 <CompileWord@plt>
mov    $0x2,%edi
mov    $0xb,%esi
mov    $0x7,%edx
pop    %rax
jmp    1040 <InlineWords@plt>

LLVM IR (-O0):
define void @DoDeferFetch() {
%1 = call i32 @CompileWord(i32 95, i32 1)
%2 = call i32 @InlineWords(i32 2, i32 11, i32 7)
ret void
}

LLVM IR (-O2):
define void @DoDeferFetch() {
%1 = tail call i32 @CompileWord(i32 95, i32 1)
%2 = tail call i32 @InlineWords(i32 2, i32 11, i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  int *ptr = NULL;
  int val = 1;
  printf("no\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [3 x i8] c"no\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int serve_results(char *, int, int);
int zen_write_results(char query[], int n, int sock) {
  return serve_results(query, n, sock);
}


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

x86 assembly (clang, -O2):
<zen_write_results>:
jmp    1030 <serve_results@plt>

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

LLVM IR (-O2):
define i32 @zen_write_results(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @serve_results(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
int IsLeapYear(int nYear) {
  if ((nYear % 4 == 0) && (nYear % 100 != 0 || nYear % 400 == 0))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<IsLeapYear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <IsLeapYear+0x4f>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <IsLeapYear+0x43>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <IsLeapYear+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <IsLeapYear+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsLeapYear>:
test   $0x3,%dil
jne    1143 <IsLeapYear+0x43>
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
ror    $0x2,%ecx
mov    $0x1,%eax
cmp    $0x28f5c28,%ecx
ja     1145 <IsLeapYear+0x45>
movslq %edi,%rcx
imul   $0x51eb851f,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x27,%rcx
add    %edx,%ecx
imul   $0x190,%ecx,%ecx
sub    %ecx,%edi
je     1145 <IsLeapYear+0x45>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @IsLeapYear(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = srem i32 %0, 100
%6 = icmp ne i32 %5, 0
%7 = srem i32 %0, 400
%8 = icmp eq i32 %7, 0
%9 = or i1 %6, %8
br i1 %9, label %11, label %10
10: ; preds = %4, %1
br label %11
11: ; preds = %4, %10
%12 = phi i32 [ 0, %10 ], [ 1, %4 ]
ret i32 %12
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int compar_cstarstar_bsearch(const void *v1, const void *v2) {
  const char *s1 = (const char *)v1;
  const char **s2 = (const char **)v2;
  return (strcasecmp(s1, *s2));
}


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

x86 assembly (clang, -O2):
<compar_cstarstar_bsearch>:
mov    (%rsi),%rsi
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @compar_cstarstar_bsearch(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
store i8** %9, i8*** %6
%10 = load i8*, i8** %5
%11 = load i8**, i8*** %6
%12 = load i8*, i8** %11
%13 = call i32 @strcasecmp(i8* %10, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @compar_cstarstar_bsearch(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
%5 = tail call i32 @strcasecmp(i8* %0, i8* %4)
ret i32 %5
}
int int_comp(const void *p1, const void *p2) {
  int n1 = *((int *)p1);
  int n2 = *((int *)p2);
  return n1 - n2;
}


x86 assembly (clang, -O0):
<int_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x18(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @int_comp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @int_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int ft_isdigit(int c) {
  int min;
  int max;
  min = '0';
  max = '9';
  if (c >= min && c <= max)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x30,-0xc(%rbp)
movl   $0x39,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1139 <ft_isdigit+0x39>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1139 <ft_isdigit+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1140 <ft_isdigit+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

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


x86 assembly (clang, -O0):
<movsi>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf0f0,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @movsi() {
ret i32 61680
}

LLVM IR (-O2):
define i32 @movsi() {
ret i32 61680
}
/* Variables and functions */
int /*<<< orphan*/ mill_choose_init(char *);
int mill_choose_wait();
__attribute__((no)) void unused(void) {
  {
    mill_choose_init("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                     "outputs/2022-01-22/02-19-57/repos/dailypips/libmill/refs/"
                     "heads/master/tests/choose.c"
                     ":"
                     "103");
    int mill_idx = -2;
    while (1) {
      if (mill_idx != -2) {
        if (0) {
          break;
        }
      }
      mill_idx = mill_choose_wait();
    }
  }
}


x86 assembly (clang, -O0):
<unused>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <mill_choose_init@plt>
movl   $0xfffffffe,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
je     114a <unused+0x2a>
jmp    114a <unused+0x2a>
mov    $0x0,%al
call   1030 <mill_choose_wait@plt>
mov    %eax,-0x4(%rbp)
jmp    113b <unused+0x1b>

x86 assembly (clang, -O2):
<unused>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <mill_choose_init@plt>
nopl   (%rax)
xor    %eax,%eax
call   1030 <mill_choose_wait@plt>
jmp    1130 <unused+0x10>

LLVM IR (-O0):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dailypips/libmill/refs/heads/master/tests/choose.c:103\00"
define void @unused() {
%1 = alloca i32
%2 = call i32 @mill_choose_init(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0))
store i32 -2, i32* %1
br label %3
3: ; preds = %0, %7
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, -2
br i1 %5, label %6, label %7
6: ; preds = %3
br label %7
7: ; preds = %6, %3
%8 = call i32 (...) @mill_choose_wait()
store i32 %8, i32* %1
br label %3
}

LLVM IR (-O2):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dailypips/libmill/refs/heads/master/tests/choose.c:103\00"
define void @unused() {
%1 = tail call i32 @mill_choose_init(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @mill_choose_wait()
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int open(char const *, int, int /*<<< orphan*/);
int _open(const char *pathname, int flags, mode_t mode) {
  return open(pathname, flags, mode);
}


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

x86 assembly (clang, -O2):
<_open>:
jmp    1030 <open@plt>

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

LLVM IR (-O2):
define i32 @_open(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @open(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ mod1_print();
int /*<<< orphan*/ mod2_print();
int main() {
  mod1_print();
  mod2_print();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @mod1_print()
%2 = tail call i32 (...) @mod2_print()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_free__(void *);
void EC_POINT_free(void *point) { __coverity_free__(point); }


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

x86 assembly (clang, -O2):
<EC_POINT_free>:
jmp    1030 <__coverity_free__@plt>

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

LLVM IR (-O2):
define void @EC_POINT_free(i8* %0) {
%2 = tail call i32 @__coverity_free__(i8* %0)
ret void
}
double lap(double k, double min, double max) {
  return (k > max) ? (k - max) : ((k < min) ? (k + (max - min)) : k);
}


x86 assembly (clang, -O0):
<lap>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1137 <lap+0x37>
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    117c <lap+0x7c>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1168 <lap+0x68>
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1172 <lap+0x72>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lap>:
ucomisd %xmm2,%xmm0
jbe    110b <lap+0xb>
subsd  %xmm2,%xmm0
ret
ucomisd %xmm0,%xmm1
jbe    1119 <lap+0x19>
subsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @lap(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %6
%9 = fcmp ogt double %7, %8
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load double, double* %4
%12 = load double, double* %6
%13 = fsub double %11, %12
br label %28
14: ; preds = %3
%15 = load double, double* %4
%16 = load double, double* %5
%17 = fcmp olt double %15, %16
br i1 %17, label %18, label %24
18: ; preds = %14
%19 = load double, double* %4
%20 = load double, double* %6
%21 = load double, double* %5
%22 = fsub double %20, %21
%23 = fadd double %19, %22
br label %26
24: ; preds = %14
%25 = load double, double* %4
br label %26
26: ; preds = %24, %18
%27 = phi double [ %23, %18 ], [ %25, %24 ]
br label %28
28: ; preds = %26, %10
%29 = phi double [ %13, %10 ], [ %27, %26 ]
ret double %29
}

LLVM IR (-O2):
define double @lap(double %0, double %1, double %2) {
%4 = fcmp ogt double %0, %2
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = fsub double %0, %2
br label %12
7: ; preds = %3
%8 = fcmp olt double %0, %1
br i1 %8, label %9, label %12
9: ; preds = %7
%10 = fsub double %2, %1
%11 = fadd double %10, %0
br label %12
12: ; preds = %7, %9, %5
%13 = phi double [ %6, %5 ], [ %11, %9 ], [ %0, %7 ]
ret double %13
}
int is_ascii_numeric(char in_c) {
  if ((in_c >= 0x30 && in_c <= 0x39)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_ascii_numeric>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <is_ascii_numeric+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <is_ascii_numeric+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1137 <is_ascii_numeric+0x37>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ascii_numeric>:
add    $0xc6,%dil
xor    %eax,%eax
cmp    $0xf6,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_ascii_numeric(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 0, i32* %2
br label %13
12: ; preds = %7, %1
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_ascii_numeric(i8 signext %0) {
%2 = add i8 %0, -58
%3 = icmp ult i8 %2, -10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int exp(int);
double pow(int, double);
double GetWeight(int x, double sigma) {
  double weight;
  weight = (1 / (pow(2 * 3.1415926, 0.5) * sigma)) *
           exp(-(x * x) / (2 * sigma * sigma));
  return weight;
}


x86 assembly (clang, -O0):
<GetWeight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    $0x6,%edi
movsd  0xed3(%rip),%xmm0
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xeb6(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
imul   -0x4(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe8e(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  -0x20(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetWeight>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,(%rsp)
mov    %edi,%ebx
movsd  0xecc(%rip),%xmm0
mov    $0x6,%edi
call   1040 <pow@plt>
movsd  (%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xeb9(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
imul   %ebx,%ebx
neg    %ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movapd %xmm2,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @GetWeight(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%6 = call double @pow(i32 6, double 5.000000e-01)
%7 = load double, double* %4
%8 = fmul double %6, %7
%9 = fdiv double 1.000000e+00, %8
%10 = load i32, i32* %3
%11 = load i32, i32* %3
%12 = mul nsw i32 %10, %11
%13 = sub nsw i32 0, %12
%14 = sitofp i32 %13 to double
%15 = load double, double* %4
%16 = fmul double 2.000000e+00, %15
%17 = load double, double* %4
%18 = fmul double %16, %17
%19 = fdiv double %14, %18
%20 = fptosi double %19 to i32
%21 = call i32 @exp(i32 %20)
%22 = sitofp i32 %21 to double
%23 = fmul double %9, %22
store double %23, double* %5
%24 = load double, double* %5
ret double %24
}

LLVM IR (-O2):
define double @GetWeight(i32 %0, double %1) {
%3 = tail call double @pow(i32 6, double 5.000000e-01)
%4 = fmul double %3, %1
%5 = fdiv double 1.000000e+00, %4
%6 = mul i32 %0, %0
%7 = sub i32 0, %6
%8 = sitofp i32 %7 to double
%9 = fmul double %1, 2.000000e+00
%10 = fmul double %9, %1
%11 = fdiv double %8, %10
%12 = fptosi double %11 to i32
%13 = tail call i32 @exp(i32 %12)
%14 = sitofp i32 %13 to double
%15 = fmul double %5, %14
ret double %15
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int service_rdp_init(char *ip, int sp, unsigned char options, char *miscptr,
                     FILE *fp, int port, char *hostname) {
  return 0;
}


x86 assembly (clang, -O0):
<service_rdp_init>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    0x10(%rbp),%rdx
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @service_rdp_init(i8* %0, i32 %1, i8 zeroext %2, i8* %3, i32* %4, i32 %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i8*
store i8* %0, i8** %8
store i32 %1, i32* %9
store i8 %2, i8* %10
store i8* %3, i8** %11
store i32* %4, i32** %12
store i32 %5, i32* %13
store i8* %6, i8** %14
ret i32 0
}

LLVM IR (-O2):
define i32 @service_rdp_init(i8* nocapture readnone %0, i32 %1, i8 zeroext %2, i8* nocapture readnone %3, i32* nocapture readnone %4, i32 %5, i8* nocapture readnone %6) {
ret i32 0
}
unsigned int f42(unsigned int x, long int y) {
  return (x >> y) | (x << (8 * sizeof(unsigned int) - y));
}


x86 assembly (clang, -O0):
<f42>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x10(%rbp),%rcx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f42>:
mov    %rsi,%rcx
mov    %edi,%eax
ror    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @f42(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = lshr i32 %0, %3
%5 = sub i32 32, %3
%6 = shl i32 %0, %5
%7 = or i32 %6, %4
ret i32 %7
}
/* Variables and functions */
scalar_t__ strncmp(void *, void *, int);
bool __cstring_eq(void *a, void *b) { return 0 == strncmp(a, b, 128); }


x86 assembly (clang, -O0):
<__cstring_eq>:
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    $0x80,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cstring_eq>:
push   %rax
mov    $0x80,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__cstring_eq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strncmp(i8* %5, i8* %6, i32 128)
%8 = icmp eq i64 0, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @__cstring_eq(i8* %0, i8* %1) {
%3 = tail call i64 @strncmp(i8* %0, i8* %1, i32 128)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c;
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  c = 0;
  while (x > y) {
    y = y + 1;
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    115d <main+0x4d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double get_time(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (tv.tv_sec + tv.tv_usec / 1000000.0);
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @get_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load double, double* %5
%7 = fdiv double %6, 1.000000e+06
%8 = fadd double %4, %7
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @get_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
void *doOpen(char const *, int /*<<< orphan*/);
void *__PHYSFS_platformOpenRead(const char *filename) {
  return (doOpen(filename, O_RDONLY));
}


x86 assembly (clang, -O0):
<__PHYSFS_platformOpenRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <doOpen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__PHYSFS_platformOpenRead>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <doOpen@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i8* @__PHYSFS_platformOpenRead(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDONLY
%5 = call i8* @doOpen(i8* %3, i32 %4)
ret i8* %5
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i8* @__PHYSFS_platformOpenRead(i8* %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i8* @doOpen(i8* %0, i32 %2)
ret i8* %3
}
void parse_arguments(int argc, char *const *argv) {
  if (argc) {
  }
  if (argv) {
  }
}


x86 assembly (clang, -O0):
<parse_arguments>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111a <parse_arguments+0x1a>
jmp    111a <parse_arguments+0x1a>
cmpq   $0x0,-0x10(%rbp)
je     112a <parse_arguments+0x2a>
jmp    112a <parse_arguments+0x2a>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @parse_arguments(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
br label %8
8: ; preds = %7, %2
%9 = load i8**, i8*** %4
%10 = icmp ne i8** %9, null
br i1 %10, label %11, label %12
11: ; preds = %8
br label %12
12: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
define void @parse_arguments(i32 %0, i8** nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
FILE *getfp(char *name, char *opt) {
  FILE *fp;
  if ((fp = fopen(name, opt)) == NULL) {
    fprintf(stderr, "Cannot open file %s!\n", name);
    exit(2);
  }
  return (fp);
}


x86 assembly (clang, -O0):
<getfp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    117e <getfp+0x4e>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getfp>:
push   %rbx
mov    %rdi,%rbx
call   1040 <fopen@plt>
test   %rax,%rax
je     1140 <getfp+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Cannot open file %s!\0A\00"
define i32* @getfp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %3
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 2)
unreachable
15: ; preds = %2
%16 = load i32*, i32** %5
ret i32* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Cannot open file %s!\0A\00"
define noalias i32* @getfp(i8* %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @exit(i32 2)
unreachable
9: ; preds = %2
ret i32* %3
}
int *radd(int *block, int n) {
  int i;
  for (i = 0; i < 64; i++) {
    if ((i - 1) % n == 0) {
      block[i] = (block[i] - 11) % 256;
    }
  }
  return block;
}


x86 assembly (clang, -O0):
<radd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x40,-0x10(%rbp)
jge    1163 <radd+0x63>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1150 <radd+0x50>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0xb,%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1155 <radd+0x55>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <radd+0x12>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<radd>:
mov    %rdi,%r8
xor    %ecx,%ecx
jmp    111a <radd+0x1a>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rcx
cmp    $0x40,%rcx
je     1149 <radd+0x49>
lea    -0x1(%rcx),%eax
cltd
idiv   %esi
test   %edx,%edx
jne    1110 <radd+0x10>
mov    (%r8,%rcx,4),%eax
lea    -0xb(%rax),%edx
lea    0xf4(%rax),%edi
test   %edx,%edx
cmovns %edx,%edi
and    $0xffffff00,%edi
neg    %edi
add    %edi,%eax
add    $0xfffffff5,%eax
mov    %eax,(%r8,%rcx,4)
jmp    1110 <radd+0x10>
mov    %r8,%rax
ret

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

LLVM IR (-O2):
define i32* @radd(i32* returned %0, i32 %1) {
br label %3
3: ; preds = %2, %14
%4 = phi i64 [ 0, %2 ], [ %15, %14 ]
%5 = trunc i64 %4 to i32
%6 = add i32 %5, -1
%7 = srem i32 %6, %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = getelementptr inbounds i32, i32* %0, i64 %4
%11 = load i32, i32* %10
%12 = add nsw i32 %11, -11
%13 = srem i32 %12, 256
store i32 %13, i32* %10
br label %14
14: ; preds = %3, %9
%15 = add nuw nsw i64 %4, 1
%16 = icmp eq i64 %15, 64
br i1 %16, label %17, label %3
17: ; preds = %14
ret i32* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void parser_trace_action(FILE *trace, char *action) {
  if (trace)
    fprintf(trace, " - %s\n", action);
}


x86 assembly (clang, -O0):
<parser_trace_action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113f <parser_trace_action+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parser_trace_action>:
test   %rdi,%rdi
je     1124 <parser_trace_action+0x14>
mov    %rsi,%rdx
lea    0xee1(%rip),%rsi
jmp    1030 <fprintf@plt>
ret

LLVM IR (-O0):
@.str = [7 x i8] c" - %s\0A\00"
define void @parser_trace_action(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 = icmp ne i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c" - %s\0A\00"
define void @parser_trace_action(i32* %0, i8* %1) {
%3 = icmp eq i32* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
unsigned long GrMapISO8859_11_Unicode(const char *pcSrcChar,
                                      unsigned long ulCount,
                                      unsigned long *pulSkip) {
  assert(pulSkip);
  assert(pcSrcChar);
  *pulSkip = 1;
  if ((unsigned char)*pcSrcChar <= 0xA0) {
    return ((unsigned long)(unsigned char)*pcSrcChar);
  } else {
    return ((unsigned long)((unsigned char)*pcSrcChar) + 0xD60);
  }
}


x86 assembly (clang, -O0):
<GrMapISO8859_11_Unicode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x20(%rbp),%rax
movq   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xa0,%eax
jg     1167 <GrMapISO8859_11_Unicode+0x57>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %rax,-0x8(%rbp)
jmp    1178 <GrMapISO8859_11_Unicode+0x68>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
add    $0xd60,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GrMapISO8859_11_Unicode>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
mov    %rdx,%rdi
xor    %eax,%eax
call   1030 <assert@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <assert@plt>
movq   $0x1,(%rbx)
movzbl (%r14),%ecx
lea    0xd60(%rcx),%rax
cmp    $0xa1,%rcx
cmovb  %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @GrMapISO8859_11_Unicode(i8* %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64* %2, i64** %7
%8 = load i64*, i64** %7
%9 = call i32 (i64*, ...) bitcast (i32 (...)* @assert to i32 (i64*, ...)*)(i64* %8)
%10 = load i8*, i8** %5
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %10)
%12 = load i64*, i64** %7
store i64 1, i64* %12
%13 = load i8*, i8** %5
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = icmp sle i32 %15, 160
br i1 %16, label %17, label %21
17: ; preds = %3
%18 = load i8*, i8** %5
%19 = load i8, i8* %18
%20 = zext i8 %19 to i64
store i64 %20, i64* %4
br label %26
21: ; preds = %3
%22 = load i8*, i8** %5
%23 = load i8, i8* %22
%24 = zext i8 %23 to i64
%25 = add i64 %24, 3424
store i64 %25, i64* %4
br label %26
26: ; preds = %21, %17
%27 = load i64, i64* %4
ret i64 %27
}

LLVM IR (-O2):
define i64 @GrMapISO8859_11_Unicode(i8* %0, i64 %1, i64* %2) {
%4 = tail call i32 (i64*, ...) bitcast (i32 (...)* @assert to i32 (i64*, ...)*)(i64* %2)
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %0)
store i64 1, i64* %2
%6 = load i8, i8* %0
%7 = icmp ult i8 %6, -95
%8 = zext i8 %6 to i64
%9 = add nuw nsw i64 %8, 3424
%10 = select i1 %7, i64 %8, i64 %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int main() {
  putchar('L' - '@');
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i8 signext 12)
ret i32 0
}
int ptreq(void *a, void *b) { return a == b; }


x86 assembly (clang, -O0):
<ptreq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptreq>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @ptreq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ptreq(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
A0AR1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((*((double *)10000000)) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<A0AR1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    $0x989680,%eax
movsd  (%rax),%xmm1
mov    -0x30(%rbp),%rax
movsd  0x21e888(%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1147 <A0AR1+0x47>
movl   $0x1,-0x4(%rbp)
jmp    114e <A0AR1+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<A0AR1>:
movsd  0x21e888(%rcx),%xmm0
xor    %eax,%eax
ucomisd 0x989680,%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @A0AR1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double, double* inttoptr (i64 10000000 to double*)
%15 = load double*, double** %13
%16 = getelementptr inbounds double, double* %15, i64 277777
%17 = load double, double* %16
%18 = fcmp ole double %14, %17
br i1 %18, label %19, label %20
19: ; preds = %6
store i32 1, i32* %7
br label %21
20: ; preds = %6
store i32 0, i32* %7
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
define i32 @A0AR1(double %0, double %1, i32 %2, i32 %3, double* nocapture readnone %4, double* nocapture %5) {
%7 = load double, double* inttoptr (i64 10000000 to double*)
%8 = getelementptr inbounds double, double* %5, i64 277777
%9 = load double, double* %8
%10 = fcmp ole double %7, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
int main() {
  unsigned char ch = 'a';
  char output[2];
  to_hex(ch, output);
  printf("%c%c", output);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movzbl -0x5(%rbp),%edi
lea    -0x7(%rbp),%rsi
mov    $0x0,%al
call   1030 <to_hex@plt>
lea    -0x7(%rbp),%rsi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xe(%rsp),%rbx
mov    $0x61,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <to_hex@plt>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%c%c\00"
define i32 @main() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @to_hex to i32 (i32, i8*, ...)*)(i32 97, i8* %2)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void XSyncDestroyCounter() {}


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

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

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

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