xunge/DecIR huggingface dataset:
/* Variables and functions */
int errno;
int rename(char const *, char const *);
void move_f_(const char *pathprev, const char *pathfinal, int *ierr) {
  if (*ierr = rename(pathprev, pathfinal))
    *ierr = errno;
}


x86 assembly (clang, -O0):
<move_f_>:
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
call   1030 <rename@plt>
mov    -0x18(%rbp),%rcx
mov    %eax,(%rcx)
cmp    $0x0,%eax
je     114f <move_f_+0x3f>
mov    0x2e99(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_f_>:
push   %rbx
mov    %rdx,%rbx
call   1030 <rename@plt>
mov    %eax,(%rbx)
test   %eax,%eax
je     112a <move_f_+0x1a>
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i32 0
define void @move_f_(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 = call i32 @rename(i8* %7, i8* %8)
%10 = load i32*, i32** %6
store i32 %9, i32* %10
%11 = icmp ne i32 %9, 0
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = load i32, i32* @errno
%14 = load i32*, i32** %6
store i32 %13, i32* %14
br label %15
15: ; preds = %12, %3
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @move_f_(i8* nocapture %0, i8* nocapture %1, i32* nocapture writeonly %2) {
%4 = tail call i32 @rename(i8* %0, i8* %1)
store i32 %4, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = load i32, i32* @errno
store i32 %7, i32* %2
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  if (n == 0) {
    printf("Zero");
  } else if (n > 0) {
    printf("Positive");
  } else {
    printf("Negative");
  }
  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>
cmpl   $0x0,-0x8(%rbp)
jne    115a <main+0x3a>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    1186 <main+0x66>
cmpl   $0x0,-0x8(%rbp)
jle    1175 <main+0x55>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    1181 <main+0x61>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    1186 <main+0x66>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
lea    0xeca(%rip),%rax
lea    0xecc(%rip),%rcx
cmovg  %rax,%rcx
lea    0xeb3(%rip),%rdi
cmovne %rcx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"Zero\00"
@.str.2 = [9 x i8] c"Positive\00"
@.str.3 = [9 x i8] c"Negative\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %16
8: ; preds = %0
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %15
13: ; preds = %8
%14 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
br label %16
16: ; preds = %15, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"Zero\00"
@.str.2 = [9 x i8] c"Positive\00"
@.str.3 = [9 x i8] c"Negative\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 = icmp eq i32 %4, 0
%6 = icmp sgt i32 %4, 0
%7 = select i1 %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0)
%8 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %7
%9 = call i32 @printf(i8* dereferenceable(1) %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ moment1(int, double *);
double pow(int /*<<< orphan*/, double);
double moment1sq(int n, double *v) { return pow(moment1(n, v), 2.0); }


x86 assembly (clang, -O0):
<moment1sq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <moment1@plt>
mov    %eax,%edi
movsd  0xebb(%rip),%xmm0
call   1040 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<moment1sq>:
push   %rax
call   1030 <moment1@plt>
movsd  0xed2(%rip),%xmm0
mov    %eax,%edi
pop    %rax
jmp    1040 <pow@plt>

LLVM IR (-O0):
define double @moment1sq(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load i32, i32* %3
%6 = load double*, double** %4
%7 = call i32 @moment1(i32 %5, double* %6)
%8 = call double @pow(i32 %7, double 2.000000e+00)
ret double %8
}

LLVM IR (-O2):
define double @moment1sq(i32 %0, double* %1) {
%3 = tail call i32 @moment1(i32 %0, double* %1)
%4 = tail call double @pow(i32 %3, double 2.000000e+00)
ret double %4
}
void closelog(void) {}


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

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

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

LLVM IR (-O2):
define void @closelog() {
ret void
}
char **check_pptr_CA_SPAWN_CMDchar(char **v) { return v; }


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

x86 assembly (clang, -O2):
<check_pptr_CA_SPAWN_CMDchar>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8** @check_pptr_CA_SPAWN_CMDchar(i8** readnone returned %0) {
ret i8** %0
}
int do_497() { return 497; }


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

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

LLVM IR (-O0):
define i32 @do_497() {
ret i32 497
}

LLVM IR (-O2):
define i32 @do_497() {
ret i32 497
}
void X509_SIG_free(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_SIG_free() {
ret void
}
/* Type definitions */
typedef int const uint32_t;

/* Variables and functions */
uint32_t functionG(const uint32_t b, const uint32_t c, const uint32_t d) {
  return (b & d) | (c & ~d);
}


x86 assembly (clang, -O0):
<functionG>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<functionG>:
mov    %edi,%eax
xor    %esi,%eax
and    %edx,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @functionG(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* %4
%8 = load i32, i32* %6
%9 = and i32 %7, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = xor i32 %11, -1
%13 = and i32 %10, %12
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @functionG(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, %0
%5 = xor i32 %2, -1
%6 = and i32 %5, %1
%7 = or i32 %4, %6
ret i32 %7
}
int read_to_comma(char *Line) {
  int Count;
  Count = 0;
  while ((Line[Count] != ',') && (Count < 79)) {
    Count++;
  }
  return Count;
}


x86 assembly (clang, -O0):
<read_to_comma>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x2c,%ecx
mov    %al,-0xd(%rbp)
je     1133 <read_to_comma+0x33>
cmpl   $0x4f,-0xc(%rbp)
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1143 <read_to_comma+0x43>
jmp    1151 <read_to_comma+0x51>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <read_to_comma+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_to_comma>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x2c,(%rdi,%rcx,1)
je     1123 <read_to_comma+0x23>
cmp    $0x4f,%rcx
mov    %rax,%rcx
jb     1110 <read_to_comma+0x10>
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @read_to_comma(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 44
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 79
br label %15
15: ; preds = %12, %4
%16 = phi i1 [ false, %4 ], [ %14, %12 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %4
20: ; preds = %15
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @read_to_comma(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %9, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 44
%7 = icmp ult i64 %3, 79
%8 = select i1 %6, i1 %7, i1 false
%9 = add nuw nsw i64 %3, 1
br i1 %8, label %2, label %10
10: ; preds = %2
%11 = trunc i64 %3 to i32
ret i32 %11
}
void nop(void) { __asm__ __volatile__("nop\n\t" ::); }


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

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

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

LLVM IR (-O2):
define void @nop() {
tail call void asm sideeffect "nop\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void I2CSlaveIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  uint32_t ui32Val;
  ;

  ;
  ui32Val = (*((volatile unsigned long *)(0x40002000 + 0x0000000C)));
  ui32Val &= ~ui32IntFlags;
  (*((volatile unsigned long *)(0x40002000 + 0x0000000C))) = ui32Val;
}


x86 assembly (clang, -O0):
<I2CSlaveIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4000200c,%eax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
mov    -0x18(%rbp),%rax
and    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x4000200c,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveIntDisable>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    0x4000200c,%rax
40
mov    %rax,-0x18(%rsp)
mov    -0x10(%rsp),%rax
not    %rax
and    %rax,-0x18(%rsp)
mov    -0x18(%rsp),%rax
mov    %rax,0x4000200c
40
ret

LLVM IR (-O0):
define void @I2CSlaveIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%6 = load volatile i64, i64* inttoptr (i64 1073750028 to i64*)
store volatile i64 %6, i64* %5
%7 = load volatile i64, i64* %4
%8 = xor i64 %7, -1
%9 = load volatile i64, i64* %5
%10 = and i64 %9, %8
store volatile i64 %10, i64* %5
%11 = load volatile i64, i64* %5
store volatile i64 %11, i64* inttoptr (i64 1073750028 to i64*)
ret void
}

LLVM IR (-O2):
define void @I2CSlaveIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%6 = bitcast i64* %5 to i8*
%7 = load volatile i64, i64* inttoptr (i64 1073750028 to i64*)
store volatile i64 %7, i64* %5
%8 = load volatile i64, i64* %4
%9 = xor i64 %8, -1
%10 = load volatile i64, i64* %5
%11 = and i64 %10, %9
store volatile i64 %11, i64* %5
%12 = load volatile i64, i64* %5
store volatile i64 %12, i64* inttoptr (i64 1073750028 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void pic_acknowledge(unsigned int interrupt) {
  if (interrupt < 0x20 || interrupt > 0x28 + 7) {
    return;
  }
  if (interrupt >= 0x28) {
    outb(0xA0, 0x20);
  }
  outb(0x20, 0x20);
}


x86 assembly (clang, -O0):
<pic_acknowledge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jb     112f <pic_acknowledge+0x1f>
cmpl   $0x2f,-0x4(%rbp)
jbe    1134 <pic_acknowledge+0x24>
jmp    1159 <pic_acknowledge+0x49>
cmpl   $0x28,-0x4(%rbp)
jb     114d <pic_acknowledge+0x3d>
mov    $0xa0,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x20,%esi
mov    %esi,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic_acknowledge>:
lea    -0x30(%rdi),%eax
cmp    $0xfffffff0,%eax
jae    1119 <pic_acknowledge+0x9>
ret
cmp    $0x28,%edi
jb     1132 <pic_acknowledge+0x22>
push   %rax
mov    $0xa0,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
add    $0x8,%rsp
mov    $0x20,%edi
mov    $0x20,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @pic_acknowledge(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ugt i32 %6, 47
br i1 %7, label %8, label %9
8: ; preds = %5, %1
br label %16
9: ; preds = %5
%10 = load i32, i32* %2
%11 = icmp uge i32 %10, 40
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @outb(i32 160, i32 32)
br label %14
14: ; preds = %12, %9
%15 = call i32 @outb(i32 32, i32 32)
br label %16
16: ; preds = %14, %8
ret void
}

LLVM IR (-O2):
define void @pic_acknowledge(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, -16
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = icmp ugt i32 %0, 39
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @outb(i32 160, i32 32)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 @outb(i32 32, i32 32)
br label %10
10: ; preds = %1, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  int a, b, c;
  scanf("%d", &num);
  printf("%d\n", num % 10 * 100 + num / 10 % 10 * 10 + num / 100);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
imul   $0x64,%edx,%esi
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
imul   $0xa,%edx,%eax
add    %eax,%esi
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
add    %eax,%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
imul   $0x51eb851f,%rax,%rsi
sub    %edx,%eax
imul   $0x64,%eax,%eax
movslq %ecx,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rdx
add    %edi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
mov    %rsi,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rsi
add    %edx,%esi
add    %eax,%esi
lea    (%rsi,%rcx,2),%esi
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
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
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = srem i32 %7, 10
%9 = mul nsw i32 %8, 100
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 10
%12 = srem i32 %11, 10
%13 = mul nsw i32 %12, 10
%14 = add nsw i32 %9, %13
%15 = load i32, i32* %2
%16 = sdiv i32 %15, 100
%17 = add nsw i32 %14, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %17)
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 = srem i32 %4, 10
%6 = mul nsw i32 %5, 100
%7 = sdiv i32 %4, 10
%8 = srem i32 %7, 10
%9 = mul nsw i32 %8, 10
%10 = sdiv i32 %4, 100
%11 = add nsw i32 %6, %10
%12 = add nsw i32 %11, %9
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRE1_get(void) { return U_WMRCORENONE_get("U_WMRE1"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRE1\00"
define i32 @U_WMRE1_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRE1\00"
define i32 @U_WMRE1_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ sem_t;

/* Variables and functions */
int sem_destroy(sem_t *sem) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sem_destroy(i32* nocapture readnone %0) {
ret i32 0
}
void swap_ptr(void *v1, void *v2) {
  void *tmp = v1;
  v1 = v2;
  v2 = tmp;
}


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

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

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

LLVM IR (-O2):
define void @swap_ptr(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x64() {
  Assert_real((isspace(100) == 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_isspace.c",
              505, ("isspace should be 0 for d"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x64>:
push   %rax
mov    $0x64,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1f9,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for d\00"
define void @t_isspace_0x64() {
%1 = call i64 @isspace(i32 100)
%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 505, i8* getelementptr inbounds ([26 x i8], [26 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for d\00"
define void @t_isspace_0x64() {
%1 = tail call i64 @isspace(i32 100)
%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 505, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
char *strncpyz(char *dst, const char *src, size_t len) {
  if (dst && len >= 0) {
    if (src) {
      strncpy(dst, src, len);
      dst[len] = '\0';
    } else
      *dst = '\0';
  }
  return dst;
}


x86 assembly (clang, -O0):
<strncpyz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1173 <strncpyz+0x63>
cmpq   $0x0,-0x18(%rbp)
jb     1173 <strncpyz+0x63>
cmpq   $0x0,-0x10(%rbp)
je     1167 <strncpyz+0x57>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    116e <strncpyz+0x5e>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    1173 <strncpyz+0x63>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpyz>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %rdi,%rdi
je     1138 <strncpyz+0x28>
mov    %rbx,%rax
test   %rsi,%rsi
je     1135 <strncpyz+0x25>
mov    %rdx,%r14
mov    %rbx,%rdi
call   1030 <strncpy@plt>
add    %rbx,%r14
mov    %r14,%rax
movb   $0x0,(%rax)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strncpyz(i8* returned %0, i8* %1, i64 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = icmp eq i8* %1, null
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = tail call i32 @strncpy(i8* %0, i8* %1, i64 %2)
%9 = getelementptr inbounds i8, i8* %0, i64 %2
br label %10
10: ; preds = %5, %7
%11 = phi i8* [ %9, %7 ], [ %0, %5 ]
store i8 0, i8* %11
br label %12
12: ; preds = %10, %3
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
void omp_init_lock(omp_lock_t *lock) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ BUFSIZ;
int /*<<< orphan*/ _DIAGASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _IOFBF;
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void setbuf(FILE *fp, char *buf) {
  _DIAGASSERT(fp != NULL);
  (void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
}


x86 assembly (clang, -O0):
<setbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <_DIAGASSERT@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116e <setbuf+0x4e>
mov    0x2e6c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
jmp    117a <setbuf+0x5a>
mov    0x2e73(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    0x2e4c(%rip),%rax
mov    (%rax),%ecx
call   1040 <setvbuf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbuf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <_DIAGASSERT@plt>
test   %r14,%r14
jne    1146 <setbuf+0x26>
mov    0x2ea4(%rip),%rax
jmp    114d <setbuf+0x2d>
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    0x2e82(%rip),%rax
mov    (%rax),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <setvbuf@plt>

LLVM IR (-O0):
@_IOFBF = global i32 0
@_IONBF = global i32 0
@BUFSIZ = global i32 0
define void @setbuf(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @_DIAGASSERT(i32 %7)
%9 = load i32*, i32** %3
%10 = load i8*, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load i32, i32* @_IOFBF
br label %17
15: ; preds = %2
%16 = load i32, i32* @_IONBF
br label %17
17: ; preds = %15, %13
%18 = phi i32 [ %14, %13 ], [ %16, %15 ]
%19 = load i32, i32* @BUFSIZ
%20 = call i32 @setvbuf(i32* %9, i8* %10, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
@_IOFBF = global i32 0
@_IONBF = global i32 0
@BUFSIZ = global i32 0
define void @setbuf(i32* %0, i8* %1) {
%3 = icmp ne i32* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @_DIAGASSERT(i32 %4)
%6 = icmp eq i8* %1, null
%7 = load i32, i32* @_IOFBF
%8 = load i32, i32* @_IONBF
%9 = select i1 %6, i32 %8, i32 %7
%10 = load i32, i32* @BUFSIZ
%11 = tail call i32 @setvbuf(i32* %0, i8* %1, i32 %9, i32 %10)
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t LCDIDDIndexedRead(uint32_t ui32Base, uint32_t ui32CS,
                           uint16_t ui16Addr) {
  uint32_t ui32Addr;
  ;
  ;
  ui32Addr = ui32CS ? 0x00000020 : 0x00000014;
  (*((volatile uint32_t *)(ui32Base + ui32Addr))) = ui16Addr;
  ui32Addr = ui32CS ? 0x00000024 : 0x00000018;
  return ((uint16_t)(*((volatile uint32_t *)(ui32Base + ui32Addr))));
}


x86 assembly (clang, -O0):
<LCDIDDIndexedRead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x14,%eax
mov    $0x20,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    -0x10(%rbp),%eax
cltq
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
mov    $0x18,%eax
mov    $0x24,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x10(%rbp),%eax
cltq
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDIDDIndexedRead>:
test   %esi,%esi
mov    $0x14,%eax
mov    $0x20,%ecx
cmove  %eax,%ecx
movslq %edi,%rax
mov    %edx,(%rcx,%rax,1)
mov    $0x18,%ecx
mov    $0x24,%edx
cmove  %ecx,%edx
mov    (%rdx,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @LCDIDDIndexedRead(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 32, i32 20
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %4
%14 = load i32, i32* %7
%15 = add nsw i32 %13, %14
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
store volatile i32 %12, i32* %17
%18 = load i32, i32* %5
%19 = icmp ne i32 %18, 0
%20 = zext i1 %19 to i64
%21 = select i1 %19, i32 36, i32 24
store i32 %21, i32* %7
%22 = load i32, i32* %4
%23 = load i32, i32* %7
%24 = add nsw i32 %22, %23
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to i32*
%27 = load volatile i32, i32* %26
ret i32 %27
}

LLVM IR (-O2):
define i32 @LCDIDDIndexedRead(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, i32 20, i32 32
%6 = add nsw i32 %5, %0
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store volatile i32 %2, i32* %8
%9 = select i1 %4, i32 24, i32 36
%10 = add nsw i32 %9, %0
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
ret i32 %13
}
void pramcache_save_page_cache(struct super_block *sb, int nosync) {}


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

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

LLVM IR (-O0):
%struct.super_block = type opaque
define void @pramcache_save_page_cache(%struct.super_block* %0, i32 %1) {
%3 = alloca %struct.super_block*
%4 = alloca i32
store %struct.super_block* %0, %struct.super_block** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.super_block = type opaque
define void @pramcache_save_page_cache(%struct.super_block* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void bar(void) {
  typedef int typedef_name_and_label;
  typedef_name_and_label i;
  i = 0;
typedef_name_and_label:
loop:
  if (i >= 5)
    goto end;
  printf("%d\n", i++);
  goto loop;
end:;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
jmp    1124 <bar+0x14>
cmpl   $0x5,-0x4(%rbp)
jl     1133 <bar+0x23>
jmp    114f <bar+0x3f>
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
jmp    1124 <bar+0x14>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @bar() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
int clamp(int /*<<< orphan*/);
int /*<<< orphan*/ strtoul(char *, int /*<<< orphan*/ *, int);
int num_arg(char *arg) { return clamp(strtoul(arg, NULL, 10)); }


x86 assembly (clang, -O0):
<num_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %eax,%edi
call   1030 <clamp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_arg>:
push   %rax
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <clamp@plt>

LLVM IR (-O0):
define i32 @num_arg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strtoul(i8* %3, i32* null, i32 10)
%5 = call i32 @clamp(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @num_arg(i8* nocapture %0) {
%2 = tail call i32 @strtoul(i8* nocapture %0, i32* null, i32 10)
%3 = tail call i32 @clamp(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ smbhash(unsigned char *, unsigned char *, unsigned char *,
                           int);
void cred_hash1(unsigned char *out, unsigned char *in, unsigned char *key) {
  unsigned char buf[8];
  smbhash(buf, in, key, 1);
  smbhash(out, buf, key + 9, 1);
}


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

x86 assembly (clang, -O2):
<cred_hash1>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %rdi,%r14
lea    0x8(%rsp),%r15
mov    %r15,%rdi
mov    $0x1,%ecx
call   1030 <smbhash@plt>
add    $0x9,%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    $0x1,%ecx
call   1030 <smbhash@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @cred_hash1(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [8 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @smbhash(i8* %8, i8* %9, i8* %10, i32 1)
%12 = load i8*, i8** %4
%13 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%14 = load i8*, i8** %6
%15 = getelementptr inbounds i8, i8* %14, i64 9
%16 = call i32 @smbhash(i8* %12, i8* %13, i8* %15, i32 1)
ret void
}

LLVM IR (-O2):
define void @cred_hash1(i8* %0, i8* %1, i8* %2) {
%4 = alloca [8 x i8]
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%6 = call i32 @smbhash(i8* %5, i8* %1, i8* %2, i32 1)
%7 = getelementptr inbounds i8, i8* %2, i64 9
%8 = call i32 @smbhash(i8* %0, i8* %5, i8* %7, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
void ClearWindow(long id) { printf("\033GC%ld:", id); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\1BGC%ld:\00"
define void @ClearWindow(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1BGC%ld:\00"
define void @ClearWindow(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Variables and functions */
int exp(double);
double M(double r, double R0, double alpha) {
  return exp(-2. * alpha * (r - R0)) - 2. * exp(-alpha * (r - R0));
}


x86 assembly (clang, -O0):
<M>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  -0x20(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M>:
sub    $0x28,%rsp
movapd %xmm2,0x10(%rsp)
movapd %xmm0,%xmm3
movsd  0xeda(%rip),%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm1,%xmm3
movsd  %xmm3,(%rsp)
mulsd  %xmm3,%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
xorpd  0xeb9(%rip),%xmm0
mulsd  (%rsp),%xmm0
call   1030 <exp@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm1
movsd  0x8(%rsp),%xmm0
subsd  %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @M(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = fmul double -2.000000e+00, %7
%9 = load double, double* %4
%10 = load double, double* %5
%11 = fsub double %9, %10
%12 = fmul double %8, %11
%13 = call i32 @exp(double %12)
%14 = sitofp i32 %13 to double
%15 = load double, double* %6
%16 = fneg double %15
%17 = load double, double* %4
%18 = load double, double* %5
%19 = fsub double %17, %18
%20 = fmul double %16, %19
%21 = call i32 @exp(double %20)
%22 = sitofp i32 %21 to double
%23 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %22, double %14)
ret double %23
}

LLVM IR (-O2):
define double @M(double %0, double %1, double %2) {
%4 = fmul double %2, -2.000000e+00
%5 = fsub double %0, %1
%6 = fmul double %5, %4
%7 = tail call i32 @exp(double %6)
%8 = sitofp i32 %7 to double
%9 = fneg double %2
%10 = fmul double %5, %9
%11 = tail call i32 @exp(double %10)
%12 = sitofp i32 %11 to double
%13 = tail call double @llvm.fmuladd.f64(double %12, double -2.000000e+00, double %8)
ret double %13
}
/* Type definitions */
typedef int /*<<< orphan*/ command;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int /*<<< orphan*/ stdout;
void show_cursor(void) {
  char command[13];
  snprintf(command, sizeof(command), "%c[?25h", 0x1B);
  fprintf(stdout, "%s", command);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<show_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xd(%rbp),%rdi
mov    $0xd,%esi
lea    0xeb8(%rip),%rdx
mov    $0x1b,%ecx
call   1030 <snprintf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    -0xd(%rbp),%rdx
lea    0xea2(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_cursor>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xec2(%rip),%rdx
lea    0xb(%rsp),%r14
mov    %r14,%rdi
mov    $0xd,%esi
mov    $0x1b,%ecx
call   1030 <snprintf@plt>
mov    0x2e84(%rip),%rbx
mov    (%rbx),%edi
lea    0xea3(%rip),%rsi
mov    %r14,%rdx
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%c[?25h\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @show_cursor() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 27)
%4 = load i32, i32* @stdout
%5 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%c[?25h\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @show_cursor() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 27)
%4 = load i32, i32* @stdout
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
ret void
}
int fe_mdio_init(struct fe_priv *priv) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.fe_priv = type opaque
define i32 @fe_mdio_init(%struct.fe_priv* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
void main() {
  int km, mi;
  printf("Please enter an integer speed in kilometers per hour: ");
  scanf("%d", &km);
  mi = (km * 621) / 1000;
  printf("%d km/hr is equivalent to %d miles/hr", km, mi);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
imul   $0x26d,-0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
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    0xf01(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
imul   $0x26d,%esi,%eax
cltq
imul   $0x10624dd3,%rax,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x26,%rdx
add    %eax,%edx
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [55 x i8] c"Please enter an integer speed in kilometers per hour: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [38 x i8] c"%d km/hr is equivalent to %d miles/hr\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = mul nsw i32 %5, 621
%7 = sdiv i32 %6, 1000
store i32 %7, i32* %2
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"Please enter an integer speed in kilometers per hour: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [38 x i8] c"%d km/hr is equivalent to %d miles/hr\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = mul nsw i32 %5, 621
%7 = sdiv i32 %6, 1000
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __le16;

/* Variables and functions */
int /*<<< orphan*/ BUG();
int /*<<< orphan*/ cpu_to_le16(unsigned int);
__le16 nilfs_rec_len_to_disk(unsigned len) {
  if (len == (1 << 16))
    return cpu_to_le16(((1 << 16) - 1));
  else if (len > (1 << 16))
    BUG();
  return cpu_to_le16(len);
}


x86 assembly (clang, -O0):
<nilfs_rec_len_to_disk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x10000,-0x8(%rbp)
jne    114a <nilfs_rec_len_to_disk+0x2a>
mov    $0xffff,%edi
call   1040 <cpu_to_le16@plt>
mov    %eax,-0x4(%rbp)
jmp    116e <nilfs_rec_len_to_disk+0x4e>
cmpl   $0x10000,-0x8(%rbp)
jbe    115e <nilfs_rec_len_to_disk+0x3e>
mov    $0x0,%al
call   1030 <BUG@plt>
jmp    1163 <nilfs_rec_len_to_disk+0x43>
mov    -0x8(%rbp),%edi
call   1040 <cpu_to_le16@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nilfs_rec_len_to_disk>:
push   %rbx
mov    %edi,%ebx
mov    $0xffff,%edi
cmp    $0x10000,%ebx
je     113b <nilfs_rec_len_to_disk+0x1b>
jbe    1139 <nilfs_rec_len_to_disk+0x19>
xor    %eax,%eax
call   1030 <BUG@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <cpu_to_le16@plt>

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

LLVM IR (-O2):
define i32 @nilfs_rec_len_to_disk(i32 %0) {
%2 = icmp eq i32 %0, 65536
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = icmp ugt i32 %0, 65536
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 (...) @BUG()
br label %7
7: ; preds = %5, %3, %1
%8 = phi i32 [ 65535, %1 ], [ %0, %3 ], [ %0, %5 ]
%9 = tail call i32 @cpu_to_le16(i32 %8)
ret i32 %9
}
/* Variables and functions */
char *strrchr(char const *, char);
char const *basename_(char const name[]) {
  char const *last = strrchr(name, '/');
  return last ? last + 1 : name;
}


x86 assembly (clang, -O0):
<basename_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <basename_+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <basename_+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename_>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @basename_(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}