xunge/DecIR huggingface dataset:
int istreinta(int mes) {
  if (mes == 4 || mes == 6 || mes == 9 || mes == 11)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<istreinta>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     112f <istreinta+0x2f>
cmpl   $0x6,-0x8(%rbp)
je     112f <istreinta+0x2f>
cmpl   $0x9,-0x8(%rbp)
je     112f <istreinta+0x2f>
cmpl   $0xb,-0x8(%rbp)
jne    113b <istreinta+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <istreinta+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<istreinta>:
add    $0xfffffffc,%edi
xor    %eax,%eax
cmp    $0x7,%edi
ja     1117 <istreinta+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.istreinta = [8 x i32] [i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1]
define i32 @istreinta(i32 %0) {
%2 = add i32 %0, -4
%3 = icmp ult i32 %2, 8
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [8 x i32], [8 x i32]* @switch.table.istreinta, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void close_file(FILE *fp) { fclose(fp); }


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

x86 assembly (clang, -O2):
<close_file>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @close_file(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret void
}
/* Variables and functions */
int snoopy_output_fileoutput(char const *const, int, char *);
int snoopy_output_devnulloutput(char const *const logMessage,
                                int errorOrMessage, char const *const arg) {
  return snoopy_output_fileoutput(logMessage, errorOrMessage, "/dev/null");
}


x86 assembly (clang, -O0):
<snoopy_output_devnulloutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xecf(%rip),%rdx
call   1030 <snoopy_output_fileoutput@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snoopy_output_devnulloutput>:
lea    0xee9(%rip),%rdx
jmp    1030 <snoopy_output_fileoutput@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/null\00"
define i32 @snoopy_output_devnulloutput(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 = call i32 @snoopy_output_fileoutput(i8* %7, i32 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 %9
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/null\00"
define i32 @snoopy_output_devnulloutput(i8* %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @snoopy_output_fileoutput(i8* %0, i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pelwak_(double *, double *, int *);
void cpelwak(double *xmom, double *para, int *ifail) {
  pelwak_(xmom, para, ifail);
}


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

x86 assembly (clang, -O2):
<cpelwak>:
jmp    1030 <pelwak_@plt>

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

LLVM IR (-O2):
define void @cpelwak(double* %0, double* %1, i32* %2) {
%4 = tail call i32 @pelwak_(double* %0, double* %1, i32* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vsnprintf(char *, int, char const *, int /*<<< orphan*/);
signed int vsprintf(char *pString, const char *pFormat, va_list ap) {
  return vsnprintf(pString, 100, pFormat, ap);
}


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

x86 assembly (clang, -O2):
<vsprintf>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0x64,%esi
jmp    1030 <vsnprintf@plt>

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

LLVM IR (-O2):
define i32 @vsprintf(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @vsnprintf(i8* %0, i32 100, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fb();
int /*<<< orphan*/ fi();
int fv();
int ignore(void) {
  fi();
  (void)fi();
  fb();
  fv();
  return fv();
}


x86 assembly (clang, -O0):
<ignore>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <fi@plt>
mov    $0x0,%al
call   1050 <fi@plt>
mov    $0x0,%al
call   1030 <fb@plt>
mov    $0x0,%al
call   1040 <fv@plt>
mov    $0x0,%al
call   1040 <fv@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore>:
push   %rax
xor    %eax,%eax
call   1050 <fi@plt>
xor    %eax,%eax
call   1050 <fi@plt>
xor    %eax,%eax
call   1030 <fb@plt>
xor    %eax,%eax
call   1040 <fv@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <fv@plt>

LLVM IR (-O0):
define i32 @ignore() {
%1 = call i32 (...) @fi()
%2 = call i32 (...) @fi()
%3 = call i32 (...) @fb()
%4 = call i32 (...) @fv()
%5 = call i32 (...) @fv()
ret i32 %5
}

LLVM IR (-O2):
define i32 @ignore() {
%1 = tail call i32 (...) @fi()
%2 = tail call i32 (...) @fi()
%3 = tail call i32 (...) @fb()
%4 = tail call i32 (...) @fv()
%5 = tail call i32 (...) @fv()
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ errno;
int _execve(uint8_t *name, uint8_t **argv, uint8_t **env) {
  errno = ENOMEM;
  return -1;
}


x86 assembly (clang, -O0):
<_execve>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_execve>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOMEM = global i32 0
@errno = global i32 0
define i32 @_execve(i32* %0, i32** %1, i32** %2) {
%4 = alloca i32*
%5 = alloca i32**
%6 = alloca i32**
store i32* %0, i32** %4
store i32** %1, i32*** %5
store i32** %2, i32*** %6
%7 = load i32, i32* @ENOMEM
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
define i32 @_execve(i32* nocapture readnone %0, i32** nocapture readnone %1, i32** nocapture readnone %2) {
%4 = load i32, i32* @ENOMEM
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int fun(int a) {
  printf("%d\n", a);
  int m = 0;
  int i;
  for (i = 0; i < 10; i++) {
    m++;
  }
  printf("%d\n", m);
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1159 <fun+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <fun+0x28>
mov    -0xc(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %rbx
mov    %edi,%esi
lea    0xee6(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @fun(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 undef
}
float fast_inv_sqrt(float n) {
  long i;
  float x2, y;
  const float threehalfs = 1.5F;
  x2 = n * 0.5F;
  y = n;
  i = *(long *)&y;
  i = 0x5f3759df - (i >> 1);
  y = *(float *)&i;
  y = y * (threehalfs - (x2 * y * y));
  return y;
}


x86 assembly (clang, -O0):
<fast_inv_sqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xee6(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
sar    $0x1,%rcx
mov    $0x5f3759df,%eax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
movss  0xe7b(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @fast_inv_sqrt(float %0) {
%2 = alloca float
%3 = alloca i64
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %2
store float 1.500000e+00, float* %6
%7 = load float, float* %2
%8 = fmul float %7, 5.000000e-01
store float %8, float* %4
%9 = load float, float* %2
store float %9, float* %5
%10 = bitcast float* %5 to i64*
%11 = load i64, i64* %10
store i64 %11, i64* %3
%12 = load i64, i64* %3
%13 = ashr i64 %12, 1
%14 = sub nsw i64 1597463007, %13
store i64 %14, i64* %3
%15 = bitcast i64* %3 to float*
%16 = load float, float* %15
store float %16, float* %5
%17 = load float, float* %5
%18 = load float, float* %4
%19 = load float, float* %5
%20 = fmul float %18, %19
%21 = load float, float* %5
%22 = fneg float %20
%23 = call float @llvm.fmuladd.f32(float %22, float %21, float 1.500000e+00)
%24 = fmul float %17, %23
store float %24, float* %5
%25 = load float, float* %5
ret float %25
}

LLVM IR (-O2):
define float @fast_inv_sqrt(float %0) {
ret float poison
}
void start_time(void) { (*(volatile unsigned char *)0x0029) |= 0x02; }


x86 assembly (clang, -O0):
<start_time>:
push   %rbp
mov    %rsp,%rbp
mov    $0x29,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x2,%eax
mov    %al,%cl
mov    $0x29,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_time>:
orb    $0x2,0x29
02
ret

LLVM IR (-O0):
define void @start_time() {
%1 = load volatile i8, i8* inttoptr (i64 41 to i8*)
%2 = zext i8 %1 to i32
%3 = or i32 %2, 2
%4 = trunc i32 %3 to i8
store volatile i8 %4, i8* inttoptr (i64 41 to i8*)
ret void
}

LLVM IR (-O2):
define void @start_time() {
%1 = load volatile i8, i8* inttoptr (i64 41 to i8*)
%2 = or i8 %1, 2
store volatile i8 %2, i8* inttoptr (i64 41 to i8*)
ret void
}
int line_isblank(char *line) {
  char *next;
  int rc;
  rc = 0;
  for (next = line; *next == ' '; next++)
    ;
  if (*next == '\n') {
    next++;
    if (*next == '\0')
      rc = 1;
  }
  return rc;
}


x86 assembly (clang, -O0):
<line_isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    113d <line_isblank+0x3d>
jmp    112c <line_isblank+0x2c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1117 <line_isblank+0x17>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1175 <line_isblank+0x75>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1170 <line_isblank+0x70>
movl   $0x1,-0x14(%rbp)
jmp    1175 <line_isblank+0x75>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_isblank>:
add    $0x1,%rdi
movzbl -0x1(%rdi),%eax
cmp    $0x20,%al
je     1100 <line_isblank>
cmp    $0xa,%al
jne    1119 <line_isblank+0x19>
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @line_isblank(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %12 [
i8 32, label %5
i8 10, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %3, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %2, %7
%13 = phi i32 [ %11, %7 ], [ 0, %2 ]
ret i32 %13
}
void CFGMR3RemoveNode(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3RemoveNode() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;
struct sshbuf {
  int dummy;
};

/* Variables and functions */
int ssh_digest_memory(int, int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/ *, size_t);
int /*<<< orphan*/ sshbuf_len(struct sshbuf const *);
int /*<<< orphan*/ sshbuf_ptr(struct sshbuf const *);
int ssh_digest_buffer(int alg, const struct sshbuf *b, u_char *d, size_t dlen) {
  return ssh_digest_memory(alg, sshbuf_ptr(b), sshbuf_len(b), d, dlen);
}


x86 assembly (clang, -O0):
<ssh_digest_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <sshbuf_ptr@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sshbuf_len@plt>
mov    -0x28(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    %eax,%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1050 <ssh_digest_memory@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssh_digest_buffer>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %edi,%r12d
mov    %rsi,%rdi
call   1040 <sshbuf_ptr@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <sshbuf_len@plt>
mov    %r12d,%edi
mov    %ebp,%esi
mov    %eax,%edx
mov    %r15,%rcx
mov    %r14,%r8
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <ssh_digest_memory@plt>

LLVM IR (-O0):
%struct.sshbuf = type { i32 }
define i32 @ssh_digest_buffer(i32 %0, %struct.sshbuf* %1, i32* %2, i64 %3) {
%5 = alloca i32
%6 = alloca %struct.sshbuf*
%7 = alloca i32*
%8 = alloca i64
store i32 %0, i32* %5
store %struct.sshbuf* %1, %struct.sshbuf** %6
store i32* %2, i32** %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load %struct.sshbuf*, %struct.sshbuf** %6
%11 = call i32 @sshbuf_ptr(%struct.sshbuf* %10)
%12 = load %struct.sshbuf*, %struct.sshbuf** %6
%13 = call i32 @sshbuf_len(%struct.sshbuf* %12)
%14 = load i32*, i32** %7
%15 = load i64, i64* %8
%16 = call i32 @ssh_digest_memory(i32 %9, i32 %11, i32 %13, i32* %14, i64 %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.sshbuf = type { i32 }
define i32 @ssh_digest_buffer(i32 %0, %struct.sshbuf* %1, i32* %2, i64 %3) {
%5 = tail call i32 @sshbuf_ptr(%struct.sshbuf* %1)
%6 = tail call i32 @sshbuf_len(%struct.sshbuf* %1)
%7 = tail call i32 @ssh_digest_memory(i32 %0, i32 %5, i32 %6, i32* %2, i64 %3)
ret i32 %7
}
/* Variables and functions */
unsigned long clock();
unsigned long rawclock(void) {
  static unsigned long base = 0;
  unsigned long rv;
  rv = clock();
  if (base == 0)
    base = rv;
  return rv - base;
}


x86 assembly (clang, -O0):
<rawclock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,0x2f05(%rip)
jne    113c <rawclock+0x2c>
mov    -0x8(%rbp),%rax
mov    %rax,0x2ef4(%rip)
mov    -0x8(%rbp),%rax
sub    0x2ee9(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rawclock>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
mov    0x2f11(%rip),%rcx
test   %rcx,%rcx
jne    112e <rawclock+0x1e>
mov    %rax,0x2f05(%rip)
mov    %rax,%rcx
sub    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@rawclock.base = internal global i64 0
define i64 @rawclock() {
%1 = alloca i64
%2 = call i64 (...) @clock()
store i64 %2, i64* %1
%3 = load i64, i64* @rawclock.base
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i64, i64* %1
store i64 %6, i64* @rawclock.base
br label %7
7: ; preds = %5, %0
%8 = load i64, i64* %1
%9 = load i64, i64* @rawclock.base
%10 = sub i64 %8, %9
ret i64 %10
}

LLVM IR (-O2):
@rawclock.base = internal unnamed_addr global i64 0
define i64 @rawclock() {
%1 = tail call i64 (...) @clock()
%2 = load i64, i64* @rawclock.base
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i64 %1, i64* @rawclock.base
br label %5
5: ; preds = %4, %0
%6 = phi i64 [ %1, %4 ], [ %2, %0 ]
%7 = sub i64 %1, %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x92() {
  Assert_real((isodigit(146) == 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_isodigit.c",
              735, ("isodigit should be 0 for 0x92"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x92\00"
define void @t_isodigit_0x92() {
%1 = tail call i64 @isodigit(i32 146)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 735, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CRYPTO_free(void *);
scalar_t__ CRYPTO_malloc(int, char *, int);
void *CRYPTO_remalloc(void *a, int num) {
  if (a != NULL)
    CRYPTO_free(a);
  a = (char *)CRYPTO_malloc((int)num,
                            "/scratch/repos/new/home/jordi_armengol_estape/"
                            "c-scraper/outputs/2022-01-22/02-19-57/repos/"
                            "AntonSizov/oscam/refs/heads/master/cscrypt/mem.c",
                            259);
  return (a);
}


x86 assembly (clang, -O0):
<CRYPTO_remalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1143 <CRYPTO_remalloc+0x23>
mov    -0x8(%rbp),%rdi
call   1030 <CRYPTO_free@plt>
mov    -0xc(%rbp),%edi
lea    0xeb3(%rip),%rsi
mov    $0x103,%edx
call   1040 <CRYPTO_malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_remalloc>:
push   %rbx
mov    %esi,%ebx
test   %rdi,%rdi
je     112d <CRYPTO_remalloc+0xd>
call   1030 <CRYPTO_free@plt>
lea    0xecc(%rip),%rsi
mov    %ebx,%edi
mov    $0x103,%edx
pop    %rbx
jmp    1040 <CRYPTO_malloc@plt>

LLVM IR (-O0):
@.str = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AntonSizov/oscam/refs/heads/master/cscrypt/mem.c\00"
define i8* @CRYPTO_remalloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @CRYPTO_free(i8* %8)
br label %10
10: ; preds = %7, %2
%11 = load i32, i32* %4
%12 = call i64 @CRYPTO_malloc(i32 %11, i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 259)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %3
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AntonSizov/oscam/refs/heads/master/cscrypt/mem.c\00"
define i8* @CRYPTO_remalloc(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @CRYPTO_free(i8* %0)
br label %6
6: ; preds = %4, %2
%7 = tail call i64 @CRYPTO_malloc(i32 %1, i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 259)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}
/* Variables and functions */
char const *level_name();
const char *f_level_name() { return level_name(); }


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

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

LLVM IR (-O0):
define i8* @f_level_name() {
%1 = call i8* (...) @level_name()
ret i8* %1
}

LLVM IR (-O2):
define i8* @f_level_name() {
%1 = tail call i8* (...) @level_name()
ret i8* %1
}
void ddprintf(const char *__format, ...) { (void)__format; }


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

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

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

LLVM IR (-O2):
define void @ddprintf(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int inportb(unsigned int);
int io_serial_is_transmit_fifo_empty(unsigned int com) {
  return inportb((com + 5)) & 0x20;
}


x86 assembly (clang, -O0):
<io_serial_is_transmit_fifo_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x5,%edi
call   1030 <inportb@plt>
and    $0x20,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_serial_is_transmit_fifo_empty>:
push   %rax
add    $0x5,%edi
call   1030 <inportb@plt>
and    $0x20,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @io_serial_is_transmit_fifo_empty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 5
%5 = call i32 @inportb(i32 %4)
%6 = and i32 %5, 32
ret i32 %6
}

LLVM IR (-O2):
define i32 @io_serial_is_transmit_fifo_empty(i32 %0) {
%2 = add i32 %0, 5
%3 = tail call i32 @inportb(i32 %2)
%4 = and i32 %3, 32
ret i32 %4
}
/* Type definitions */
struct terminal {
  int dummy;
};
struct parm_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ move_cursor(struct terminal *, int, int /*<<< orphan*/);
int sum(struct parm_t *);
void curs_down(struct terminal *term, void *arg) {
  int num = sum((struct parm_t *)arg);
  num = (num <= 0) ? 1 : num;
  move_cursor(term, num, 0);
}


x86 assembly (clang, -O0):
<curs_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sum@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1153 <curs_down+0x33>
mov    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1159 <curs_down+0x39>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
xor    %edx,%edx
call   1040 <move_cursor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curs_down>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <sum@plt>
test   %eax,%eax
mov    $0x1,%esi
cmovg  %eax,%esi
mov    %rbx,%rdi
xor    %edx,%edx
pop    %rbx
jmp    1040 <move_cursor@plt>

LLVM IR (-O0):
%struct.terminal = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_down(%struct.terminal* %0, i8* %1) {
%3 = alloca %struct.terminal*
%4 = alloca i8*
%5 = alloca i32
store %struct.terminal* %0, %struct.terminal** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to %struct.parm_t*
%8 = call i32 @sum(%struct.parm_t* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp sle i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
br label %14
12: ; preds = %2
%13 = load i32, i32* %5
br label %14
14: ; preds = %12, %11
%15 = phi i32 [ 1, %11 ], [ %13, %12 ]
store i32 %15, i32* %5
%16 = load %struct.terminal*, %struct.terminal** %3
%17 = load i32, i32* %5
%18 = call i32 @move_cursor(%struct.terminal* %16, i32 %17, i32 0)
ret void
}

LLVM IR (-O2):
%struct.terminal = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_down(%struct.terminal* %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.parm_t*
%4 = tail call i32 @sum(%struct.parm_t* %3)
%5 = icmp sgt i32 %4, 1
%6 = select i1 %5, i32 %4, i32 1
%7 = tail call i32 @move_cursor(%struct.terminal* %0, i32 %6, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ strlen(char *);
void cmdline_parser_print_version(void) {
  printf("%s %s\n",
         (strlen("tlist(trasker)") ? "tlist(trasker)" : "tlist(trasker)"),
         "0.0.10");
}


x86 assembly (clang, -O0):
<cmdline_parser_print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xedc(%rip),%rdi
call   1030 <strlen@plt>
lea    0xed0(%rip),%rsi
cmp    $0x0,%rax
cmovne %rsi,%rsi
lea    0xeba(%rip),%rdi
lea    0xec9(%rip),%rdx
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdline_parser_print_version>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xef1(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [15 x i8] c"tlist(trasker)\00"
@.str.2 = [7 x i8] c"0.0.10\00"
define void @cmdline_parser_print_version() {
%1 = call i64 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [15 x i8] c"tlist(trasker)\00"
@.str.2 = [7 x i8] c"0.0.10\00"
define void @cmdline_parser_print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_usage() {
  printf("Usage: %s [-b] [-d] [-h] [-v]\n", "batbeep");
  printf("Try '%s --help' for more information.\n", "batbeep");
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xf00(%rip),%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Usage: %s [-b] [-d] [-h] [-v]\0A\00"
@.str.1 = [8 x i8] c"batbeep\00"
@.str.2 = [39 x i8] c"Try '%s --help' for more information.\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Usage: %s [-b] [-d] [-h] [-v]\0A\00"
@.str.1 = [8 x i8] c"batbeep\00"
@.str.2 = [39 x i8] c"Try '%s --help' for more information.\0A\00"
define void @print_usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _UARTBaseValid(int);
void UARTEnableSIR(uint32_t ui32Base, bool bLowPower) {
  ASSERT(_UARTBaseValid(ui32Base));
  if (bLowPower) {
    (*((volatile uint32_t *)(ui32Base + 0x00000030))) |=
        (0x00000002 | 0x00000004);
  } else {
    (*((volatile uint32_t *)(ui32Base + 0x00000030))) |= (0x00000002);
  }
}


x86 assembly (clang, -O0):
<UARTEnableSIR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
cmpl   $0x0,-0x8(%rbp)
je     115b <UARTEnableSIR+0x3b>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%ecx
or     $0x6,%ecx
mov    %ecx,(%rax)
jmp    116a <UARTEnableSIR+0x4a>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%ecx
or     $0x2,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTEnableSIR>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
xor    %eax,%eax
test   %ebx,%ebx
setne  %al
movslq %ebp,%rcx
shl    $0x2,%eax
or     0x30(%rcx),%eax
or     $0x2,%eax
mov    %eax,0x30(%rcx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @UARTEnableSIR(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @_UARTBaseValid(i32 %5)
%7 = call i32 @ASSERT(i32 %6)
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %2
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 48
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
%15 = load volatile i32, i32* %14
%16 = or i32 %15, 6
store volatile i32 %16, i32* %14
br label %24
17: ; preds = %2
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 48
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load volatile i32, i32* %21
%23 = or i32 %22, 2
store volatile i32 %23, i32* %21
br label %24
24: ; preds = %17, %10
ret void
}

LLVM IR (-O2):
define void @UARTEnableSIR(i32 %0, i32 %1) {
%3 = tail call i32 @_UARTBaseValid(i32 %0)
%4 = tail call i32 @ASSERT(i32 %3)
%5 = icmp eq i32 %1, 0
%6 = add nsw i32 %0, 48
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = select i1 %5, i32 2, i32 6
%11 = or i32 %9, %10
store volatile i32 %11, i32* %8
ret void
}
int perform_analysis(char *iteration_num) {}


x86 assembly (clang, -O0):
<perform_analysis>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @perform_analysis(i8* nocapture readnone %0) {
ret i32 undef
}
float interp_step(float v0, float v1, float v2, float v3, float t) {
  return v1;
}


x86 assembly (clang, -O0):
<interp_step>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp_step>:
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @interp_step(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float, float* %7
ret float %11
}

LLVM IR (-O2):
define float @interp_step(float %0, float returned %1, float %2, float %3, float %4) {
ret float %1
}
/* Variables and functions */
int /*<<< orphan*/ make_manual(int);
void l_latex_manual_() { make_manual(1); }


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

x86 assembly (clang, -O2):
<l_latex_manual_>:
mov    $0x1,%edi
jmp    1030 <make_manual@plt>

LLVM IR (-O0):
define void @l_latex_manual_() {
%1 = call i32 @make_manual(i32 1)
ret void
}

LLVM IR (-O2):
define void @l_latex_manual_() {
%1 = tail call i32 @make_manual(i32 1)
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int main(int argc, char const *argv[]) { return strcmp("helloWORLD", "hello"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"helloWORLD\00"
@.str.1 = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @strcmp(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, s, c;
  scanf("%d", &a);
  s = a * a;
  printf("%d\n", s);
  c = s * a;
  printf("%d\n", c);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
imul   %ebx,%ebx
lea    0xec0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
imul   0x4(%rsp),%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = mul nsw i32 %7, %5
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
void atomic_inc_long(volatile long *var) {
  asm volatile("lock ;"
               " "
               "incl %0"
               " \n\t"
               : "=m"(*var)
               : "m"(*var)
               : "cc", "memory");
}


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

x86 assembly (clang, -O2):
<atomic_inc_long>:
lock incl (%rdi)
ret

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

LLVM IR (-O2):
define void @atomic_inc_long(i64* %0) {
tail call void asm sideeffect "lock ; incl $0 \0A\09", "=*m,*m,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %0, i64* elementtype(i64) %0)
ret void
}
int getLeft(int i) { return 2 * i; }


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

x86 assembly (clang, -O2):
<getLeft>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @getLeft(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "USAGE:\n"
                  "   dexeconfig [-M] [-p {w|W}] -i configfile dexefile\n"
                  "   dexeconfig -x configfile dexefile\n"
                  "   dexeconfig -v  dexefile\n"
                  "   dexeconfig -p {w|W}  dexefile\n\n"
                  "where is\n"
                  "   -i      insert a config file\n"
                  "   -x      extract a config file\n"
                  "   -p w    clear write permission\n"
                  "   -p W    set write permission\n"
                  "   -v      view status information\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [334 x i8] c"USAGE:\0A dexeconfig [-M] [-p {w|W}] -i configfile dexefile\0A dexeconfig -x configfile dexefile\0A dexeconfig -v dexefile\0A dexeconfig -p {w|W} dexefile\0A\0Awhere is\0A -i insert a config file\0A -x extract a config file\0A -p w clear write permission\0A -p W set write permission\0A -v view status information\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([334 x i8], [334 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [334 x i8] c"USAGE:\0A dexeconfig [-M] [-p {w|W}] -i configfile dexefile\0A dexeconfig -x configfile dexefile\0A dexeconfig -v dexefile\0A dexeconfig -p {w|W} dexefile\0A\0Awhere is\0A -i insert a config file\0A -x extract a config file\0A -p w clear write permission\0A -p W set write permission\0A -v view status information\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([334 x i8], [334 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int sigblock(int /*<<< orphan*/);
int siggetmask(void) { return sigblock(0); }


x86 assembly (clang, -O0):
<siggetmask>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <sigblock@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @siggetmask() {
%1 = call i32 @sigblock(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @siggetmask() {
%1 = tail call i32 @sigblock(i32 0)
ret i32 %1
}
int test_imm_32uint16_reg(unsigned short val) {
  return ((val) & (-0x32 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_32uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffffce,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_32uint16_reg>:
test   $0xffce,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_32uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -50
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int pffft_simd_size() { return 4; }


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

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

LLVM IR (-O0):
define i32 @pffft_simd_size() {
ret i32 4
}

LLVM IR (-O2):
define i32 @pffft_simd_size() {
ret i32 4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ strtoul(char const *, char **, int);
bool strtou32(const char *restrict str, uint32_t *restrict res) {
  char *end = NULL;
  *res = strtoul(str, &end, 10);
  return *str && !*end;
}


x86 assembly (clang, -O0):
<strtou32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1166 <strtou32+0x56>
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
setne  %al
xor    $0xff,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtou32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movq   $0x0,(%rsp)
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,(%r14)
cmpb   $0x0,(%rbx)
je     1145 <strtou32+0x35>
mov    (%rsp),%rcx
xor    %eax,%eax
cmpb   $0x0,(%rcx)
sete   %al
jmp    1147 <strtou32+0x37>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @strtou32(i8* noalias %0, i32* noalias %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8*
store i8* %0, i8** %3
store i32* %1, i32** %4
store i8* null, i8** %5
%6 = load i8*, i8** %3
%7 = call i32 @strtoul(i8* %6, i8** %5, i32 10)
%8 = load i32*, i32** %4
store i32 %7, i32* %8
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i8*, i8** %5
%15 = load i8, i8* %14
%16 = icmp ne i8 %15, 0
%17 = xor i1 %16, true
br label %18
18: ; preds = %13, %2
%19 = phi i1 [ false, %2 ], [ %17, %13 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @strtou32(i8* noalias %0, i32* noalias nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @strtoul(i8* %0, i8** %3, i32 10)
store i32 %5, i32* %1
%6 = load i8, i8* %0
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %8, %2
%14 = phi i32 [ 0, %2 ], [ %12, %8 ]
ret i32 %14
}
void gw_addref(struct gw_info *gw) {}


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

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

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

LLVM IR (-O2):
%struct.gw_info = type opaque
define void @gw_addref(%struct.gw_info* nocapture %0) {
ret void
}