xunge/DecIR huggingface dataset:
char *strcpy(char *s, const char *t) {
  char *p;
  p = s;
  while ((*p = *t) != '\0') {
    p++;
    t++;
  }
  return s;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1149 <strcpy+0x49>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %cl,(%rdi)
test   %cl,%cl
je     111f <strcpy+0x1f>
mov    $0x1,%ecx
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %8, %5 ], [ %0, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
store i8 %10, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret i8* %0
}
void render_renderer(struct renderer *renderer) {}


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

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

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

LLVM IR (-O2):
%struct.renderer = type opaque
define void @render_renderer(%struct.renderer* nocapture %0) {
ret void
}
int test_imm_C7int8_mem(signed char *val) {
  return ((*val) & (0xC7 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_C7int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -57
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void *print_it(void *data) {
  printf("Hello from %s!\n", (char *)data);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"Hello from %s!\0A\00"
define noalias i8* @print_it(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* null
}
/* Variables and functions */
const char *CmdProc_SkipSpace(const char *buf) {
  if (buf == NULL) {
    return NULL;
  }
  while ((buf[0] == ' ') && (buf[0] != 0)) {
    ++buf;
  }
  return buf;
}


x86 assembly (clang, -O0):
<CmdProc_SkipSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <CmdProc_SkipSpace+0x20>
movq   $0x0,-0x8(%rbp)
jmp    1173 <CmdProc_SkipSpace+0x73>
jmp    1125 <CmdProc_SkipSpace+0x25>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x11(%rbp)
jne    114a <CmdProc_SkipSpace+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    115a <CmdProc_SkipSpace+0x5a>
jmp    116b <CmdProc_SkipSpace+0x6b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1125 <CmdProc_SkipSpace+0x25>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdProc_SkipSpace>:
test   %rdi,%rdi
je     111e <CmdProc_SkipSpace+0x1e>
add    $0xffffffffffffffff,%rdi
nopl   0x0(%rax)
lea    0x1(%rdi),%rax
cmpb   $0x20,0x1(%rdi)
mov    %rax,%rdi
je     1110 <CmdProc_SkipSpace+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @CmdProc_SkipSpace(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %7, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 32
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %3, label %8
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %9
}
/* Variables and functions */
double exp(double);
double log(double);
double midi_to_freq(int midi) {
  double f;
  f = exp(log(440.0) + (double)(midi - 69) * log(2.0) / 12.0);
  return (f);
}


x86 assembly (clang, -O0):
<midi_to_freq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  0xedd(%rip),%xmm0
call   1040 <log@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x45,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb4(%rip),%xmm0
call   1040 <log@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xe8e(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<midi_to_freq>:
add    $0xffffffbb,%edi
cvtsi2sd %edi,%xmm0
mulsd  0xee1(%rip),%xmm0
divsd  0xee1(%rip),%xmm0
addsd  0xee1(%rip),%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @midi_to_freq(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
%4 = call double @log(double 4.400000e+02)
%5 = load i32, i32* %2
%6 = sub nsw i32 %5, 69
%7 = sitofp i32 %6 to double
%8 = call double @log(double 2.000000e+00)
%9 = fmul double %7, %8
%10 = fdiv double %9, 1.200000e+01
%11 = fadd double %4, %10
%12 = call double @exp(double %11)
store double %12, double* %3
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @midi_to_freq(i32 %0) {
%2 = add nsw i32 %0, -69
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3FE62E42FEFA39EF
%5 = fdiv double %4, 1.200000e+01
%6 = fadd double %5, 0x401858DB7958D4AC
%7 = tail call double @exp(double %6)
ret double %7
}
/* Variables and functions */
size_t sizeof_strv(char **strv) {
  size_t u = 0;
  if (!strv)
    return 0;
  while (strv[u++])
    ;
  return u - 1;
}


x86 assembly (clang, -O0):
<sizeof_strv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1128 <sizeof_strv+0x28>
movq   $0x0,-0x8(%rbp)
jmp    115c <sizeof_strv+0x5c>
jmp    112d <sizeof_strv+0x2d>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,(%rax,%rcx,8)
je     1150 <sizeof_strv+0x50>
jmp    112d <sizeof_strv+0x2d>
mov    -0x18(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sizeof_strv>:
test   %rdi,%rdi
je     1120 <sizeof_strv+0x20>
mov    $0xffffffffffffffff,%rcx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpq   $0x0,0x8(%rdi,%rcx,8)
mov    %rax,%rcx
jne    1110 <sizeof_strv+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @sizeof_strv(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %5, %3 ], [ 0, %1 ]
%5 = add i64 %4, 1
%6 = getelementptr inbounds i8*, i8** %0, i64 %4
%7 = load i8*, i8** %6
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 0, %1 ], [ %4, %3 ]
ret i64 %10
}
int main(void) {
  int func = 0;
  __func__;
  return func;
}


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

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

LLVM IR (-O0):
@__func__.main = [5 x i8] c"main\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
unsigned char font_reverse_c(unsigned char);
int read(int /*<<< orphan*/, unsigned char *, int);
int /*<<< orphan*/ write(int, unsigned char *, int);
int main() {
  while (1) {
    unsigned char ic;
    if (read(0, &ic, 1) < 1)
      break;
    unsigned char oc = font_reverse_c(ic);
    write(1, &oc, 1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
jge    115d <main+0x2d>
jmp    117e <main+0x4e>
movzbl -0x5(%rbp),%edi
call   1050 <font_reverse_c@plt>
mov    %al,-0x6(%rbp)
mov    $0x1,%edx
lea    -0x6(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
jmp    113f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0x6(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    1193 <main+0x63>
lea    0x7(%rsp),%r14
lea    0x6(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl 0x6(%rsp),%edi
call   1050 <font_reverse_c@plt>
mov    %al,0x7(%rsp)
mov    $0x1,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <read@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = call i32 @read(i32 0, i8* %1, i32 1)
%4 = icmp slt i32 %3, 1
br i1 %4, label %11, label %5
5: ; preds = %0, %5
%6 = load i8, i8* %1
%7 = tail call zeroext i8 @font_reverse_c(i8 zeroext %6)
store i8 %7, i8* %2
%8 = call i32 @write(i32 1, i8* %2, i32 1)
%9 = call i32 @read(i32 0, i8* %1, i32 1)
%10 = icmp slt i32 %9, 1
br i1 %10, label %11, label %5
11: ; preds = %5, %0
ret i32 0
}
void RTMemPoolRetain(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemPoolRetain() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_subs_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_subs_epi16(__m128i A, __m128i B) {
  return _mm_subs_epi16(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_subs_epi16>:
jmp    1030 <_mm_subs_epi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_subs_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_subs_epi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
size_t strlen(const char *str) {
  register int i = 0;
  while (*str++)
    i++;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <strlen+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
movslq -0xc(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4
%12 = zext i32 %8 to i64
br label %13
13: ; preds = %11, %1
%14 = phi i64 [ 0, %1 ], [ %12, %11 ]
ret i64 %14
}
void f2(x) float x;
{}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f2(double %0) {
%2 = alloca float
%3 = fptrunc double %0 to float
store float %3, float* %2
ret void
}

LLVM IR (-O2):
define void @f2(double %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_11281() {
  Assert_real((isqrt(11281) == 106),
              "/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/stdlib/isqrt.c",
              1515, ("Integer square root of 11281 should be 106"));
}


x86 assembly (clang, -O0):
<t_sqrt_11281>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2c11,%edi
call   1030 <isqrt@plt>
cmp    $0x6a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x5eb,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_11281>:
push   %rax
mov    $0x2c11,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x6a,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x5eb,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [43 x i8] c"Integer square root of 11281 should be 106\00"
define void @t_sqrt_11281() {
%1 = call i32 @isqrt(i32 11281)
%2 = icmp eq i32 %1, 106
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1515, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [43 x i8] c"Integer square root of 11281 should be 106\00"
define void @t_sqrt_11281() {
%1 = tail call i32 @isqrt(i32 11281)
%2 = icmp eq i32 %1, 106
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1515, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void Clear_List(int *array, int array_length) {
  int i = 0;
  for (i = 0; i < array_length; i++) {
    array[i] = 0;
  }
}


x86 assembly (clang, -O0):
<Clear_List>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1142 <Clear_List+0x42>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <Clear_List+0x19>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Clear_List>:
test   %esi,%esi
jle    1126 <Clear_List+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @Clear_List(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int flock(int, int);
int zflock(int fd, int operation) {
  int ret;
  do {
    ret = flock(fd, operation);
  } while ((ret < 0) && (errno == EINTR));
  return ret;
  ;
}


x86 assembly (clang, -O0):
<zflock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <flock@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jge    1155 <zflock+0x45>
mov    0x2e9e(%rip),%rax
mov    (%rax),%rax
mov    0x2e8c(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    111e <zflock+0xe>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zflock>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2ebe(%rip),%r14
mov    0x2eaf(%rip),%r15
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <flock@plt>
test   %eax,%eax
jns    1145 <zflock+0x35>
mov    (%r15),%rcx
cmp    %rcx,(%r14)
je     1130 <zflock+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @zflock(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @flock(i32 %0, i32 %1)
%5 = icmp slt i32 %4, 0
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
%9 = select i1 %5, i1 %8, i1 false
br i1 %9, label %3, label %10
10: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void version() { fprintf(stderr, "arc4 version: %s\n", "2.2.8"); }


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0xee7(%rip),%rdx
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
lea    0xeeb(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"arc4 version: %s\0A\00"
@.str.1 = [6 x i8] c"2.2.8\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"arc4 version: %s\0A\00"
@.str.1 = [6 x i8] c"2.2.8\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct wpa_ctrl {
  int dummy;
};

/* Variables and functions */
int wpa_ctrl_command(struct wpa_ctrl *, char *);
int wpa_cli_cmd_mib(struct wpa_ctrl *ctrl, int argc, char *argv[]) {
  return wpa_ctrl_command(ctrl, "MIB");
}


x86 assembly (clang, -O0):
<wpa_cli_cmd_mib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
call   1030 <wpa_ctrl_command@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_cli_cmd_mib>:
lea    0xee9(%rip),%rsi
jmp    1030 <wpa_ctrl_command@plt>

LLVM IR (-O0):
%struct.wpa_ctrl = type { i32 }
@.str = [4 x i8] c"MIB\00"
define i32 @wpa_cli_cmd_mib(%struct.wpa_ctrl* %0, i32 %1, i8** %2) {
%4 = alloca %struct.wpa_ctrl*
%5 = alloca i32
%6 = alloca i8**
store %struct.wpa_ctrl* %0, %struct.wpa_ctrl** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load %struct.wpa_ctrl*, %struct.wpa_ctrl** %4
%8 = call i32 @wpa_ctrl_command(%struct.wpa_ctrl* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %8
}

LLVM IR (-O2):
%struct.wpa_ctrl = type { i32 }
@.str = [4 x i8] c"MIB\00"
define i32 @wpa_cli_cmd_mib(%struct.wpa_ctrl* %0, i32 %1, i8** nocapture readnone %2) {
%4 = tail call i32 @wpa_ctrl_command(%struct.wpa_ctrl* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t ip_get_frag_offset(const uint8_t *p_ip) {
  return ((p_ip[6] & 0x1f) << 8 | p_ip[7]);
}


x86 assembly (clang, -O0):
<ip_get_frag_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
and    $0x1f,%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x1c(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_get_frag_offset>:
mov    0x18(%rdi),%eax
and    $0x1f,%eax
shl    $0x8,%eax
or     0x1c(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ip_get_frag_offset(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 6
%5 = load i32, i32* %4
%6 = and i32 %5, 31
%7 = shl i32 %6, 8
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 7
%10 = load i32, i32* %9
%11 = or i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @ip_get_frag_offset(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 6
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = and i32 %4, 7936
%6 = getelementptr inbounds i32, i32* %0, i64 7
%7 = load i32, i32* %6
%8 = or i32 %5, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xa8() {
  Assert_real((isprint(168) == 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_isprint.c",
              845, ("isprint should be 0 for 0xa8"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xa8>:
push   %rax
mov    $0xa8,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x34d,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xa8\00"
define void @t_isprint_0xa8() {
%1 = call i64 @isprint(i32 168)
%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 845, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xa8\00"
define void @t_isprint_0xa8() {
%1 = tail call i64 @isprint(i32 168)
%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 845, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ SIOCOUTQ;
int /*<<< orphan*/ diminuto_ipc_get_control(int, int /*<<< orphan*/);
ssize_t diminuto_ipc_stream_get_pending(int fd) {
  return diminuto_ipc_get_control(fd, SIOCOUTQ);
}


x86 assembly (clang, -O0):
<diminuto_ipc_stream_get_pending>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <diminuto_ipc_get_control@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_ipc_stream_get_pending>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <diminuto_ipc_get_control@plt>

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

LLVM IR (-O2):
@SIOCOUTQ = global i32 0
define i32 @diminuto_ipc_stream_get_pending(i32 %0) {
%2 = load i32, i32* @SIOCOUTQ
%3 = tail call i32 @diminuto_ipc_get_control(i32 %0, i32 %2)
ret i32 %3
}
/* Type definitions */
struct option {
  int dummy;
};
struct getopt_data {
  int dummy;
};

/* Variables and functions */
int getopt_internal(int, char *const *, char const *, struct option const *,
                    int *, int, struct getopt_data *);
int __getopt_long_only_r(int argc, char *const argv[], const char *shortopts,
                         const struct option *longopts, int *longind,
                         struct getopt_data *data) {
  return getopt_internal(argc, argv, shortopts, longopts, longind, 1, data);
}


x86 assembly (clang, -O0):
<__getopt_long_only_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%rax
mov    $0x1,%r9d
mov    %rax,(%rsp)
call   1030 <getopt_internal@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getopt_long_only_r>:
push   %rax
mov    %r9,(%rsp)
mov    $0x1,%r9d
call   1030 <getopt_internal@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.option = type { i32 }
%struct.getopt_data = type { i32 }
define i32 @__getopt_long_only_r(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, %struct.getopt_data* %5) {
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i8*
%10 = alloca %struct.option*
%11 = alloca i32*
%12 = alloca %struct.getopt_data*
store i32 %0, i32* %7
store i8** %1, i8*** %8
store i8* %2, i8** %9
store %struct.option* %3, %struct.option** %10
store i32* %4, i32** %11
store %struct.getopt_data* %5, %struct.getopt_data** %12
%13 = load i32, i32* %7
%14 = load i8**, i8*** %8
%15 = load i8*, i8** %9
%16 = load %struct.option*, %struct.option** %10
%17 = load i32*, i32** %11
%18 = load %struct.getopt_data*, %struct.getopt_data** %12
%19 = call i32 @getopt_internal(i32 %13, i8** %14, i8* %15, %struct.option* %16, i32* %17, i32 1, %struct.getopt_data* %18)
ret i32 %19
}

LLVM IR (-O2):
%struct.option = type { i32 }
%struct.getopt_data = type { i32 }
define i32 @__getopt_long_only_r(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, %struct.getopt_data* %5) {
%7 = tail call i32 @getopt_internal(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 1, %struct.getopt_data* %5)
ret i32 %7
}
/* Variables and functions */
int emptyneighbor(int);
scalar_t__ isfluid(int);
int issurface(int flag) {
  if (isfluid(flag)) {
    return emptyneighbor(flag);
  }
  return 0;
}


x86 assembly (clang, -O0):
<issurface>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isfluid@plt>
cmp    $0x0,%rax
je     114d <issurface+0x2d>
mov    -0x8(%rbp),%edi
call   1040 <emptyneighbor@plt>
mov    %eax,-0x4(%rbp)
jmp    1154 <issurface+0x34>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<issurface>:
push   %rbx
mov    %edi,%ebx
call   1030 <isfluid@plt>
test   %rax,%rax
je     1135 <issurface+0x15>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <emptyneighbor@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @issurface(i32 %0) {
%2 = tail call i64 @isfluid(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @emptyneighbor(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
int maximu(int max) { return max; }


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

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

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

LLVM IR (-O2):
define i32 @maximu(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int read_word(unsigned char *);
unsigned read_segofs16(unsigned char *buf) {
  return read_word(buf) + (read_word(buf + 2) << 4);
}


x86 assembly (clang, -O0):
<read_segofs16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read_word@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   1030 <read_word@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
shl    $0x4,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_segofs16>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <read_word@plt>
mov    %eax,%ebp
add    $0x2,%rbx
mov    %rbx,%rdi
call   1030 <read_word@plt>
shl    $0x4,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_segofs16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @read_word(i8* %3)
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 2
%7 = call i32 @read_word(i8* %6)
%8 = shl i32 %7, 4
%9 = add nsw i32 %4, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @read_segofs16(i8* %0) {
%2 = tail call i32 @read_word(i8* %0)
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = tail call i32 @read_word(i8* %3)
%5 = shl i32 %4, 4
%6 = add nsw i32 %5, %2
ret i32 %6
}
/* Variables and functions */
double CSPL_Stats_variance(double *, long);
double sqrt(double);
double CSPL_Stats_std(double *inval, long n) {
  double variance;
  variance = CSPL_Stats_variance(inval, n);
  return (sqrt(variance));
}


x86 assembly (clang, -O0):
<CSPL_Stats_std>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <CSPL_Stats_variance@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CSPL_Stats_std>:
push   %rax
call   1030 <CSPL_Stats_variance@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1136 <CSPL_Stats_std+0x16>
sqrtsd %xmm0,%xmm0
pop    %rax
ret
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @CSPL_Stats_std(double* %0, i64 %1) {
%3 = alloca double*
%4 = alloca i64
%5 = alloca double
store double* %0, double** %3
store i64 %1, i64* %4
%6 = load double*, double** %3
%7 = load i64, i64* %4
%8 = call double @CSPL_Stats_variance(double* %6, i64 %7)
store double %8, double* %5
%9 = load double, double* %5
%10 = call double @sqrt(double %9)
ret double %10
}

LLVM IR (-O2):
define double @CSPL_Stats_std(double* %0, i64 %1) {
%3 = tail call double @CSPL_Stats_variance(double* %0, i64 %1)
%4 = tail call double @sqrt(double %3)
ret double %4
}
/* Variables and functions */
float sqrtf(float);
float b(float x) { return sqrtf(x); }


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

x86 assembly (clang, -O2):
<b>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111d <b+0xd>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

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

LLVM IR (-O2):
define float @b(float %0) {
%2 = tail call float @sqrtf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ ConsolePrint(int);
void ConsoleGoAhead() { ConsolePrint(0x0d); }


x86 assembly (clang, -O0):
<ConsoleGoAhead>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd,%edi
call   1030 <ConsolePrint@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConsoleGoAhead>:
mov    $0xd,%edi
jmp    1030 <ConsolePrint@plt>

LLVM IR (-O0):
define void @ConsoleGoAhead() {
%1 = call i32 @ConsolePrint(i32 13)
ret void
}

LLVM IR (-O2):
define void @ConsoleGoAhead() {
%1 = tail call i32 @ConsolePrint(i32 13)
ret void
}
int fun632() { return 632; }


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

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

LLVM IR (-O0):
define i32 @fun632() {
ret i32 632
}

LLVM IR (-O2):
define i32 @fun632() {
ret i32 632
}
/* Variables and functions */
char *jsonCmd(char *, int);
char *jsonCmdErase(void) { return (jsonCmd("erase", 1)); }


x86 assembly (clang, -O0):
<jsonCmdErase>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <jsonCmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonCmdErase>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <jsonCmd@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"erase\00"
define i8* @jsonCmdErase() {
%1 = call i8* @jsonCmd(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
ret i8* %1
}

LLVM IR (-O2):
@.str = [6 x i8] c"erase\00"
define i8* @jsonCmdErase() {
%1 = tail call i8* @jsonCmd(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ extendMatching(int /*<<< orphan*/, long, long,
                                  int /*<<< orphan*/);
void constructMatchings() { extendMatching(0, 0L, 0L, 0); }


x86 assembly (clang, -O0):
<constructMatchings>:
push   %rbp
mov    %rsp,%rbp
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%edx
mov    %ecx,%edi
mov    %rdx,%rsi
call   1030 <extendMatching@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<constructMatchings>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <extendMatching@plt>

LLVM IR (-O0):
define void @constructMatchings() {
%1 = call i32 @extendMatching(i32 0, i64 0, i64 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @constructMatchings() {
%1 = tail call i32 @extendMatching(i32 0, i64 0, i64 0, i32 0)
ret void
}
void openHorizontalBox(void *ui_interface, const char *label) {}


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

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

LLVM IR (-O0):
define void @openHorizontalBox(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @openHorizontalBox(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void HitWDT(void) { (*(volatile unsigned char *)0xFFFAB) = 0xAC; }


x86 assembly (clang, -O0):
<HitWDT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffab,%eax
movb   $0xac,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<HitWDT>:
movb   $0xac,0xfffab
ac
ret

LLVM IR (-O0):
define void @HitWDT() {
store volatile i8 -84, i8* inttoptr (i64 1048491 to i8*)
ret void
}

LLVM IR (-O2):
define void @HitWDT() {
store volatile i8 -84, i8* inttoptr (i64 1048491 to i8*)
ret void
}
void ff_hevc_put_hevc_bi_epel_h64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h64_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ spy_init_io_jobs(int);
void spy_setup_io_jobs() { spy_init_io_jobs(5000); }


x86 assembly (clang, -O0):
<spy_setup_io_jobs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1388,%edi
call   1030 <spy_init_io_jobs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<spy_setup_io_jobs>:
mov    $0x1388,%edi
jmp    1030 <spy_init_io_jobs@plt>

LLVM IR (-O0):
define void @spy_setup_io_jobs() {
%1 = call i32 @spy_init_io_jobs(i32 5000)
ret void
}

LLVM IR (-O2):
define void @spy_setup_io_jobs() {
%1 = tail call i32 @spy_init_io_jobs(i32 5000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isodigit(int);
void t_isodigit_0x34() {
  Assert_real((isodigit(52)),
              "/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_isodigit.c",
              265, ("isodigit should be 1 for 4"));
}


x86 assembly (clang, -O0):
<t_isodigit_0x34>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34,%edi
call   1040 <isodigit@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x109,%edx
lea    0xf66(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0x34>:
push   %rax
mov    $0x34,%edi
call   1040 <isodigit@plt>
lea    0xece(%rip),%rsi
lea    0xf70(%rip),%rcx
mov    %eax,%edi
mov    $0x109,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 1 for 4\00"
define void @t_isodigit_0x34() {
%1 = call i32 @isodigit(i32 52)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 265, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 1 for 4\00"
define void @t_isodigit_0x34() {
%1 = tail call i32 @isodigit(i32 52)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 265, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ vider_stdin();
void get_line(char *prompt, char *line) {
  vider_stdin();
  printf("%s ", prompt);
  scanf("%"
        "100"
        "[^\n]",
        line);
}


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

x86 assembly (clang, -O2):
<get_line>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <vider_stdin@plt>
lea    0xeb8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <scanf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
@.str.1 = [9 x i8] c"%100[^\0A]\00"
define void @get_line(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @vider_stdin()
%6 = load i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
@.str.1 = [9 x i8] c"%100[^\0A]\00"
define void @get_line(i8* %0, i8* %1) {
%3 = tail call i32 (...) @vider_stdin()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ csi_disable(unsigned int);
void bsp_csi_disable(unsigned int sel) { csi_disable(sel); }


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

x86 assembly (clang, -O2):
<bsp_csi_disable>:
jmp    1030 <csi_disable@plt>

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

LLVM IR (-O2):
define void @bsp_csi_disable(i32 %0) {
%2 = tail call i32 @csi_disable(i32 %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_type_of_mixture(int *r, int *mix) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(84, r, mix, c, 0);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @celcon_type_of_mixture(i32* %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc4c(i32 84, i32* %0, i32* %1, double* undef, i32 0)
ret i32 %3
}