xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint64_t micro_time(void) {
  struct timeval tv;
  assert(gettimeofday(&tv, NULL) == 0);
  return tv.tv_sec * 1000 * 1000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<micro_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
imul   $0x3e8,-0x10(%rbp),%eax
imul   $0x3e8,%eax,%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<micro_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
imul   $0xf4240,0x8(%rsp),%eax
cltq
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @micro_time() {
%1 = alloca %struct.timeval
%2 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000
%9 = mul nsw i32 %8, 1000
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%12 = load i64, i64* %11
%13 = add nsw i64 %10, %12
ret i64 %13
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @micro_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i32, i32* %7
%9 = mul i32 %8, 1000000
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%12 = load i64, i64* %11
%13 = add nsw i64 %12, %10
ret i64 %13
}
warning(s, a1, a2, a3, a4) char *s;
{ diag(" (warning)\n", s, a1, a2, a3, a4); }


x86 assembly (clang, -O0):
<warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <diag@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warning>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xedc(%rip),%rdi
xor    %eax,%eax
jmp    1030 <diag@plt>

LLVM IR (-O0):
@.str = [12 x i8] c" (warning)\0A\00"
define i32 @warning(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = load i32, i32* %11
%17 = call i32 (i8*, i8*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @diag to i32 (i8*, i8*, i32, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %12, i32 %13, i32 %14, i32 %15, i32 %16)
%18 = load i32, i32* %6
ret i32 %18
}

LLVM IR (-O2):
@.str = [12 x i8] c" (warning)\0A\00"
define i32 @warning(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 (i8*, i8*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @diag to i32 (i8*, i8*, i32, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret i32 undef
}
void free_matrix(double ***matrix, int row, int col) {
  for (int i = 0; i < row; i++) {
    free((*matrix)[i]);
  }
  free(*matrix);
}


x86 assembly (clang, -O0):
<free_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <free_matrix+0x47>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <free_matrix+0x19>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_matrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1145 <free_matrix+0x35>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14),%rax
mov    (%rax,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_matrix+0x20>
mov    (%r14),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_matrix(double*** nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %10
7: ; preds = %10, %3
%8 = bitcast double*** %0 to i8**
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
ret void
10: ; preds = %5, %10
%11 = phi i64 [ 0, %5 ], [ %16, %10 ]
%12 = load double**, double*** %0
%13 = getelementptr inbounds double*, double** %12, i64 %11
%14 = bitcast double** %13 to i8**
%15 = load i8*, i8** %14
tail call void @free(i8* %15)
%16 = add nuw nsw i64 %11, 1
%17 = icmp eq i64 %16, %6
br i1 %17, label %7, label %10
}
/* Variables and functions */
char *strdup(char *);
char *temp_filename(void) { return strdup("_tmpfile.out"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"_tmpfile.out\00"
define i8* @temp_filename() {
%1 = call i8* @strdup(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [13 x i8] c"_tmpfile.out\00"
define noalias i8* @temp_filename() {
%1 = tail call dereferenceable_or_null(13) i8* @strdup(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int f311(int *);
int f312(int *p) { return f311(p); }


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

x86 assembly (clang, -O2):
<f312>:
jmp    1030 <f311@plt>

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

LLVM IR (-O2):
define i32 @f312(i32* %0) {
%2 = tail call i32 @f311(i32* %0)
ret i32 %2
}
int test_imm_99int64_lowword_mem(long long *val) {
  return ((*val) & (0x99 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_99int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 153
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int jac_jacobi_zeros(double *, int const, double, double);
int jac_zeros_grjp(double *z, const int Q, double alpha, double beta) {
  z[Q - 1] = 1.0;
  return jac_jacobi_zeros(z, Q - 1, alpha + 1, beta);
}


x86 assembly (clang, -O0):
<jac_zeros_grjp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
movsd  0xeab(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <jac_jacobi_zeros@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_zeros_grjp>:
movslq %esi,%rax
add    $0xffffffff,%esi
movabs $0x3ff0000000000000,%rcx
mov    %rcx,-0x8(%rdi,%rax,8)
addsd  0xed3(%rip),%xmm0
jmp    1030 <jac_jacobi_zeros@plt>

LLVM IR (-O0):
define i32 @jac_zeros_grjp(double* %0, i32 %1, double %2, double %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca double
%8 = alloca double
store double* %0, double** %5
store i32 %1, i32* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double*, double** %5
%10 = load i32, i32* %6
%11 = sub nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds double, double* %9, i64 %12
store double 1.000000e+00, double* %13
%14 = load double*, double** %5
%15 = load i32, i32* %6
%16 = sub nsw i32 %15, 1
%17 = load double, double* %7
%18 = fadd double %17, 1.000000e+00
%19 = load double, double* %8
%20 = call i32 @jac_jacobi_zeros(double* %14, i32 %16, double %18, double %19)
ret i32 %20
}

LLVM IR (-O2):
define i32 @jac_zeros_grjp(double* %0, i32 %1, double %2, double %3) {
%5 = add nsw i32 %1, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds double, double* %0, i64 %6
store double 1.000000e+00, double* %7
%8 = fadd double %2, 1.000000e+00
%9 = tail call i32 @jac_jacobi_zeros(double* %0, i32 %5, double %8, double %3)
ret i32 %9
}
int main(void) {
  int a = 0;
  while (a) {
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1121 <main+0x21>
jmp    1121 <main+0x21>
mov    -0x4(%rbp),%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
br label %3
3: ; preds = %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3
br label %7
7: ; preds = %6, %3
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int BUFSIZ;
int /*<<< orphan*/ error(char *);
scalar_t__ read(int, void *, int);
void getData(int sockfd, void *data) {
  if ((read(sockfd, data, sizeof(char) * BUFSIZ) < 0))
    error("ERROR reading from socket");
}


x86 assembly (clang, -O0):
<getData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2ea3(%rip),%rax
movslq (%rax),%rax
shl    $0x0,%rax
mov    %eax,%edx
call   1030 <read@plt>
cmp    $0x0,%rax
jge    1161 <getData+0x41>
lea    0xea4(%rip),%rdi
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getData>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
call   1030 <read@plt>
test   %rax,%rax
js     1136 <getData+0x16>
pop    %rax
ret
lea    0xec3(%rip),%rdi
pop    %rax
jmp    1040 <error@plt>

LLVM IR (-O0):
@BUFSIZ = global i32 0
@.str = [26 x i8] c"ERROR reading from socket\00"
define void @getData(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @BUFSIZ
%8 = sext i32 %7 to i64
%9 = mul i64 1, %8
%10 = trunc i64 %9 to i32
%11 = call i64 @read(i32 %5, i8* %6, i32 %10)
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
@.str = [26 x i8] c"ERROR reading from socket\00"
define void @getData(i32 %0, i8* nocapture %1) {
%3 = load i32, i32* @BUFSIZ
%4 = tail call i64 @read(i32 %0, i8* %1, i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
PUT_BTS(r) int r;
{
  int i;
  i = 32;
  while (i > 0) {
    printf("%d", (((r >> (i - 1)) % 2) + 2) % 2);
    i--;
  }
}


x86 assembly (clang, -O0):
<PUT_BTS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x20,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    116a <PUT_BTS+0x5a>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
sar    %cl,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x2,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <PUT_BTS+0x12>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PUT_BTS>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
mov    $0x21,%ebx
lea    0xede(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x2(%rbx),%ecx
mov    %ebp,%esi
shr    %cl,%esi
and    $0x1,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <PUT_BTS+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @PUT_BTS(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 32, i32* %4
br label %5
5: ; preds = %8, %1
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
%12 = ashr i32 %9, %11
%13 = srem i32 %12, 2
%14 = add nsw i32 %13, 2
%15 = srem i32 %14, 2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %4
%18 = add nsw i32 %17, -1
store i32 %18, i32* %4
br label %5
19: ; preds = %5
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @PUT_BTS(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 32, %1 ], [ %4, %2 ]
%4 = add nsw i32 %3, -1
%5 = lshr i32 %0, %4
%6 = and i32 %5, 1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = icmp ugt i32 %3, 1
br i1 %8, label %2, label %9
9: ; preds = %2
ret i32 undef
}
double L0(double x) { return 1.; }


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

x86 assembly (clang, -O2):
<L0>:
movsd  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @L0(double %0) {
ret double 1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ pr_info(char *);
void sake_stop_memory_monitor(void) {
  pr_info("Stopping memory monitor...");
  pr_info("Memory monitor stopped.");
}


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

x86 assembly (clang, -O2):
<sake_stop_memory_monitor>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <pr_info@plt>
lea    0xef7(%rip),%rdi
pop    %rax
jmp    1030 <pr_info@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Stopping memory monitor...\00"
@.str.1 = [24 x i8] c"Memory monitor stopped.\00"
define void @sake_stop_memory_monitor() {
%1 = call i32 @pr_info(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @pr_info(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Stopping memory monitor...\00"
@.str.1 = [24 x i8] c"Memory monitor stopped.\00"
define void @sake_stop_memory_monitor() {
%1 = tail call i32 @pr_info(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @pr_info(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xa9() {
  Assert_real((isascii(169) == 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_isascii.c",
              850, ("isascii should be 0 for 0xa9"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xa9>:
push   %rax
mov    $0xa9,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x352,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xa9\00"
define void @t_isascii_0xa9() {
%1 = call i64 @isascii(i32 169)
%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 850, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xa9\00"
define void @t_isascii_0xa9() {
%1 = tail call i64 @isascii(i32 169)
%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 850, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int bcm2835_read(int);
int /*<<< orphan*/ bcm2835_write(int, unsigned char);
void pl011_uart_putc_extra(unsigned char byte, unsigned int extra) {
  while (bcm2835_read((0 + 0x201000 + 0x18)) & (1 << 5)) {
  }
  bcm2835_write((0 + 0x201000 + 0x00), byte + extra - extra);
}


x86 assembly (clang, -O0):
<pl011_uart_putc_extra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x201018,%edi
call   1030 <bcm2835_read@plt>
and    $0x20,%eax
cmp    $0x0,%eax
je     114c <pl011_uart_putc_extra+0x2c>
jmp    1131 <pl011_uart_putc_extra+0x11>
movzbl -0x1(%rbp),%eax
add    -0x8(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    $0x201000,%edi
movzbl %al,%esi
call   1040 <bcm2835_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl011_uart_putc_extra>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x201018,%edi
call   1030 <bcm2835_read@plt>
test   $0x20,%al
jne    1130 <pl011_uart_putc_extra+0x10>
movzbl %bl,%esi
mov    $0x201000,%edi
pop    %rbx
jmp    1040 <bcm2835_write@plt>

LLVM IR (-O0):
define void @pl011_uart_putc_extra(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = call i32 @bcm2835_read(i32 2101272)
%7 = and i32 %6, 32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = load i32, i32* %4
%14 = add i32 %12, %13
%15 = load i32, i32* %4
%16 = sub i32 %14, %15
%17 = trunc i32 %16 to i8
%18 = call i32 @bcm2835_write(i32 2101248, i8 zeroext %17)
ret void
}

LLVM IR (-O2):
define void @pl011_uart_putc_extra(i8 zeroext %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @bcm2835_read(i32 2101272)
%5 = and i32 %4, 32
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3
%8 = tail call i32 @bcm2835_write(i32 2101248, i8 zeroext %0)
ret void
}
/* Variables and functions */
unsigned int mfspr(int);
unsigned int cpu_perf_get(unsigned int counterId) {
  return mfspr(((7 << (11)) + (counterId)));
}


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

x86 assembly (clang, -O2):
<cpu_perf_get>:
add    $0x3800,%edi
jmp    1030 <mfspr@plt>

LLVM IR (-O0):
define i32 @cpu_perf_get(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 14336, %3
%5 = call i32 @mfspr(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @cpu_perf_get(i32 %0) {
%2 = add i32 %0, 14336
%3 = tail call i32 @mfspr(i32 %2)
ret i32 %3
}
/* Variables and functions */
int inb(int);
int /*<<< orphan*/ outb(int, unsigned int);
unsigned mc146818_read(unsigned reg) {
  outb(0x070, reg);
  return inb(0x070 + 1);
}


x86 assembly (clang, -O0):
<mc146818_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x70,%edi
call   1030 <outb@plt>
mov    $0x71,%edi
call   1040 <inb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc146818_read>:
push   %rax
mov    %edi,%esi
mov    $0x70,%edi
call   1030 <outb@plt>
mov    $0x71,%edi
pop    %rax
jmp    1040 <inb@plt>

LLVM IR (-O0):
define i32 @mc146818_read(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @outb(i32 112, i32 %3)
%5 = call i32 @inb(i32 113)
ret i32 %5
}

LLVM IR (-O2):
define i32 @mc146818_read(i32 %0) {
%2 = tail call i32 @outb(i32 112, i32 %0)
%3 = tail call i32 @inb(i32 113)
ret i32 %3
}
/* Type definitions */
struct matrix {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat_transpose_copy(struct matrix *, struct matrix *);
void mat_transpose(struct matrix *m) { mat_transpose_copy(m, m); }


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

x86 assembly (clang, -O2):
<mat_transpose>:
mov    %rdi,%rsi
jmp    1030 <mat_transpose_copy@plt>

LLVM IR (-O0):
%struct.matrix = type { i32 }
define void @mat_transpose(%struct.matrix* %0) {
%2 = alloca %struct.matrix*
store %struct.matrix* %0, %struct.matrix** %2
%3 = load %struct.matrix*, %struct.matrix** %2
%4 = load %struct.matrix*, %struct.matrix** %2
%5 = call i32 @mat_transpose_copy(%struct.matrix* %3, %struct.matrix* %4)
ret void
}

LLVM IR (-O2):
%struct.matrix = type { i32 }
define void @mat_transpose(%struct.matrix* %0) {
%2 = tail call i32 @mat_transpose_copy(%struct.matrix* %0, %struct.matrix* %0)
ret void
}
__attribute__((no)) void touch_mem(void *ptr) {
  volatile char sink = *((volatile char *)ptr);
}


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

x86 assembly (clang, -O2):
<touch_mem>:
mov    (%rdi),%al
mov    %al,-0x1(%rsp)
ret

LLVM IR (-O0):
define void @touch_mem(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load volatile i8, i8* %4
store volatile i8 %5, i8* %3
ret void
}

LLVM IR (-O2):
define void @touch_mem(i8* %0) {
%2 = alloca i8
%3 = load volatile i8, i8* %0
store volatile i8 %3, i8* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cos(int /*<<< orphan*/);
int /*<<< orphan*/ popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basCos() { pushNumber(cos(popNumber())); }


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

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

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

LLVM IR (-O2):
define void @basCos() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @cos(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
int uniphier_sld3_dpll_init(const struct uniphier_board_data *bd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.uniphier_board_data = type opaque
define i32 @uniphier_sld3_dpll_init(%struct.uniphier_board_data* nocapture readnone %0) {
ret i32 0
}
const char *Pointer_Brief(void) { return "Reference to other object"; }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Reference to other object\00"
define i8* @Pointer_Brief() {
ret i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [26 x i8] c"Reference to other object\00"
define i8* @Pointer_Brief() {
ret i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0)
}
void gdk_image_get_colormap() {}


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

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

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

LLVM IR (-O2):
define void @gdk_image_get_colormap() {
ret void
}
char *cindex(s, c)
char *s, c;
{
  while (*s)
    if (*s++ == c)
      return s - 1;
  return (char *)0;
}


x86 assembly (clang, -O0):
<cindex>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114f <cindex+0x4f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114a <cindex+0x4a>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <cindex+0x57>
jmp    110e <cindex+0xe>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cindex>:
mov    %rdi,%rax
movsbl %sil,%ecx
add    $0xffffffffffffffff,%rax
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%edx
test   %edx,%edx
je     1121 <cindex+0x21>
add    $0x1,%rax
cmp    %edx,%ecx
jne    1110 <cindex+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @cindex(i8* %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
br label %5
5: ; preds = %9, %2
%6 = phi i8* [ %0, %2 ], [ %10, %9 ]
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = sext i8 %7 to i32
%12 = icmp eq i32 %4, %11
br i1 %12, label %13, label %5
13: ; preds = %5, %9
%14 = phi i8* [ %6, %9 ], [ null, %5 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void err_sys_fatal(const char *string) {
  perror(string);
  exit(-1);
}


x86 assembly (clang, -O0):
<err_sys_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err_sys_fatal>:
push   %rax
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @err_sys_fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @err_sys_fatal(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
void gdk_window_set_back_pixmap() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_set_back_pixmap() {
ret void
}
char *user_name(char *code) {
  if (*code == '1')
    return "admin";
  else
    return "guest";
}


x86 assembly (clang, -O0):
<user_name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x31,%eax
jne    1128 <user_name+0x28>
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1133 <user_name+0x33>
lea    0xed7(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<user_name>:
cmpb   $0x31,(%rdi)
lea    0xef6(%rip),%rcx
lea    0xef5(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"admin\00"
@.str.1 = [6 x i8] c"guest\00"
define i8* @user_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 49
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [6 x i8] c"admin\00"
@.str.1 = [6 x i8] c"guest\00"
define i8* @user_name(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 49
%4 = select i1 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ memset(unsigned char *, int, int);
void jffs2_decompression_test_prepare(unsigned char *buf, int size) {
  memset(buf, 0x55, size + 1);
}


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

x86 assembly (clang, -O2):
<jffs2_decompression_test_prepare>:
lea    0x1(%rsi),%edx
mov    $0x55,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @jffs2_decompression_test_prepare(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 = add nsw i32 %6, 1
%8 = call i32 @memset(i8* %5, i32 85, i32 %7)
ret void
}

LLVM IR (-O2):
define void @jffs2_decompression_test_prepare(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i32 @memset(i8* %0, i32 85, i32 %3)
ret void
}
/* Type definitions */
struct resend {
  int dummy;
};

/* Variables and functions */
struct resend *find_resend(int, unsigned char const *, unsigned char,
                           unsigned char const *, unsigned char,
                           struct resend **);
struct resend *find_request(const unsigned char *prefix, unsigned char plen,
                            const unsigned char *src_prefix,
                            unsigned char src_plen,
                            struct resend **previous_return) {
  return find_resend(1, prefix, plen, src_prefix, src_plen, previous_return);
}


x86 assembly (clang, -O0):
<find_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %cl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x9(%rbp),%dl
mov    -0x18(%rbp),%rcx
mov    -0x19(%rbp),%al
mov    -0x28(%rbp),%r9
mov    $0x1,%edi
movzbl %dl,%edx
movzbl %al,%r8d
call   1030 <find_resend@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_request>:
mov    %r8,%r9
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <find_resend@plt>

LLVM IR (-O0):
%struct.resend = type { i32 }
define %struct.resend* @find_request(i8* %0, i8 zeroext %1, i8* %2, i8 zeroext %3, %struct.resend** %4) {
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i8*
%9 = alloca i8
%10 = alloca %struct.resend**
store i8* %0, i8** %6
store i8 %1, i8* %7
store i8* %2, i8** %8
store i8 %3, i8* %9
store %struct.resend** %4, %struct.resend*** %10
%11 = load i8*, i8** %6
%12 = load i8, i8* %7
%13 = load i8*, i8** %8
%14 = load i8, i8* %9
%15 = load %struct.resend**, %struct.resend*** %10
%16 = call %struct.resend* @find_resend(i32 1, i8* %11, i8 zeroext %12, i8* %13, i8 zeroext %14, %struct.resend** %15)
ret %struct.resend* %16
}

LLVM IR (-O2):
%struct.resend = type { i32 }
define %struct.resend* @find_request(i8* %0, i8 zeroext %1, i8* %2, i8 zeroext %3, %struct.resend** %4) {
%6 = tail call %struct.resend* @find_resend(i32 1, i8* %0, i8 zeroext %1, i8* %2, i8 zeroext %3, %struct.resend** %4)
ret %struct.resend* %6
}
int baz(int x) {
  if (x == 0)
    return 0;
  if (x == 1)
    return 1;
  return 2;
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <baz+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    113a <baz+0x3a>
cmpl   $0x1,-0x8(%rbp)
jne    1133 <baz+0x33>
movl   $0x1,-0x4(%rbp)
jmp    113a <baz+0x3a>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
xor    %ecx,%ecx
cmp    $0x1,%edi
sete   %cl
mov    $0x2,%eax
sub    %ecx,%eax
test   %edi,%edi
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @baz(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i32 1, i32 2
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 0, i32 %3
ret i32 %5
}
/* Variables and functions */
char const *chaz_CC_gcc_version();
scalar_t__ chaz_CC_gcc_version_num();
const char *chaz_Probe_gcc_version(void) {
  return chaz_CC_gcc_version_num() ? chaz_CC_gcc_version() : NULL;
}


x86 assembly (clang, -O0):
<chaz_Probe_gcc_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <chaz_CC_gcc_version_num@plt>
cmp    $0x0,%rax
je     1149 <chaz_Probe_gcc_version+0x29>
mov    $0x0,%al
call   1030 <chaz_CC_gcc_version@plt>
mov    %rax,-0x8(%rbp)
jmp    1154 <chaz_Probe_gcc_version+0x34>
xor    %eax,%eax
mov    %rax,-0x8(%rbp)
jmp    1154 <chaz_Probe_gcc_version+0x34>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chaz_Probe_gcc_version>:
push   %rax
xor    %eax,%eax
call   1040 <chaz_CC_gcc_version_num@plt>
test   %rax,%rax
je     1135 <chaz_Probe_gcc_version+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <chaz_CC_gcc_version@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @chaz_Probe_gcc_version() {
%1 = call i64 (...) @chaz_CC_gcc_version_num()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i8* (...) @chaz_CC_gcc_version()
br label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %3
%7 = phi i8* [ %4, %3 ], [ null, %5 ]
ret i8* %7
}

LLVM IR (-O2):
define i8* @chaz_Probe_gcc_version() {
%1 = tail call i64 (...) @chaz_CC_gcc_version_num()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i8* (...) @chaz_CC_gcc_version()
br label %5
5: ; preds = %0, %3
%6 = phi i8* [ %4, %3 ], [ null, %0 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ append_scripts_dirs();
scalar_t__ path_env_was_changed(int);
int /*<<< orphan*/ split_path_list();
void update_path_env(int force) {
  if (path_env_was_changed(force)) {
    append_scripts_dirs();
    split_path_list();
  }
}


x86 assembly (clang, -O0):
<update_path_env>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <path_env_was_changed@plt>
cmp    $0x0,%rax
je     115b <update_path_env+0x2b>
mov    $0x0,%al
call   1040 <append_scripts_dirs@plt>
mov    $0x0,%al
call   1030 <split_path_list@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_path_env>:
push   %rax
call   1050 <path_env_was_changed@plt>
test   %rax,%rax
je     114a <update_path_env+0x1a>
xor    %eax,%eax
call   1040 <append_scripts_dirs@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <split_path_list@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @update_path_env(i32 %0) {
%2 = tail call i64 @path_env_was_changed(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 (...) @append_scripts_dirs()
%6 = tail call i32 (...) @split_path_list()
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_49(int /*<<< orphan*/);
int gen_49() {
  handle_49(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_49>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_49@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_49>:
push   %rax
xor    %edi,%edi
call   1030 <handle_49@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gen_49() {
%1 = call i32 @handle_49(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_49() {
%1 = tail call i32 @handle_49(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ p16e_adc();
int /*<<< orphan*/ p16e_eeprom();
int /*<<< orphan*/ p16e_int_pin();
int /*<<< orphan*/ p16e_int_ports();
int /*<<< orphan*/ p16e_mssp();
int /*<<< orphan*/ p16e_tmr0();
int /*<<< orphan*/ p16e_tmr1();
int /*<<< orphan*/ p16e_tmr2();
int /*<<< orphan*/ p16e_wdt_2();
int /*<<< orphan*/ serial(int /*<<< orphan*/);
void PIC16F1939_periferic(void) {
  p16e_mssp();
  p16e_adc();
  p16e_int_pin();
  p16e_int_ports();
  p16e_tmr0();
  p16e_wdt_2();
  p16e_eeprom();
  p16e_tmr1();
  p16e_tmr2();
  serial(0);
}


x86 assembly (clang, -O0):
<PIC16F1939_periferic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <p16e_mssp@plt>
mov    $0x0,%al
call   1060 <p16e_adc@plt>
mov    $0x0,%al
call   10a0 <p16e_int_pin@plt>
mov    $0x0,%al
call   1090 <p16e_int_ports@plt>
mov    $0x0,%al
call   1080 <p16e_tmr0@plt>
mov    $0x0,%al
call   1050 <p16e_wdt_2@plt>
mov    $0x0,%al
call   10c0 <p16e_eeprom@plt>
mov    $0x0,%al
call   10b0 <p16e_tmr1@plt>
mov    $0x0,%al
call   1070 <p16e_tmr2@plt>
xor    %edi,%edi
call   1040 <serial@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PIC16F1939_periferic>:
push   %rax
xor    %eax,%eax
call   1030 <p16e_mssp@plt>
xor    %eax,%eax
call   1060 <p16e_adc@plt>
xor    %eax,%eax
call   10a0 <p16e_int_pin@plt>
xor    %eax,%eax
call   1090 <p16e_int_ports@plt>
xor    %eax,%eax
call   1080 <p16e_tmr0@plt>
xor    %eax,%eax
call   1050 <p16e_wdt_2@plt>
xor    %eax,%eax
call   10c0 <p16e_eeprom@plt>
xor    %eax,%eax
call   10b0 <p16e_tmr1@plt>
xor    %eax,%eax
call   1070 <p16e_tmr2@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <serial@plt>

LLVM IR (-O0):
define void @PIC16F1939_periferic() {
%1 = call i32 (...) @p16e_mssp()
%2 = call i32 (...) @p16e_adc()
%3 = call i32 (...) @p16e_int_pin()
%4 = call i32 (...) @p16e_int_ports()
%5 = call i32 (...) @p16e_tmr0()
%6 = call i32 (...) @p16e_wdt_2()
%7 = call i32 (...) @p16e_eeprom()
%8 = call i32 (...) @p16e_tmr1()
%9 = call i32 (...) @p16e_tmr2()
%10 = call i32 @serial(i32 0)
ret void
}

LLVM IR (-O2):
define void @PIC16F1939_periferic() {
%1 = tail call i32 (...) @p16e_mssp()
%2 = tail call i32 (...) @p16e_adc()
%3 = tail call i32 (...) @p16e_int_pin()
%4 = tail call i32 (...) @p16e_int_ports()
%5 = tail call i32 (...) @p16e_tmr0()
%6 = tail call i32 (...) @p16e_wdt_2()
%7 = tail call i32 (...) @p16e_eeprom()
%8 = tail call i32 (...) @p16e_tmr1()
%9 = tail call i32 (...) @p16e_tmr2()
%10 = tail call i32 @serial(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
unsigned int readInt();
int /*<<< orphan*/ writeCommand1parm(char *, unsigned int);
unsigned int groundSensor(unsigned int sensor) {
  unsigned int ground = 0;
  if ((sensor <= 3) && (sensor > 0)) {
    writeCommand1parm("GR", sensor);
    ground = readInt();
  } else {
    printf("Error sensor number \n");
  }
  return ground;
}


x86 assembly (clang, -O0):
<groundSensor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x4(%rbp)
ja     1174 <groundSensor+0x44>
cmpl   $0x0,-0x4(%rbp)
jbe    1174 <groundSensor+0x44>
mov    -0x4(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <writeCommand1parm@plt>
mov    $0x0,%al
call   1050 <readInt@plt>
mov    %eax,-0x8(%rbp)
jmp    1180 <groundSensor+0x50>
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<groundSensor>:
push   %rax
mov    %edi,%esi
lea    -0x1(%rsi),%eax
cmp    $0x2,%eax
ja     114f <groundSensor+0x1f>
lea    0xebe(%rip),%rdi
call   1040 <writeCommand1parm@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <readInt@plt>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"GR\00"
@.str.1 = [22 x i8] c"Error sensor number \0A\00"
define i32 @groundSensor(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp ule i32 %4, 3
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ugt i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %2
%11 = call i32 @writeCommand1parm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 (...) @readInt()
store i32 %12, i32* %3
br label %15
13: ; preds = %6, %1
%14 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %9
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"GR\00"
@str = [21 x i8] c"Error sensor number \00"
define i32 @groundSensor(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 3
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @writeCommand1parm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = tail call i32 (...) @readInt()
br label %9
7: ; preds = %1
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ %6, %4 ], [ 0, %7 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int const_restrict_ext_call(const int *restrict a, const int *restrict b) {
  int r1 = *a;
  int r2 = *b;
  printf("%d:%d", 1, 2);
  return r1 + r2 + *a + *b;
}


x86 assembly (clang, -O0):
<const_restrict_ext_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    -0x8(%rbp),%rcx
add    (%rcx),%eax
mov    -0x10(%rbp),%rcx
add    (%rcx),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<const_restrict_ext_call>:
push   %rbx
mov    (%rsi),%ebx
add    (%rdi),%ebx
lea    0xee4(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
add    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d:%d\00"
define i32 @const_restrict_ext_call(i32* noalias nocapture %0, i32* noalias nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%6 = add i32 %4, %3
%7 = shl i32 %6, 1
ret i32 %7
}