xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ between(char, float, char);
scalar_t__ num(char);
int hex(char c) {
  return num(c) || between('a', 'f', c) || between('A', 'F', c);
}


x86 assembly (clang, -O0):
<hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <num@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1191 <hex+0x71>
mov    $0x61,%edi
movss  0xeaa(%rip),%xmm0
movsbl -0x1(%rbp),%esi
call   1040 <between@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1191 <hex+0x71>
mov    $0x41,%edi
movss  0xe86(%rip),%xmm0
movsbl -0x1(%rbp),%esi
call   1040 <between@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1030 <num@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    116d <hex+0x4d>
movsbl %bpl,%ebp
movss  0xec0(%rip),%xmm0
mov    $0x61,%edi
mov    %ebp,%esi
call   1040 <between@plt>
test   %rax,%rax
jne    116d <hex+0x4d>
movss  0xeab(%rip),%xmm0
mov    $0x41,%edi
mov    %ebp,%esi
call   1040 <between@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @num(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @between(i8 signext 97, float 1.020000e+02, i8 signext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = call i64 @between(i8 signext 65, float 7.000000e+01, i8 signext %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @hex(i8 signext %0) {
%2 = tail call i64 @num(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i64 @between(i8 signext 97, float 1.020000e+02, i8 signext %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @between(i8 signext 65, float 7.000000e+01, i8 signext %0)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %10, %7 ]
ret i32 %12
}
void structs(void) {
  typedef struct {
    unsigned x;
  } tester_t;
  tester_t x;
  tester_t *z = &x;
  x.x = 5;
  z->x = 4;
}


x86 assembly (clang, -O0):
<structs>:
push   %rbp
mov    %rsp,%rbp
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x4,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tester_t = type { i32 }
define void @structs() {
%1 = alloca %struct.tester_t
%2 = alloca %struct.tester_t*
store %struct.tester_t* %1, %struct.tester_t** %2
%3 = getelementptr inbounds %struct.tester_t, %struct.tester_t* %1, i32 0, i32 0
store i32 5, i32* %3
%4 = load %struct.tester_t*, %struct.tester_t** %2
%5 = getelementptr inbounds %struct.tester_t, %struct.tester_t* %4, i32 0, i32 0
store i32 4, i32* %5
ret void
}

LLVM IR (-O2):
%struct.tester_t = type { i32 }
define void @structs() {
ret void
}
char pop(char **stackp) {
  (*stackp)--;
  return **stackp;
}


x86 assembly (clang, -O0):
<pop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop>:
mov    (%rdi),%rax
lea    -0x1(%rax),%rcx
mov    %rcx,(%rdi)
mov    -0x1(%rax),%al
ret

LLVM IR (-O0):
define signext i8 @pop(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i32 -1
store i8* %5, i8** %3
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = load i8, i8* %7
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @pop(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 -1
store i8* %3, i8** %0
%4 = load i8, i8* %3
ret i8 %4
}
int FN_GetChLrRange() { return (0); }


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

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

LLVM IR (-O0):
define i32 @FN_GetChLrRange() {
ret i32 0
}

LLVM IR (-O2):
define i32 @FN_GetChLrRange() {
ret i32 0
}
int do_187() { return 187; }


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

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

LLVM IR (-O0):
define i32 @do_187() {
ret i32 187
}

LLVM IR (-O2):
define i32 @do_187() {
ret i32 187
}
int mlx5dr_table_destroy(struct mlx5dr_table *table) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mlx5dr_table = type opaque
define i32 @mlx5dr_table_destroy(%struct.mlx5dr_table* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printInt(char);
int /*<<< orphan*/ printStr(char *);
int /*<<< orphan*/ readInt(char);
void main() {
  char x, y;
  char msg[15] = "Enter number: ";
  printStr(msg);
  readInt(x);
  printStr(msg);
  readInt(y);
  printStr("result: ");
  printInt(x * y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x11(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xeb9(%rip),%ax
mov    %ax,-0x5(%rbp)
mov    0xeb1(%rip),%al
mov    %al,-0x3(%rbp)
lea    -0x11(%rbp),%rdi
call   1040 <printStr@plt>
movsbl -0x1(%rbp),%edi
call   1050 <readInt@plt>
lea    -0x11(%rbp),%rdi
call   1040 <printStr@plt>
movsbl -0x2(%rbp),%edi
call   1050 <readInt@plt>
lea    0xe84(%rip),%rdi
call   1040 <printStr@plt>
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
imul   %ecx,%eax
movsbl %al,%edi
call   1030 <printInt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x203a7265626d75,%rax
mov    %rax,0x7(%rsp)
movabs $0x756e207265746e45,%rax
20 6e 75
mov    %rax,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <printStr@plt>
xor    %edi,%edi
call   1050 <readInt@plt>
mov    %rbx,%rdi
call   1040 <printStr@plt>
xor    %edi,%edi
call   1050 <readInt@plt>
lea    0xe95(%rip),%rdi
call   1040 <printStr@plt>
xor    %edi,%edi
call   1030 <printInt@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.msg = [15 x i8] c"Enter number: \00"
@.str = [9 x i8] c"result: \00"
define void @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca [15 x i8]
%4 = bitcast [15 x i8]* %3 to i8*
%5 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%6 = call i32 @printStr(i8* %5)
%7 = load i8, i8* %1
%8 = call i32 @readInt(i8 signext %7)
%9 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%10 = call i32 @printStr(i8* %9)
%11 = load i8, i8* %2
%12 = call i32 @readInt(i8 signext %11)
%13 = call i32 @printStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%14 = load i8, i8* %1
%15 = sext i8 %14 to i32
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = mul nsw i32 %15, %17
%19 = trunc i32 %18 to i8
%20 = call i32 @printInt(i8 signext %19)
ret void
}

LLVM IR (-O2):
@__const.main.msg = [15 x i8] c"Enter number: \00"
@.str = [9 x i8] c"result: \00"
define void @main() {
%1 = alloca [15 x i8]
%2 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%3 = call i32 @printStr(i8* %2)
%4 = call i32 @readInt(i8 signext undef)
%5 = call i32 @printStr(i8* %2)
%6 = call i32 @readInt(i8 signext undef)
%7 = call i32 @printStr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @printInt(i8 signext 0)
ret void
}
double F_edgeBlendQuad(int *index, double *L) { return 0.0; }


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

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

LLVM IR (-O0):
define double @F_edgeBlendQuad(i32* %0, double* %1) {
%3 = alloca i32*
%4 = alloca double*
store i32* %0, i32** %3
store double* %1, double** %4
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @F_edgeBlendQuad(i32* nocapture readnone %0, double* nocapture readnone %1) {
ret double 0.000000e+00
}
void echanger(int *t, int n1, int n2) {
  int c = t[n1];
  t[n1] = t[n2];
  t[n2] = c;
}


x86 assembly (clang, -O0):
<echanger>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<echanger>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @echanger(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @echanger(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
int test_imm_1Eint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x1E << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_1Eint64_highword_mem>:
testb  $0x1e,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_1Eint64_highword_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, 32
%6 = and i64 %5, 30
%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_1Eint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 128849018880
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int is_set(unsigned long *x, int n) {
  int r = n >> 5;
  unsigned long m = 1UL << (n & 31);
  return !!(x[r] & m);
}


x86 assembly (clang, -O0):
<is_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x5,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1f,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
and    -0x18(%rbp),%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_set>:
mov    %esi,%eax
sar    $0x5,%eax
cltq
mov    (%rdi,%rax,8),%ecx
xor    %eax,%eax
bt     %esi,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @is_set(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i64* %0, i64** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = ashr i32 %7, 5
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = and i32 %9, 31
%11 = zext i32 %10 to i64
%12 = shl i64 1, %11
store i64 %12, i64* %6
%13 = load i64*, i64** %3
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i64, i64* %13, i64 %15
%17 = load i64, i64* %16
%18 = load i64, i64* %6
%19 = and i64 %17, %18
%20 = icmp ne i64 %19, 0
%21 = xor i1 %20, true
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @is_set(i64* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 5
%4 = and i32 %1, 31
%5 = zext i32 %4 to i64
%6 = shl nuw nsw i64 1, %5
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 %7
%9 = load i64, i64* %8
%10 = and i64 %9, %6
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}
int main() {
  int x = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int **buildMat123(int, int);
int /*<<< orphan*/ deleteMat(int **, int);
int /*<<< orphan*/ outMat(int **, int, int);
int **rotateMat90c(int **, int);
void testRotateMat90c() {
  int size = 4;
  int **xs = buildMat123(size, size);
  outMat(xs, size, size);
  int **ys = rotateMat90c(xs, size);
  outMat(ys, size, size);
  deleteMat(xs, size);
  deleteMat(ys, size);
}


x86 assembly (clang, -O0):
<testRotateMat90c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1060 <buildMat123@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
call   1030 <outMat@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <rotateMat90c@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
call   1030 <outMat@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1050 <deleteMat@plt>
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1050 <deleteMat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testRotateMat90c>:
push   %r14
push   %rbx
push   %rax
mov    $0x4,%edi
mov    $0x4,%esi
call   1060 <buildMat123@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x4,%esi
mov    $0x4,%edx
call   1030 <outMat@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <rotateMat90c@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    $0x4,%esi
mov    $0x4,%edx
call   1030 <outMat@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <deleteMat@plt>
mov    %r14,%rdi
mov    $0x4,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <deleteMat@plt>

LLVM IR (-O0):
define void @testRotateMat90c() {
%1 = alloca i32
%2 = alloca i32**
%3 = alloca i32**
store i32 4, i32* %1
%4 = load i32, i32* %1
%5 = load i32, i32* %1
%6 = call i32** @buildMat123(i32 %4, i32 %5)
store i32** %6, i32*** %2
%7 = load i32**, i32*** %2
%8 = load i32, i32* %1
%9 = load i32, i32* %1
%10 = call i32 @outMat(i32** %7, i32 %8, i32 %9)
%11 = load i32**, i32*** %2
%12 = load i32, i32* %1
%13 = call i32** @rotateMat90c(i32** %11, i32 %12)
store i32** %13, i32*** %3
%14 = load i32**, i32*** %3
%15 = load i32, i32* %1
%16 = load i32, i32* %1
%17 = call i32 @outMat(i32** %14, i32 %15, i32 %16)
%18 = load i32**, i32*** %2
%19 = load i32, i32* %1
%20 = call i32 @deleteMat(i32** %18, i32 %19)
%21 = load i32**, i32*** %3
%22 = load i32, i32* %1
%23 = call i32 @deleteMat(i32** %21, i32 %22)
ret void
}

LLVM IR (-O2):
define void @testRotateMat90c() {
%1 = tail call i32** @buildMat123(i32 4, i32 4)
%2 = tail call i32 @outMat(i32** %1, i32 4, i32 4)
%3 = tail call i32** @rotateMat90c(i32** %1, i32 4)
%4 = tail call i32 @outMat(i32** %3, i32 4, i32 4)
%5 = tail call i32 @deleteMat(i32** %1, i32 4)
%6 = tail call i32 @deleteMat(i32** %3, i32 4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ CRYPTO_EX_new;
typedef int /*<<< orphan*/ CRYPTO_EX_free;
typedef int /*<<< orphan*/ CRYPTO_EX_dup;

/* Variables and functions */
int /*<<< orphan*/ CRYPTO_EX_INDEX_ENGINE;
int CRYPTO_get_ex_new_index(int /*<<< orphan*/, long, void *,
                            int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                            int /*<<< orphan*/ *);
int ENGINE_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
                            CRYPTO_EX_dup *dup_func,
                            CRYPTO_EX_free *free_func) {
  return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_ENGINE, argl, argp, new_func,
                                 dup_func, free_func);
}


x86 assembly (clang, -O0):
<ENGINE_get_ex_new_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
call   1030 <CRYPTO_get_ex_new_index@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ENGINE_get_ex_new_index>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
jmp    1030 <CRYPTO_get_ex_new_index@plt>

LLVM IR (-O0):
@CRYPTO_EX_INDEX_ENGINE = global i32 0
define i32 @ENGINE_get_ex_new_index(i64 %0, i8* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i64 %0, i64* %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i32, i32* @CRYPTO_EX_INDEX_ENGINE
%12 = load i64, i64* %6
%13 = load i8*, i8** %7
%14 = load i32*, i32** %8
%15 = load i32*, i32** %9
%16 = load i32*, i32** %10
%17 = call i32 @CRYPTO_get_ex_new_index(i32 %11, i64 %12, i8* %13, i32* %14, i32* %15, i32* %16)
ret i32 %17
}

LLVM IR (-O2):
@CRYPTO_EX_INDEX_ENGINE = global i32 0
define i32 @ENGINE_get_ex_new_index(i64 %0, i8* %1, i32* %2, i32* %3, i32* %4) {
%6 = load i32, i32* @CRYPTO_EX_INDEX_ENGINE
%7 = tail call i32 @CRYPTO_get_ex_new_index(i32 %6, i64 %0, i8* %1, i32* %2, i32* %3, i32* %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fork();
int getpid();
int getppid();
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ sleep(int);
int main(void) {
  fork();
  fork();
  fork();
  fork();
  printf("PID: %d\t PPID: %d\n", getpid(), getppid());
  sleep(10);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <fork@plt>
mov    $0x0,%al
call   1080 <fork@plt>
mov    $0x0,%al
call   1080 <fork@plt>
mov    $0x0,%al
call   1080 <fork@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getppid@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xe58(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1070 <sleep@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1080 <fork@plt>
xor    %eax,%eax
call   1080 <fork@plt>
xor    %eax,%eax
call   1080 <fork@plt>
xor    %eax,%eax
call   1080 <fork@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getppid@plt>
lea    0xe6c(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    $0xa,%edi
call   1070 <sleep@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"PID: %d\09 PPID: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @fork()
%3 = call i32 (...) @fork()
%4 = call i32 (...) @fork()
%5 = call i32 (...) @fork()
%6 = call i32 (...) @getpid()
%7 = call i32 (...) @getppid()
%8 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = call i32 @sleep(i32 10)
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"PID: %d\09 PPID: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @fork()
%2 = tail call i32 (...) @fork()
%3 = tail call i32 (...) @fork()
%4 = tail call i32 (...) @fork()
%5 = tail call i32 (...) @getpid()
%6 = tail call i32 (...) @getppid()
%7 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = tail call i32 @sleep(i32 10)
%9 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ handle(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
void main() {
  char *str1;
  char *str2;
  printf("Please enter the str1:\n");
  scanf("%s", str1);
  handle(str1, str2);
  printf("%s", str2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <handle@plt>
mov    -0x10(%rbp),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rbx
mov    %rbx,%rdi
call   1060 <scanf@plt>
call   1050 <handle@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Please enter the str1:\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @main() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %1
%7 = load i8*, i8** %2
%8 = call i32 @handle(i8* %6, i8* %7)
%9 = load i8*, i8** %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@str = [23 x i8] c"Please enter the str1:\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* undef)
%3 = tail call i32 @handle(i8* undef, i8* undef)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* undef)
ret void
}
char *dois(void) { return "dois"; }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"dois\00"
define i8* @dois() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"dois\00"
define i8* @dois() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void statusput(char *buf) { printf("%s\n", buf); }


x86 assembly (clang, -O0):
<statusput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<statusput>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @statusput(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t);
void bzero_0(char *s, size_t n) { memset(s, 0, n); }


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

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

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

LLVM IR (-O2):
define void @bzero_0(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef long uint32_t;

/* Variables and functions */
long htonl(int);
uint64_t hton64(uint64_t val) {
  union {
    uint64_t ll;
    uint32_t l[2];
  } w, r;
  if (htonl(1) == 1L)
    return val;
  w.ll = val;
  r.l[0] = htonl(w.l[1]);
  r.l[1] = htonl(w.l[0]);
  return r.ll;
}


x86 assembly (clang, -O0):
<hton64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <htonl@plt>
cmp    $0x1,%rax
jne    113a <hton64+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <hton64+0x54>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1030 <htonl@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,%edi
call   1030 <htonl@plt>
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hton64>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <htonl@plt>
cmp    $0x1,%rax
je     1138 <hton64+0x28>
call   1030 <htonl@plt>
mov    %rax,%r14
mov    %ebx,%edi
call   1030 <htonl@plt>
mov    %r14d,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%union.anon = type { [2 x i64] }
define i32 @hton64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %union.anon
%5 = alloca %union.anon
store i32 %0, i32* %3
%6 = call i64 @htonl(i32 1)
%7 = icmp eq i64 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %3
store i32 %9, i32* %2
br label %29
10: ; preds = %1
%11 = load i32, i32* %3
%12 = bitcast %union.anon* %4 to i32*
store i32 %11, i32* %12
%13 = bitcast %union.anon* %4 to [2 x i64]*
%14 = getelementptr inbounds [2 x i64], [2 x i64]* %13, i64 0, i64 1
%15 = load i64, i64* %14
%16 = trunc i64 %15 to i32
%17 = call i64 @htonl(i32 %16)
%18 = bitcast %union.anon* %5 to [2 x i64]*
%19 = getelementptr inbounds [2 x i64], [2 x i64]* %18, i64 0, i64 0
store i64 %17, i64* %19
%20 = bitcast %union.anon* %4 to [2 x i64]*
%21 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
%22 = load i64, i64* %21
%23 = trunc i64 %22 to i32
%24 = call i64 @htonl(i32 %23)
%25 = bitcast %union.anon* %5 to [2 x i64]*
%26 = getelementptr inbounds [2 x i64], [2 x i64]* %25, i64 0, i64 1
store i64 %24, i64* %26
%27 = bitcast %union.anon* %5 to i32*
%28 = load i32, i32* %27
store i32 %28, i32* %2
br label %29
29: ; preds = %10, %8
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @hton64(i32 %0) {
%2 = tail call i64 @htonl(i32 1)
%3 = icmp eq i64 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @htonl(i32 undef)
%6 = trunc i64 %5 to i32
%7 = tail call i64 @htonl(i32 %0)
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %6, %4 ], [ %0, %1 ]
ret i32 %9
}
__attribute__((no, noclone)) signed __int128 t104_4sub(signed __int128 x) {
  signed __int128 y =
      ((-((signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1)) - 1));
  signed __int128 r;
  if (__builtin_sub_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t104_4sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movabs $0x8000000000000000,%rax
mov    %rax,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rax
sub    %rsi,%rdx
sbb    %rax,%rcx
seto   %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    1174 <t104_4sub+0x64>
jmp    117b <t104_4sub+0x6b>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t104_4sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movabs $0x8000000000000000,%rax
sub    %rax,%rbx
jno    1130 <t104_4sub+0x20>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t104_4sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 -170141183460469231731687303715884105728, i128* %6
%12 = load i128, i128* %5
%13 = load i128, i128* %6
%14 = call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 %12, i128 %13)
%15 = extractvalue { i128, i1 } %14, 1
%16 = extractvalue { i128, i1 } %14, 0
store i128 %16, i128* %7
br i1 %15, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %2
%20 = load i128, i128* %7
store i128 %20, i128* %3
%21 = bitcast i128* %3 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t104_4sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 %6, i128 -170141183460469231731687303715884105728)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
unsigned long rand();
int /*<<< orphan*/ srand(unsigned long);
unsigned long time(int /*<<< orphan*/);
unsigned long random_xid(void) {
  static int initialized;
  if (!initialized) {
    int fd;
    unsigned long seed;
    seed = time(0);
    srand(seed);
    initialized++;
  }
  return rand();
}


x86 assembly (clang, -O0):
<random_xid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2efd(%rip)
jne    1168 <random_xid+0x38>
xor    %edi,%edi
call   1040 <time@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <srand@plt>
mov    0x2edd(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ed4(%rip)
mov    $0x0,%al
call   1050 <rand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_xid>:
push   %rax
cmpl   $0x0,0x2f04(%rip)
jne    1150 <random_xid+0x20>
xor    %edi,%edi
call   1040 <time@plt>
mov    %rax,%rdi
call   1030 <srand@plt>
addl   $0x1,0x2eec(%rip)
xor    %eax,%eax
pop    %rcx
jmp    1050 <rand@plt>

LLVM IR (-O0):
@random_xid.initialized = internal global i32 0
define i64 @random_xid() {
%1 = alloca i32
%2 = alloca i64
%3 = load i32, i32* @random_xid.initialized
%4 = icmp ne i32 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %0
%6 = call i64 @time(i32 0)
store i64 %6, i64* %2
%7 = load i64, i64* %2
%8 = call i32 @srand(i64 %7)
%9 = load i32, i32* @random_xid.initialized
%10 = add nsw i32 %9, 1
store i32 %10, i32* @random_xid.initialized
br label %11
11: ; preds = %5, %0
%12 = call i64 (...) @rand()
ret i64 %12
}

LLVM IR (-O2):
@random_xid.initialized = internal unnamed_addr global i32 0
define i64 @random_xid() {
%1 = load i32, i32* @random_xid.initialized
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i64 @time(i32 0)
%5 = tail call i32 @srand(i64 %4)
%6 = load i32, i32* @random_xid.initialized
%7 = add nsw i32 %6, 1
store i32 %7, i32* @random_xid.initialized
br label %8
8: ; preds = %3, %0
%9 = tail call i64 (...) @rand()
ret i64 %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void ADCComparatorIntClear(uint32_t ui32Base, uint32_t ui32Status) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000034))) = ui32Status;
}


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

x86 assembly (clang, -O2):
<ADCComparatorIntClear>:
mov    %rsi,0x34(%rdi)
ret

LLVM IR (-O0):
define void @ADCComparatorIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 52
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @ADCComparatorIntClear(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 52
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
char *get_ptr() {
  char *temp;
  temp = "hello world";
  return temp;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
define i8* @get_ptr() {
%1 = alloca i8*
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
define i8* @get_ptr() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_key_t;

/* Variables and functions */
int kthread_key_create(int /*<<< orphan*/ *, void (*)(void *));
int pthread_key_create(pthread_key_t *key, void (*destructor)(void *)) {
  return kthread_key_create(key, destructor);
}


x86 assembly (clang, -O0):
<pthread_key_create>:
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 <kthread_key_create@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_key_create>:
jmp    1030 <kthread_key_create@plt>

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

LLVM IR (-O2):
define i32 @pthread_key_create(i32* %0, void (i8*)* %1) {
%3 = tail call i32 @kthread_key_create(i32* %0, void (i8*)* %1)
ret i32 %3
}
void avformat_license() {}


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

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

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

LLVM IR (-O2):
define void @avformat_license() {
ret void
}
void UART1WriteChar(unsigned char ch) {
  while (((*(volatile unsigned long *)(0xE0010000 + 0x14)) & 0x20) == 0)
    ;
  (*(volatile unsigned long *)(0xE0010000 + 0x00)) = ch;
}


x86 assembly (clang, -O0):
<UART1WriteChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xe0010014,%eax
mov    (%rax),%rax
and    $0x20,%rax
cmp    $0x0,%rax
jne    1125 <UART1WriteChar+0x25>
jmp    110a <UART1WriteChar+0xa>
movzbl -0x1(%rbp),%eax
mov    %eax,%ecx
mov    $0xe0010000,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART1WriteChar>:
mov    $0xe0010000,%eax
cs nopw 0x0(%rax,%rax,1)
nop
testq  $0x20,0x14(%rax)
je     1110 <UART1WriteChar+0x10>
movzbl %dil,%ecx
mov    %rcx,(%rax)
ret

LLVM IR (-O0):
define void @UART1WriteChar(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = load volatile i64, i64* inttoptr (i64 3758161940 to i64*)
%5 = and i64 %4, 32
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i8, i8* %2
%10 = zext i8 %9 to i64
store volatile i64 %10, i64* inttoptr (i64 3758161920 to i64*)
ret void
}

LLVM IR (-O2):
define void @UART1WriteChar(i8 zeroext %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i64, i64* inttoptr (i64 3758161940 to i64*)
%4 = and i64 %3, 32
%5 = icmp eq i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = zext i8 %0 to i64
store volatile i64 %7, i64* inttoptr (i64 3758161920 to i64*)
ret void
}
unsigned long long g() {
  long long l2;
  unsigned short us;
  unsigned long long ul;
  short s2;
  ul = us = l2 = s2 = -1;
  return ul;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
movw   $0xffff,-0x1a(%rbp)
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
movw   $0xffff,-0xa(%rbp)
movq   $0xffff,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @g() {
%1 = alloca i64
%2 = alloca i16
%3 = alloca i64
%4 = alloca i16
store i16 -1, i16* %4
store i64 -1, i64* %1
store i16 -1, i16* %2
store i64 65535, i64* %3
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @g() {
ret i64 65535
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ iscntrl(int /*<<< orphan*/);
void t_iscntrl_0x00() {
  Assert_real((iscntrl(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_iscntrl.c",
              5, ("iscntrl should be 1 for 0x00"));
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <iscntrl@plt>
mov    %eax,%edi
lea    0xecc(%rip),%rsi
mov    $0x5,%edx
lea    0xf68(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
xor    %edi,%edi
call   1030 <iscntrl@plt>
lea    0xed1(%rip),%rsi
lea    0xf72(%rip),%rcx
mov    %eax,%edi
mov    $0x5,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x00\00"
define void @t_iscntrl_0x00() {
%1 = call i32 @iscntrl(i32 0)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 5, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x00\00"
define void @t_iscntrl_0x00() {
%1 = tail call i32 @iscntrl(i32 0)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void g_set_error() {}


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

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

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

LLVM IR (-O2):
define void @g_set_error() {
ret void
}
void delay(unsigned long n) {
  unsigned long i;
  while (n--) {
    i = 2;
    while (i--)
      __asm__("nop");
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
cmp    $0x0,%rax
je     114d <delay+0x4d>
movq   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     1148 <delay+0x48>
nop
jmp    1129 <delay+0x29>
jmp    1108 <delay+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
test   %rdi,%rdi
je     1118 <delay+0x18>
cs nopw 0x0(%rax,%rax,1)
nop
nop
nop
add    $0xffffffffffffffff,%rdi
jne    1110 <delay+0x10>
ret

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

LLVM IR (-O2):
define void @delay(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %5, %3 ], [ %0, %1 ]
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
%5 = add i64 %4, -1
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ strncmp(char const *, char const *, size_t);
int streq(const char *s1, const char *s2, size_t len) {
  if (s1 == s2)
    return 1;
  if (s1 == NULL || s2 == NULL)
    return 0;
  return strncmp(s1, s2, len) == 0;
}


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    113e <streq+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1180 <streq+0x70>
cmpq   $0x0,-0x10(%rbp)
je     1154 <streq+0x44>
cmpq   $0x0,-0x18(%rbp)
jne    1160 <streq+0x50>
movl   $0x0,-0x4(%rbp)
jmp    1180 <streq+0x70>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq>:
cmp    %rsi,%rdi
je     1137 <streq+0x27>
xor    %eax,%eax
test   %rdi,%rdi
je     1136 <streq+0x26>
test   %rsi,%rsi
je     1136 <streq+0x26>
push   %rax
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @streq(i8* %0, i8* %1, i64 %2) {
%4 = icmp eq i8* %0, %1
br i1 %4, label %13, label %5
5: ; preds = %3
%6 = icmp eq i8* %0, null
%7 = icmp eq i8* %1, null
%8 = or i1 %6, %7
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = tail call i64 @strncmp(i8* %0, i8* %1, i64 %2)
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %5, %3, %9
%14 = phi i32 [ %12, %9 ], [ 1, %3 ], [ 0, %5 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ cache_wait(int, int);
void l2x0_flush_line(unsigned long addr) {
  cache_wait((0xC4200000 + 0x7F0), 1);
  (*((volatile unsigned *)(0xC4200000 + 0x7F0)) = addr);
}


x86 assembly (clang, -O0):
<l2x0_flush_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xc42007f0,%edi
mov    $0x1,%esi
call   1030 <cache_wait@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%ecx
mov    $0xc42007f0,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l2x0_flush_line>:
push   %rbx
mov    %rdi,%rbx
mov    $0xc42007f0,%edi
mov    $0x1,%esi
call   1030 <cache_wait@plt>
mov    $0xc42007f0,%eax
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @l2x0_flush_line(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @cache_wait(i32 -1004533776, i32 1)
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
store volatile i32 %5, i32* inttoptr (i64 3290433520 to i32*)
ret void
}

LLVM IR (-O2):
define void @l2x0_flush_line(i64 %0) {
%2 = tail call i32 @cache_wait(i32 -1004533776, i32 1)
%3 = trunc i64 %0 to i32
store volatile i32 %3, i32* inttoptr (i64 3290433520 to i32*)
ret void
}