xunge/DecIR huggingface dataset:
int get_length(int value, int base) {
  int len;
  int index;
  len = 0;
  if (base == 10 && value < 0)
    len++;
  if (value == 0)
    len++;
  index = value;
  while (index != 0) {
    index /= base;
    len++;
  }
  return (len);
}


x86 assembly (clang, -O0):
<get_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    112e <get_length+0x2e>
cmpl   $0x0,-0x4(%rbp)
jge    112e <get_length+0x2e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1141 <get_length+0x41>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     116b <get_length+0x6b>
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <get_length+0x47>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_length>:
cmp    $0xa,%esi
sete   %cl
test   %edi,%edi
sets   %dl
and    %cl,%dl
movzbl %dl,%ecx
test   %edi,%edi
je     112d <get_length+0x2d>
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
cltd
idiv   %esi
add    $0x1,%ecx
test   %eax,%eax
jne    1120 <get_length+0x20>
mov    %ecx,%eax
ret
add    $0x1,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_length(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 10
%4 = icmp slt i32 %0, 0
%5 = and i1 %4, %3
%6 = icmp eq i32 %0, 0
%7 = select i1 %5, i32 2, i32 1
br i1 %6, label %16, label %8
8: ; preds = %2
%9 = zext i1 %5 to i32
br label %10
10: ; preds = %8, %10
%11 = phi i32 [ %13, %10 ], [ %0, %8 ]
%12 = phi i32 [ %14, %10 ], [ %9, %8 ]
%13 = sdiv i32 %11, %1
%14 = add nuw nsw i32 %12, 1
%15 = icmp eq i32 %13, 0
br i1 %15, label %16, label %10
16: ; preds = %10, %2
%17 = phi i32 [ %7, %2 ], [ %14, %10 ]
ret i32 %17
}
/* Variables and functions */
int mlreplyt(char *, char *, int, char);
int mlreply(char *prompt, char *buf, int nbuf) {
  return (mlreplyt(prompt, buf, nbuf, '\n'));
}


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

x86 assembly (clang, -O2):
<mlreply>:
mov    $0xa,%ecx
jmp    1030 <mlreplyt@plt>

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

LLVM IR (-O2):
define i32 @mlreply(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @mlreplyt(i8* %0, i8* %1, i32 %2, i8 signext 10)
ret i32 %4
}
char to_hex(char byte, char high) {
  char nibble;
  if (high) {
    nibble = (byte & 0xF0) >> 4;
  } else {
    nibble = (byte & 0x0F);
  }
  if (nibble < 10) {
    return '0' + nibble;
  }
  return 'A' + nibble - 10;
}


x86 assembly (clang, -O0):
<to_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
cmpb   $0x0,-0x3(%rbp)
je     112e <to_hex+0x2e>
movsbl -0x2(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
mov    %al,-0x4(%rbp)
jmp    1138 <to_hex+0x38>
movsbl -0x2(%rbp),%eax
and    $0xf,%eax
mov    %al,-0x4(%rbp)
movsbl -0x4(%rbp),%eax
cmp    $0xa,%eax
jge    1154 <to_hex+0x54>
movsbl -0x4(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1161 <to_hex+0x61>
movsbl -0x4(%rbp),%eax
add    $0x41,%eax
sub    $0xa,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_hex>:
mov    %edi,%eax
shr    $0x4,%al
and    $0xf,%dil
test   %sil,%sil
movzbl %dil,%ecx
movzbl %al,%eax
cmove  %ecx,%eax
lea    0x30(%rax),%ecx
lea    0x37(%rax),%edx
cmp    $0xa,%al
movzbl %cl,%ecx
movzbl %dl,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @to_hex(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%7 = load i8, i8* %5
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = and i32 %11, 240
%13 = ashr i32 %12, 4
%14 = trunc i32 %13 to i8
store i8 %14, i8* %6
br label %20
15: ; preds = %2
%16 = load i8, i8* %4
%17 = sext i8 %16 to i32
%18 = and i32 %17, 15
%19 = trunc i32 %18 to i8
store i8 %19, i8* %6
br label %20
20: ; preds = %15, %9
%21 = load i8, i8* %6
%22 = sext i8 %21 to i32
%23 = icmp slt i32 %22, 10
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i8, i8* %6
%26 = sext i8 %25 to i32
%27 = add nsw i32 48, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %3
br label %35
29: ; preds = %20
%30 = load i8, i8* %6
%31 = sext i8 %30 to i32
%32 = add nsw i32 65, %31
%33 = sub nsw i32 %32, 10
%34 = trunc i32 %33 to i8
store i8 %34, i8* %3
br label %35
35: ; preds = %29, %24
%36 = load i8, i8* %3
ret i8 %36
}

LLVM IR (-O2):
define signext i8 @to_hex(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %1, 0
%4 = lshr i8 %0, 4
%5 = and i8 %0, 15
%6 = select i1 %3, i8 %5, i8 %4
%7 = icmp ult i8 %6, 10
%8 = or i8 %6, 48
%9 = add nuw nsw i8 %6, 55
%10 = select i1 %7, i8 %8, i8 %9
ret i8 %10
}
void stosl(void *addr, int data, int cnt) {
  __asm__ __volatile__("cld; rep stosl"
                       : "=D"(addr), "=c"(cnt)
                       : "0"(addr), "1"(cnt), "a"(data)
                       : "memory", "cc");
}


x86 assembly (clang, -O0):
<stosl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%eax
cld
rep stos %eax,%es:(%rdi)
mov    %rdi,-0x8(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stosl>:
mov    %edx,%ecx
mov    %esi,%eax
cld
rep stos %eax,%es:(%rdi)
ret

LLVM IR (-O0):
define void @stosl(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = call { i8*, i32 } asm sideeffect "cld; rep stosl", "={di},={cx},0,1,{ax},~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i8* %7, i32 %8, i32 %9)
%11 = extractvalue { i8*, i32 } %10, 0
%12 = extractvalue { i8*, i32 } %10, 1
store i8* %11, i8** %4
store i32 %12, i32* %6
ret void
}

LLVM IR (-O2):
define void @stosl(i8* %0, i32 %1, i32 %2) {
%4 = tail call { i8*, i32 } asm sideeffect "cld; rep stosl", "={di},={cx},0,1,{ax},~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i8* %0, i32 %2, i32 %1)
ret void
}
int index_3d(int a, int b, int c, int length2, int length3) {
  return c + length3 * (b + length2 * (a));
}


x86 assembly (clang, -O0):
<index_3d>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%esi
imul   -0x4(%rbp),%esi
add    %esi,%edx
imul   %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_3d>:
imul   %ecx,%edi
lea    (%rdi,%rsi,1),%eax
imul   %r8d,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @index_3d(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %8
%12 = load i32, i32* %10
%13 = load i32, i32* %7
%14 = load i32, i32* %9
%15 = load i32, i32* %6
%16 = mul nsw i32 %14, %15
%17 = add nsw i32 %13, %16
%18 = mul nsw i32 %12, %17
%19 = add nsw i32 %11, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @index_3d(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = mul nsw i32 %3, %0
%7 = add nsw i32 %6, %1
%8 = mul nsw i32 %7, %4
%9 = add nsw i32 %8, %2
ret i32 %9
}
/* Variables and functions */
int callee_flat_u_noabs(unsigned int);
unsigned caller_flat_u_nn(unsigned bla) { return callee_flat_u_noabs(bla); }


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

x86 assembly (clang, -O2):
<caller_flat_u_nn>:
jmp    1030 <callee_flat_u_noabs@plt>

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

LLVM IR (-O2):
define i32 @caller_flat_u_nn(i32 %0) {
%2 = tail call i32 @callee_flat_u_noabs(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void wrong_usage() {
  printf("Usage: tcc_service flags parameter\n");
  printf("tcc_service -h for help\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<wrong_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<wrong_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Usage: tcc_service flags parameter\0A\00"
@.str.1 = [25 x i8] c"tcc_service -h for help\0A\00"
define void @wrong_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [35 x i8] c"Usage: tcc_service flags parameter\00"
@str.2 = [24 x i8] c"tcc_service -h for help\00"
define void @wrong_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
int f() {
  const int *p;
  return *p;
}


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

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(char *progname) {
  fprintf(stderr, "Usage: %s <user> <token> <scope1> [<scope2> ... <scopeN>]\n",
          progname);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [59 x i8] c"Usage: %s <user> <token> <scope1> [<scope2> ... <scopeN>]\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [59 x i8] c"Usage: %s <user> <token> <scope1> [<scope2> ... <scopeN>]\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void X509_NAME_add_entry_by_OBJ(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_NAME_add_entry_by_OBJ() {
ret void
}
/* Variables and functions */
scalar_t__ shim_enosys(int /*<<< orphan*/, int, unsigned long);
int shim_arch_prctl(int code, unsigned long addr) {
  return (int)shim_enosys(0, code, addr);
}


x86 assembly (clang, -O0):
<shim_arch_prctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
call   1030 <shim_enosys@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_arch_prctl>:
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

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

LLVM IR (-O2):
define i32 @shim_arch_prctl(i32 %0, i64 %1) {
%3 = tail call i64 @shim_enosys(i32 0, i32 %0, i64 %1)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
struct editor {
  int dummy;
};

/* Variables and functions */
char get(struct editor *, int);
int line_start(struct editor *ed, int pos) {
  while (1) {
    if (pos == 0)
      break;
    if (get(ed, pos - 1) == '\n')
      break;
    pos--;
  }
  return pos;
}


x86 assembly (clang, -O0):
<line_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    112e <line_start+0x1e>
jmp    115c <line_start+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <get@plt>
movsbl %al,%eax
cmp    $0xa,%eax
jne    114e <line_start+0x3e>
jmp    115c <line_start+0x4c>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <line_start+0xf>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_start>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
nopl   0x0(%rax)
mov    %ebp,%ebx
test   %ebp,%ebp
je     1137 <line_start+0x27>
lea    -0x1(%rbx),%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <get@plt>
cmp    $0xa,%al
jne    1120 <line_start+0x10>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.editor = type { i32 }
define i32 @line_start(%struct.editor* %0, i32 %1) {
%3 = alloca %struct.editor*
%4 = alloca i32
store %struct.editor* %0, %struct.editor** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %2, %17
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
br label %20
9: ; preds = %5
%10 = load %struct.editor*, %struct.editor** %3
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, 1
%13 = call signext i8 @get(%struct.editor* %10, i32 %12)
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 10
br i1 %15, label %16, label %17
16: ; preds = %9
br label %20
17: ; preds = %9
%18 = load i32, i32* %4
%19 = add nsw i32 %18, -1
store i32 %19, i32* %4
br label %5
20: ; preds = %16, %8
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
%struct.editor = type { i32 }
define i32 @line_start(%struct.editor* %0, i32 %1) {
br label %3
3: ; preds = %6, %2
%4 = phi i32 [ %1, %2 ], [ %7, %6 ]
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = add nsw i32 %4, -1
%8 = tail call signext i8 @get(%struct.editor* %0, i32 %7)
%9 = icmp eq i8 %8, 10
br i1 %9, label %10, label %3
10: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_check_stability(float *, float *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  float a[] = {1.000000000000000, -2.000000000000000, 1.968750000000000,
               -2.000000000000000, 0.531250000000000};
  float b[] = {0, 0, 0, 0, 0};
  assert(__ESBMC_check_stability(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [5 x float] [float 1.000000e+00, float -2.000000e+00, float 1.968750e+00, float -2.000000e+00, float 5.312500e-01]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x float]
%3 = alloca [5 x float]
store i32 0, i32* %1
%4 = bitcast [5 x float]* %2 to i8*
%5 = bitcast [5 x float]* %3 to i8*
%6 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%7 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 0
%8 = call i32 @__ESBMC_check_stability(float* %6, float* %7)
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x float] [float 1.000000e+00, float -2.000000e+00, float 1.968750e+00, float -2.000000e+00, float 5.312500e-01]
define i32 @main() {
%1 = alloca [5 x float]
%2 = alloca [5 x float]
%3 = bitcast [5 x float]* %1 to i8*
%4 = bitcast [5 x float]* %2 to i8*
%5 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%6 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%7 = call i32 @__ESBMC_check_stability(float* %5, float* %6)
%8 = call i32 @assert(i32 %7)
ret i32 0
}
/* Variables and functions */
long atol(char *);
int /*<<< orphan*/ isdigit(char);
long ExtractNum(char *st) {
  long ret;
  ret = 0;
  while (!isdigit(*st))
    st++;
  ret = atol(st);
  return ret;
}


x86 assembly (clang, -O0):
<ExtractNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1155 <ExtractNum+0x35>
jmp    1166 <ExtractNum+0x46>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <ExtractNum+0x14>
mov    -0x8(%rbp),%rdi
call   1040 <atol@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExtractNum>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isdigit@plt>
test   %eax,%eax
je     1130 <ExtractNum+0x10>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <atol@plt>

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

LLVM IR (-O2):
define i64 @ExtractNum(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i32 @isdigit(i8 signext %4)
%6 = icmp eq i32 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %2, label %8
8: ; preds = %2
%9 = tail call i64 @atol(i8* %3)
ret i64 %9
}
int test_imm_87uint16_reg(unsigned short val) {
  return ((val) & (0x87 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_87uint16_reg>:
test   $0x87,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_87uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 135
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t OneWireIntStatus(uint32_t ui32Base, bool bMasked) {
  ;
  if (bMasked) {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000108))));
  } else {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000104))));
  }
}


x86 assembly (clang, -O0):
<OneWireIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1129 <OneWireIntStatus+0x29>
mov    -0x10(%rbp),%rax
mov    0x108(%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1138 <OneWireIntStatus+0x38>
mov    -0x10(%rbp),%rax
mov    0x104(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OneWireIntStatus>:
mov    %rdi,-0x8(%rsp)
xor    %eax,%eax
test   %esi,%esi
setne  %al
mov    -0x8(%rsp),%rcx
mov    0x104(%rcx,%rax,4),%rax
ret

LLVM IR (-O0):
define i64 @OneWireIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store volatile i64 %0, i64* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load volatile i64, i64* %4
%10 = add nsw i64 %9, 264
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
store i64 %12, i64* %3
br label %18
13: ; preds = %2
%14 = load volatile i64, i64* %4
%15 = add nsw i64 %14, 260
%16 = inttoptr i64 %15 to i64*
%17 = load volatile i64, i64* %16
store i64 %17, i64* %3
br label %18
18: ; preds = %13, %8
%19 = load i64, i64* %3
ret i64 %19
}

LLVM IR (-O2):
define i64 @OneWireIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
store volatile i64 %0, i64* %3
%4 = icmp eq i32 %1, 0
%5 = load volatile i64, i64* %3
%6 = select i1 %4, i64 260, i64 264
%7 = add nsw i64 %5, %6
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ series(int, int);
int main(void) {
  int n, x;
  printf("Kindly enter any the value of x and n \n");
  scanf("%d", &x);
  scanf("%d", &n);
  series(x, n);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x8(%rsp),%edi
mov    0xc(%rsp),%esi
call   1040 <series@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Kindly enter any the value of x and n \0A\00"
@.str.1 = [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 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = call i32 @series(i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [39 x i8] c"Kindly enter any the value of x and n \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = call i32 @series(i32 %8, i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Message(int);
int /*<<< orphan*/ OutFlush();
int /*<<< orphan*/ WaitCharacter();
void AnyKey(void) {
  Message(20);
  OutFlush();
  WaitCharacter();
}


x86 assembly (clang, -O0):
<AnyKey>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
call   1030 <Message@plt>
mov    $0x0,%al
call   1040 <OutFlush@plt>
mov    $0x0,%al
call   1050 <WaitCharacter@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AnyKey>:
push   %rax
mov    $0x14,%edi
call   1030 <Message@plt>
xor    %eax,%eax
call   1040 <OutFlush@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <WaitCharacter@plt>

LLVM IR (-O0):
define void @AnyKey() {
%1 = call i32 @Message(i32 20)
%2 = call i32 (...) @OutFlush()
%3 = call i32 (...) @WaitCharacter()
ret void
}

LLVM IR (-O2):
define void @AnyKey() {
%1 = tail call i32 @Message(i32 20)
%2 = tail call i32 (...) @OutFlush()
%3 = tail call i32 (...) @WaitCharacter()
ret void
}
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ raw();
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
void cmd_raw(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_return(raw());
}


x86 assembly (clang, -O0):
<cmd_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_raw+0x27>
jmp    117f <cmd_raw+0x3f>
mov    $0x1,%edi
call   1060 <report_count@plt>
mov    $0x0,%al
call   1040 <raw@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_raw>:
push   %rax
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_raw+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1060 <report_count@plt>
xor    %eax,%eax
call   1040 <raw@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <report_return@plt>

LLVM IR (-O0):
define void @cmd_raw(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @raw()
%12 = call i32 @report_return(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_raw(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @raw()
%8 = tail call i32 @report_return(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
long RECV(void *, int, int);
long NETrecvData(void *pData, int Size, int Mode) {
  return RECV(pData, Size, Mode);
}


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

x86 assembly (clang, -O2):
<NETrecvData>:
jmp    1030 <RECV@plt>

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

LLVM IR (-O2):
define i64 @NETrecvData(i8* %0, i32 %1, i32 %2) {
%4 = tail call i64 @RECV(i8* %0, i32 %1, i32 %2)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ open_window(char *);
void vsplit_window(void) { open_window("v50%"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"v50%\00"
define void @vsplit_window() {
%1 = call i32 @open_window(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"v50%\00"
define void @vsplit_window() {
%1 = tail call i32 @open_window(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void cwd() {
  db(0x66);
  db(0x99);
}


x86 assembly (clang, -O0):
<cwd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x66,%edi
call   1030 <db@plt>
mov    $0x99,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwd>:
push   %rax
mov    $0x66,%edi
call   1030 <db@plt>
mov    $0x99,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @cwd() {
%1 = call i32 @db(i32 102)
%2 = call i32 @db(i32 153)
ret void
}

LLVM IR (-O2):
define void @cwd() {
%1 = tail call i32 @db(i32 102)
%2 = tail call i32 @db(i32 153)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x1;
};
typedef TYPE_1__ XSegment;

/* Variables and functions */
short get_XSegment_x1(void *_p) { return (short)((XSegment *)_p)->x1; }


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

x86 assembly (clang, -O2):
<get_XSegment_x1>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define signext i16 @get_XSegment_x1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define signext i16 @get_XSegment_x1(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ filePosition(int /*<<< orphan*/);
int /*<<< orphan*/ popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basLoc() { pushNumber(filePosition(popNumber())); }


x86 assembly (clang, -O0):
<basLoc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <filePosition@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basLoc>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <filePosition@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basLoc() {
%1 = call i32 (...) @popNumber()
%2 = call i32 @filePosition(i32 %1)
%3 = call i32 @pushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @basLoc() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @filePosition(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
void _Jv__mprec_tinytens(void) {}


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

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

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

LLVM IR (-O2):
define void @_Jv__mprec_tinytens() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int cmp(void *left_key, void *right_key) {
  int left = (int)left_key;
  int right = (int)right_key;
  if (left < right) {
    return 1;
  } else if (left > right) {
    return 1;
  } else {
    assert(left == right);
    return 0;
  }
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1146 <cmp+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1178 <cmp+0x68>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    115e <cmp+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1178 <cmp+0x68>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
mov    $0x1,%eax
cmp    %esi,%edi
jne    112a <cmp+0x1a>
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @cmp(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = icmp eq i32 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @assert(i32 1)
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ 0, %8 ], [ 1, %2 ]
ret i32 %11
}
AR0AR1(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[10000000]) = (p1[1111111 / 4]); }


x86 assembly (clang, -O0):
<AR0AR1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movss  0x10f444(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x2625a00(%rax)
02
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0AR1>:
movss  0x10f444(%rcx),%xmm0
movss  %xmm0,0x2625a00(%rdx)
02
ret

LLVM IR (-O0):
define i32 @AR0AR1(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float*, float** %13
%17 = getelementptr inbounds float, float* %16, i64 277777
%18 = load float, float* %17
%19 = load float*, float** %12
%20 = getelementptr inbounds float, float* %19, i64 10000000
store float %18, float* %20
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @AR0AR1(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture %5) {
%7 = getelementptr inbounds float, float* %5, i64 277777
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %4, i64 10000000
store float %8, float* %9
ret i32 undef
}
/* Variables and functions */
unsigned int tdmb_GetLockStatus();
unsigned int rtvTDMB_GetLockStatus(void) {
  unsigned int lock_st;
  ((void)0);
  lock_st = tdmb_GetLockStatus();
  ((void)0);
  return lock_st;
}


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

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

LLVM IR (-O0):
define i32 @rtvTDMB_GetLockStatus() {
%1 = alloca i32
%2 = call i32 (...) @tdmb_GetLockStatus()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @rtvTDMB_GetLockStatus() {
%1 = tail call i32 (...) @tdmb_GetLockStatus()
ret i32 %1
}
int lenPartitionsList(char **list) {
  char **part;
  int rc;
  if (!list)
    return 0;
  for (rc = 0, part = list; *part; rc++, part++)
    ;
  return rc;
}


x86 assembly (clang, -O0):
<lenPartitionsList>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <lenPartitionsList+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1161 <lenPartitionsList+0x61>
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     115b <lenPartitionsList+0x5b>
jmp    1141 <lenPartitionsList+0x41>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    112e <lenPartitionsList+0x2e>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lenPartitionsList>:
xor    %eax,%eax
test   %rdi,%rdi
je     111c <lenPartitionsList+0x1c>
cmpq   $0x0,(%rdi)
je     111c <lenPartitionsList+0x1c>
xor    %eax,%eax
nop
cmpq   $0x0,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rax
jne    1110 <lenPartitionsList+0x10>
ret

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

LLVM IR (-O2):
define i32 @lenPartitionsList(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8** [ %10, %6 ], [ %0, %3 ]
%9 = add nuw nsw i32 %7, 1
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i32 [ 0, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %14
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fd_nrf8001_close_remote_pipe_error(int);
int /*<<< orphan*/ fd_nrf8001_close_remote_pipe_success();
void fd_nrf8001_dispatch_close_remote_pipe_response(
    uint8_t status, uint8_t *response_data __attribute__((unused)),
    uint32_t response_data_length __attribute__((unused))) {
  if (status != 0x00) {
    fd_nrf8001_close_remote_pipe_error(status);
    return;
  }
  fd_nrf8001_close_remote_pipe_success();
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1149 <fd_nrf8001_dispatch_close_remote_pipe_response+0x29>
mov    -0x4(%rbp),%edi
call   1030 <fd_nrf8001_close_remote_pipe_error@plt>
jmp    1150 <fd_nrf8001_dispatch_close_remote_pipe_response+0x30>
mov    $0x0,%al
call   1040 <fd_nrf8001_close_remote_pipe_success@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
test   %edi,%edi
je     1129 <fd_nrf8001_dispatch_close_remote_pipe_response+0x9>
jmp    1030 <fd_nrf8001_close_remote_pipe_error@plt>
xor    %eax,%eax
jmp    1040 <fd_nrf8001_close_remote_pipe_success@plt>

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

LLVM IR (-O2):
define void @fd_nrf8001_dispatch_close_remote_pipe_response(i32 %0, i32* nocapture readnone %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @fd_nrf8001_close_remote_pipe_error(i32 %0)
br label %9
7: ; preds = %3
%8 = tail call i32 (...) @fd_nrf8001_close_remote_pipe_success()
br label %9
9: ; preds = %7, %5
ret void
}
int IsODigit(char C) { return (C >= '0' && C <= '7'); }


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

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

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

LLVM IR (-O2):
define i32 @IsODigit(i8 signext %0) {
%2 = and i8 %0, -8
%3 = icmp eq i8 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
int not(int x) { return x ? 0 : 1; }


x86 assembly (clang, -O0):
<not>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<not>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @not(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 0, i32 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @not(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int isUpperLetter(char c) {
  if (65 <= c && c <= 90) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isUpperLetter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     1134 <isUpperLetter+0x34>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1134 <isUpperLetter+0x34>
movl   $0x1,-0x4(%rbp)
jmp    113b <isUpperLetter+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isUpperLetter>:
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isUpperLetter(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 65, %5
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
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 @isUpperLetter(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int FOO(void) {
  printf("Hello, I'm %s\n", "FOO");
  return 0;
}


x86 assembly (clang, -O0):
<FOO>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeed(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, I'm %s\0A\00"
@.str.1 = [4 x i8] c"FOO\00"
define i32 @FOO() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Hello, I'm %s\0A\00"
@.str.1 = [4 x i8] c"FOO\00"
define i32 @FOO() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void zero(short *p1, short *p2) {
  while ((++p1) <= p2)
    *p1 = 0;
}


x86 assembly (clang, -O0):
<zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
cmp    -0x10(%rbp),%rax
ja     1130 <zero+0x30>
mov    -0x8(%rbp),%rax
movw   $0x0,(%rax)
jmp    110c <zero+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero>:
mov    %rdi,%rdx
add    $0x2,%rdi
cmp    %rsi,%rdi
ja     1141 <zero+0x31>
push   %rax
lea    0x4(%rdx),%rax
add    $0x1,%rsi
cmp    %rsi,%rax
cmova  %rax,%rsi
not    %rdx
add    %rsi,%rdx
and    $0xfffffffffffffffe,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @zero(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
store i16* %0, i16** %3
store i16* %1, i16** %4
br label %5
5: ; preds = %10, %2
%6 = load i16*, i16** %3
%7 = getelementptr inbounds i16, i16* %6, i32 1
store i16* %7, i16** %3
%8 = load i16*, i16** %4
%9 = icmp ule i16* %7, %8
br i1 %9, label %10, label %12
10: ; preds = %5
%11 = load i16*, i16** %3
store i16 0, i16* %11
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @zero(i16* writeonly %0, i16* readnone %1) {
%3 = ptrtoint i16* %0 to i64
%4 = getelementptr i16, i16* %0, i64 1
%5 = icmp ugt i16* %4, %1
br i1 %5, label %16, label %6
6: ; preds = %2
%7 = bitcast i16* %4 to i8*
%8 = ptrtoint i16* %1 to i64
%9 = add i64 %3, 4
%10 = add nuw i64 %8, 1
%11 = call i64 @llvm.umax.i64(i64 %9, i64 %10)
%12 = add i64 %11, -3
%13 = sub i64 %12, %3
%14 = add i64 %13, 2
%15 = and i64 %14, -2
br label %16
16: ; preds = %6, %2
ret void
}