xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
void uDMAChannelSelectSecondary(uint32_t ui32SecPeriphs) {
  (*((volatile uint32_t *)(0x400FF500))) |= ui32SecPeriphs;
}


x86 assembly (clang, -O0):
<uDMAChannelSelectSecondary>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x400ff500,%ecx
mov    (%rcx),%ecx
or     %eax,%ecx
mov    $0x400ff500,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAChannelSelectSecondary>:
mov    %edi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
or     %eax,0x400ff500
ret

LLVM IR (-O0):
define void @uDMAChannelSelectSecondary(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = load volatile i32, i32* inttoptr (i64 1074787584 to i32*)
%5 = or i32 %4, %3
store volatile i32 %5, i32* inttoptr (i64 1074787584 to i32*)
ret void
}

LLVM IR (-O2):
define void @uDMAChannelSelectSecondary(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = load volatile i32, i32* inttoptr (i64 1074787584 to i32*)
%5 = or i32 %4, %3
store volatile i32 %5, i32* inttoptr (i64 1074787584 to i32*)
ret void
}
/* Variables and functions */
double M_PI;
double asin(double);
void CEA2latlon(double cea_lat, double cea_lon, double lon_cm, double *lat_deg,
                double *lon_deg) {
  *lon_deg = cea_lon + lon_cm;
  *lat_deg = 180.0 / M_PI * asin(cea_lat);
  return;
}


x86 assembly (clang, -O0):
<CEA2latlon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xeb7(%rip),%xmm0
mov    0x2e98(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <asin@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CEA2latlon>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
addsd  %xmm2,%xmm1
movsd  %xmm1,(%rsi)
mov    0x2ec1(%rip),%rax
movsd  0xed1(%rip),%xmm1
divsd  (%rax),%xmm1
movsd  %xmm1,0x8(%rsp)
call   1030 <asin@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define void @CEA2latlon(double %0, double %1, double %2, double* %3, double* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double*
%10 = alloca double*
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double* %3, double** %9
store double* %4, double** %10
%11 = load double, double* %7
%12 = load double, double* %8
%13 = fadd double %11, %12
%14 = load double*, double** %10
store double %13, double* %14
%15 = load double, double* @M_PI
%16 = fdiv double 1.800000e+02, %15
%17 = load double, double* %6
%18 = call double @asin(double %17)
%19 = fmul double %16, %18
%20 = load double*, double** %9
store double %19, double* %20
ret void
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define void @CEA2latlon(double %0, double %1, double %2, double* nocapture writeonly %3, double* nocapture writeonly %4) {
%6 = fadd double %1, %2
store double %6, double* %4
%7 = load double, double* @M_PI
%8 = fdiv double 1.800000e+02, %7
%9 = tail call double @asin(double %0)
%10 = fmul double %8, %9
store double %10, double* %3
ret void
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int read(int, void *, size_t);
int safe_read(int fd, void *buf, size_t count) {
  int r;
  while (1) {
    r = read(fd, buf, count);
    if (r == -1 && errno == EINTR)
      continue;
    break;
  }
  return r;
}


x86 assembly (clang, -O0):
<safe_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    115f <safe_read+0x4f>
mov    0x2e99(%rip),%rax
mov    (%rax),%rax
mov    0x2e87(%rip),%rcx
cmp    (%rcx),%rax
jne    115f <safe_read+0x4f>
jmp    1123 <safe_read+0x13>
jmp    1164 <safe_read+0x54>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_read>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb9(%rip),%r15
mov    0x2eaa(%rip),%r12
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <read@plt>
cmp    $0xffffffff,%eax
jne    114b <safe_read+0x3b>
mov    (%r15),%rcx
cmp    (%r12),%rcx
je     1130 <safe_read+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @safe_read(i32 %0, i8* nocapture %1, i64 %2) {
br label %4
4: ; preds = %7, %3
%5 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i64, i64* @errno
%9 = load i64, i64* @EINTR
%10 = icmp eq i64 %8, %9
br i1 %10, label %4, label %11
11: ; preds = %4, %7
ret i32 %5
}
int test_tmult_ok1(char x, char y) {
  int iprod = (int)x * y;
  return iprod >= -128 && iprod <= 127;
}


x86 assembly (clang, -O0):
<test_tmult_ok1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0xffffff80,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1137 <test_tmult_ok1+0x37>
cmpl   $0x7f,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_tmult_ok1>:
imul   %esi,%edi
movsbl %dil,%ecx
xor    %eax,%eax
cmp    %edi,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @test_tmult_ok1(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = mul nsw i32 %7, %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp sge i32 %11, -128
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* %5
%15 = icmp sle i32 %14, 127
br label %16
16: ; preds = %13, %2
%17 = phi i1 [ false, %2 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @test_tmult_ok1(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i32
%4 = sext i8 %1 to i32
%5 = mul nsw i32 %4, %3
%6 = add nsw i32 %5, 128
%7 = icmp ult i32 %6, 256
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ to_stdout(char);
void printstr(char *s) {
  char c;
  while ((c = *s) != '\0') {
    to_stdout(c);
    s++;
  }
}


x86 assembly (clang, -O0):
<printstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     114b <printstr+0x3b>
movsbl -0x9(%rbp),%edi
call   1030 <to_stdout@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <printstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <printstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <to_stdout@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <printstr+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @printstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = load i8, i8* %3
%11 = call i32 @to_stdout(i8 signext %10)
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @printstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @to_stdout(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata) {}


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

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

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

LLVM IR (-O2):
%struct.ieee80211_sub_if_data = type opaque
define void @ieee80211_debugfs_remove_netdev(%struct.ieee80211_sub_if_data* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ isalpha(int);
int tolower(int);
int get_child_index(int c) {
  int result;
  if (isalpha(c)) {
    return tolower(c) - 97;
  } else {
    return 26;
  }
  return result;
}


x86 assembly (clang, -O0):
<get_child_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     1150 <get_child_index+0x30>
mov    -0x8(%rbp),%edi
call   1030 <tolower@plt>
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <get_child_index+0x37>
movl   $0x1a,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_child_index>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
test   %rax,%rax
je     1139 <get_child_index+0x19>
mov    %ebx,%edi
call   1030 <tolower@plt>
add    $0xffffff9f,%eax
pop    %rbx
ret
mov    $0x1a,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_child_index(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i64 @isalpha(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @tolower(i32 %9)
%11 = sub nsw i32 %10, 97
store i32 %11, i32* %2
br label %13
12: ; preds = %1
store i32 26, i32* %2
br label %13
13: ; preds = %12, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_child_index(i32 %0) {
%2 = tail call i64 @isalpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @tolower(i32 %0)
%6 = add nsw i32 %5, -97
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ 26, %1 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_nest_lock_t;

/* Variables and functions */
void omp_set_nest_lock(omp_nest_lock_t *_Lock) {}


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

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

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

LLVM IR (-O2):
define void @omp_set_nest_lock(i32* nocapture %0) {
ret void
}
/* Type definitions */
struct ipr_reclaim_query_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *get_reclaim_results(struct ipr_reclaim_query_data *);
int /*<<< orphan*/ printf(char *, char *);
void print_reclaim_results(struct ipr_reclaim_query_data *buf) {
  char *body = get_reclaim_results(buf);
  printf("%s", body);
  free(body);
}


x86 assembly (clang, -O0):
<print_reclaim_results>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <get_reclaim_results@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_reclaim_results>:
push   %rbx
call   1050 <get_reclaim_results@plt>
mov    %rax,%rbx
lea    0xec0(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.ipr_reclaim_query_data = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @print_reclaim_results(%struct.ipr_reclaim_query_data* %0) {
%2 = alloca %struct.ipr_reclaim_query_data*
%3 = alloca i8*
store %struct.ipr_reclaim_query_data* %0, %struct.ipr_reclaim_query_data** %2
%4 = load %struct.ipr_reclaim_query_data*, %struct.ipr_reclaim_query_data** %2
%5 = call i8* @get_reclaim_results(%struct.ipr_reclaim_query_data* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
%struct.ipr_reclaim_query_data = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @print_reclaim_results(%struct.ipr_reclaim_query_data* %0) {
%2 = tail call i8* @get_reclaim_results(%struct.ipr_reclaim_query_data* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @free(i8* %2)
ret void
}
int ft_numlen(long long n, long long base) {
  int size;
  if (n == 0)
    return (1);
  size = 0;
  if (n < 0)
    size++;
  while (n != 0) {
    size++;
    n /= base;
  }
  return (size);
}


x86 assembly (clang, -O0):
<ft_numlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1123 <ft_numlen+0x23>
movl   $0x1,-0x4(%rbp)
jmp    1173 <ft_numlen+0x73>
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    113e <ft_numlen+0x3e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1143 <ft_numlen+0x43>
cmpq   $0x0,-0x10(%rbp)
je     116d <ft_numlen+0x6d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
jmp    1143 <ft_numlen+0x43>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_numlen>:
test   %rdi,%rdi
je     1142 <ft_numlen+0x42>
mov    %rdi,%rax
mov    %rdi,%rcx
shr    $0x3f,%rcx
jmp    112d <ft_numlen+0x2d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cqto
idiv   %rsi
add    $0x1,%ecx
test   %rax,%rax
je     113f <ft_numlen+0x3f>
mov    %rax,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
jne    1120 <ft_numlen+0x20>
xor    %edx,%edx
div    %esi
jmp    1125 <ft_numlen+0x25>
mov    %ecx,%eax
ret
mov    $0x1,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_numlen(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = lshr i64 %0, 63
%6 = trunc i64 %5 to i32
br label %7
7: ; preds = %4, %7
%8 = phi i32 [ %6, %4 ], [ %10, %7 ]
%9 = phi i64 [ %0, %4 ], [ %11, %7 ]
%10 = add nuw nsw i32 %8, 1
%11 = sdiv i64 %9, %1
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %7
13: ; preds = %7, %2
%14 = phi i32 [ 1, %2 ], [ %10, %7 ]
ret i32 %14
}
double ffi_reinterpret_double(void *result) { return *(double *)&result; }


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

x86 assembly (clang, -O2):
<ffi_reinterpret_double>:
movq   %rdi,%xmm0
ret

LLVM IR (-O0):
define double @ffi_reinterpret_double(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = bitcast i8** %2 to double*
%4 = load double, double* %3
ret double %4
}

LLVM IR (-O2):
define double @ffi_reinterpret_double(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = bitcast i64 %2 to double
ret double %3
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
int get_1970_sec_0_am();
time_t get_1970_ms_0_am() { return get_1970_sec_0_am() * 1000; }


x86 assembly (clang, -O0):
<get_1970_ms_0_am>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_1970_sec_0_am@plt>
imul   $0x3e8,%eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_1970_ms_0_am>:
push   %rax
xor    %eax,%eax
call   1030 <get_1970_sec_0_am@plt>
imul   $0x3e8,%eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get_1970_ms_0_am() {
%1 = call i32 (...) @get_1970_sec_0_am()
%2 = mul nsw i32 %1, 1000
ret i32 %2
}

LLVM IR (-O2):
define i32 @get_1970_ms_0_am() {
%1 = tail call i32 (...) @get_1970_sec_0_am()
%2 = mul nsw i32 %1, 1000
ret i32 %2
}
int _log10(int num) {
  int count = 0;
  if (num > 0) {
    while ((num /= 10) > 0)
      count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<_log10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1147 <_log10+0x47>
jmp    111d <_log10+0x1d>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jle    1142 <_log10+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111d <_log10+0x1d>
jmp    1147 <_log10+0x47>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_log10>:
xor    %eax,%eax
cmp    $0xa,%edi
jl     1124 <_log10+0x24>
xor    %eax,%eax
mov    $0xcccccccd,%ecx
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1110 <_log10+0x10>
ret

LLVM IR (-O0):
define i32 @_log10(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 sgt i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
br label %7
7: ; preds = %11, %6
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 10
store i32 %9, i32* %2
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %7
14: ; preds = %7
br label %15
15: ; preds = %14, %1
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @_log10(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = icmp ugt i32 %5, 99
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
void I_ShutdownGraphics(void) {}


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

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

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

LLVM IR (-O2):
define void @I_ShutdownGraphics() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  typedef enum { happy, sad, bored } Feeling;
  Feeling today = sad;
  if (today = happy)
    printf("Great day! %d\n", today);
  else
    printf("Leave me in peace %d\n", today);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    113c <main+0x2c>
jmp    1150 <main+0x40>
mov    -0x8(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    115f <main+0x4f>
mov    -0x8(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Great day! %d\0A\00"
@.str.1 = [22 x i8] c"Leave me in peace %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 0, i32* %2
br i1 false, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6, %3
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"Leave me in peace %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 0
}
read_tiff_image(image_file_name, the_image) char image_file_name[];
short **the_image;
{}


x86 assembly (clang, -O0):
<read_tiff_image>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @read_tiff_image(i8* nocapture readnone %0, i16** nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, int);
int /*<<< orphan*/ stderr;
void sigusr1_handler(int signal) {
  do {
    if (4 <= 4) {
      fprintf(stderr,
              "%s %d: "
              "signal %d received\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/clpsz/linux-ipcs/refs/heads/master/"
              "signal/main.c",
              14, signal);
    }
  } while (0);
}


x86 assembly (clang, -O0):
<sigusr1_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%r8d
lea    0xed1(%rip),%rsi
lea    0xee5(%rip),%rdx
mov    $0xe,%ecx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigusr1_handler>:
mov    %edi,%r8d
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
lea    0xef1(%rip),%rdx
mov    $0xe,%ecx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"%s %d: signal %d received\0A\00"
@.str.1 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/clpsz/linux-ipcs/refs/heads/master/signal/main.c\00"
define void @sigusr1_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = load i32, i32* %2
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0), i32 14, i32 %5)
br label %7
7: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"%s %d: signal %d received\0A\00"
@.str.1 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/clpsz/linux-ipcs/refs/heads/master/signal/main.c\00"
define void @sigusr1_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0), i32 14, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ server(int, char **);
int main(int argc, char *argv[]) {
  server(argc, argv);
  return 0;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_color_selection_dialog_new() {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ ENOENT;
scalar_t__ errno;
int stat(char const *, struct stat *);
int exist_file(const char *filename) {
  struct stat st;
  if (stat(filename, &st) == -1)
    if (errno == ENOENT)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<exist_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
jne    115d <exist_file+0x4d>
mov    0x2ea7(%rip),%rax
mov    (%rax),%rax
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%rax
jne    1158 <exist_file+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1164 <exist_file+0x54>
jmp    115d <exist_file+0x4d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exist_file>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
jne    1136 <exist_file+0x26>
mov    0x2ebb(%rip),%rax
mov    (%rax),%rcx
mov    0x2ea1(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
je     113b <exist_file+0x2b>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@errno = global i64 0
@ENOENT = global i64 0
define i32 @exist_file(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i64, i64* @errno
%10 = load i64, i64* @ENOENT
%11 = icmp eq i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 0, i32* %2
br label %15
13: ; preds = %8
br label %14
14: ; preds = %13, %1
store i32 1, i32* %2
br label %15
15: ; preds = %14, %12
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@errno = global i64 0
@ENOENT = global i64 0
define i32 @exist_file(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* @errno
%8 = load i64, i64* @ENOENT
%9 = icmp eq i64 %7, %8
br i1 %9, label %11, label %10
10: ; preds = %6, %1
br label %11
11: ; preds = %6, %10
%12 = phi i32 [ 1, %10 ], [ 0, %6 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t uint32ToInt16(uint32_t x) {
  int16_t y = x;
  return y;
}


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

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

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

LLVM IR (-O2):
define i32 @uint32ToInt16(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
scalar_t__ spdif_swab_u32(unsigned int);
unsigned int spdif_swab_s32(int i) {
  return (int)spdif_swab_u32((unsigned int)i);
}


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

x86 assembly (clang, -O2):
<spdif_swab_s32>:
jmp    1030 <spdif_swab_u32@plt>

LLVM IR (-O0):
define i32 @spdif_swab_s32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @spdif_swab_u32(i32 %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @spdif_swab_s32(i32 %0) {
%2 = tail call i64 @spdif_swab_u32(i32 %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int _strnatcmp(char *, char *);
int strnatcmp(const void *a, const void *b) {
  return _strnatcmp(*(char **)a, *(char **)b);
}


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

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

LLVM IR (-O0):
define i32 @strnatcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @_strnatcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @strnatcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @_strnatcmp(i8* %4, i8* %6)
ret i32 %7
}
int fun1342() { return 1342; }


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

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

LLVM IR (-O0):
define i32 @fun1342() {
ret i32 1342
}

LLVM IR (-O2):
define i32 @fun1342() {
ret i32 1342
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x0b() {
  Assert_real((islower(11) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              60, ("islower should be 0 for 0x0b"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x0b\00"
define void @t_islower_0x0b() {
%1 = tail call i64 @islower(i32 11)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 60, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void set_cell(unsigned *CA, unsigned new_state, unsigned width,
              unsigned height) {
  if ((width < 14) && (height < 7)) {
    CA[(height * 14) + width] = new_state;
  }
}


x86 assembly (clang, -O0):
<set_cell>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0xe,-0x10(%rbp)
jae    1138 <set_cell+0x38>
cmpl   $0x7,-0x14(%rbp)
jae    1138 <set_cell+0x38>
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
imul   $0xe,-0x14(%rbp),%ecx
add    -0x10(%rbp),%ecx
mov    %ecx,%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cell>:
cmp    $0xd,%edx
ja     1118 <set_cell+0x18>
cmp    $0x6,%ecx
ja     1118 <set_cell+0x18>
mov    %ecx,%eax
shl    $0x4,%eax
sub    %ecx,%eax
sub    %ecx,%eax
add    %edx,%eax
mov    %esi,(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @set_cell(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ult i32 %2, 14
%6 = icmp ult i32 %3, 7
%7 = and i1 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = mul nuw nsw i32 %3, 14
%10 = add nuw nsw i32 %9, %2
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %0, i64 %11
store i32 %1, i32* %12
br label %13
13: ; preds = %8, %4
ret void
}
/* Variables and functions */
scalar_t__ strlen(char const *);
bool str_is_empty(const char *s) {
  if (s != NULL && strlen(s) > 0) {
    return false;
  } else {
    return true;
  }
}


x86 assembly (clang, -O0):
<str_is_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <str_is_empty+0x36>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jle    1146 <str_is_empty+0x36>
movl   $0x0,-0x4(%rbp)
jmp    114d <str_is_empty+0x3d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_is_empty>:
test   %rdi,%rdi
je     112b <str_is_empty+0x1b>
push   %rax
call   1030 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
lea    0x8(%rsp),%rsp
jle    112b <str_is_empty+0x1b>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @str_is_empty(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %3, %1
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 1, %6 ], [ 0, %3 ]
ret i32 %8
}
void lvmlockd_connect(void) {}


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

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

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

LLVM IR (-O2):
define void @lvmlockd_connect() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char *, char *, int /*<<< orphan*/);
int getblnarg(char *argid, char *argline, int *blnlong) {
  if (strncmp(argid, argline, strlen(argid)) != 0)
    return 0;
  *blnlong = 1;
  return 1;
}


x86 assembly (clang, -O0):
<getblnarg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1172 <getblnarg+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1183 <getblnarg+0x63>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getblnarg>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    1156 <getblnarg+0x36>
movl   $0x1,(%r14)
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @getblnarg(i8* %0, i8* %1, i32* nocapture writeonly %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
store i32 1, i32* %2
br label %8
8: ; preds = %3, %7
%9 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %9
}
/* Variables and functions */
int round(int);
int temp_C2F(int temp_C) {
  if (temp_C == 999)
    return 999;
  return round(temp_C * 9 / 5.0 + 32);
}


x86 assembly (clang, -O0):
<temp_C2F>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x3e7,-0x8(%rbp)
jne    1134 <temp_C2F+0x24>
movl   $0x3e7,-0x4(%rbp)
jmp    1160 <temp_C2F+0x50>
imul   $0x9,-0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xec4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeb0(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <round@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<temp_C2F>:
cmp    $0x3e7,%edi
jne    111e <temp_C2F+0xe>
mov    $0x3e7,%eax
ret
lea    (%rdi,%rdi,8),%eax
cvtsi2sd %eax,%xmm0
divsd  0xed3(%rip),%xmm0
addsd  0xed3(%rip),%xmm0
cvttsd2si %xmm0,%edi
jmp    1030 <round@plt>

LLVM IR (-O0):
define i32 @temp_C2F(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 999
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 999, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 9
%10 = sitofp i32 %9 to double
%11 = fdiv double %10, 5.000000e+00
%12 = fadd double %11, 3.200000e+01
%13 = fptosi double %12 to i32
%14 = call i32 @round(i32 %13)
store i32 %14, i32* %2
br label %15
15: ; preds = %7, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @temp_C2F(i32 %0) {
%2 = icmp eq i32 %0, 999
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = mul nsw i32 %0, 9
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 5.000000e+00
%7 = fadd double %6, 3.200000e+01
%8 = fptosi double %7 to i32
%9 = tail call i32 @round(i32 %8)
br label %10
10: ; preds = %1, %3
%11 = phi i32 [ %9, %3 ], [ 999, %1 ]
ret i32 %11
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *OCCalloc(size_t num, size_t size) {
  if (0 == size || 0 == num) {
    return NULL;
  }
  return calloc(num, size);
}


x86 assembly (clang, -O0):
<OCCalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
je     1138 <OCCalloc+0x28>
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1145 <OCCalloc+0x35>
movq   $0x0,-0x8(%rbp)
jmp    1156 <OCCalloc+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OCCalloc>:
test   %rdi,%rdi
je     111f <OCCalloc+0xf>
test   %rsi,%rsi
je     111f <OCCalloc+0xf>
jmp    1030 <calloc@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @OCCalloc(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
%4 = icmp eq i64 %0, 0
%5 = or i1 %4, %3
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i8* @calloc(i64 %0, i64 %1)
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ null, %2 ]
ret i8* %9
}
void notice(char *fmt, ...) {}


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

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

LLVM IR (-O0):
define void @notice(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @notice(i8* nocapture %0, ...) {
ret void
}
void block_motor_done(int motor) {}


x86 assembly (clang, -O0):
<block_motor_done>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @block_motor_done(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isenabledsound();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basIsEnabledSound() { pushNumber(isenabledsound()); }


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

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

LLVM IR (-O0):
define void @basIsEnabledSound() {
%1 = call i32 (...) @isenabledsound()
%2 = call i32 @pushNumber(i32 %1)
ret void
}

LLVM IR (-O2):
define void @basIsEnabledSound() {
%1 = tail call i32 (...) @isenabledsound()
%2 = tail call i32 @pushNumber(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ pthread_cond_broadcast(int /*<<< orphan*/ *);
void std_pthread_cond_broadcast(pthread_cond_t *cond) {
  if (pthread_cond_broadcast(cond)) {
    perror("pthread_cond_broadcast");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<std_pthread_cond_broadcast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_cond_broadcast@plt>
cmp    $0x0,%rax
je     1165 <std_pthread_cond_broadcast+0x35>
lea    0xeaa(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_pthread_cond_broadcast>:
push   %rax
call   1030 <pthread_cond_broadcast@plt>
test   %rax,%rax
jne    113d <std_pthread_cond_broadcast+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [23 x i8] c"pthread_cond_broadcast\00"
define void @std_pthread_cond_broadcast(i32* %0) {
%2 = tail call i64 @pthread_cond_broadcast(i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}
void I422ToYUY2() {}


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

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

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

LLVM IR (-O2):
define void @I422ToYUY2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_version() { printf("\n"); }


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

x86 assembly (clang, -O2):
<print_version>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print_version() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
int minus(int a) { return (!a) ? 29999 : (a - 1); }


x86 assembly (clang, -O0):
<minus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    111e <minus+0x1e>
mov    $0x752f,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <minus+0x27>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minus>:
sub    $0x1,%edi
mov    $0x752f,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @minus(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
br label %9
9: ; preds = %6, %5
%10 = phi i32 [ 29999, %5 ], [ %8, %6 ]
ret i32 %10
}

LLVM IR (-O2):
define i32 @minus(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = add nsw i32 %0, -1
%4 = select i1 %2, i32 29999, i32 %3
ret i32 %4
}