xunge/DecIR huggingface dataset:
int next_nl(char *str, int l) {
  int n;
  for (n = 0; *str; ++n) {
    if (!l--)
      break;
    if (*str++ == '\n')
      break;
  }
  return n;
}


x86 assembly (clang, -O0):
<next_nl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     116b <next_nl+0x6b>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jne    1138 <next_nl+0x38>
jmp    116b <next_nl+0x6b>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1158 <next_nl+0x58>
jmp    116b <next_nl+0x6b>
jmp    115d <next_nl+0x5d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <next_nl+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_nl>:
mov    (%rdi),%dl
test   %dl,%dl
je     1127 <next_nl+0x27>
mov    %esi,%ecx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmp    %eax,%ecx
je     1126 <next_nl+0x26>
cmp    $0xa,%dl
je     1126 <next_nl+0x26>
movzbl 0x1(%rdi,%rax,1),%edx
add    $0x1,%rax
test   %dl,%dl
jne    1110 <next_nl+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @next_nl(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %19, label %5
5: ; preds = %2, %13
%6 = phi i8 [ %17, %13 ], [ %3, %2 ]
%7 = phi i32 [ %16, %13 ], [ 0, %2 ]
%8 = phi i32 [ %14, %13 ], [ %1, %2 ]
%9 = phi i8* [ %15, %13 ], [ %0, %2 ]
%10 = icmp eq i32 %8, 0
%11 = icmp eq i8 %6, 10
%12 = select i1 %10, i1 true, i1 %11
br i1 %12, label %19, label %13
13: ; preds = %5
%14 = add nsw i32 %8, -1
%15 = getelementptr inbounds i8, i8* %9, i64 1
%16 = add nuw nsw i32 %7, 1
%17 = load i8, i8* %15
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %5
19: ; preds = %13, %5, %2
%20 = phi i32 [ 0, %2 ], [ %7, %5 ], [ %16, %13 ]
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ free(long *);
long *malloc(int);
int main() {
  long *test = malloc(sizeof(long) * 3);
  test[1] = 9;
  free(test);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x18,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x9,0x8(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x18,%edi
call   1040 <malloc@plt>
movq   $0x9,0x8(%rax)
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64*
store i32 0, i32* %1
%3 = call i64* @malloc(i32 24)
store i64* %3, i64** %2
%4 = load i64*, i64** %2
%5 = getelementptr inbounds i64, i64* %4, i64 1
store i64 9, i64* %5
%6 = load i64*, i64** %2
%7 = call i32 @free(i64* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64* @malloc(i32 24)
%2 = getelementptr inbounds i64, i64* %1, i64 1
store i64 9, i64* %2
%3 = tail call i32 @free(i64* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __startrek_entry_pt_Controller();
void cil_keeperController(void) {
  {
    __startrek_entry_pt_Controller();
    return;
  }
}


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

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

LLVM IR (-O0):
define void @cil_keeperController() {
%1 = call i32 (...) @__startrek_entry_pt_Controller()
ret void
}

LLVM IR (-O2):
define void @cil_keeperController() {
%1 = tail call i32 (...) @__startrek_entry_pt_Controller()
ret void
}
int pgcd(int a, int b) {
  do {
    int r = a % b;
    a = b;
    b = r;
  } while (b != 0);
  return a;
}


x86 assembly (clang, -O0):
<pgcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    110a <pgcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgcd>:
mov    %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edi,%eax
mov    %edx,%edi
cltd
idiv   %edi
test   %edx,%edx
jne    1110 <pgcd+0x10>
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @pgcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %6, %3 ]
%5 = phi i32 [ %0, %2 ], [ %4, %3 ]
%6 = srem i32 %5, %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %4
}
int fun1306() { return 1306; }


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

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

LLVM IR (-O0):
define i32 @fun1306() {
ret i32 1306
}

LLVM IR (-O2):
define i32 @fun1306() {
ret i32 1306
}
/* Type definitions */
struct roff_node {
  int dummy;
};
struct roff_meta {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ font_push(char);
int /*<<< orphan*/ pre_syn(struct roff_node *);
int pre_fd(const struct roff_meta *meta, struct roff_node *n) {
  pre_syn(n);
  font_push('B');
  return 1;
}


x86 assembly (clang, -O0):
<pre_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <pre_syn@plt>
mov    $0x42,%edi
call   1030 <font_push@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pre_fd>:
push   %rax
mov    %rsi,%rdi
call   1040 <pre_syn@plt>
mov    $0x42,%edi
call   1030 <font_push@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.roff_meta = type { i32 }
%struct.roff_node = type { i32 }
define i32 @pre_fd(%struct.roff_meta* %0, %struct.roff_node* %1) {
%3 = alloca %struct.roff_meta*
%4 = alloca %struct.roff_node*
store %struct.roff_meta* %0, %struct.roff_meta** %3
store %struct.roff_node* %1, %struct.roff_node** %4
%5 = load %struct.roff_node*, %struct.roff_node** %4
%6 = call i32 @pre_syn(%struct.roff_node* %5)
%7 = call i32 @font_push(i8 signext 66)
ret i32 1
}

LLVM IR (-O2):
%struct.roff_meta = type { i32 }
%struct.roff_node = type { i32 }
define i32 @pre_fd(%struct.roff_meta* nocapture readnone %0, %struct.roff_node* %1) {
%3 = tail call i32 @pre_syn(%struct.roff_node* %1)
%4 = tail call i32 @font_push(i8 signext 66)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int sched_setaffinity(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int set_affinity(int cpu) {
  cpu_set_t mask;
  CPU_ZERO(&mask);
  CPU_SET(cpu, &mask);
  return (sched_setaffinity(0, sizeof(cpu_set_t), &mask));
}


x86 assembly (clang, -O0):
<set_affinity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setaffinity@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_affinity>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <sched_setaffinity@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @set_affinity(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @CPU_ZERO(i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @CPU_SET(i32 %5, i32* %3)
%7 = call i32 @sched_setaffinity(i32 0, i32 4, i32* %3)
ret i32 %7
}

LLVM IR (-O2):
define i32 @set_affinity(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = call i32 @CPU_SET(i32 %0, i32* %2)
%6 = call i32 @sched_setaffinity(i32 0, i32 4, i32* %2)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ rotate(int *, int, int);
int /*<<< orphan*/ swap(int *, int, int);
void sort(int a[], int len) {
  int i;
  for (i = 1; i < len; i++) {
    swap(a, 1, len - i);
    rotate(a, 1, len - i);
  }
}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1178 <sort+0x58>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    -0x10(%rbp),%edx
mov    $0x1,%esi
call   1040 <swap@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    -0x10(%rbp),%edx
mov    $0x1,%esi
call   1030 <rotate@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <sort+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort>:
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%esi
jl     1163 <sort+0x43>
mov    %esi,%ebx
mov    %rdi,%r14
add    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    $0x1,%esi
mov    %ebx,%edx
call   1040 <swap@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %ebx,%edx
call   1030 <rotate@plt>
add    $0xffffffff,%ebx
jne    1140 <sort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @sort(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i32 [ %9, %4 ], [ 1, %2 ]
%6 = sub nsw i32 %1, %5
%7 = tail call i32 @swap(i32* %0, i32 1, i32 %6)
%8 = tail call i32 @rotate(i32* %0, i32 1, i32 %6)
%9 = add nuw nsw i32 %5, 1
%10 = icmp eq i32 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t endian_rev32(uint32_t data) {
  return ((data & 0x000000FF) << 24) | ((data & 0x0000FF00) << 8) |
         ((data & 0x00FF0000) >> 8) | ((data & 0xFF000000) >> 24);
}


x86 assembly (clang, -O0):
<endian_rev32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @endian_rev32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = ashr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = lshr i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @endian_rev32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int fnv1_hash(void *, int);
int strlen(char *);
int hash_string(void *key) {
  return fnv1_hash(key, sizeof(char) * strlen((char *)key));
}


x86 assembly (clang, -O0):
<hash_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   1040 <fnv1_hash@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <fnv1_hash@plt>

LLVM IR (-O0):
define i32 @hash_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sext i32 %5 to i64
%7 = mul i64 1, %6
%8 = trunc i64 %7 to i32
%9 = call i32 @fnv1_hash(i8* %3, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @hash_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @fnv1_hash(i8* %0, i32 %2)
ret i32 %3
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
char *_strptime(char const *, char const *, struct tm *, int *);
char *strptime(const char *buf, const char *format, struct tm *timeptr) {
  char *ret;
  int gmt;
  gmt = 0;
  ret = _strptime(buf, format, timeptr, &gmt);
  return (ret);
}


x86 assembly (clang, -O0):
<strptime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x24(%rbp),%rcx
call   1030 <_strptime@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strptime>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rcx
call   1030 <_strptime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i8* @strptime(i8* %0, i8* %1, %struct.tm* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.tm*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.tm* %2, %struct.tm** %6
store i32 0, i32* %8
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load %struct.tm*, %struct.tm** %6
%12 = call i8* @_strptime(i8* %9, i8* %10, %struct.tm* %11, i32* %8)
store i8* %12, i8** %7
%13 = load i8*, i8** %7
ret i8* %13
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @strptime(i8* %0, i8* %1, %struct.tm* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%6 = call i8* @_strptime(i8* %0, i8* %1, %struct.tm* %2, i32* %4)
ret i8* %6
}
unsigned long ScaleColor8to6(const unsigned char color) {
  return ((unsigned long)(((color) & ~0x03) >> 2));
}


x86 assembly (clang, -O0):
<ScaleColor8to6>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xfffffffc,%eax
sar    $0x2,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScaleColor8to6>:
shr    $0x2,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i64 @ScaleColor8to6(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -4
%6 = ashr i32 %5, 2
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @ScaleColor8to6(i8 zeroext %0) {
%2 = lshr i8 %0, 2
%3 = zext i8 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
int isaac_strncpy(char *dst, const char *src, int len) {
  if (!dst)
    return 1;
  if (!src)
    return 1;
  strncpy(dst, src, len);
  dst[len] = '\0';
  return 0;
}


x86 assembly (clang, -O0):
<isaac_strncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113a <isaac_strncpy+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1174 <isaac_strncpy+0x64>
cmpq   $0x0,-0x18(%rbp)
jne    1151 <isaac_strncpy+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1174 <isaac_strncpy+0x64>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isaac_strncpy>:
mov    $0x1,%eax
test   %rdi,%rdi
je     113b <isaac_strncpy+0x2b>
test   %rsi,%rsi
je     113b <isaac_strncpy+0x2b>
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isaac_strncpy(i8* %0, i8* %1, i32 %2) {
%4 = icmp eq i8* %0, null
%5 = icmp eq i8* %1, null
%6 = or i1 %4, %5
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = tail call i32 @strncpy(i8* %0, i8* %1, i32 %2)
%9 = sext i32 %2 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %3, %7
%12 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %12
}
/* Variables and functions */
void *update_data(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @update_data() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @update_data() {
ret i8* null
}
/* Variables and functions */
int main1(int);
int main(void) { return main1(32 - 7); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x19,%edi
jmp    1030 <main1@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @main1(i32 25)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @main1(i32 25)
ret i32 %1
}
void mkdir() {}


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

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

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

LLVM IR (-O2):
define void @mkdir() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void exit_failure(char *nom_func, char *mess) {
  fprintf(stderr, "!---! Erreur !---!\n");
  fprintf(stderr, "fonction: %s -- %s\n", nom_func, mess);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<exit_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_failure>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eae(%rip),%r15
mov    (%r15),%edi
lea    0xec4(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r15),%edi
lea    0xec7(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"!---! Erreur !---!\0A\00"
@.str.1 = [20 x i8] c"fonction: %s -- %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @exit_failure(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"!---! Erreur !---!\0A\00"
@.str.1 = [20 x i8] c"fonction: %s -- %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @exit_failure(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
}
/* Variables and functions */
scalar_t__ COND_LE();
int /*<<< orphan*/ EA_A7_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_sle_8_pd7(void) {
  m68ki_write_8(EA_A7_PD_8(), COND_LE() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_sle_8_pd7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_A7_PD_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_LE@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_sle_8_pd7>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_A7_PD_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_LE@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_sle_8_pd7() {
%1 = call i32 (...) @EA_A7_PD_8()
%2 = call i64 (...) @COND_LE()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_sle_8_pd7() {
%1 = tail call i32 (...) @EA_A7_PD_8()
%2 = tail call i64 (...) @COND_LE()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_log10f();
scalar_t__ log10f(float);
void test_log10f(float f) {
  if (log10f(f) != log10f(f))
    link_failure_log10f();
}


x86 assembly (clang, -O0):
<test_log10f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <log10f@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <log10f@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_log10f+0x3c>
mov    $0x0,%al
call   1030 <link_failure_log10f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_log10f>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <log10f@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <log10f@plt>
cmp    %rax,%rbx
jne    1149 <test_log10f+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_log10f@plt>

LLVM IR (-O0):
define void @test_log10f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @log10f(float %3)
%5 = load float, float* %2
%6 = call i64 @log10f(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_log10f()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_log10f(float %0) {
%2 = tail call i64 @log10f(float %0)
%3 = tail call i64 @log10f(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_log10f()
br label %7
7: ; preds = %5, %1
ret void
}
int unlink(const char *p) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @unlink(i8* nocapture readnone %0) {
ret i32 -1
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local2;
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < 1UL) {
      local2 = 0UL;
      while (local2 < 1UL) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] + 146565199UL) + (unsigned short)56522;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x16(%rbp)
movzwl -0x16(%rbp),%eax
cmp    $0x1,%rax
jae    1166 <RandomFunc+0x66>
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    1155 <RandomFunc+0x55>
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1136 <RandomFunc+0x36>
movzwl -0x16(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x16(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
add    $0x8bc684f,%rax
add    $0xdcca,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0x505e,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
%7 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%8 = load i16*, i16** %3
%9 = getelementptr inbounds i16, i16* %8, i64 0
%10 = load i16, i16* %9
%11 = zext i16 %10 to i32
%12 = add nsw i32 %11, 2885
%13 = trunc i32 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %7
br label %15
15: ; preds = %29, %2
%16 = load i16, i16* %7
%17 = zext i16 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %34
19: ; preds = %15
store i16 0, i16* %6
br label %20
20: ; preds = %24, %19
%21 = load i16, i16* %6
%22 = zext i16 %21 to i64
%23 = icmp ult i64 %22, 1
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i16, i16* %6
%26 = zext i16 %25 to i64
%27 = add i64 %26, 2
%28 = trunc i64 %27 to i16
store i16 %28, i16* %6
br label %20
29: ; preds = %20
%30 = load i16, i16* %7
%31 = zext i16 %30 to i64
%32 = add i64 %31, 2
%33 = trunc i64 %32 to i16
store i16 %33, i16* %7
br label %15
34: ; preds = %15
%35 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%36 = load i16, i16* %35
%37 = zext i16 %36 to i64
%38 = add i64 %37, 146565199
%39 = add i64 %38, 56522
%40 = trunc i64 %39 to i16
%41 = load i16*, i16** %4
%42 = getelementptr inbounds i16, i16* %41, i64 0
store i16 %40, i16* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, 20574
store i16 %4, i16* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int charger_init() {
  printf("Charger init\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Charger init\0A\00"
define i32 @charger_init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Charger init\00"
define i32 @charger_init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xdc() {
  Assert_real((isbdigit(220) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              1105, ("isbdigit should be 0 for 0xdc"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xdc\00"
define void @t_isbdigit_0xdc() {
%1 = tail call i64 @isbdigit(i32 220)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1105, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_RECIP_INFO;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_RECIP_INFO_it;
int i2d_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_RECIP_INFO_it);
}


x86 assembly (clang, -O0):
<i2d_PKCS7_RECIP_INFO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb9(%rip),%rdx
call   1030 <ASN1_item_i2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_PKCS7_RECIP_INFO>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@PKCS7_RECIP_INFO_it = global i32 0
define i32 @i2d_PKCS7_RECIP_INFO(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 = load i8**, i8*** %4
%7 = call i32 @ASN1_item_i2d(i32* %5, i8** %6, i32* @PKCS7_RECIP_INFO_it)
ret i32 %7
}

LLVM IR (-O2):
@PKCS7_RECIP_INFO_it = global i32 0
define i32 @i2d_PKCS7_RECIP_INFO(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @PKCS7_RECIP_INFO_it)
ret i32 %3
}
int Vec_IntSortCompare1(int *pp1, int *pp2) {
  if (*pp1 < *pp2)
    return -1;
  if (*pp1 > *pp2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<Vec_IntSortCompare1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <Vec_IntSortCompare1+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <Vec_IntSortCompare1+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    1148 <Vec_IntSortCompare1+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <Vec_IntSortCompare1+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vec_IntSortCompare1>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @Vec_IntSortCompare1(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %3, %4
%6 = icmp sgt i32 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Type definitions */
struct group {
  char *gr_name;
};

/* Variables and functions */
struct group *getgrgid(int);
char *get_gnamebyid(int gid) {
  struct group *grp;
  grp = getgrgid(gid);
  if (!grp) {
    return NULL;
  }
  return grp->gr_name;
}


x86 assembly (clang, -O0):
<get_gnamebyid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <getgrgid@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    113f <get_gnamebyid+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    114a <get_gnamebyid+0x3a>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_gnamebyid>:
push   %rax
call   1030 <getgrgid@plt>
test   %rax,%rax
je     1120 <get_gnamebyid+0x10>
mov    (%rax),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.group = type { i8* }
define i8* @get_gnamebyid(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.group*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call %struct.group* @getgrgid(i32 %5)
store %struct.group* %6, %struct.group** %4
%7 = load %struct.group*, %struct.group** %4
%8 = icmp ne %struct.group* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
store i8* null, i8** %2
br label %14
10: ; preds = %1
%11 = load %struct.group*, %struct.group** %4
%12 = getelementptr inbounds %struct.group, %struct.group* %11, i32 0, i32 0
%13 = load i8*, i8** %12
store i8* %13, i8** %2
br label %14
14: ; preds = %10, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
%struct.group = type { i8* }
define i8* @get_gnamebyid(i32 %0) {
%2 = tail call %struct.group* @getgrgid(i32 %0)
%3 = icmp eq %struct.group* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds %struct.group, %struct.group* %2, i64 0, i32 0
%6 = load i8*, i8** %5
br label %7
7: ; preds = %1, %4
%8 = phi i8* [ %6, %4 ], [ null, %1 ]
ret i8* %8
}
void security_msg_queue_free(struct msg_queue *msq) {}


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

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

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

LLVM IR (-O2):
%struct.msg_queue = type opaque
define void @security_msg_queue_free(%struct.msg_queue* nocapture %0) {
ret void
}
/* Variables and functions */
int Rand_Get();
unsigned Rand_GetBetween(int min, int max) {
  if (min == max) {
    return max;
  }
  return (Rand_Get() % (max - min)) + min;
}


x86 assembly (clang, -O0):
<Rand_GetBetween>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1135 <Rand_GetBetween+0x25>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <Rand_GetBetween+0x3b>
mov    $0x0,%al
call   1030 <Rand_Get@plt>
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Rand_GetBetween>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%eax
mov    %esi,%ebp
sub    %edi,%ebp
je     112b <Rand_GetBetween+0x1b>
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <Rand_Get@plt>
cltd
idiv   %ebp
mov    %edx,%eax
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @Rand_GetBetween(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, %0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i32 (...) @Rand_Get()
%6 = sub nsw i32 %1, %0
%7 = srem i32 %5, %6
%8 = add nsw i32 %7, %0
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ %8, %4 ], [ %1, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int /*<<< orphan*/ y(int);
int main() {
  int i;
  for (i = 0; i < 10000; i++) {
    f(i);
    y(i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2710,-0x8(%rbp)
jge    1161 <main+0x41>
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
mov    -0x8(%rbp),%edi
call   1040 <y@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <f@plt>
mov    %ebx,%edi
call   1040 <y@plt>
add    $0x1,%ebx
cmp    $0x2710,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @f(i32 %2)
%4 = tail call i32 @y(i32 %2)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 10000
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Variables and functions */
scalar_t__ is_blank(char const);
size_t nonblank_begin(const char *str, size_t begin, size_t end) {
  while (begin < end && is_blank(str[begin])) {
    ++begin;
  }
  return (begin);
}


x86 assembly (clang, -O0):
<nonblank_begin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x19(%rbp)
jae    1152 <nonblank_begin+0x42>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <is_blank@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1162 <nonblank_begin+0x52>
jmp    1173 <nonblank_begin+0x63>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <nonblank_begin+0x14>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nonblank_begin>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
cmp    %rdx,%rsi
jae    114b <nonblank_begin+0x3b>
mov    %rdx,%r14
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl (%r15,%rbx,1),%edi
call   1030 <is_blank@plt>
test   %rax,%rax
je     114b <nonblank_begin+0x3b>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <nonblank_begin+0x20>
mov    %r14,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @nonblank_begin(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
br label %7
7: ; preds = %20, %3
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i8*, i8** %4
%13 = load i64, i64* %5
%14 = getelementptr inbounds i8, i8* %12, i64 %13
%15 = load i8, i8* %14
%16 = call i64 @is_blank(i8 signext %15)
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %11, %7
%19 = phi i1 [ false, %7 ], [ %17, %11 ]
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = load i64, i64* %5
%22 = add i64 %21, 1
store i64 %22, i64* %5
br label %7
23: ; preds = %18
%24 = load i64, i64* %5
ret i64 %24
}

LLVM IR (-O2):
define i64 @nonblank_begin(i8* nocapture %0, i64 %1, i64 %2) {
%4 = icmp ult i64 %1, %2
br i1 %4, label %5, label %14
5: ; preds = %3, %11
%6 = phi i64 [ %12, %11 ], [ %1, %3 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i64 @is_blank(i8 signext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %5
%12 = add i64 %6, 1
%13 = icmp eq i64 %12, %2
br i1 %13, label %14, label %5
14: ; preds = %5, %11, %3
%15 = phi i64 [ %1, %3 ], [ %2, %11 ], [ %6, %5 ]
ret i64 %15
}
float deg2rad(float deg) {
  return (deg * (float)3.14159265358979323846264338327) / 180.0f;
}


x86 assembly (clang, -O0):
<deg2rad>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee2(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<deg2rad>:
mulss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @deg2rad(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x400921FB60000000
%5 = fdiv float %4, 1.800000e+02
ret float %5
}

LLVM IR (-O2):
define float @deg2rad(float %0) {
%2 = fmul float %0, 0x400921FB60000000
%3 = fdiv float %2, 1.800000e+02
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char, void *);
int main() {
  char *t = "abcdefg";
  printf("%x,%c,%p\n", (int)t, t[1], (void *)t);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%al
mov    -0x10(%rbp),%rcx
lea    0xec6(%rip),%rdi
movsbl %al,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rcx
lea    0xee9(%rip),%rdi
mov    %ecx,%esi
mov    $0x62,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"abcdefg\00"
@.str.1 = [10 x i8] c"%x,%c,%p\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 ptrtoint ([8 x i8]* @.str to i32), i8 signext 98, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void RTAvlGCPtrRemoveBestFit(void) {}


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

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

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

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