xunge/DecIR huggingface dataset:
int numXifres(int n) {
  int i;
  for (i = 1; n / 10 != 0; i++)
    n = n / 10;
  return i;
}


x86 assembly (clang, -O0):
<numXifres>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     113e <numXifres+0x3e>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <numXifres+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numXifres>:
lea    0x9(%rdi),%ecx
mov    $0x1,%eax
cmp    $0x13,%ecx
jb     1145 <numXifres+0x45>
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
lea    (%rcx,%rdx,1),%edi
add    $0x1,%eax
add    %edx,%ecx
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1120 <numXifres+0x20>
ret

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

LLVM IR (-O2):
define i32 @numXifres(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i32 [ %7, %4 ], [ %0, %1 ]
%7 = sdiv i32 %6, 10
%8 = add nuw nsw i32 %5, 1
%9 = add nsw i32 %7, 9
%10 = icmp ult i32 %9, 19
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ ems1Stok(char const *, char *);
int /*<<< orphan*/ sprintf(char *, char *, void *);
void emsSetp(const char *token, void *pvalue) {
  char str[200 + 1];
  ;
  ;
  sprintf(str, "%p", pvalue);
  ems1Stok(token, str);
  return;
}


x86 assembly (clang, -O0):
<emsSetp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xebb(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <ems1Stok@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emsSetp>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xec9(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ems1Stok@plt>
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%p\00"
define void @emsSetp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [201 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [201 x i8], [201 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %4
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [201 x i8], [201 x i8]* %5, i64 0, i64 0
%11 = call i32 @ems1Stok(i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%p\00"
define void @emsSetp(i8* %0, i8* %1) {
%3 = alloca [201 x i8]
%4 = getelementptr inbounds [201 x i8], [201 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = call i32 @ems1Stok(i8* %0, i8* %4)
ret void
}
int test_imm_98uint8_reg(unsigned char val) {
  return ((val) & (0x98 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_98uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x98,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_98uint8_reg>:
test   $0x98,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_98uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -104
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int func(int a_def, int b_def) { return a_def + b_def; }


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

x86 assembly (clang, -O2):
<func>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @func(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @func(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
double baz(double x, double y, double z, double u) {
  return x * x * y * y * y * z * z * z * z * u;
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @baz(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %5
%11 = fmul double %9, %10
%12 = load double, double* %6
%13 = fmul double %11, %12
%14 = load double, double* %6
%15 = fmul double %13, %14
%16 = load double, double* %6
%17 = fmul double %15, %16
%18 = load double, double* %7
%19 = fmul double %17, %18
%20 = load double, double* %7
%21 = fmul double %19, %20
%22 = load double, double* %7
%23 = fmul double %21, %22
%24 = load double, double* %7
%25 = fmul double %23, %24
%26 = load double, double* %8
%27 = fmul double %25, %26
ret double %27
}

LLVM IR (-O2):
define double @baz(double %0, double %1, double %2, double %3) {
%5 = fmul double %0, %0
%6 = fmul double %5, %1
%7 = fmul double %6, %1
%8 = fmul double %7, %1
%9 = fmul double %8, %2
%10 = fmul double %9, %2
%11 = fmul double %10, %2
%12 = fmul double %11, %2
%13 = fmul double %12, %3
ret double %13
}
_Bool isdigit(unsigned char c) { return ((unsigned char)(c - '0') < 10); }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sub    $0x30,%eax
movzbl %al,%eax
cmp    $0xa,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xd0,%dil
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define zeroext i1 @isdigit(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = sub nsw i32 %4, 48
%6 = trunc i32 %5 to i8
%7 = zext i8 %6 to i32
%8 = icmp slt i32 %7, 10
ret i1 %8
}

LLVM IR (-O2):
define zeroext i1 @isdigit(i8 zeroext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
ret i1 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_framework();
int /*<<< orphan*/ test_ftp();
int main(void) {
  test_framework();
  test_ftp();
  printf("\n---- TEST SUCCEEDED ----\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_framework@plt>
mov    $0x0,%al
call   1050 <test_ftp@plt>
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [27 x i8] c"\0A---- TEST SUCCEEDED ----\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_framework()
%3 = call i32 (...) @test_ftp()
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [26 x i8] c"\0A---- TEST SUCCEEDED ----\00"
define i32 @main() {
%1 = tail call i32 (...) @test_framework()
%2 = tail call i32 (...) @test_ftp()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void systick_init(void) {
  (*(volatile unsigned int *)(0xe000e010 + 0x4)) = 120000000 / 1000;
  (*(volatile unsigned int *)(0xe000e010)) |= 4;
  (*(volatile unsigned int *)(0xe000e010)) |= 1;
  (*(volatile unsigned int *)(0xe000e010)) |= 2;
}


x86 assembly (clang, -O0):
<systick_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000e014,%eax
movl   $0x1d4c0,(%rax)
mov    $0xe000e010,%eax
mov    (%rax),%ecx
or     $0x4,%ecx
mov    $0xe000e010,%eax
mov    %ecx,(%rax)
mov    $0xe000e010,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0xe000e010,%eax
mov    %ecx,(%rax)
mov    $0xe000e010,%eax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    $0xe000e010,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<systick_init>:
mov    $0xe000e010,%eax
movl   $0x1d4c0,0x4(%rax)
orl    $0x4,(%rax)
orl    $0x1,(%rax)
orl    $0x2,(%rax)
ret

LLVM IR (-O0):
define void @systick_init() {
store volatile i32 120000, i32* inttoptr (i64 3758153748 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%2 = or i32 %1, 4
store volatile i32 %2, i32* inttoptr (i64 3758153744 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%4 = or i32 %3, 1
store volatile i32 %4, i32* inttoptr (i64 3758153744 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%6 = or i32 %5, 2
store volatile i32 %6, i32* inttoptr (i64 3758153744 to i32*)
ret void
}

LLVM IR (-O2):
define void @systick_init() {
store volatile i32 120000, i32* inttoptr (i64 3758153748 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%2 = or i32 %1, 4
store volatile i32 %2, i32* inttoptr (i64 3758153744 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%4 = or i32 %3, 1
store volatile i32 %4, i32* inttoptr (i64 3758153744 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%6 = or i32 %5, 2
store volatile i32 %6, i32* inttoptr (i64 3758153744 to i32*)
ret void
}
void *test47(int *i) { return i ?: 0; }


x86 assembly (clang, -O0):
<test47>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1127 <test47+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1132 <test47+0x32>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1132 <test47+0x32>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test47>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @test47(i32* readnone %0) {
%2 = bitcast i32* %0 to i8*
ret i8* %2
}
void RTStrGetCpNExInternal(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrGetCpNExInternal() {
ret void
}
void mmm(int y) {
  if (y != 0)
    y++;
}


x86 assembly (clang, -O0):
<mmm>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111a <mmm+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mmm(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 %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @mmm(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ tolower(char);
char gs_clcase(char c) { return (char)tolower(c); }


x86 assembly (clang, -O0):
<gs_clcase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <tolower@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gs_clcase>:
push   %rax
call   1030 <tolower@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define signext i8 @gs_clcase(i8 signext %0) {
%2 = tail call i64 @tolower(i8 signext %0)
%3 = trunc i64 %2 to i8
ret i8 %3
}
GetTime(User, System) double *User, *System;
{
  *User = 0.0;
  *System = 0.0;
}


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

x86 assembly (clang, -O2):
<GetTime>:
movq   $0x0,(%rdi)
movq   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @GetTime(double* nocapture writeonly %0, double* nocapture writeonly %1) {
store double 0.000000e+00, double* %0
store double 0.000000e+00, double* %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ bibtex_addstring(char *);
void process_string(char *p) {
  while (*p && *p != '{' && *p != '(')
    p++;
  bibtex_addstring(p);
}


x86 assembly (clang, -O0):
<process_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1156 <process_string+0x46>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x7b,%ecx
mov    %al,-0x9(%rbp)
je     1156 <process_string+0x46>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1166 <process_string+0x56>
jmp    1177 <process_string+0x67>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <process_string+0xc>
mov    -0x8(%rbp),%rdi
call   1030 <bibtex_addstring@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_string>:
movzbl (%rdi),%eax
test   %al,%al
je     1125 <process_string+0x15>
cmp    $0x28,%al
je     1125 <process_string+0x15>
cmp    $0x7b,%al
je     1125 <process_string+0x15>
add    $0x1,%rdi
jmp    1110 <process_string>
jmp    1030 <bibtex_addstring@plt>

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

LLVM IR (-O2):
define void @process_string(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 123, label %7
i8 40, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2
%8 = tail call i32 @bibtex_addstring(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *bindtextdomain(char const *, int /*<<< orphan*/ *);
void check_textdomain(const char *domainname) {
  (void)bindtextdomain(domainname, bindtextdomain(domainname, NULL));
}


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

x86 assembly (clang, -O2):
<check_textdomain>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <bindtextdomain@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <bindtextdomain@plt>

LLVM IR (-O0):
define void @check_textdomain(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @bindtextdomain(i8* %4, i32* null)
%6 = call i32* @bindtextdomain(i8* %3, i32* %5)
ret void
}

LLVM IR (-O2):
define void @check_textdomain(i8* %0) {
%2 = tail call i32* @bindtextdomain(i8* %0, i32* null)
%3 = tail call i32* @bindtextdomain(i8* %0, i32* %2)
ret void
}
double Random(pseed)
unsigned *pseed;
{
  unsigned temp;
  double temp1;
  temp = (1220703125 * *pseed) & 0x7fffffff;
  *pseed = temp;
  temp1 = temp;
  temp1 *= 0.465613e-9;
  return temp1;
}


x86 assembly (clang, -O0):
<Random>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
imul   $0x48c27395,%eax,%eax
and    $0x7fffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xec6(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Random>:
imul   $0x48c27395,(%rdi),%eax
and    $0x7fffffff,%eax
mov    %eax,(%rdi)
cvtsi2sd %eax,%xmm0
mulsd  0xee7(%rip),%xmm0
ret

LLVM IR (-O0):
define double @Random(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = mul i32 1220703125, %6
%8 = and i32 %7, 2147483647
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32*, i32** %2
store i32 %9, i32* %10
%11 = load i32, i32* %3
%12 = uitofp i32 %11 to double
store double %12, double* %4
%13 = load double, double* %4
%14 = fmul double %13, 4.656130e-10
store double %14, double* %4
%15 = load double, double* %4
ret double %15
}

LLVM IR (-O2):
define double @Random(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = mul i32 %2, 1220703125
%4 = and i32 %3, 2147483647
store i32 %4, i32* %0
%5 = uitofp i32 %4 to double
%6 = fmul double %5, 4.656130e-10
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int Select(int argc, char **argv) {
  printf("Calling from Select\n");
  return 1;
}


x86 assembly (clang, -O0):
<Select>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Select>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Calling from Select\0A\00"
define i32 @Select(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [20 x i8] c"Calling from Select\00"
define i32 @Select(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int int32_t;

/* Variables and functions */
int var_get_u32(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                int /*<<< orphan*/ *);
int var_get_s32(uint8_t *cp, const uint8_t *endp, int32_t *i) {
  int b = var_get_u32(cp, endp, (uint32_t *)i);
  *i = (*i >> 1) ^ -(*i & 1);
  return b;
}


x86 assembly (clang, -O0):
<var_get_s32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <var_get_u32@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
sar    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
and    $0x1,%edx
xor    %eax,%eax
sub    %edx,%eax
xor    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<var_get_s32>:
push   %rbx
mov    %rdx,%rbx
call   1030 <var_get_u32@plt>
mov    (%rbx),%ecx
mov    %ecx,%edx
sar    %edx
and    $0x1,%ecx
neg    %ecx
xor    %edx,%ecx
mov    %ecx,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @var_get_s32(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = load i32*, i32** %4
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = call i32 @var_get_u32(i32* %8, i32* %9, i32* %10)
store i32 %11, i32* %7
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
%14 = ashr i32 %13, 1
%15 = load i32*, i32** %6
%16 = load i32, i32* %15
%17 = and i32 %16, 1
%18 = sub nsw i32 0, %17
%19 = xor i32 %14, %18
%20 = load i32*, i32** %6
store i32 %19, i32* %20
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @var_get_s32(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @var_get_u32(i32* %0, i32* %1, i32* %2)
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = and i32 %5, 1
%8 = sub nsw i32 0, %7
%9 = xor i32 %6, %8
store i32 %9, i32* %2
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int8_t;
typedef int /*<<< orphan*/ u_int64_t;
typedef int /*<<< orphan*/ u_int32_t;
typedef int /*<<< orphan*/ u_int16_t;
typedef int /*<<< orphan*/ int8_t;
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  int8_t i8 = 0;
  u_int8_t ui8 = 0;
  int16_t i16 = 0;
  u_int16_t ui16 = 0;
  int32_t i32 = 0;
  u_int32_t ui32 = 0;
  int64_t i64 = 0;
  u_int64_t ui64 = 0;
  puts("success");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"success\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
%10 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"success\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void tegra_irq_to_wake(int irq, int *wak_list, int *wak_size) {
  *wak_size = 0;
  return;
}


x86 assembly (clang, -O0):
<tegra_irq_to_wake>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tegra_irq_to_wake>:
movl   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define void @tegra_irq_to_wake(i32 %0, i32* nocapture readnone %1, i32* nocapture writeonly %2) {
store i32 0, i32* %2
ret void
}
/* Type definitions */
typedef int SIGCHLD;

/* Variables and functions */
int sigblock(int /*<<< orphan*/);
int /*<<< orphan*/ sigsetmask(int);
int /*<<< orphan*/ unblock_remote_children();
void unblock_children() {
  (void)sigsetmask(sigblock(0) & ~(1 << ((SIGCHLD)-1)));
  unblock_remote_children();
}


x86 assembly (clang, -O0):
<unblock_children>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <sigblock@plt>
mov    %eax,%edi
and    %eax,%edi
call   1040 <sigsetmask@plt>
mov    $0x0,%al
call   1050 <unblock_remote_children@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<unblock_children>:
push   %rax
xor    %edi,%edi
call   1030 <sigblock@plt>
call   1040 <sigsetmask@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <unblock_remote_children@plt>

LLVM IR (-O0):
define void @unblock_children() {
%1 = call i32 @sigblock(i32 0)
%2 = and i32 %1, poison
%3 = call i32 @sigsetmask(i32 %2)
%4 = call i32 (...) @unblock_remote_children()
ret void
}

LLVM IR (-O2):
define void @unblock_children() {
%1 = tail call i32 @sigblock(i32 0)
%2 = tail call i32 @sigsetmask(i32 poison)
%3 = tail call i32 (...) @unblock_remote_children()
ret void
}
void helper2() {}


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

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

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

LLVM IR (-O2):
define void @helper2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_init_player();
int /*<<< orphan*/ test_player_move_to_cell();
void testplayer(void) {
  test_init_player();
  test_player_move_to_cell();
}


x86 assembly (clang, -O0):
<testplayer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_init_player@plt>
mov    $0x0,%al
call   1040 <test_player_move_to_cell@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testplayer>:
push   %rax
xor    %eax,%eax
call   1030 <test_init_player@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_player_move_to_cell@plt>

LLVM IR (-O0):
define void @testplayer() {
%1 = call i32 (...) @test_init_player()
%2 = call i32 (...) @test_player_move_to_cell()
ret void
}

LLVM IR (-O2):
define void @testplayer() {
%1 = tail call i32 (...) @test_init_player()
%2 = tail call i32 (...) @test_player_move_to_cell()
ret void
}
/* Type definitions */
struct usb_endpoint_descriptor {
  int dummy;
};

/* Variables and functions */
scalar_t__ usb_endpoint_dir_out(struct usb_endpoint_descriptor const *);
scalar_t__ usb_endpoint_xfer_bulk(struct usb_endpoint_descriptor const *);
int usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd) {
  return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd);
}


x86 assembly (clang, -O0):
<usb_endpoint_is_bulk_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <usb_endpoint_xfer_bulk@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     115a <usb_endpoint_is_bulk_out+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <usb_endpoint_dir_out@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_endpoint_is_bulk_out>:
push   %rbx
mov    %rdi,%rbx
call   1040 <usb_endpoint_xfer_bulk@plt>
test   %rax,%rax
je     1143 <usb_endpoint_is_bulk_out+0x23>
mov    %rbx,%rdi
call   1030 <usb_endpoint_dir_out@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.usb_endpoint_descriptor = type { i32 }
define i32 @usb_endpoint_is_bulk_out(%struct.usb_endpoint_descriptor* %0) {
%2 = alloca %struct.usb_endpoint_descriptor*
store %struct.usb_endpoint_descriptor* %0, %struct.usb_endpoint_descriptor** %2
%3 = load %struct.usb_endpoint_descriptor*, %struct.usb_endpoint_descriptor** %2
%4 = call i64 @usb_endpoint_xfer_bulk(%struct.usb_endpoint_descriptor* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load %struct.usb_endpoint_descriptor*, %struct.usb_endpoint_descriptor** %2
%8 = call i64 @usb_endpoint_dir_out(%struct.usb_endpoint_descriptor* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.usb_endpoint_descriptor = type { i32 }
define i32 @usb_endpoint_is_bulk_out(%struct.usb_endpoint_descriptor* %0) {
%2 = tail call i64 @usb_endpoint_xfer_bulk(%struct.usb_endpoint_descriptor* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @usb_endpoint_dir_out(%struct.usb_endpoint_descriptor* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
void ADC_DelSig_IRQ_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @ADC_DelSig_IRQ_Interrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xb5() {
  Assert_real((ispunct(181) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              910, ("ispunct should be 0 for 0xb5"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xb5\00"
define void @t_ispunct_0xb5() {
%1 = call i64 @ispunct(i32 181)
%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 910, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xb5\00"
define void @t_ispunct_0xb5() {
%1 = tail call i64 @ispunct(i32 181)
%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 910, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int get_operand_left(int *program, int statement) {
  return program[statement * 4 + 2];
}


x86 assembly (clang, -O0):
<get_operand_left>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_operand_left>:
lea    0x2(,%rsi,4),%eax
cltq
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @get_operand_left(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 = mul nsw i32 %6, 4
%8 = add nsw i32 %7, 2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %5, i64 %9
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @get_operand_left(i32* nocapture %0, i32 %1) {
%3 = shl nsw i32 %1, 2
%4 = or i32 %3, 2
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
ret i32 %7
}
int parent(int index) { return (index - 1) >> 1; }


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

x86 assembly (clang, -O2):
<parent>:
lea    -0x1(%rdi),%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @parent(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void extra_die(const char *msg) {
  fprintf(stderr, "error: %s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<extra_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<extra_die>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @extra_die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @extra_die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, int);
void __do_copy(void *to, const void *from, int n) { memcpy(to, from, n); }


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

x86 assembly (clang, -O2):
<__do_copy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @__do_copy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(char *, int, int, int /*<<< orphan*/ *);
int read_blname(FILE *f, char *name) { return fread(name, sizeof(char), 4, f); }


x86 assembly (clang, -O0):
<read_blname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x4,%edx
call   1030 <fread@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_blname>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
jmp    1030 <fread@plt>

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

LLVM IR (-O2):
define i32 @read_blname(i32* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @fread(i8* %1, i32 1, i32 4, i32* %0)
ret i32 %3
}
/* Type definitions */
struct arg_u64 {
  int dummy;
};

/* Variables and functions */
struct arg_u64 *arg_u64_n(char const *, char const *, char const *, int, int,
                          char const *);
struct arg_u64 *arg_u64_1(const char *shortopts, const char *longopts,
                          const char *datatype, const char *glossary) {
  return arg_u64_n(shortopts, longopts, datatype, 1, 1, glossary);
}


x86 assembly (clang, -O0):
<arg_u64_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r9
mov    $0x1,%r8d
mov    %r8d,%ecx
call   1030 <arg_u64_n@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_u64_1>:
mov    %rcx,%r9
mov    $0x1,%ecx
mov    $0x1,%r8d
jmp    1030 <arg_u64_n@plt>

LLVM IR (-O0):
%struct.arg_u64 = type { i32 }
define %struct.arg_u64* @arg_u64_1(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call %struct.arg_u64* @arg_u64_n(i8* %9, i8* %10, i8* %11, i32 1, i32 1, i8* %12)
ret %struct.arg_u64* %13
}

LLVM IR (-O2):
%struct.arg_u64 = type { i32 }
define %struct.arg_u64* @arg_u64_1(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call %struct.arg_u64* @arg_u64_n(i8* %0, i8* %1, i8* %2, i32 1, i32 1, i8* %3)
ret %struct.arg_u64* %5
}
void __mkargv() {}


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

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

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

LLVM IR (-O2):
define void @__mkargv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_completion_queue_shutdown() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_completion_queue_shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_completion_queue_shutdown>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_completion_queue_shutdown() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_completion_queue_shutdown() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int euler_problem_6();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", euler_problem_6());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <euler_problem_6@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [9 x i8] c"hello c.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
const char *submix_name(void *unused) {
  (void)unused;
  return "Audio line (internal use only)";
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"Audio line (internal use only)\00"
define i8* @submix_name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [31 x i8] c"Audio line (internal use only)\00"
define i8* @submix_name(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0)
}
char i2sa(int c) {
  switch (c) {
  case 0:
    return '-';
  case 1:
    return 'A';
  case 2:
    return 'B';
  case 3:
    return 'C';
  case 4:
    return 'D';
  case 5:
    return 'E';
  case 6:
    return 'F';
  }
  return '?';
}


x86 assembly (clang, -O0):
<i2sa>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x6,%rax
ja     116b <i2sa+0x6b>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x2d,-0x1(%rbp)
jmp    116f <i2sa+0x6f>
movb   $0x41,-0x1(%rbp)
jmp    116f <i2sa+0x6f>
movb   $0x42,-0x1(%rbp)
jmp    116f <i2sa+0x6f>
movb   $0x43,-0x1(%rbp)
jmp    116f <i2sa+0x6f>
movb   $0x44,-0x1(%rbp)
jmp    116f <i2sa+0x6f>
movb   $0x45,-0x1(%rbp)
jmp    116f <i2sa+0x6f>
movb   $0x46,-0x1(%rbp)
jmp    116f <i2sa+0x6f>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2sa>:
lea    0x0(,%rdi,8),%ecx
movabs $0x4645444342412d,%rdx
shr    %cl,%rdx
cmp    $0x7,%edi
mov    $0x3f,%eax
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @i2sa(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %12 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
]
5: ; preds = %1
store i8 45, i8* %2
br label %13
6: ; preds = %1
store i8 65, i8* %2
br label %13
7: ; preds = %1
store i8 66, i8* %2
br label %13
8: ; preds = %1
store i8 67, i8* %2
br label %13
9: ; preds = %1
store i8 68, i8* %2
br label %13
10: ; preds = %1
store i8 69, i8* %2
br label %13
11: ; preds = %1
store i8 70, i8* %2
br label %13
12: ; preds = %1
store i8 63, i8* %2
br label %13
13: ; preds = %12, %11, %10, %9, %8, %7, %6, %5
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @i2sa(i32 %0) {
%2 = icmp ult i32 %0, 7
%3 = zext i32 %0 to i56
%4 = shl nuw nsw i56 %3, 3
%5 = lshr i56 19779407858254125, %4
%6 = trunc i56 %5 to i8
%7 = select i1 %2, i8 %6, i8 63
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xfc() {
  Assert_real((isbdigit(252) == 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_isbdigit.c",
              1265, ("isbdigit should be 0 for 0xfc"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xfc>:
push   %rax
mov    $0xfc,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x4f1,%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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xfc\00"
define void @t_isbdigit_0xfc() {
%1 = call i64 @isbdigit(i32 252)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1265, i8* getelementptr inbounds ([30 x i8], [30 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xfc\00"
define void @t_isbdigit_0xfc() {
%1 = tail call i64 @isbdigit(i32 252)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1265, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}