xunge/DecIR huggingface dataset:
int test_imm_B2uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xB2 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B2uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 11665408
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ logDebug(char);
int max(int a, int b) {
  logDebug('m');
  return a > b ? a : b;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x6d,%edi
call   1030 <logDebug@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    113f <max+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <max+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x6d,%edi
call   1030 <logDebug@plt>
cmp    %ebx,%ebp
cmovg  %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @max(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @logDebug(i8 signext 109)
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %4
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = tail call i32 @logDebug(i8 signext 109)
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %0, i32 %1
ret i32 %5
}
/* Variables and functions */
scalar_t__ mkdir(char const *const, int);
int main(const int argc, const char *const argv[]) {
  int err = 0;
  while (*argv) {
    if (mkdir(*argv, 0777))
      err = 1;
    argv++;
  }
  return err;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     116e <main+0x5e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
je     115d <main+0x4d>
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    112d <main+0x1d>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    (%rsi),%rdi
test   %rdi,%rdi
je     114f <main+0x3f>
mov    %rsi,%rbx
add    $0x8,%rbx
xor    %ebp,%ebp
mov    $0x1,%r14d
nopl   0x0(%rax,%rax,1)
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
test   %rax,%rax
cmovne %r14d,%ebp
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <main+0x20>
jmp    1151 <main+0x41>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %11, %5 ], [ 0, %2 ]
%8 = phi i8** [ %12, %5 ], [ %1, %2 ]
%9 = tail call i64 @mkdir(i8* %6, i32 511)
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i32 %7, i32 1
%12 = getelementptr inbounds i8*, i8** %8, i64 1
%13 = load i8*, i8** %12
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %11, %5 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main(int i) { f(1 + 1); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = tail call i32 @f(i32 2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ XSelectionEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XSelectionEvent(void) {
  XSelectionEvent *_p = (XSelectionEvent *)malloc(sizeof(XSelectionEvent));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XSelectionEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XSelectionEvent+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XSelectionEvent>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XSelectionEvent+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XSelectionEvent() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XSelectionEvent() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
/* Variables and functions */
size_t skip_leb128(const unsigned char *buf, const unsigned char *buf_end) {
  const unsigned char *p = buf;
  unsigned char byte;
  while (1) {
    if (p == buf_end)
      return 0;
    byte = *p++;
    if ((byte & 0x80) == 0)
      return p - buf;
  }
}


x86 assembly (clang, -O0):
<skip_leb128>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    112f <skip_leb128+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    116e <skip_leb128+0x6e>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%al
mov    %al,-0x21(%rbp)
movzbl -0x21(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
jne    1169 <skip_leb128+0x69>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    116e <skip_leb128+0x6e>
jmp    1114 <skip_leb128+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_leb128>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rdi,%rax,1),%rcx
cmp    %rsi,%rcx
je     1123 <skip_leb128+0x23>
add    $0x1,%rax
cmpb   $0x0,(%rcx)
js     1110 <skip_leb128+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @skip_leb128(i8* %0, i8* readnone %1) {
br label %3
3: ; preds = %6, %2
%4 = phi i8* [ %0, %2 ], [ %7, %6 ]
%5 = icmp eq i8* %4, %1
br i1 %5, label %14, label %6
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
%8 = load i8, i8* %4
%9 = icmp sgt i8 %8, -1
br i1 %9, label %10, label %3
10: ; preds = %6
%11 = ptrtoint i8* %7 to i64
%12 = ptrtoint i8* %0 to i64
%13 = sub i64 %11, %12
br label %14
14: ; preds = %3, %10
%15 = phi i64 [ %13, %10 ], [ 0, %3 ]
ret i64 %15
}
int ModuloSub(int f, int k) {
  int tmp;
  tmp = f - k;
  if (tmp < 0)
    tmp += 27;
  return (tmp);
}


x86 assembly (clang, -O0):
<ModuloSub>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1126 <ModuloSub+0x26>
mov    -0xc(%rbp),%eax
add    $0x1b,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ModuloSub>:
sub    %esi,%edi
lea    0x1b(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @ModuloSub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = icmp slt i32 %3, 0
%5 = add nsw i32 %3, 27
%6 = select i1 %4, i32 %5, i32 %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ stress_float_put(float const);
float __attribute__((no))
stress_funccall_float_4(const float a, const float b, const float c,
                        const float d) {
  stress_float_put(a);
  stress_float_put(b);
  stress_float_put(c);
  stress_float_put(d);
  return a + b + c + d;
}


x86 assembly (clang, -O0):
<stress_funccall_float_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <stress_float_put@plt>
movss  -0x8(%rbp),%xmm0
call   1030 <stress_float_put@plt>
movss  -0xc(%rbp),%xmm0
call   1030 <stress_float_put@plt>
movss  -0x10(%rbp),%xmm0
call   1030 <stress_float_put@plt>
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_funccall_float_4>:
sub    $0x18,%rsp
movss  %xmm3,0x10(%rsp)
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0x14(%rsp)
call   1030 <stress_float_put@plt>
movss  0x8(%rsp),%xmm0
call   1030 <stress_float_put@plt>
movss  0xc(%rsp),%xmm0
call   1030 <stress_float_put@plt>
movss  0x10(%rsp),%xmm0
call   1030 <stress_float_put@plt>
movss  0x14(%rsp),%xmm0
addss  0x8(%rsp),%xmm0
addss  0xc(%rsp),%xmm0
addss  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @stress_funccall_float_4(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = call i32 @stress_float_put(float %9)
%11 = load float, float* %6
%12 = call i32 @stress_float_put(float %11)
%13 = load float, float* %7
%14 = call i32 @stress_float_put(float %13)
%15 = load float, float* %8
%16 = call i32 @stress_float_put(float %15)
%17 = load float, float* %5
%18 = load float, float* %6
%19 = fadd float %17, %18
%20 = load float, float* %7
%21 = fadd float %19, %20
%22 = load float, float* %8
%23 = fadd float %21, %22
ret float %23
}

LLVM IR (-O2):
define float @stress_funccall_float_4(float %0, float %1, float %2, float %3) {
%5 = tail call i32 @stress_float_put(float %0)
%6 = tail call i32 @stress_float_put(float %1)
%7 = tail call i32 @stress_float_put(float %2)
%8 = tail call i32 @stress_float_put(float %3)
%9 = fadd float %0, %1
%10 = fadd float %9, %2
%11 = fadd float %10, %3
ret float %11
}
/* Variables and functions */
float cos(float);
float _cos(float s) { return cos(s); }


x86 assembly (clang, -O0):
<_cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <cos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cos>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define float @_cos(float %0) {
%2 = tail call float @cos(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ puts(char *);
main() {
  char dia[3];
  char mes[3];
  char ano[5];
  gets(dia);
  gets(mes);
  gets(ano);
  puts(mes);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x3(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x6(%rbp),%rdi
call   1040 <gets@plt>
lea    -0xb(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x6(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
call   1040 <gets@plt>
lea    0x5(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
lea    0xb(%rsp),%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [3 x i8]
%2 = alloca [3 x i8]
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%7 = call i32 @gets(i8* %6)
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%9 = call i32 @gets(i8* %8)
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%11 = call i32 @puts(i8* %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [3 x i8]
%2 = alloca [3 x i8]
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%7 = call i32 @gets(i8* %4)
%8 = call i32 @gets(i8* %5)
%9 = call i32 @gets(i8* %6)
%10 = call i32 @puts(i8* %5)
ret i32 0
}
/* Variables and functions */
scalar_t__ StatSumFloat(float *, int, int);
double StatAvgFloat(float a[], int n, int s) {
  return (double)StatSumFloat(a, n, s) / (double)n;
}


x86 assembly (clang, -O0):
<StatAvgFloat>:
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 <StatSumFloat@plt>
cvtsi2sd %rax,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StatAvgFloat>:
push   %rbx
mov    %esi,%ebx
call   1030 <StatSumFloat@plt>
cvtsi2sd %rax,%xmm0
cvtsi2sd %ebx,%xmm1
divsd  %xmm1,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @StatAvgFloat(float* %0, i32 %1, i32 %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
store float* %0, float** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load float*, float** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i64 @StatSumFloat(float* %7, i32 %8, i32 %9)
%11 = sitofp i64 %10 to double
%12 = load i32, i32* %5
%13 = sitofp i32 %12 to double
%14 = fdiv double %11, %13
ret double %14
}

LLVM IR (-O2):
define double @StatAvgFloat(float* %0, i32 %1, i32 %2) {
%4 = tail call i64 @StatSumFloat(float* %0, i32 %1, i32 %2)
%5 = sitofp i64 %4 to double
%6 = sitofp i32 %1 to double
%7 = fdiv double %5, %6
ret double %7
}
unsigned ones(unsigned long in) {
  in -= ((in >> 1) & 0x55555555UL);
  in = (in & 0x33333333UL) + ((in & 0xccccccccUL) >> 2);
  in += in >> 4;
  in &= 0x0f0f0f0fUL;
  in += in >> 8;
  in += in >> 16;
  return in & 0x3f;
}


x86 assembly (clang, -O0):
<ones>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
shr    $0x1,%rcx
and    $0x55555555,%rcx
mov    -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x33333333,%rax
movabs $0xcccccccc,%rcx
and    -0x8(%rbp),%rcx
shr    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x4,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xf0f0f0f,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3f,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ones>:
mov    %rdi,%rax
shr    %rax
and    $0x55555555,%eax
sub    %rax,%rdi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
mov    %rax,%rcx
shr    $0x8,%rcx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @ones(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 1
%5 = and i64 %4, 1431655765
%6 = load i64, i64* %2
%7 = sub i64 %6, %5
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = and i64 %8, 858993459
%10 = load i64, i64* %2
%11 = and i64 %10, 3435973836
%12 = lshr i64 %11, 2
%13 = add i64 %9, %12
store i64 %13, i64* %2
%14 = load i64, i64* %2
%15 = lshr i64 %14, 4
%16 = load i64, i64* %2
%17 = add i64 %16, %15
store i64 %17, i64* %2
%18 = load i64, i64* %2
%19 = and i64 %18, 252645135
store i64 %19, i64* %2
%20 = load i64, i64* %2
%21 = lshr i64 %20, 8
%22 = load i64, i64* %2
%23 = add i64 %22, %21
store i64 %23, i64* %2
%24 = load i64, i64* %2
%25 = lshr i64 %24, 16
%26 = load i64, i64* %2
%27 = add i64 %26, %25
store i64 %27, i64* %2
%28 = load i64, i64* %2
%29 = and i64 %28, 63
%30 = trunc i64 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @ones(i64 %0) {
%2 = lshr i64 %0, 1
%3 = and i64 %2, 1431655765
%4 = sub i64 %0, %3
%5 = and i64 %4, 858993459
%6 = lshr i64 %4, 2
%7 = and i64 %6, 858993459
%8 = add nuw nsw i64 %7, %5
%9 = lshr i64 %8, 4
%10 = add nuw nsw i64 %9, %8
%11 = and i64 %10, 252645135
%12 = lshr i64 %11, 8
%13 = add nuw nsw i64 %12, %11
%14 = lshr i64 %13, 16
%15 = add nuw nsw i64 %14, %13
%16 = trunc i64 %15 to i32
%17 = and i32 %16, 63
ret i32 %17
}
void swap(char *linesarray[], int left, int right) {
  char *temp;
  temp = linesarray[right];
  linesarray[right] = linesarray[left];
  linesarray[left] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %edx,%rax
mov    (%rdi,%rax,8),%rcx
movslq %esi,%rdx
mov    (%rdi,%rdx,8),%rsi
mov    %rsi,(%rdi,%rax,8)
mov    %rcx,(%rdi,%rdx,8)
ret

LLVM IR (-O0):
define void @swap(i8** %0, i32 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8**, i8*** %4
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %8, i64 %10
%12 = load i8*, i8** %11
store i8* %12, i8** %7
%13 = load i8**, i8*** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = load i8**, i8*** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
store i8* %17, i8** %21
%22 = load i8*, i8** %7
%23 = load i8**, i8*** %4
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %23, i64 %25
store i8* %22, i8** %26
ret void
}

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8*, i8** %0, i64 %4
%6 = load i8*, i8** %5
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
store i8* %9, i8** %5
store i8* %6, i8** %8
ret void
}
void vector_scale_3d(double v[2], double s) {
  v[0] *= s;
  v[1] *= s;
  v[2] *= s;
}


x86 assembly (clang, -O0):
<vector_scale_3d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_scale_3d>:
movupd (%rdi),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,(%rdi)
mulsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @vector_scale_3d(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = fmul double %8, %5
store double %9, double* %7
%10 = load double, double* %4
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = fmul double %13, %10
store double %14, double* %12
%15 = load double, double* %4
%16 = load double*, double** %3
%17 = getelementptr inbounds double, double* %16, i64 2
%18 = load double, double* %17
%19 = fmul double %18, %15
store double %19, double* %17
ret void
}

LLVM IR (-O2):
define void @vector_scale_3d(double* nocapture %0, double %1) {
%3 = bitcast double* %0 to <2 x double>*
%4 = load <2 x double>, <2 x double>* %3
%5 = insertelement <2 x double> poison, double %1, i64 0
%6 = shufflevector <2 x double> %5, <2 x double> poison, <2 x i32> zeroinitializer
%7 = fmul <2 x double> %4, %6
%8 = bitcast double* %0 to <2 x double>*
store <2 x double> %7, <2 x double>* %8
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = load double, double* %9
%11 = fmul double %10, %1
store double %11, double* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char *buffer;
  printf("String please: ");
  scanf("%s", buffer);
  printf("Thanks for the \"%s\"!\n", buffer);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xecf(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"String please: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [22 x i8] c"Thanks for the \22%s\22!\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = load i8*, i8** %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"String please: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [22 x i8] c"Thanks for the \22%s\22!\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* undef)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* undef)
ret i32 0
}
int See__usr_share_doc_fakechroot_README_fake() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @See__usr_share_doc_fakechroot_README_fake() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fsemu_control_set_warp(int);
int /*<<< orphan*/ fsemu_control_warp();
void fsemu_control_toggle_warp(void) {
  fsemu_control_set_warp(!fsemu_control_warp());
}


x86 assembly (clang, -O0):
<fsemu_control_toggle_warp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <fsemu_control_warp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <fsemu_control_set_warp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsemu_control_toggle_warp>:
push   %rax
xor    %eax,%eax
call   1030 <fsemu_control_warp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1040 <fsemu_control_set_warp@plt>

LLVM IR (-O0):
define void @fsemu_control_toggle_warp() {
%1 = call i32 (...) @fsemu_control_warp()
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
%5 = call i32 @fsemu_control_set_warp(i32 %4)
ret void
}

LLVM IR (-O2):
define void @fsemu_control_toggle_warp() {
%1 = tail call i32 (...) @fsemu_control_warp()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @fsemu_control_set_warp(i32 %3)
ret void
}
void assert_die(const char *file, unsigned line, const char *condition) {
  error("%s:%u: MPS ASSERTION FAILED: %s\n", file, line, condition);
}


x86 assembly (clang, -O0):
<assert_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_die>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee1(%rip),%rdi
xor    %eax,%eax
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"%s:%u: MPS ASSERTION FAILED: %s\0A\00"
define void @assert_die(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"%s:%u: MPS ASSERTION FAILED: %s\0A\00"
define void @assert_die(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
ret void
}
/* Variables and functions */
int compute_exit_code(char const *);
char *main1(int, char **);
int main(int argc, char **argv) {
  const char *z = main1(argc, argv);
  int exit_code = compute_exit_code(z);
  return exit_code;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <main1@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <compute_exit_code@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <main1@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <compute_exit_code@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i8* @main1(i32 %0, i8** %1)
%4 = tail call i32 @compute_exit_code(i8* %3)
ret i32 %4
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *newstr(char *str) {
  char *tempstr = (char *)malloc(sizeof(char) * strlen(str) + 1);
  if (tempstr != NULL)
    strcpy(tempstr, str);
  return tempstr;
}


x86 assembly (clang, -O0):
<newstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cltq
shl    $0x0,%rax
add    $0x1,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1172 <newstr+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newstr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1157 <newstr+0x27>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @newstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sext i32 %5 to i64
%7 = mul i64 1, %6
%8 = add i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %18
14: ; preds = %1
%15 = load i8*, i8** %3
%16 = load i8*, i8** %2
%17 = call i32 @strcpy(i8* %15, i8* %16)
br label %18
18: ; preds = %14, %1
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @newstr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @strcpy(i8* %5, i8* %0)
br label %9
9: ; preds = %7, %1
ret i8* %5
}
/* Variables and functions */
int random_in_range_percent(int, int);
int roll() { return random_in_range_percent(128, 15); }


x86 assembly (clang, -O0):
<roll>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%edi
mov    $0xf,%esi
call   1030 <random_in_range_percent@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<roll>:
mov    $0x80,%edi
mov    $0xf,%esi
jmp    1030 <random_in_range_percent@plt>

LLVM IR (-O0):
define i32 @roll() {
%1 = call i32 @random_in_range_percent(i32 128, i32 15)
ret i32 %1
}

LLVM IR (-O2):
define i32 @roll() {
%1 = tail call i32 @random_in_range_percent(i32 128, i32 15)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xe8() {
  Assert_real((ispunct(232) == 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_ispunct.c",
              1165, ("ispunct should be 0 for 0xe8"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xe8>:
push   %rax
mov    $0xe8,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x48d,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xe8\00"
define void @t_ispunct_0xe8() {
%1 = call i64 @ispunct(i32 232)
%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 1165, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xe8\00"
define void @t_ispunct_0xe8() {
%1 = tail call i64 @ispunct(i32 232)
%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 1165, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int unlink(char const *);
int txc_libc_unlink(const char *path) { return unlink(path); }


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

x86 assembly (clang, -O2):
<txc_libc_unlink>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @txc_libc_unlink(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
char *basename(char const *);
char *strrchr(char *, char);
char *base_name(const char *filename) {
  char *name = basename(filename);
  char *s = strrchr(name, '.');
  if (s)
    s[0] = '\0';
  return name;
}


x86 assembly (clang, -O0):
<base_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <basename@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115d <base_name+0x3d>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base_name>:
push   %rbx
call   1040 <basename@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     113e <base_name+0x1e>
movb   $0x0,(%rax)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @base_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @basename(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i8* @strrchr(i8* %7, i8 signext 46)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 0
store i8 0, i8* %13
br label %14
14: ; preds = %11, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @base_name(i8* %0) {
%2 = tail call i8* @basename(i8* %0)
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %2, i8 signext 46)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
store i8 0, i8* %3
br label %6
6: ; preds = %5, %1
ret i8* %2
}
/* Variables and functions */
unsigned int sleep(unsigned int);
void test(void) {
  unsigned int seconds;
  unsigned int result;
  seconds = 10;
  result = sleep(seconds);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sleep@plt>
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
mov    $0xa,%edi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = alloca i32
store i32 10, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @sleep(i32 %3)
store i32 %4, i32* %2
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @sleep(i32 10)
ret void
}
/* Type definitions */
struct sched_param {
  int /*<<< orphan*/ sched_priority;
};

/* Variables and functions */
int /*<<< orphan*/ SCHED_OTHER;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ sched_setscheduler(int /*<<< orphan*/, int /*<<< orphan*/,
                              struct sched_param *);
void unrealtime(void) {
  struct sched_param prm = {.sched_priority = 0};
  if (sched_setscheduler(0, SCHED_OTHER, &prm) < 0) {
    perror("sched_setscheduler SCHED_OTHER");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<unrealtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setscheduler@plt>
cmp    $0x0,%rax
jge    118c <unrealtime+0x4c>
lea    0xe83(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unrealtime>:
push   %rax
movl   $0x0,(%rsp)
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
xor    %edi,%edi
call   1030 <sched_setscheduler@plt>
test   %rax,%rax
js     1152 <unrealtime+0x22>
pop    %rax
ret
lea    0xea7(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@SCHED_OTHER = global i32 0
@.str = [31 x i8] c"sched_setscheduler SCHED_OTHER\00"
define void @unrealtime() {
%1 = alloca %struct.sched_param
%2 = bitcast %struct.sched_param* %1 to i8*
%3 = load i32, i32* @SCHED_OTHER
%4 = call i64 @sched_setscheduler(i32 0, i32 %3, %struct.sched_param* %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %0
ret void
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@SCHED_OTHER = global i32 0
@.str = [31 x i8] c"sched_setscheduler SCHED_OTHER\00"
define void @unrealtime() {
%1 = alloca %struct.sched_param
%2 = bitcast %struct.sched_param* %1 to i8*
%3 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %1, i64 0, i32 0
store i32 0, i32* %3
%4 = load i32, i32* @SCHED_OTHER
%5 = call i64 @sched_setscheduler(i32 0, i32 %4, %struct.sched_param* %1)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DMA3_DMA19_DriverIRQHandler();
__attribute__((weak)) void DMA3_DMA19_IRQHandler(void) {
  DMA3_DMA19_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @DMA3_DMA19_IRQHandler() {
%1 = call i32 (...) @DMA3_DMA19_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @DMA3_DMA19_IRQHandler() {
%1 = tail call i32 (...) @DMA3_DMA19_DriverIRQHandler()
ret void
}
int isodigit(char c) { return c >= '0' && c <= '7'; }


x86 assembly (clang, -O0):
<isodigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <isodigit+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x37,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isodigit>:
and    $0xf8,%dil
xor    %eax,%eax
cmp    $0x30,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isodigit(i8 signext %0) {
%2 = and i8 %0, -8
%3 = icmp eq i8 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
__attribute__((always_)) uint64_t f() {
  uint64_t ans = 0, curr = 1, next = 2;
  while (curr < 4000000) {
    if (curr % 2 == 0)
      ans += curr;
    uint64_t tmp = next;
    next += curr;
    curr = tmp;
  }
  return ans;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
cmpl   $0x3d0900,-0x8(%rbp)
jge    115d <f+0x5d>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <f+0x43>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <f+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
br label %5
5: ; preds = %16, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 4000000
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i32, i32* %2
%10 = srem i32 %9, 2
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i32, i32* %2
%14 = load i32, i32* %1
%15 = add nsw i32 %14, %13
store i32 %15, i32* %1
br label %16
16: ; preds = %12, %8
%17 = load i32, i32* %3
store i32 %17, i32* %4
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = add nsw i32 %19, %18
store i32 %20, i32* %3
%21 = load i32, i32* %4
store i32 %21, i32* %2
br label %5
22: ; preds = %5
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
define i32 @f() {
ret i32 4613732
}
/* Type definitions */
typedef int /*<<< orphan*/ SXNET;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ SXNET_it;
void SXNET_free(SXNET *a) { ASN1_item_free((ASN1_VALUE *)a, &SXNET_it); }


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

x86 assembly (clang, -O2):
<SXNET_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@SXNET_it = global i32 0
define void @SXNET_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @SXNET_it)
ret void
}

LLVM IR (-O2):
@SXNET_it = global i32 0
define void @SXNET_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @SXNET_it)
ret void
}
/* Variables and functions */
int cfg_processor_get_hex_int_attr(void *, char *);
int cfg_flash_get_area_addr(void *area) {
  return cfg_processor_get_hex_int_attr(area, "addr");
}


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

x86 assembly (clang, -O2):
<cfg_flash_get_area_addr>:
lea    0xee9(%rip),%rsi
jmp    1030 <cfg_processor_get_hex_int_attr@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"addr\00"
define i32 @cfg_flash_get_area_addr(i8* %0) {
%2 = tail call i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void g_string_insert_c() {}


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

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

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

LLVM IR (-O2):
define void @g_string_insert_c() {
ret void
}
void U_EMRENDPATH_print(const char *contents) { (void)(contents); }


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

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

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

LLVM IR (-O2):
define void @U_EMRENDPATH_print(i8* nocapture %0) {
ret void
}
int test_imm_F3int8_mem(signed char *val) {
  return ((*val) & (0xF3 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F3int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -13
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
long sys_rt_sigaction(va_list ap) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @sys_rt_sigaction(i32 %0) {
ret i64 0
}