xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ print_ch(int, int, int);
void print_digit(int x, int y, int digit) {
  if (0 <= digit && digit <= 9)
    digit += '0';
  else if (0xA <= digit && digit <= 0xF)
    digit += 'A' - 0xA;
  else
    digit = '?';
  print_ch(x, y, digit);
}


x86 assembly (clang, -O0):
<print_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
cmp    -0xc(%rbp),%eax
jg     1144 <print_digit+0x34>
cmpl   $0x9,-0xc(%rbp)
jg     1144 <print_digit+0x34>
mov    -0xc(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    1176 <print_digit+0x66>
mov    $0xa,%eax
cmp    -0xc(%rbp),%eax
jg     116a <print_digit+0x5a>
cmpl   $0xf,-0xc(%rbp)
jg     116a <print_digit+0x5a>
mov    -0xc(%rbp),%eax
add    $0x37,%eax
mov    %eax,-0xc(%rbp)
jmp    1171 <print_digit+0x61>
movl   $0x3f,-0xc(%rbp)
jmp    1176 <print_digit+0x66>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <print_ch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_digit>:
cmp    $0x9,%edx
ja     111d <print_digit+0xd>
add    $0x30,%edx
jmp    1030 <print_ch@plt>
lea    -0xa(%rdx),%eax
add    $0x37,%edx
cmp    $0x6,%eax
mov    $0x3f,%eax
cmovb  %edx,%eax
mov    %eax,%edx
jmp    1030 <print_ch@plt>

LLVM IR (-O0):
define void @print_digit(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* %6
%8 = icmp sle i32 0, %7
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load i32, i32* %6
%11 = icmp sle i32 %10, 9
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %6
%14 = add nsw i32 %13, 48
store i32 %14, i32* %6
br label %26
15: ; preds = %9, %3
%16 = load i32, i32* %6
%17 = icmp sle i32 10, %16
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = load i32, i32* %6
%20 = icmp sle i32 %19, 15
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 55
store i32 %23, i32* %6
br label %25
24: ; preds = %18, %15
store i32 63, i32* %6
br label %25
25: ; preds = %24, %21
br label %26
26: ; preds = %25, %12
%27 = load i32, i32* %4
%28 = load i32, i32* %5
%29 = load i32, i32* %6
%30 = call i32 @print_ch(i32 %27, i32 %28, i32 %29)
ret void
}

LLVM IR (-O2):
define void @print_digit(i32 %0, i32 %1, i32 %2) {
%4 = icmp ult i32 %2, 10
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = add nuw nsw i32 %2, 48
br label %12
7: ; preds = %3
%8 = add i32 %2, -10
%9 = icmp ult i32 %8, 6
%10 = add nsw i32 %2, 55
%11 = select i1 %9, i32 %10, i32 63
br label %12
12: ; preds = %7, %5
%13 = phi i32 [ %6, %5 ], [ %11, %7 ]
%14 = tail call i32 @print_ch(i32 %0, i32 %1, i32 %13)
ret void
}
void rop3_245_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = ~*D;
  stk1 = T | stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_245_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_245_0_1>:
mov    (%rdi),%r8b
mov    %r8d,%ecx
not    %cl
mov    %edx,%eax
not    %al
and    %cl,%al
or     %dl,%cl
and    %sil,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %al,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_245_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %8
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %7
%20 = load i8, i8* %7
%21 = zext i8 %20 to i32
%22 = load i8, i8* %5
%23 = zext i8 %22 to i32
%24 = and i32 %21, %23
%25 = load i8, i8* %7
%26 = zext i8 %25 to i32
%27 = load i8, i8* %6
%28 = zext i8 %27 to i32
%29 = xor i32 %28, -1
%30 = and i32 %26, %29
%31 = or i32 %24, %30
%32 = load i8, i8* %6
%33 = zext i8 %32 to i32
%34 = load i8, i8* %5
%35 = zext i8 %34 to i32
%36 = xor i32 %35, -1
%37 = and i32 %33, %36
%38 = load i8*, i8** %4
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = and i32 %37, %40
%42 = or i32 %31, %41
%43 = trunc i32 %42 to i8
%44 = load i8*, i8** %4
store i8 %43, i8* %44
ret void
}

LLVM IR (-O2):
define void @rop3_245_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, -1
%6 = or i8 %5, %2
%7 = and i8 %6, %1
%8 = xor i8 %2, -1
%9 = and i8 %5, %8
%10 = xor i8 %1, -1
%11 = and i8 %10, %2
%12 = and i8 %11, %4
%13 = or i8 %12, %9
%14 = or i8 %13, %7
store i8 %14, i8* %0
ret void
}
/* Variables and functions */
int number_mm();
int number_percent(void) {
  long percent;
  while ((percent = number_mm() & (128 - 1)) > 99)
    ;
  return (int)(1 + percent);
}


x86 assembly (clang, -O0):
<number_percent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <number_mm@plt>
and    $0x7f,%eax
cltq
mov    %rax,-0x8(%rbp)
cmp    $0x63,%rax
jle    1137 <number_percent+0x27>
jmp    1118 <number_percent+0x8>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_percent>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <number_mm@plt>
and    $0x7f,%eax
cmp    $0x63,%eax
ja     1120 <number_percent+0x10>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @number_percent() {
%1 = alloca i64
br label %2
2: ; preds = %7, %0
%3 = call i32 (...) @number_mm()
%4 = and i32 %3, 127
%5 = sext i32 %4 to i64
store i64 %5, i64* %1
%6 = icmp sgt i64 %5, 99
br i1 %6, label %7, label %8
7: ; preds = %2
br label %2
8: ; preds = %2
%9 = load i64, i64* %1
%10 = add nsw i64 1, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @number_percent() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @number_mm()
%3 = and i32 %2, 127
%4 = icmp ugt i32 %3, 99
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = add nuw nsw i32 %3, 1
ret i32 %6
}
void module_remove_driver(struct device_driver *drv) {}


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

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

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

LLVM IR (-O2):
%struct.device_driver = type opaque
define void @module_remove_driver(%struct.device_driver* nocapture %0) {
ret void
}
int fegetround(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @fegetround() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @fegetround() {
ret i32 -1
}
/* Variables and functions */
double now_sec();
int /*<<< orphan*/ rte_pause();
void delay_spin(double sec) {
  double target = now_sec() + sec;
  while (now_sec() < target) {
    rte_pause();
  }
}


x86 assembly (clang, -O0):
<delay_spin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <now_sec@plt>
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <now_sec@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1163 <delay_spin+0x43>
mov    $0x0,%al
call   1040 <rte_pause@plt>
jmp    113e <delay_spin+0x1e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_spin>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <now_sec@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <now_sec@plt>
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    115b <delay_spin+0x3b>
xor    %eax,%eax
call   1040 <rte_pause@plt>
jmp    1140 <delay_spin+0x20>
pop    %rax
ret

LLVM IR (-O0):
define void @delay_spin(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = call double (...) @now_sec()
%5 = load double, double* %2
%6 = fadd double %4, %5
store double %6, double* %3
br label %7
7: ; preds = %11, %1
%8 = call double (...) @now_sec()
%9 = load double, double* %3
%10 = fcmp olt double %8, %9
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 (...) @rte_pause()
br label %7
13: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @delay_spin(double %0) {
%2 = tail call double (...) @now_sec()
%3 = fadd double %2, %0
%4 = tail call double (...) @now_sec()
%5 = fcmp olt double %4, %3
br i1 %5, label %6, label %10
6: ; preds = %1, %6
%7 = tail call i32 (...) @rte_pause()
%8 = tail call double (...) @now_sec()
%9 = fcmp olt double %8, %3
br i1 %9, label %6, label %10
10: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ exit(int);
void mem_assert(void *pointer) {
  if (pointer == NULL) {
    error("Allocation error\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<mem_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    114d <mem_assert+0x2d>
lea    0xec2(%rip),%rdi
call   1030 <error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_assert>:
test   %rdi,%rdi
je     1126 <mem_assert+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Allocation error\0A\00"
define void @mem_assert(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @error(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Allocation error\0A\00"
define void @mem_assert(i8* readnone %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @error(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
ret void
}
int test_imm_FAint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xFA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FAint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0xfa,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FAint64_midword_mem>:
testb  $0xfa,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FAint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 16384000
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fork();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main() {
  int i;
  for (i = 0; i < 2; i++) {
    fork();
  }
  printf("forked\n");
  sleep(15);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1165 <main+0x35>
mov    $0x0,%al
call   1050 <fork@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    $0xf,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
xor    %eax,%eax
call   1050 <fork@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
mov    $0xf,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [7 x i8] c"forked\00"
define i32 @main() {
%1 = tail call i32 (...) @fork()
%2 = tail call i32 (...) @fork()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 15)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glMateriali(unsigned int, unsigned int, int);
void Materiali(unsigned int f, unsigned int p, int v) { glMateriali(f, p, v); }


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

x86 assembly (clang, -O2):
<Materiali>:
jmp    1030 <glMateriali@plt>

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

LLVM IR (-O2):
define void @Materiali(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @glMateriali(i32 %0, i32 %1, i32 %2)
ret void
}
/* Type definitions */
struct graph {
  int dummy;
};

/* Variables and functions */
struct graph *adjacencyList(int, int);
int /*<<< orphan*/ printGraph(struct graph *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int e, v;
  printf("Enter number of vertices and number of edges : ");
  scanf("%d%d", &v, &e);
  struct graph *g = adjacencyList(v, e);
  printGraph(g);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x4(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <adjacencyList@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <printGraph@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1040 <scanf@plt>
mov    (%rsp),%edi
mov    0x4(%rsp),%esi
call   1050 <adjacencyList@plt>
mov    %rax,%rdi
call   1060 <printGraph@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.graph = type { i32 }
@.str = [48 x i8] c"Enter number of vertices and number of edges : \00"
@.str.1 = [5 x i8] c"%d%d\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 @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %1)
%7 = load i32, i32* %2
%8 = load i32, i32* %1
%9 = call %struct.graph* @adjacencyList(i32 %7, i32 %8)
%10 = call i32 @printGraph(%struct.graph* %9)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_number_of_quaddobl_solutions(int *length) {
  int *a, fail;
  double *c;
  fail = _ada_use_c2phc4c(392, a, length, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<solcon_number_of_quaddobl_solutions>:
mov    %rdi,%rdx
mov    $0x188,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @solcon_number_of_quaddobl_solutions(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 392, i32* undef, i32* %0, double* undef, i32 0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ iswcntrl(int /*<<< orphan*/);
void uninitvar_iswcntrl(void) {
  wint_t i;
  (void)iswcntrl(i);
}


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

x86 assembly (clang, -O2):
<uninitvar_iswcntrl>:
jmp    1030 <iswcntrl@plt>

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

LLVM IR (-O2):
define void @uninitvar_iswcntrl() {
%1 = tail call i32 @iswcntrl(i32 undef)
ret void
}
void glTexEnvxv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glTexEnvxv() {
ret void
}
/* Variables and functions */
void *realloc(void *, long);
void *_jx_core_realloc(void *in_memory, long in_new_size) {
  if (in_new_size == 0)
    in_new_size = 1;
  return realloc(in_memory, in_new_size);
}


x86 assembly (clang, -O0):
<_jx_core_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <_jx_core_realloc+0x23>
movq   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_jx_core_realloc>:
test   %rsi,%rsi
mov    $0x1,%eax
cmove  %rax,%rsi
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @_jx_core_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
store i64 1, i64* %4
br label %8
8: ; preds = %7, %2
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i8* @realloc(i8* %9, i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @_jx_core_realloc(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
%4 = select i1 %3, i64 1, i64 %1
%5 = tail call i8* @realloc(i8* %0, i64 %4)
ret i8* %5
}
/* Variables and functions */
unsigned long djb2(unsigned char *);
unsigned long hash(unsigned char *str) { return djb2(str); }


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

x86 assembly (clang, -O2):
<hash>:
jmp    1030 <djb2@plt>

LLVM IR (-O0):
define i64 @hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @djb2(i8* %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @hash(i8* %0) {
%2 = tail call i64 @djb2(i8* %0)
ret i64 %2
}
/* Type definitions */
struct mat4 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat4_adjugate(float *, float *);
__attribute__((always_)) struct mat4 *psmat4_adjugate(struct mat4 *result,
                                                      struct mat4 *m) {
  mat4_adjugate((float *)result, (float *)m);
  return result;
}


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

x86 assembly (clang, -O2):
<psmat4_adjugate>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat4_adjugate@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat4 = type { i32 }
define %struct.mat4* @psmat4_adjugate(%struct.mat4* %0, %struct.mat4* %1) {
%3 = alloca %struct.mat4*
%4 = alloca %struct.mat4*
store %struct.mat4* %0, %struct.mat4** %3
store %struct.mat4* %1, %struct.mat4** %4
%5 = load %struct.mat4*, %struct.mat4** %3
%6 = bitcast %struct.mat4* %5 to float*
%7 = load %struct.mat4*, %struct.mat4** %4
%8 = bitcast %struct.mat4* %7 to float*
%9 = call i32 @mat4_adjugate(float* %6, float* %8)
%10 = load %struct.mat4*, %struct.mat4** %3
ret %struct.mat4* %10
}

LLVM IR (-O2):
%struct.mat4 = type { i32 }
define %struct.mat4* @psmat4_adjugate(%struct.mat4* returned %0, %struct.mat4* %1) {
%3 = bitcast %struct.mat4* %0 to float*
%4 = bitcast %struct.mat4* %1 to float*
%5 = tail call i32 @mat4_adjugate(float* %3, float* %4)
ret %struct.mat4* %0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t util_RotL(const uint64_t x, int k) {
  return (x << k) | (x >> (64 - k));
}


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

x86 assembly (clang, -O2):
<util_RotL>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @util_RotL(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 64, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @util_RotL(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 64, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Type definitions */
struct eqn_node {
  int dummy;
};

/* Variables and functions */
char const *eqn_next(struct eqn_node *, char, size_t *, int /*<<< orphan*/);
const char *eqn_nextrawtok(struct eqn_node *ep, size_t *sz) {
  return (eqn_next(ep, '"', sz, 0));
}


x86 assembly (clang, -O0):
<eqn_nextrawtok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x22,%esi
xor    %ecx,%ecx
call   1030 <eqn_next@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eqn_nextrawtok>:
mov    %rsi,%rdx
mov    $0x22,%esi
xor    %ecx,%ecx
jmp    1030 <eqn_next@plt>

LLVM IR (-O0):
%struct.eqn_node = type { i32 }
define i8* @eqn_nextrawtok(%struct.eqn_node* %0, i64* %1) {
%3 = alloca %struct.eqn_node*
%4 = alloca i64*
store %struct.eqn_node* %0, %struct.eqn_node** %3
store i64* %1, i64** %4
%5 = load %struct.eqn_node*, %struct.eqn_node** %3
%6 = load i64*, i64** %4
%7 = call i8* @eqn_next(%struct.eqn_node* %5, i8 signext 34, i64* %6, i32 0)
ret i8* %7
}

LLVM IR (-O2):
%struct.eqn_node = type { i32 }
define i8* @eqn_nextrawtok(%struct.eqn_node* %0, i64* %1) {
%3 = tail call i8* @eqn_next(%struct.eqn_node* %0, i8 signext 34, i64* %1, i32 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ encrypt(char *);
int main() {
  char buff[] = "ciao\0";
  encrypt(buff);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xed5(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xa(%rbp),%rdi
call   1030 <encrypt@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x0,0x4(%rsp)
movl   $0x6f616963,(%rsp)
mov    %rsp,%rdi
call   1030 <encrypt@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.buff = [6 x i8] c"ciao\00\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
store i32 0, i32* %1
%3 = bitcast [6 x i8]* %2 to i8*
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @encrypt(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.buff = [6 x i8] c"ciao\00\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @encrypt(i8* %2)
ret i32 0
}
double pathconN_nm8_sq(double x) { return x * x; }


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

x86 assembly (clang, -O2):
<pathconN_nm8_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @pathconN_nm8_sq(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @pathconN_nm8_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
void av_log2_i() {}


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

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

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

LLVM IR (-O2):
define void @av_log2_i() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nmea_wr_init(char const *);
void nmea_wr_posn_init(const char *fname) { nmea_wr_init(fname); }


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

x86 assembly (clang, -O2):
<nmea_wr_posn_init>:
jmp    1030 <nmea_wr_init@plt>

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

LLVM IR (-O2):
define void @nmea_wr_posn_init(i8* %0) {
%2 = tail call i32 @nmea_wr_init(i8* %0)
ret void
}
int stat(const char *file, struct stat *st) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @stat(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int count_digit_in_range(int, int, int);
int /*<<< orphan*/ printf(char *, int, int, int, int);
int main(int argc, char *argv[]) {
  int number = 0;
  int range_min = 0;
  int range_max = 100;
  printf("%d Times Number %d Coming between %d to %d\n",
         count_digit_in_range(number, range_min, range_max), number, range_min,
         range_max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x64,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1040 <count_digit_in_range@plt>
mov    %eax,%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <count_digit_in_range@plt>
lea    0xeca(%rip),%rdi
mov    %eax,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x64,%r8d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"%d Times Number %d Coming between %d to %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 100, i32* %8
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = call i32 @count_digit_in_range(i32 %9, i32 %10, i32 %11)
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14, i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"%d Times Number %d Coming between %d to %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @count_digit_in_range(i32 0, i32 0, i32 100)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %3, i32 0, i32 0, i32 100)
ret i32 0
}
void g_value_get_uchar() {}


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

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

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

LLVM IR (-O2):
define void @g_value_get_uchar() {
ret void
}
int op_or(int a, int b) { return a | b; }


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

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

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

LLVM IR (-O2):
define i32 @op_or(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ do_display();
int /*<<< orphan*/ glClear(int);
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  do_display();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    0x2eb4(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1040 <do_display@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <do_display@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %1, %2
%4 = call i32 @glClear(i32 %3)
%5 = call i32 (...) @do_display()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 (...) @do_display()
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int int64_t;

/* Variables and functions */
int64_t unzigzag(uint64_t n) { return (n >> 1) ^ (-(n & 1)); }


x86 assembly (clang, -O0):
<unzigzag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unzigzag>:
mov    %edi,%eax
sar    %eax
and    $0x1,%edi
neg    %edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @unzigzag(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = load i32, i32* %2
%6 = and i32 %5, 1
%7 = sub nsw i32 0, %6
%8 = xor i32 %4, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @unzigzag(i32 %0) {
%2 = ashr i32 %0, 1
%3 = and i32 %0, 1
%4 = sub nsw i32 0, %3
%5 = xor i32 %2, %4
ret i32 %5
}
long double _Complex sub_long_double_rr(long double a, long double b) {
  return a - b;
}


x86 assembly (clang, -O0):
<sub_long_double_rr>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x30(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
fsubrp %st,%st(1)
fstpt  -0x20(%rbp)
fldz
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_long_double_rr>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fsubp  %st,%st(1)
fldz
fxch   %st(1)
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @sub_long_double_rr(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca { x86_fp80, x86_fp80 }
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
%6 = load x86_fp80, x86_fp80* %4
%7 = load x86_fp80, x86_fp80* %5
%8 = fsub x86_fp80 %6, %7
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%10 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %8, x86_fp80* %9
store x86_fp80 0xK00000000000000000000, x86_fp80* %10
%11 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3
ret { x86_fp80, x86_fp80 } %11
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @sub_long_double_rr(x86_fp80 %0, x86_fp80 %1) {
%3 = fsub x86_fp80 %0, %1
%4 = insertvalue { x86_fp80, x86_fp80 } poison, x86_fp80 %3, 0
%5 = insertvalue { x86_fp80, x86_fp80 } %4, x86_fp80 0xK00000000000000000000, 1
ret { x86_fp80, x86_fp80 } %5
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_06(uint64_t x) {
  __asm__("rolq $6, %0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<ROL64_06>:
mov    %rdi,%rax
rol    $0x6,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_06(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$6, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_06(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$6, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
void Add16Bits(unsigned short *carry, unsigned short *a, unsigned short b,
               unsigned short c) {
  unsigned long accum;
  accum = (unsigned long)b;
  accum += (unsigned long)c;
  accum += (unsigned long)*carry;
  *carry = (unsigned short)((accum & 0x00010000) ? 1 : 0);
  *a = (unsigned short)(accum & 0xFFFF);
  return;
}


x86 assembly (clang, -O0):
<Add16Bits>:
push   %rbp
mov    %rsp,%rbp
mov    %cx,%ax
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %ax,-0x14(%rbp)
movzwl -0x12(%rbp),%eax
mov    %rax,-0x20(%rbp)
movzwl -0x14(%rbp),%eax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdx
and    $0x10000,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %ax,%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
mov    -0x20(%rbp),%rax
and    $0xffff,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Add16Bits>:
mov    %edx,%eax
mov    %ecx,%ecx
add    %rax,%rcx
movzwl (%rdi),%eax
add    %rcx,%rax
mov    %eax,%ecx
shr    $0x10,%ecx
and    $0x1,%ecx
mov    %cx,(%rdi)
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @Add16Bits(i16* %0, i16* %1, i16 zeroext %2, i16 zeroext %3) {
%5 = alloca i16*
%6 = alloca i16*
%7 = alloca i16
%8 = alloca i16
%9 = alloca i64
store i16* %0, i16** %5
store i16* %1, i16** %6
store i16 %2, i16* %7
store i16 %3, i16* %8
%10 = load i16, i16* %7
%11 = zext i16 %10 to i64
store i64 %11, i64* %9
%12 = load i16, i16* %8
%13 = zext i16 %12 to i64
%14 = load i64, i64* %9
%15 = add i64 %14, %13
store i64 %15, i64* %9
%16 = load i16*, i16** %5
%17 = load i16, i16* %16
%18 = zext i16 %17 to i64
%19 = load i64, i64* %9
%20 = add i64 %19, %18
store i64 %20, i64* %9
%21 = load i64, i64* %9
%22 = and i64 %21, 65536
%23 = icmp ne i64 %22, 0
%24 = zext i1 %23 to i64
%25 = select i1 %23, i32 1, i32 0
%26 = trunc i32 %25 to i16
%27 = load i16*, i16** %5
store i16 %26, i16* %27
%28 = load i64, i64* %9
%29 = and i64 %28, 65535
%30 = trunc i64 %29 to i16
%31 = load i16*, i16** %6
store i16 %30, i16* %31
ret void
}

LLVM IR (-O2):
define void @Add16Bits(i16* nocapture %0, i16* nocapture writeonly %1, i16 zeroext %2, i16 zeroext %3) {
%5 = zext i16 %2 to i64
%6 = zext i16 %3 to i64
%7 = add nuw nsw i64 %6, %5
%8 = load i16, i16* %0
%9 = zext i16 %8 to i64
%10 = add nuw nsw i64 %7, %9
%11 = lshr i64 %10, 16
%12 = trunc i64 %11 to i16
%13 = and i16 %12, 1
store i16 %13, i16* %0
%14 = trunc i64 %10 to i16
store i16 %14, i16* %1
ret void
}
/* Variables and functions */
int dll_open(char const *, int);
int __wrap_open(const char *file, int oflag, ...) {
  return dll_open(file, oflag);
}


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

x86 assembly (clang, -O2):
<__wrap_open>:
jmp    1030 <dll_open@plt>

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

LLVM IR (-O2):
define i32 @__wrap_open(i8* %0, i32 %1, ...) {
%3 = tail call i32 @dll_open(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ mg_drain(int, int);
int mg_open(char *);
int /*<<< orphan*/ mg_release(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int qid;
  qid = mg_open("/tmp/pb_msgqueue");
  printf("qid %d\n", qid);
  while (1) {
    mg_drain(qid, (1));
  }
  mg_release(qid);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <mg_open@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    $0x1,%esi
call   1050 <mg_drain@plt>
jmp    1164 <main+0x34>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <mg_open@plt>
mov    %eax,%ebx
lea    0xecb(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
nopl   (%rax)
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <mg_drain@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [17 x i8] c"/tmp/pb_msgqueue\00"
@.str.1 = [8 x i8] c"qid %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @mg_open(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %2, %10
%11 = load i32, i32* %6
%12 = call i32 @mg_drain(i32 %11, i32 1)
br label %10
}

LLVM IR (-O2):
@.str = [17 x i8] c"/tmp/pb_msgqueue\00"
@.str.1 = [8 x i8] c"qid %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @mg_open(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %3)
br label %5
5: ; preds = %5, %2
%6 = tail call i32 @mg_drain(i32 %3, i32 1)
br label %5
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ delete (void **);
void *newAndZero(void **ptr, size_t count, size_t size) {
  if (!ptr)
    return NULL;
  delete (ptr);
  *ptr = calloc(count, size);
  return *ptr;
}


x86 assembly (clang, -O0):
<newAndZero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114c <newAndZero+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    1177 <newAndZero+0x57>
mov    -0x10(%rbp),%rdi
call   1040 <delete@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newAndZero>:
test   %rdi,%rdi
je     114c <newAndZero+0x2c>
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <delete@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <calloc@plt>
mov    %rax,(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @newAndZero(i8** %0, i64 %1, i64 %2) {
%4 = icmp eq i8** %0, null
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i32 @delete(i8** %0)
%7 = tail call i8* @calloc(i64 %1, i64 %2)
store i8* %7, i8** %0
br label %8
8: ; preds = %3, %5
%9 = phi i8* [ %7, %5 ], [ null, %3 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x0b() {
  Assert_real((ispunct(11) == 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_ispunct.c",
              60, ("ispunct should be 0 for 0x0b"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x0b>:
push   %rax
mov    $0xb,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x0b\00"
define void @t_ispunct_0x0b() {
%1 = tail call i64 @ispunct(i32 11)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 60, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *srpc_malloc(size_t);
void *srpc_calloc(size_t nmemb, size_t size) {
  void *ptr;
  size_t len;
  len = nmemb * ((size - 1) / sizeof(void *) + 1) * sizeof(void *);
  if ((ptr = srpc_malloc(len)) != NULL)
    (void)memset(ptr, 0, len);
  return (ptr);
}


x86 assembly (clang, -O0):
<srpc_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
shr    $0x3,%rcx
add    $0x1,%rcx
imul   %rcx,%rax
shl    $0x3,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <srpc_malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1176 <srpc_calloc+0x56>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<srpc_calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
add    $0xffffffffffffffff,%rbx
shr    $0x3,%rbx
add    $0x1,%rbx
imul   %rdi,%rbx
shl    $0x3,%rbx
mov    %rbx,%rdi
call   1040 <srpc_malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1158 <srpc_calloc+0x38>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @srpc_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = sub i64 %8, 1
%10 = udiv i64 %9, 8
%11 = add i64 %10, 1
%12 = mul i64 %7, %11
%13 = mul i64 %12, 8
store i64 %13, i64* %6
%14 = load i64, i64* %6
%15 = call i8* @srpc_malloc(i64 %14)
store i8* %15, i8** %5
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %21
17: ; preds = %2
%18 = load i8*, i8** %5
%19 = load i64, i64* %6
%20 = call i32 @memset(i8* %18, i32 0, i64 %19)
br label %21
21: ; preds = %17, %2
%22 = load i8*, i8** %5
ret i8* %22
}

LLVM IR (-O2):
define i8* @srpc_calloc(i64 %0, i64 %1) {
%3 = add i64 %1, -1
%4 = lshr i64 %3, 3
%5 = add nuw nsw i64 %4, 1
%6 = shl i64 %0, 3
%7 = mul i64 %6, %5
%8 = tail call i8* @srpc_malloc(i64 %7)
%9 = icmp eq i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = tail call i32 @memset(i8* %8, i32 0, i64 %7)
br label %12
12: ; preds = %10, %2
ret i8* %8
}