xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void Print_Bits(signed int code, signed int bits, signed int len) {
  signed int i = 0;
  while (!(i >= len)) {
    printf("%d", code >> (bits - 1) - i & 1);
    i = i + 1;
  }
}


x86 assembly (clang, -O0):
<Print_Bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
setge  %al
xor    $0xff,%al
test   $0x1,%al
jne    1140 <Print_Bits+0x30>
jmp    116b <Print_Bits+0x5b>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
sub    -0x10(%rbp),%ecx
sar    %cl,%esi
and    $0x1,%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <Print_Bits+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Print_Bits>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    114a <Print_Bits+0x3a>
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
add    $0xffffffff,%ebp
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
mov    %r14d,%esi
mov    %ebp,%ecx
shr    %cl,%esi
and    $0x1,%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
add    $0xffffffff,%ebx
jne    1130 <Print_Bits+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @Print_Bits(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
store i32 0, i32* %7
br label %8
8: ; preds = %13, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp sge i32 %9, %10
%12 = xor i1 %11, true
br i1 %12, label %13, label %24
13: ; preds = %8
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, 1
%17 = load i32, i32* %7
%18 = sub nsw i32 %16, %17
%19 = ashr i32 %14, %18
%20 = and i32 %19, 1
%21 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %8
24: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @Print_Bits(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3, %5
%6 = phi i32 [ %12, %5 ], [ 0, %3 ]
%7 = xor i32 %6, -1
%8 = add i32 %7, %1
%9 = lshr i32 %0, %8
%10 = and i32 %9, 1
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %12, %2
br i1 %13, label %14, label %5
14: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
unsigned int plusccia(unsigned int a, unsigned int b) {
  unsigned int sum = a + b;
  if (sum < a)
    abort();
  return sum;
}


x86 assembly (clang, -O0):
<plusccia>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    113a <plusccia+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plusccia>:
add    %esi,%edi
jb     1117 <plusccia+0x7>
mov    %edi,%eax
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @plusccia(i32 %0, i32 %1) {
%3 = add i32 %1, %0
%4 = icmp ult i32 %3, %0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i32 %3
}
__attribute__((weak)) void timerISR() {}


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

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

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

LLVM IR (-O2):
define weak void @timerISR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("translator from long type time into time format\n");
  printf("\t -h|--help for help\n");
  printf("\t -v|--version for version\n");
}


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

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf15(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"translator from long type time into time format\0A\00"
@.str.1 = [22 x i8] c"\09 -h|--help for help\0A\00"
@.str.2 = [28 x i8] c"\09 -v|--version for version\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [48 x i8] c"translator from long type time into time format\00"
@str.3 = [21 x i8] c"\09 -h|--help for help\00"
@str.4 = [27 x i8] c"\09 -v|--version for version\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.4, i64 0, i64 0))
ret void
}
int func(int n) { return n; }


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

x86 assembly (clang, -O2):
<func>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @func(i32 returned %0) {
ret i32 %0
}
int stack_array_empty(struct Stack *s) {}


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

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

LLVM IR (-O0):
%struct.Stack = type opaque
define i32 @stack_array_empty(%struct.Stack* %0) {
%2 = alloca i32
%3 = alloca %struct.Stack*
store %struct.Stack* %0, %struct.Stack** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.Stack = type opaque
define i32 @stack_array_empty(%struct.Stack* nocapture readnone %0) {
ret i32 undef
}
void nrom_initialize_mapper() { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @sws_allocVec() {
ret void
}
int main() {
  char arr[] = {"ABCEFGH"};
  int k;
  for (k = strlen(arr) - 1; k >= 0; k--) {
    printf("%c", arr[k]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%rax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1179 <main+0x59>
movslq -0x10(%rbp),%rax
movsbl -0xc(%rbp,%rax,1),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    114a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x48,%edi
call   1030 <putchar@plt>
mov    $0x47,%edi
call   1030 <putchar@plt>
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x43,%edi
call   1030 <putchar@plt>
mov    $0x42,%edi
call   1030 <putchar@plt>
mov    $0x41,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.arr = [8 x i8] c"ABCEFGH\00"
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [8 x i8]* %2 to i8*
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%6 = call i64 @strlen(i8* %5)
%7 = sub i64 %6, 1
%8 = trunc i64 %7 to i32
store i32 %8, i32* %3
br label %9
9: ; preds = %19, %0
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %9
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %12
%20 = load i32, i32* %3
%21 = add nsw i32 %20, -1
store i32 %21, i32* %3
br label %9
22: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 72)
%2 = tail call i32 @putchar(i32 71)
%3 = tail call i32 @putchar(i32 70)
%4 = tail call i32 @putchar(i32 69)
%5 = tail call i32 @putchar(i32 67)
%6 = tail call i32 @putchar(i32 66)
%7 = tail call i32 @putchar(i32 65)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void use_aeskey(uint32_t keyno) {
  if (keyno > 0x3F)
    return;
  *((volatile uint8_t *)0x10009010) = keyno;
  *((volatile uint32_t *)0x10009000) =
      *((volatile uint32_t *)0x10009000) | 0x04000000;
}


x86 assembly (clang, -O0):
<use_aeskey>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3f,-0x4(%rbp)
jle    1116 <use_aeskey+0x16>
jmp    1134 <use_aeskey+0x34>
mov    -0x4(%rbp),%ecx
mov    $0x10009010,%eax
mov    %ecx,(%rax)
mov    $0x10009000,%eax
mov    (%rax),%ecx
or     $0x4000000,%ecx
mov    $0x10009000,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_aeskey>:
cmp    $0x3f,%edi
jg     1117 <use_aeskey+0x17>
mov    %edi,0x10009010
orl    $0x4000000,0x10009000
ret

LLVM IR (-O0):
define void @use_aeskey(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 63
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load i32, i32* %2
store volatile i32 %7, i32* inttoptr (i64 268472336 to i32*)
%8 = load volatile i32, i32* inttoptr (i64 268472320 to i32*)
%9 = or i32 %8, 67108864
store volatile i32 %9, i32* inttoptr (i64 268472320 to i32*)
br label %10
10: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @use_aeskey(i32 %0) {
%2 = icmp sgt i32 %0, 63
br i1 %2, label %6, label %3
3: ; preds = %1
store volatile i32 %0, i32* inttoptr (i64 268472336 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 268472320 to i32*)
%5 = or i32 %4, 67108864
store volatile i32 %5, i32* inttoptr (i64 268472320 to i32*)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ngen(char *, char *, int);
void cgdec2pi(int v) { ngen("%s\t$%d,(%%edx)", "subl", v); }


x86 assembly (clang, -O0):
<cgdec2pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <ngen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgdec2pi>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xeef(%rip),%rsi
jmp    1030 <ngen@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s\09$%d,(%%edx)\00"
@.str.1 = [5 x i8] c"subl\00"
define void @cgdec2pi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ngen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s\09$%d,(%%edx)\00"
@.str.1 = [5 x i8] c"subl\00"
define void @cgdec2pi(i32 %0) {
%2 = tail call i32 @ngen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ stringTreeRealloc_(void *, int /*<<< orphan*/);
void stringTreeFree_(void *ptr) {
  assert(ptr != NULL);
  stringTreeRealloc_(ptr, 0);
}


x86 assembly (clang, -O0):
<stringTreeFree_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <stringTreeRealloc_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringTreeFree_>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1030 <stringTreeRealloc_@plt>

LLVM IR (-O0):
define void @stringTreeFree_(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 @stringTreeRealloc_(i8* %7, i32 0)
ret void
}

LLVM IR (-O2):
define void @stringTreeFree_(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @stringTreeRealloc_(i8* %0, i32 0)
ret void
}
void mp_load_1(int n, int radix, int out[]) {
  int j;
  short int *outdgt;
  outdgt = (short int *)&out[2];
  out[0] = 1;
  out[1] = 0;
  outdgt[0] = 1;
  for (j = 1; j < n; j++) {
    outdgt[j] = 0;
  }
}


x86 assembly (clang, -O0):
<mp_load_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x20(%rbp),%rax
movw   $0x1,(%rax)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1167 <mp_load_1+0x67>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movw   $0x0,(%rax,%rcx,2)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113f <mp_load_1+0x3f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_load_1>:
push   %rax
movq   $0x1,(%rdx)
movw   $0x1,0x8(%rdx)
cmp    $0x2,%edi
jl     1140 <mp_load_1+0x30>
mov    %edi,%eax
add    $0x8,%rdx
add    $0x2,%rdx
add    $0xffffffff,%eax
add    %rax,%rax
mov    %rdx,%rdi
xor    %esi,%esi
mov    %rax,%rdx
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @mp_load_1(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = getelementptr i32, i32* %2, i64 2
%5 = bitcast i32* %4 to i16*
store i32 1, i32* %2
%6 = getelementptr inbounds i32, i32* %2, i64 1
store i32 0, i32* %6
store i16 1, i16* %5
%7 = icmp sgt i32 %0, 1
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = bitcast i32* %4 to i8*
%10 = getelementptr i8, i8* %9, i64 2
%11 = add nsw i32 %0, -1
%12 = zext i32 %11 to i64
%13 = shl nuw nsw i64 %12, 1
br label %14
14: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
double __VERIFIER_nondet_double();
int main() {
  double x;
  x = __VERIFIER_nondet_double();
  __VERIFIER_assert(x == x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_double@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_double@plt>
xor    %edi,%edi
ucomisd %xmm0,%xmm0
setnp  %dil
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double (...) @__VERIFIER_nondet_double()
store double %3, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fcmp oeq double %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @__VERIFIER_assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double (...) @__VERIFIER_nondet_double()
%2 = fcmp ord double %1, 0.000000e+00
%3 = zext i1 %2 to i32
%4 = tail call i32 @__VERIFIER_assert(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getchar();
int /*<<< orphan*/ printf(char *);
int more(void) {
  int c;
  c = '\000';
  printf("\t   [cr for more; space-cr to quit]\n");
  c = getchar();
  if (c == '\n')
    return 1;
  else
    exit(0);
}


x86 assembly (clang, -O0):
<more>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jne    116a <more+0x3a>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<more>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
jne    1150 <more+0x20>
mov    $0x1,%eax
pop    %rcx
ret
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\09 [cr for more; space-cr to quit]\0A\00"
define i32 @more() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 10
br i1 %5, label %6, label %7
6: ; preds = %0
ret i32 1
7: ; preds = %0
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [36 x i8] c"\09 [cr for more; space-cr to quit]\00"
define i32 @more() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
%3 = icmp eq i32 %2, 10
br i1 %3, label %4, label %5
4: ; preds = %0
ret i32 1
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fabs(double);
double sqrt(int /*<<< orphan*/);
double efunc(double x) { return 1.0 / sqrt(fabs(x * x + 2.0 * x - 2.0)); }


x86 assembly (clang, -O0):
<efunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xec9(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xeb4(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe91(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<efunc>:
push   %rax
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
addsd  0xec7(%rip),%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
movsd  0xebb(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @efunc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fmul double 2.000000e+00, %5
%7 = call double @llvm.fmuladd.f64(double %3, double %4, double %6)
%8 = fsub double %7, 2.000000e+00
%9 = call i32 @fabs(double %8)
%10 = call double @sqrt(i32 %9)
%11 = fdiv double 1.000000e+00, %10
ret double %11
}

LLVM IR (-O2):
define double @efunc(double %0) {
%2 = fmul double %0, 2.000000e+00
%3 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %2)
%4 = fadd double %3, -2.000000e+00
%5 = tail call i32 @fabs(double %4)
%6 = tail call double @sqrt(i32 %5)
%7 = fdiv double 1.000000e+00, %6
ret double %7
}
void mvMatScale2(float *r, float factor) {
  int i;
  for (i = 0; i < 4; i++)
    r[i] *= factor;
}


x86 assembly (clang, -O0):
<mvMatScale2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1143 <mvMatScale2+0x43>
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <mvMatScale2+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvMatScale2>:
movups (%rdi),%xmm1
shufps $0x0,%xmm0,%xmm0
mulps  %xmm1,%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @mvMatScale2(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
%5 = alloca i32
store float* %0, float** %3
store float %1, float* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load float, float* %4
%11 = load float*, float** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %11, i64 %13
%15 = load float, float* %14
%16 = fmul float %15, %10
store float %16, float* %14
br label %17
17: ; preds = %9
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @mvMatScale2(float* nocapture %0, float %1) {
%3 = bitcast float* %0 to <4 x float>*
%4 = load <4 x float>, <4 x float>* %3
%5 = insertelement <4 x float> poison, float %1, i64 0
%6 = shufflevector <4 x float> %5, <4 x float> poison, <4 x i32> zeroinitializer
%7 = fmul <4 x float> %4, %6
%8 = bitcast float* %0 to <4 x float>*
store <4 x float> %7, <4 x float>* %8
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint64_t getbits(uint64_t val, int start, int end) {
  uint64_t ret = val;
  assert(end < 64);
  assert(start >= 0);
  if (end < 63)
    ret = ((((uint64_t)1) << (end + 1)) - (uint64_t)1) & val;
  return (ret >> start);
}


x86 assembly (clang, -O0):
<getbits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x40,-0xc(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x3f,-0xc(%rbp)
jge    1169 <getbits+0x59>
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbits>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %esi,%ebx
mov    %edi,%r14d
xor    %edi,%edi
cmp    $0x40,%edx
setl   %dil
call   1030 <assert@plt>
mov    %ebx,%edi
not    %edi
shr    $0x1f,%edi
call   1030 <assert@plt>
lea    0x1(%rbp),%ecx
mov    $0xffffffff,%edx
mov    $0xffffffff,%eax
shl    %cl,%eax
cmp    $0x3f,%ebp
not    %eax
cmovge %edx,%eax
and    %r14d,%eax
mov    %ebx,%ecx
sar    %cl,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getbits(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* %4
store i32 %8, i32* %7
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 64
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %5
%14 = icmp sge i32 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32, i32* %6
%18 = icmp slt i32 %17, 63
br i1 %18, label %19, label %26
19: ; preds = %3
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
%22 = shl i32 1, %21
%23 = sub nsw i32 %22, 1
%24 = load i32, i32* %4
%25 = and i32 %23, %24
store i32 %25, i32* %7
br label %26
26: ; preds = %19, %3
%27 = load i32, i32* %7
%28 = load i32, i32* %5
%29 = ashr i32 %27, %28
ret i32 %29
}

LLVM IR (-O2):
define i32 @getbits(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, 64
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = xor i32 %1, -1
%8 = lshr i32 %7, 31
%9 = tail call i32 @assert(i32 %8)
%10 = icmp slt i32 %2, 63
%11 = add nsw i32 %2, 1
%12 = shl nsw i32 -1, %11
%13 = xor i32 %12, -1
%14 = select i1 %10, i32 %13, i32 -1
%15 = and i32 %14, %0
%16 = ashr i32 %15, %1
ret i32 %16
}
unsigned __lshlsi3(unsigned long a, int b) { return a << b; }


x86 assembly (clang, -O0):
<__lshlsi3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__lshlsi3>:
mov    %esi,%ecx
mov    %rdi,%rax
shl    %cl,%rax
ret

LLVM IR (-O0):
define i32 @__lshlsi3(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = shl i64 %5, %7
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @__lshlsi3(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = shl i64 %0, %3
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ pwmSetRange(int);
int /*<<< orphan*/ pwmWrite(int, int);
void pwmToneWrite(int pin, int freq) {
  int range;
  if (freq == 0)
    pwmWrite(pin, 0);
  else {
    range = 600000 / freq;
    pwmSetRange(range);
    pwmWrite(pin, freq / 2);
  }
}


x86 assembly (clang, -O0):
<pwmToneWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1147 <pwmToneWrite+0x27>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <pwmWrite@plt>
jmp    1170 <pwmToneWrite+0x50>
mov    $0x927c0,%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <pwmSetRange@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1030 <pwmWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwmToneWrite>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
test   %esi,%esi
je     1146 <pwmToneWrite+0x26>
mov    %esi,%ebp
mov    $0x927c0,%eax
xor    %edx,%edx
idiv   %esi
mov    %eax,%edi
call   1040 <pwmSetRange@plt>
mov    %ebp,%esi
shr    $0x1f,%esi
add    %ebp,%esi
sar    %esi
jmp    1148 <pwmToneWrite+0x28>
xor    %esi,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <pwmWrite@plt>

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

LLVM IR (-O2):
define void @pwmToneWrite(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = sdiv i32 600000, %1
%6 = tail call i32 @pwmSetRange(i32 %5)
%7 = sdiv i32 %1, 2
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 0, %2 ]
%10 = tail call i32 @pwmWrite(i32 %0, i32 %9)
ret void
}
/* Variables and functions */
int Pop();
int /*<<< orphan*/ Push(int);
int CmdSubtract(void) {
  int operand2;
  operand2 = Pop();
  Push(Pop() - operand2);
  return 0;
}


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

x86 assembly (clang, -O2):
<CmdSubtract>:
push   %rbx
xor    %eax,%eax
call   1030 <Pop@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <Pop@plt>
sub    %ebx,%eax
mov    %eax,%edi
call   1040 <Push@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CmdSubtract() {
%1 = alloca i32
%2 = call i32 (...) @Pop()
store i32 %2, i32* %1
%3 = call i32 (...) @Pop()
%4 = load i32, i32* %1
%5 = sub nsw i32 %3, %4
%6 = call i32 @Push(i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @CmdSubtract() {
%1 = tail call i32 (...) @Pop()
%2 = tail call i32 (...) @Pop()
%3 = sub nsw i32 %2, %1
%4 = tail call i32 @Push(i32 %3)
ret i32 0
}
void signed_char_shl_signed_char_signed_int(signed char *LHS, signed int RHS) {
  (*LHS) <<= RHS;
}


x86 assembly (clang, -O0):
<signed_char_shl_signed_char_signed_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
shl    %cl,%edx
mov    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_char_shl_signed_char_signed_int>:
mov    %esi,%ecx
movzbl (%rdi),%eax
shl    %cl,%eax
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @signed_char_shl_signed_char_signed_int(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = shl i32 %4, %1
%6 = trunc i32 %5 to i8
store i8 %6, i8* %0
ret void
}
char *hash_plugin_summary(void) { return ("ripemd160 \tRIPEMD-160 plugin"); }


x86 assembly (clang, -O0):
<hash_plugin_summary>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_summary>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [29 x i8] c"ripemd160 \09RIPEMD-160 plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [29 x i8] c"ripemd160 \09RIPEMD-160 plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0)
}
int IS_ALPHA_NUM(CH)
char CH;
{
  CH = UPPER(CH);
  return (((CH >= 'A') && (CH <= 'Z')) || ((CH >= '0') && (CH <= '9')));
}


x86 assembly (clang, -O0):
<IS_ALPHA_NUM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <UPPER@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     114b <IS_ALPHA_NUM+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    1170 <IS_ALPHA_NUM+0x60>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x3(%rbp)
jl     116a <IS_ALPHA_NUM+0x5a>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IS_ALPHA_NUM>:
push   %rax
movsbl %dil,%edi
xor    %eax,%eax
call   1030 <UPPER@plt>
shl    $0x18,%eax
lea    -0x40000001(%rax),%ecx
cmp    $0x1affffff,%ecx
setb   %cl
add    $0xd0ffffff,%eax
cmp    $0xaffffff,%eax
setb   %al
or     %cl,%al
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @IS_ALPHA_NUM(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = call i32 (i32, ...) bitcast (i32 (...)* @UPPER to i32 (i32, ...)*)(i32 %5)
%7 = trunc i32 %6 to i8
store i8 %7, i8* %2
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sge i32 %9, 65
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp sle i32 %13, 90
br i1 %14, label %25, label %15
15: ; preds = %11, %1
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 48
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = icmp sle i32 %21, 57
br label %23
23: ; preds = %19, %15
%24 = phi i1 [ false, %15 ], [ %22, %19 ]
br label %25
25: ; preds = %23, %11
%26 = phi i1 [ true, %11 ], [ %24, %23 ]
%27 = zext i1 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
define i32 @IS_ALPHA_NUM(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @UPPER to i32 (i32, ...)*)(i32 %3)
%5 = shl i32 %4, 24
%6 = add i32 %5, -1073741825
%7 = icmp ult i32 %6, 452984831
%8 = add i32 %5, -788529153
%9 = icmp ult i32 %8, 184549375
%10 = or i1 %7, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ ListDrawAct();
int /*<<< orphan*/ ListMakeActive(int /*<<< orphan*/);
void ListHome() {
  ListMakeActive(0);
  ListDrawAct();
}


x86 assembly (clang, -O0):
<ListHome>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <ListMakeActive@plt>
mov    $0x0,%al
call   1030 <ListDrawAct@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ListHome>:
push   %rax
xor    %edi,%edi
call   1040 <ListMakeActive@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ListDrawAct@plt>

LLVM IR (-O0):
define void @ListHome() {
%1 = call i32 @ListMakeActive(i32 0)
%2 = call i32 (...) @ListDrawAct()
ret void
}

LLVM IR (-O2):
define void @ListHome() {
%1 = tail call i32 @ListMakeActive(i32 0)
%2 = tail call i32 (...) @ListDrawAct()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ printf(char *, ...);
void closeConnection(int fd, char *servidor) {
  printf("Cerrando la conexion del %s...\n", servidor);
  close(fd);
  printf("Conexion cerrada\n");
}


x86 assembly (clang, -O0):
<closeConnection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeConnection>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%edi
call   1050 <close@plt>
lea    0xed1(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Cerrando la conexion del %s...\0A\00"
@.str.1 = [18 x i8] c"Conexion cerrada\0A\00"
define void @closeConnection(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %3
%8 = call i32 @close(i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Cerrando la conexion del %s...\0A\00"
@str = [17 x i8] c"Conexion cerrada\00"
define void @closeConnection(i32 %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @close(i32 %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage: hsts-check [-h] hostlist_file\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 = [38 x i8] c"usage: hsts-check [-h] hostlist_file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"usage: hsts-check [-h] hostlist_file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Msp430UartP__0__Counter__overflow();
int /*<<< orphan*/ TransformCounterC__0__CounterFrom__overflow();
int /*<<< orphan*/ TransformCounterC__1__CounterFrom__overflow();
void Msp430CounterC__0__Counter__overflow(void) {
  TransformCounterC__1__CounterFrom__overflow();
  TransformCounterC__0__CounterFrom__overflow();
  Msp430UartP__0__Counter__overflow();
}


x86 assembly (clang, -O0):
<Msp430CounterC__0__Counter__overflow>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <TransformCounterC__1__CounterFrom__overflow@plt>
mov    $0x0,%al
call   1030 <TransformCounterC__0__CounterFrom__overflow@plt>
mov    $0x0,%al
call   1050 <Msp430UartP__0__Counter__overflow@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msp430CounterC__0__Counter__overflow>:
push   %rax
xor    %eax,%eax
call   1040 <TransformCounterC__1__CounterFrom__overflow@plt>
xor    %eax,%eax
call   1030 <TransformCounterC__0__CounterFrom__overflow@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <Msp430UartP__0__Counter__overflow@plt>

LLVM IR (-O0):
define void @Msp430CounterC__0__Counter__overflow() {
%1 = call i32 (...) @TransformCounterC__1__CounterFrom__overflow()
%2 = call i32 (...) @TransformCounterC__0__CounterFrom__overflow()
%3 = call i32 (...) @Msp430UartP__0__Counter__overflow()
ret void
}

LLVM IR (-O2):
define void @Msp430CounterC__0__Counter__overflow() {
%1 = tail call i32 (...) @TransformCounterC__1__CounterFrom__overflow()
%2 = tail call i32 (...) @TransformCounterC__0__CounterFrom__overflow()
%3 = tail call i32 (...) @Msp430UartP__0__Counter__overflow()
ret void
}
void cgpostlude(void) {}


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

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

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

LLVM IR (-O2):
define void @cgpostlude() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
void fig07_14() {
  int x = 5;
  const int *const ptr = &x;
  printf("%d\n", *ptr);
}


x86 assembly (clang, -O0):
<fig07_14>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fig07_14>:
lea    0xee9(%rip),%rdi
mov    $0x5,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @fig07_14() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
ret void
}
char *hash_plugin_summary(void) { return ("md4 \t\tMD4 plugin"); }


x86 assembly (clang, -O0):
<hash_plugin_summary>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_summary>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"md4 \09\09MD4 plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"md4 \09\09MD4 plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ quick_sort(int /*<<< orphan*/ *, int /*<<< orphan*/,
                              int /*<<< orphan*/);
void sort(int32_t *a, int32_t n) { quick_sort(a, 0, n); }


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

x86 assembly (clang, -O2):
<sort>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <quick_sort@plt>

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

LLVM IR (-O2):
define void @sort(i32* %0, i32 %1) {
%3 = tail call i32 @quick_sort(i32* %0, i32 0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CopyChars(char *, char const *, int);
char *CreateString(int);
int StrLen(char const *);
int /*<<< orphan*/ g_assert(char const *);
extern char *CloneString(const char *src) {
  int len;
  char *dest;
  g_assert(src);
  len = StrLen(src);
  dest = CreateString(StrLen(src) + 1);
  CopyChars(dest, src, len);
  return dest;
}


x86 assembly (clang, -O0):
<CloneString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <g_assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <StrLen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <StrLen@plt>
mov    %eax,%edi
add    $0x1,%edi
call   1060 <CreateString@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <CopyChars@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CloneString>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1050 <g_assert@plt>
mov    %rbx,%rdi
call   1040 <StrLen@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1040 <StrLen@plt>
lea    0x1(%rax),%edi
call   1060 <CreateString@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <CopyChars@plt>
mov    %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @CloneString(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @g_assert(i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @StrLen(i8* %7)
store i32 %8, i32* %3
%9 = load i8*, i8** %2
%10 = call i32 @StrLen(i8* %9)
%11 = add nsw i32 %10, 1
%12 = call i8* @CreateString(i32 %11)
store i8* %12, i8** %4
%13 = load i8*, i8** %4
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = call i32 @CopyChars(i8* %13, i8* %14, i32 %15)
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
define i8* @CloneString(i8* %0) {
%2 = tail call i32 @g_assert(i8* %0)
%3 = tail call i32 @StrLen(i8* %0)
%4 = tail call i32 @StrLen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = tail call i8* @CreateString(i32 %5)
%7 = tail call i32 @CopyChars(i8* %6, i8* %0, i32 %3)
ret i8* %6
}
/* Variables and functions */
int log2(double);
double log10(double x) { return log2(x) * (1 / 0x1.A934F0979A371p+1); }


x86 assembly (clang, -O0):
<log10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log2@plt>
cvtsi2sd %eax,%xmm0
movsd  0xecd(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10>:
push   %rax
call   1030 <log2@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @log10(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @log2(double %3)
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 0x3FD34413509F79FF
ret double %6
}

LLVM IR (-O2):
define double @log10(double %0) {
%2 = tail call i32 @log2(double %0)
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3FD34413509F79FF
ret double %4
}
SIGNAL(PCINT2_vect) { PCint(2); }


x86 assembly (clang, -O0):
<SIGNAL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <PCint@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIGNAL>:
mov    $0x2,%edi
xor    %eax,%eax
jmp    1030 <PCint@plt>

LLVM IR (-O0):
define i32 @SIGNAL(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @PCint to i32 (i32, ...)*)(i32 2)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @SIGNAL(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @PCint to i32 (i32, ...)*)(i32 2)
ret i32 undef
}