xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int Mpn(int nargs, int *args) {
  printf("%d", *args);
  return 0;
}


x86 assembly (clang, -O0):
<Mpn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mpn>:
push   %rax
mov    (%rsi),%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @Mpn(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t rand32(uint32_t seed) {
  static uint64_t state = 0xb707be451df0bb19ULL;
  if (seed != 0)
    state = seed;
  uint32_t res = state >> 32;
  state = state * 6364136223846793005ULL + 1;
  return res;
}


x86 assembly (clang, -O0):
<rand32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111d <rand32+0x1d>
mov    -0x8(%rbp),%rax
mov    %eax,0x2f03(%rip)
mov    0x2efd(%rip),%eax
mov    $0x20,%ecx
sar    %cl,%eax
cltq
mov    %rax,-0x10(%rbp)
movslq 0x2ee9(%rip),%rax
movabs $0x5851f42d4c957f2d,%rcx
f4 51 58
imul   %rcx,%rax
add    $0x1,%rax
mov    %eax,0x2ed1(%rip)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand32>:
test   %rdi,%rdi
jne    110b <rand32+0xb>
mov    0x2f15(%rip),%edi
imul   $0x4c957f2d,%edi,%eax
add    $0x1,%eax
mov    %eax,0x2f06(%rip)
ret

LLVM IR (-O0):
@rand32.state = internal global i32 502315801
define i64 @rand32(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = trunc i64 %7 to i32
store i32 %8, i32* @rand32.state
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* @rand32.state
%11 = ashr i32 %10, 32
%12 = sext i32 %11 to i64
store i64 %12, i64* %3
%13 = load i32, i32* @rand32.state
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 6364136223846793005
%16 = add i64 %15, 1
%17 = trunc i64 %16 to i32
store i32 %17, i32* @rand32.state
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
@rand32.state = internal unnamed_addr global i32 502315801
define i64 @rand32(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = load i32, i32* @rand32.state
%4 = trunc i64 %0 to i32
%5 = select i1 %2, i32 %3, i32 %4
%6 = mul i32 %5, 1284865837
%7 = add i32 %6, 1
store i32 %7, i32* @rand32.state
ret i64 poison
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printd(int);
void modp(int a, int b) {
  int *p;
  printd(a);
  print(" %= ");
  printd(b);
  print(" -> ");
  p = &a;
  *p %= b;
  printd(*p);
  print("\r\n");
}


x86 assembly (clang, -O0):
<modp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <printd@plt>
lea    0xec3(%rip),%rdi
call   1040 <print@plt>
mov    -0x8(%rbp),%edi
call   1030 <printd@plt>
lea    0xeb4(%rip),%rdi
call   1040 <print@plt>
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    (%rax),%eax
cltd
idiv   %ecx
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <printd@plt>
lea    0xe84(%rip),%rdi
call   1040 <print@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modp>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <printd@plt>
lea    0xecd(%rip),%rdi
call   1040 <print@plt>
mov    %ebx,%edi
call   1030 <printd@plt>
lea    0xebf(%rip),%rdi
call   1040 <print@plt>
mov    %ebp,%eax
cltd
idiv   %ebx
mov    %edx,%edi
call   1030 <printd@plt>
lea    0xeac(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <print@plt>

LLVM IR (-O0):
@.str = [5 x i8] c" %= \00"
@.str.1 = [5 x i8] c" -> \00"
@.str.2 = [3 x i8] c"\0D\0A\00"
define void @modp(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 = call i32 @printd(i32 %6)
%8 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
%10 = call i32 @printd(i32 %9)
%11 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %5
%12 = load i32, i32* %4
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = srem i32 %14, %12
store i32 %15, i32* %13
%16 = load i32*, i32** %5
%17 = load i32, i32* %16
%18 = call i32 @printd(i32 %17)
%19 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c" %= \00"
@.str.1 = [5 x i8] c" -> \00"
@.str.2 = [3 x i8] c"\0D\0A\00"
define void @modp(i32 %0, i32 %1) {
%3 = tail call i32 @printd(i32 %0)
%4 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @printd(i32 %1)
%6 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = srem i32 %0, %1
%8 = tail call i32 @printd(i32 %7)
%9 = tail call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void _infix_operator_plus_u16_u16(unsigned short lhs, unsigned short rhs,
                                  unsigned short *__rval_1) {
  *__rval_1 = lhs + rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_plus_u16_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
add    %ecx,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_infix_operator_plus_u16_u16>:
add    %esi,%edi
mov    %di,(%rdx)
ret

LLVM IR (-O0):
define void @_infix_operator_plus_u16_u16(i16 zeroext %0, i16 zeroext %1, i16* %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16*
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16* %2, i16** %6
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = load i16, i16* %5
%10 = zext i16 %9 to i32
%11 = add nsw i32 %8, %10
%12 = trunc i32 %11 to i16
%13 = load i16*, i16** %6
store i16 %12, i16* %13
ret void
}

LLVM IR (-O2):
define void @_infix_operator_plus_u16_u16(i16 zeroext %0, i16 zeroext %1, i16* nocapture writeonly %2) {
%4 = add i16 %1, %0
store i16 %4, i16* %2
ret void
}
/* Type definitions */
struct scope {
  int dummy;
};

/* Variables and functions */
struct scope *scope_pop(struct scope *);
void scope_free(struct scope *scope) {
  while (scope) {
    scope = scope_pop(scope);
  }
}


x86 assembly (clang, -O0):
<scope_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <scope_free+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <scope_pop@plt>
mov    %rax,-0x8(%rbp)
jmp    111c <scope_free+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scope_free>:
push   %rax
test   %rdi,%rdi
je     112d <scope_free+0x1d>
mov    %rdi,%rax
nopl   0x0(%rax)
mov    %rax,%rdi
call   1030 <scope_pop@plt>
test   %rax,%rax
jne    1120 <scope_free+0x10>
pop    %rax
ret

LLVM IR (-O0):
%struct.scope = type { i32 }
define void @scope_free(%struct.scope* %0) {
%2 = alloca %struct.scope*
store %struct.scope* %0, %struct.scope** %2
br label %3
3: ; preds = %6, %1
%4 = load %struct.scope*, %struct.scope** %2
%5 = icmp ne %struct.scope* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load %struct.scope*, %struct.scope** %2
%8 = call %struct.scope* @scope_pop(%struct.scope* %7)
store %struct.scope* %8, %struct.scope** %2
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.scope = type { i32 }
define void @scope_free(%struct.scope* %0) {
%2 = icmp eq %struct.scope* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi %struct.scope* [ %5, %3 ], [ %0, %1 ]
%5 = tail call %struct.scope* @scope_pop(%struct.scope* %4)
%6 = icmp eq %struct.scope* %5, null
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addtexttohtml(char *, char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 2; i < argc; i++)
    addtexttohtml(argv[1], argv[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1160 <main+0x50>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <addtexttohtml@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x3,%edi
jl     1146 <main+0x36>
mov    %rsi,%r15
mov    %edi,%r14d
mov    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%r15),%rdi
mov    (%r15,%rbx,8),%rsi
call   1030 <addtexttohtml@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %4, %7
%8 = phi i64 [ 2, %4 ], [ %13, %7 ]
%9 = load i8*, i8** %5
%10 = getelementptr inbounds i8*, i8** %1, i64 %8
%11 = load i8*, i8** %10
%12 = tail call i32 @addtexttohtml(i8* %9, i8* %11)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int close(int);
int tcp_close(int sd) { return close(sd); }


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

x86 assembly (clang, -O2):
<tcp_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @tcp_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void show_help(void) {
  puts("");
  puts("Usage: nanpyattach [--daemon] [--baud <baud>] [--always] [--noinit] "
       "<device>");
  puts("");
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xf31(%rip),%rdi
call   1030 <puts@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_help>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [77 x i8] c"Usage: nanpyattach [--daemon] [--baud <baud>] [--always] [--noinit] <device>\00"
define void @show_help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [77 x i8] c"Usage: nanpyattach [--daemon] [--baud <baud>] [--always] [--noinit] <device>\00"
define void @show_help() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int sscanf(char const *, char *, double *);
double get_num(const char *str) {
  while (*str) {
    double number;
    if (sscanf(str, "%lf", &number) == 1) {
      return number;
    }
    str++;
  }
  return -1;
}


x86 assembly (clang, -O0):
<get_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1166 <get_num+0x56>
mov    -0x10(%rbp),%rdi
lea    0xed4(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <sscanf@plt>
cmp    $0x1,%eax
jne    1155 <get_num+0x45>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1173 <get_num+0x63>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <get_num+0xc>
movsd  0xe92(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_num>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  0xedc(%rip),%xmm0
lea    0xedd(%rip),%r14
lea    0x8(%rsp),%r15
cmpb   $0x0,(%rbx)
je     115a <get_num+0x4a>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <sscanf@plt>
movsd  0xeb5(%rip),%xmm0
add    $0x1,%rbx
cmp    $0x1,%eax
jne    1130 <get_num+0x20>
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define double @get_num(i8* %0) {
%2 = alloca double
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
br label %5
5: ; preds = %15, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = call i32 @sscanf(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %4)
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = load double, double* %4
store double %14, double* %2
br label %19
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
br label %5
18: ; preds = %5
store double -1.000000e+00, double* %2
br label %19
19: ; preds = %18, %13
%20 = load double, double* %2
ret double %20
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define double @get_num(i8* nocapture %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
br label %4
4: ; preds = %8, %1
%5 = phi i8* [ %0, %1 ], [ %12, %8 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %4
%9 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%10 = icmp eq i32 %9, 1
%11 = load double, double* %2
%12 = getelementptr inbounds i8, i8* %5, i64 1
br i1 %10, label %13, label %4
13: ; preds = %8, %4
%14 = phi double [ %11, %8 ], [ -1.000000e+00, %4 ]
ret double %14
}
void __debug_show_held_locks(struct task_struct *task) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @__debug_show_held_locks(%struct.task_struct* nocapture %0) {
ret void
}
int do_458() { return 458; }


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

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

LLVM IR (-O0):
define i32 @do_458() {
ret i32 458
}

LLVM IR (-O2):
define i32 @do_458() {
ret i32 458
}
char *dtx_utf8_prev_char(char *ptr, char *first) {
  do {
    --ptr;
  } while (!(((((*ptr) >> 7) & 1) == 0) || ((((*ptr) >> 6) & 3) == 3)) &&
           ptr > first);
  return ptr;
}


x86 assembly (clang, -O0):
<dtx_utf8_prev_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
sar    $0x7,%ecx
and    $0x1,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     115c <dtx_utf8_prev_char+0x5c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
sar    $0x6,%ecx
and    $0x3,%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
mov    %al,-0x11(%rbp)
je     115c <dtx_utf8_prev_char+0x5c>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    110c <dtx_utf8_prev_char+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtx_utf8_prev_char>:
add    $0xffffffffffffffff,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x1(%rdi),%rax
cmp    %rsi,%rdi
jbe    1131 <dtx_utf8_prev_char+0x31>
movzbl (%rdi),%ecx
mov    %ecx,%edx
and    $0xffffff80,%edx
je     1131 <dtx_utf8_prev_char+0x31>
and    $0xffffffc0,%ecx
mov    %rax,%rdi
cmp    $0xc0,%ecx
jne    1110 <dtx_utf8_prev_char+0x10>
add    $0x1,%rax
ret

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

LLVM IR (-O2):
define i8* @dtx_utf8_prev_char(i8* %0, i8* readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = and i32 %7, 128
%9 = icmp ne i32 %8, 0
%10 = and i32 %7, 192
%11 = icmp ne i32 %10, 192
%12 = and i1 %9, %11
%13 = icmp ugt i8* %5, %1
%14 = and i1 %13, %12
br i1 %14, label %3, label %15
15: ; preds = %3
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char const *);
int strlen(char const *);
char *stradd(char *from, const char *add) {
  char *res;
  int len = strlen(from) + strlen(add);
  res = malloc(len + 1);
  snprintf(res, len + 1, "%s%s", from, add);
  free(from);
  return res;
}


x86 assembly (clang, -O0):
<stradd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
add    $0x1,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
add    $0x1,%esi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xe69(%rip),%rdx
call   1050 <snprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stradd>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r12
call   1040 <strlen@plt>
mov    %eax,%r15d
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%r15,%rax,1),%ebp
add    $0x1,%ebp
mov    %ebp,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xe8a(%rip),%rdx
mov    %rax,%rdi
mov    %ebp,%esi
mov    %r12,%rcx
mov    %r14,%r8
call   1050 <snprintf@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
define i8* @stradd(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
%11 = add nsw i32 %8, %10
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = add nsw i32 %12, 1
%14 = call i8* @malloc(i32 %13)
store i8* %14, i8** %5
%15 = load i8*, i8** %5
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
%18 = load i8*, i8** %3
%19 = load i8*, i8** %4
%20 = call i32 @snprintf(i8* %15, i32 %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %18, i8* %19)
%21 = load i8*, i8** %3
%22 = call i32 @free(i8* %21)
%23 = load i8*, i8** %5
ret i8* %23
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
define i8* @stradd(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = add i32 %3, 1
%6 = add i32 %5, %4
%7 = tail call i8* @malloc(i32 %6)
%8 = tail call i32 @snprintf(i8* %7, i32 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%9 = tail call i32 @free(i8* %0)
ret i8* %7
}
int main() {
  int a = 0x01, b = 0x02;
  return a && b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     1132 <main+0x32>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void printfloat(float n) { printf(" %.2e |", n); }


x86 assembly (clang, -O0):
<printfloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c" %.2e |\00"
define void @printfloat(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
double(cosh)(double x) { return 0.0; }


x86 assembly (clang, -O0):
<cosh>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosh>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @cosh(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @cosh(double %0) {
ret double 0.000000e+00
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct fileinfo_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_pop_front(struct genlist *);
void fileinfo_list_pop_front(struct fileinfo_list *tthis) {
  genlist_pop_front((struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<fileinfo_list_pop_front>:
jmp    1030 <genlist_pop_front@plt>

LLVM IR (-O0):
%struct.fileinfo_list = type { i32 }
%struct.genlist = type { i32 }
define void @fileinfo_list_pop_front(%struct.fileinfo_list* %0) {
%2 = alloca %struct.fileinfo_list*
store %struct.fileinfo_list* %0, %struct.fileinfo_list** %2
%3 = load %struct.fileinfo_list*, %struct.fileinfo_list** %2
%4 = bitcast %struct.fileinfo_list* %3 to %struct.genlist*
%5 = call i32 @genlist_pop_front(%struct.genlist* %4)
ret void
}

LLVM IR (-O2):
%struct.fileinfo_list = type { i32 }
%struct.genlist = type { i32 }
define void @fileinfo_list_pop_front(%struct.fileinfo_list* %0) {
%2 = bitcast %struct.fileinfo_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_pop_front(%struct.genlist* %2)
ret void
}
unsigned int vied_bit_set_bit(unsigned int value, unsigned int lsb) {
  return value | (1 << lsb);
}


x86 assembly (clang, -O0):
<vied_bit_set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @vied_bit_set_bit(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 = shl i32 1, %6
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @vied_bit_set_bit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = or i32 %3, %0
ret i32 %4
}
void RTStrFormatNumber(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrFormatNumber() {
ret void
}
int helloNDK() { return 26; }


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

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

LLVM IR (-O0):
define i32 @helloNDK() {
ret i32 26
}

LLVM IR (-O2):
define i32 @helloNDK() {
ret i32 26
}
void mulvf(double *result, const double *v, const double m) {
  result[0] = v[0] * m;
  result[1] = v[1] * m;
  result[2] = v[2] * m;
}


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

x86 assembly (clang, -O2):
<mulvf>:
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
movsd  0x8(%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rdi)
mulsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @mulvf(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** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double, double* %6
%11 = fmul double %9, %10
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 0
store double %11, double* %13
%14 = load double*, double** %5
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = load double, double* %6
%18 = fmul double %16, %17
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i64 1
store double %18, double* %20
%21 = load double*, double** %5
%22 = getelementptr inbounds double, double* %21, i64 2
%23 = load double, double* %22
%24 = load double, double* %6
%25 = fmul double %23, %24
%26 = load double*, double** %4
%27 = getelementptr inbounds double, double* %26, i64 2
store double %25, double* %27
ret void
}

LLVM IR (-O2):
define void @mulvf(double* nocapture writeonly %0, double* nocapture %1, double %2) {
%4 = load double, double* %1
%5 = fmul double %4, %2
store double %5, double* %0
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = fmul double %7, %2
%9 = getelementptr inbounds double, double* %0, i64 1
store double %8, double* %9
%10 = getelementptr inbounds double, double* %1, i64 2
%11 = load double, double* %10
%12 = fmul double %11, %2
%13 = getelementptr inbounds double, double* %0, i64 2
store double %12, double* %13
ret void
}
void write_kernels_oc_adios_(void) {}


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

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

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

LLVM IR (-O2):
define void @write_kernels_oc_adios_() {
ret void
}
int f32_to_adata(unsigned int x) {
  unsigned int s, e, m, y;
  s = (x >> 31);
  e = (x >> 23) & 0xff;
  m = (x << 8) | 0x80000000;
  if (e < 127 - (16 - 1))
    y = 0;
  else if (e > 127)
    y = (1 << (16 - 1)) - 1;
  else
    y = m >> (127 + (32 - 16) - e);
  return (y ^ -s) + s;
}


x86 assembly (clang, -O0):
<f32_to_adata>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x17,%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
or     $0x80000000,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x70,-0xc(%rbp)
jae    1142 <f32_to_adata+0x42>
movl   $0x0,-0x14(%rbp)
jmp    116d <f32_to_adata+0x6d>
cmpl   $0x7f,-0xc(%rbp)
jbe    1158 <f32_to_adata+0x58>
movl   $0x7fff,-0x14(%rbp)
jmp    1168 <f32_to_adata+0x68>
mov    -0x10(%rbp),%eax
mov    $0x8f,%ecx
sub    -0xc(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0x14(%rbp)
jmp    116d <f32_to_adata+0x6d>
mov    -0x14(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
xor    %ecx,%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f32_to_adata>:
mov    %edi,%eax
mov    %edi,%esi
shr    $0x17,%esi
movzbl %sil,%ecx
xor    %edx,%edx
cmp    $0x70,%ecx
jb     112e <f32_to_adata+0x2e>
mov    $0x7fff,%edx
cmp    $0x7f,%ecx
ja     112e <f32_to_adata+0x2e>
mov    %eax,%edx
shl    $0x8,%edx
or     $0x80000000,%edx
mov    $0x8f,%cl
sub    %sil,%cl
shr    %cl,%edx
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x1f,%eax
xor    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f32_to_adata(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* %2
%8 = lshr i32 %7, 31
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = lshr i32 %9, 23
%11 = and i32 %10, 255
store i32 %11, i32* %4
%12 = load i32, i32* %2
%13 = shl i32 %12, 8
%14 = or i32 %13, -2147483648
store i32 %14, i32* %5
%15 = load i32, i32* %4
%16 = icmp ult i32 %15, 112
br i1 %16, label %17, label %18
17: ; preds = %1
store i32 0, i32* %6
br label %28
18: ; preds = %1
%19 = load i32, i32* %4
%20 = icmp ugt i32 %19, 127
br i1 %20, label %21, label %22
21: ; preds = %18
store i32 32767, i32* %6
br label %27
22: ; preds = %18
%23 = load i32, i32* %5
%24 = load i32, i32* %4
%25 = sub i32 143, %24
%26 = lshr i32 %23, %25
store i32 %26, i32* %6
br label %27
27: ; preds = %22, %21
br label %28
28: ; preds = %27, %17
%29 = load i32, i32* %6
%30 = load i32, i32* %3
%31 = sub i32 0, %30
%32 = xor i32 %29, %31
%33 = load i32, i32* %3
%34 = add i32 %32, %33
ret i32 %34
}

LLVM IR (-O2):
define i32 @f32_to_adata(i32 %0) {
%2 = lshr i32 %0, 23
%3 = and i32 %2, 255
%4 = shl i32 %0, 8
%5 = or i32 %4, -2147483648
%6 = icmp ult i32 %3, 112
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = icmp ugt i32 %3, 127
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = sub nuw nsw i32 143, %3
%11 = lshr i32 %5, %10
br label %12
12: ; preds = %7, %1, %9
%13 = phi i32 [ %11, %9 ], [ 0, %1 ], [ 32767, %7 ]
%14 = lshr i32 %0, 31
%15 = ashr i32 %0, 31
%16 = xor i32 %13, %15
%17 = add i32 %16, %14
ret i32 %17
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void fprint_addc_direct(FILE *stream, uint8_t direct) {
  fprintf(stream,
          "ADDC  A, "
          "0x%02X"
          "                   ",
          direct);
}


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

x86 assembly (clang, -O2):
<fprint_addc_direct>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"ADDC A, 0x%02X \00"
define void @fprint_addc_direct(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 @fprintf(i32* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"ADDC A, 0x%02X \00"
define void @fprint_addc_direct(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void debug_print_addr(const char *desc, void *p) {}


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

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

LLVM IR (-O0):
define void @debug_print_addr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @debug_print_addr(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
struct conscell {
  int dummy;
};

/* Variables and functions */
struct conscell *buREPsopen() {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.conscell = type { i32 }
define %struct.conscell* @buREPsopen() {
ret %struct.conscell* null
}

LLVM IR (-O2):
%struct.conscell = type { i32 }
define noalias %struct.conscell* @buREPsopen() {
ret %struct.conscell* null
}
void g_hash_table_replace() {}


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

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

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

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

/* Variables and functions */
uint64_t addRoundKey(uint64_t state, uint64_t sk) { return state ^ sk; }


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

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

LLVM IR (-O0):
define i32 @addRoundKey(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 = xor i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @addRoundKey(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int num, digit;
  scanf("%d", &num);
  scanf("%d", &digit);
  printf("%d", (num >> digit) & 1);
  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>
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%ecx
sar    %cl,%esi
and    $0x1,%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%cl
shr    %cl,%esi
and    $0x1,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 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* %1
%8 = load i32, i32* %2
%9 = lshr i32 %7, %8
%10 = and i32 %9, 1
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_mod_int8_t(int8_t m) { printf("K:=GF(%d);\n", m); }


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

x86 assembly (clang, -O2):
<print_mod_int8_t>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"K:=GF(%d);\0A\00"
define void @print_mod_int8_t(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ ft_isalpha(int);
scalar_t__ ft_isdigit(int);
int ft_isalnum(int c) {
  if (ft_isdigit(c) || ft_isalpha(c))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <ft_isdigit@plt>
cmp    $0x0,%rax
jne    114f <ft_isalnum+0x2f>
mov    -0x8(%rbp),%edi
call   1040 <ft_isalpha@plt>
cmp    $0x0,%rax
je     115b <ft_isalnum+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <ft_isalnum+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalnum>:
push   %rbx
mov    %edi,%ebx
call   1030 <ft_isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <ft_isalnum+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <ft_isalpha@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ft_isalnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @ft_isdigit(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i64 @ft_isalpha(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @ft_isalnum(i32 %0) {
%2 = tail call i64 @ft_isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @ft_isalpha(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, long);
int main() {
  int c;
  long count;
  count = 0;
  while ((c = getchar()) != EOF) {
    if (c == '\n') {
      count++;
    }
  }
  printf("%ld \n", count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea0(%rip),%rcx
cmp    (%rcx),%eax
je     116b <main+0x4b>
cmpl   $0xa,-0x8(%rbp)
jne    1166 <main+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <main+0x17>
mov    -0x10(%rbp),%rsi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1157 <main+0x37>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %rcx,%rbx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [6 x i8] c"%ld \0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i64 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i64
%9 = add nuw nsw i64 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i64 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %14)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int gru_unit_mb(int);
uint64_t gru_unit_gb(uint64_t num) { return gru_unit_mb(num) / 1024; }


x86 assembly (clang, -O0):
<gru_unit_gb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <gru_unit_mb@plt>
mov    $0x400,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gru_unit_gb>:
push   %rax
call   1030 <gru_unit_mb@plt>
lea    0x3ff(%rax),%ecx
test   %eax,%eax
cmovs  %ecx,%eax
sar    $0xa,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gru_unit_gb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @gru_unit_mb(i32 %3)
%5 = sdiv i32 %4, 1024
ret i32 %5
}

LLVM IR (-O2):
define i32 @gru_unit_gb(i32 %0) {
%2 = tail call i32 @gru_unit_mb(i32 %0)
%3 = sdiv i32 %2, 1024
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_length_quaddobl_solution_string(int k, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(420, &k, n, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_length_quaddobl_solution_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1a4,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_length_quaddobl_solution_string>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1a4,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_length_quaddobl_solution_string(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc4c(i32 420, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_length_quaddobl_solution_string(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 420, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}