xunge/DecIR huggingface dataset:
int myisspace(char ch) { return (ch == ' ' || ch == '\t' || ch == '\n'); }


x86 assembly (clang, -O0):
<myisspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     113b <myisspace+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     113b <myisspace+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myisspace>:
mov    $0x1,%eax
cmp    $0x9,%dil
je     1111 <myisspace+0x11>
cmp    $0x20,%dil
jne    1112 <myisspace+0x12>
ret
xor    %eax,%eax
cmp    $0xa,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @myisspace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @myisspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 10
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
void f(int a) { a++; }


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

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

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
ret void
}

LLVM IR (-O2):
define void @f(i32 %0) {
ret void
}
/* Variables and functions */
int printf(char *, char const *);
int puts(const char *s) { return printf("%s\n", s); }


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

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

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

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


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

x86 assembly (clang, -O2):
<testTortureExecute>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <a@plt>

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

LLVM IR (-O2):
define void @testTortureExecute() {
%1 = tail call i32 @a(i32 0, i32 0)
ret void
}
unsigned int asn1Tag(unsigned char **Ref) {
  unsigned int rc;
  rc = *(*Ref)++;
  if ((rc & 0x01F) == 0x1F) {
    rc = (rc << 8) + *(*Ref)++;
  }
  return rc;
}


x86 assembly (clang, -O0):
<asn1Tag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movzbl (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1f,%eax
cmp    $0x1f,%eax
jne    114d <asn1Tag+0x4d>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<asn1Tag>:
mov    (%rdi),%rcx
lea    0x1(%rcx),%rax
mov    %rax,(%rdi)
movzbl (%rcx),%eax
mov    %eax,%edx
not    %edx
test   $0x1f,%dl
jne    1126 <asn1Tag+0x26>
shl    $0x8,%eax
lea    0x2(%rcx),%rdx
mov    %rdx,(%rdi)
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @asn1Tag(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %3, i8** %0
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = and i32 %5, 31
%7 = icmp eq i32 %6, 31
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = shl nuw nsw i32 %5, 8
%10 = getelementptr inbounds i8, i8* %2, i64 2
store i8* %10, i8** %0
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = or i32 %9, %12
br label %14
14: ; preds = %8, %1
%15 = phi i32 [ %13, %8 ], [ %5, %1 ]
ret i32 %15
}
void GPMCWrAccessAndWrDataOnADMUXBusTimingConfig(
    unsigned int baseAddr, unsigned int csNum, unsigned int wrAccessTime,
    unsigned int wrDataOnADmuxBus) {
  unsigned int conf;
  conf = (((wrAccessTime << (0x00000018u)) & (0x1F000000u)) |
          ((wrDataOnADmuxBus << (0x00000010u)) & (0x000F0000u)));
  (*((volatile unsigned int *)(baseAddr + (0x74 + (csNum * (0x30)))))) |= conf;
}


x86 assembly (clang, -O0):
<GPMCWrAccessAndWrDataOnADMUXBusTimingConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x18,%eax
and    $0x1f000000,%eax
mov    -0x10(%rbp),%ecx
shl    $0x10,%ecx
and    $0xf0000,%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x4(%rbp),%eax
imul   $0x30,-0x8(%rbp),%ecx
add    $0x74,%ecx
add    %ecx,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCWrAccessAndWrDataOnADMUXBusTimingConfig>:
and    $0x1f,%edx
shl    $0x18,%edx
and    $0xf,%ecx
shl    $0x10,%ecx
or     %edx,%ecx
lea    (%rsi,%rsi,2),%eax
shl    $0x4,%eax
add    %edi,%eax
add    $0x74,%eax
or     %ecx,(%rax)
ret

LLVM IR (-O0):
define void @GPMCWrAccessAndWrDataOnADMUXBusTimingConfig(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %7
%11 = shl i32 %10, 24
%12 = and i32 %11, 520093696
%13 = load i32, i32* %8
%14 = shl i32 %13, 16
%15 = and i32 %14, 983040
%16 = or i32 %12, %15
store i32 %16, i32* %9
%17 = load i32, i32* %9
%18 = load i32, i32* %5
%19 = load i32, i32* %6
%20 = mul i32 %19, 48
%21 = add i32 116, %20
%22 = add i32 %18, %21
%23 = zext i32 %22 to i64
%24 = inttoptr i64 %23 to i32*
%25 = load volatile i32, i32* %24
%26 = or i32 %25, %17
store volatile i32 %26, i32* %24
ret void
}

LLVM IR (-O2):
define void @GPMCWrAccessAndWrDataOnADMUXBusTimingConfig(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %2, 24
%6 = and i32 %5, 520093696
%7 = shl i32 %3, 16
%8 = and i32 %7, 983040
%9 = or i32 %8, %6
%10 = mul i32 %1, 48
%11 = add i32 %0, 116
%12 = add i32 %11, %10
%13 = zext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
%15 = load volatile i32, i32* %14
%16 = or i32 %9, %15
store volatile i32 %16, i32* %14
ret void
}
void av_bsf_list_append() {}


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

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

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

LLVM IR (-O2):
define void @av_bsf_list_append() {
ret void
}
/* Variables and functions */
bool nrf53_errata_31(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_31() {
ret i32 0
}
unsigned int get_bits(unsigned int value) {
  unsigned int bits = 0;
  while (value > 0) {
    bits += 1;
    value /= 2;
  }
  return bits;
}


x86 assembly (clang, -O0):
<get_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    112f <get_bits+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <get_bits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bits>:
xor    %eax,%eax
test   %edi,%edi
je     111c <get_bits+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <get_bits+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_bits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i32 %5, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
int test_imm_86uint16_mem(unsigned short *val) {
  return ((*val) & (-0x86 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_86uint16_mem>:
movzwl (%rdi),%eax
test   $0xff7a,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_86uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -134
%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_86uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -134
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
void main() {
  printf("hello world!\n");
  int a = 1;
  int b = 2;
  int c;
  printf("a=%d,b=%d\n", a, b);
  c = a;
  a = b;
  b = c;
  printf("a=%d,b=%d", a, b);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <getchar@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"hello world!\0A\00"
@.str.1 = [11 x i8] c"a=%d,b=%d\0A\00"
@.str.2 = [10 x i8] c"a=%d,b=%d\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
store i32 2, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %1
store i32 %8, i32* %3
%9 = load i32, i32* %2
store i32 %9, i32* %1
%10 = load i32, i32* %3
store i32 %10, i32* %2
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 %12)
%14 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"a=%d,b=%d\0A\00"
@.str.2 = [10 x i8] c"a=%d,b=%d\00"
@str = [13 x i8] c"hello world!\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 2)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 1)
%4 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vertex(char, float, float);
void curve_to(float x0, float y0, float x1, float y1, float x2, float y2) {
  vertex('c', x0, y0);
  vertex('c', x1, y1);
  vertex('C', x2, y2);
}


x86 assembly (clang, -O0):
<curve_to>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mov    $0x63,%edi
call   1030 <vertex@plt>
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
mov    $0x63,%edi
call   1030 <vertex@plt>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
mov    $0x43,%edi
call   1030 <vertex@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curve_to>:
sub    $0x18,%rsp
movss  %xmm5,0x14(%rsp)
movss  %xmm4,0x10(%rsp)
movss  %xmm3,0xc(%rsp)
movss  %xmm2,0x8(%rsp)
mov    $0x63,%edi
call   1030 <vertex@plt>
mov    $0x63,%edi
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1030 <vertex@plt>
mov    $0x43,%edi
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
add    $0x18,%rsp
jmp    1030 <vertex@plt>

LLVM IR (-O0):
define void @curve_to(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %7
%14 = load float, float* %8
%15 = call i32 @vertex(i8 signext 99, float %13, float %14)
%16 = load float, float* %9
%17 = load float, float* %10
%18 = call i32 @vertex(i8 signext 99, float %16, float %17)
%19 = load float, float* %11
%20 = load float, float* %12
%21 = call i32 @vertex(i8 signext 67, float %19, float %20)
ret void
}

LLVM IR (-O2):
define void @curve_to(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = tail call i32 @vertex(i8 signext 99, float %0, float %1)
%8 = tail call i32 @vertex(i8 signext 99, float %2, float %3)
%9 = tail call i32 @vertex(i8 signext 67, float %4, float %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_string(char *);
void frontend_version(void) {
  output_string("\tFront End (2.7,84/11/28)");
  output_string("\n;\tFront End for ASXXXX (2.8,13/01/20)");
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"\09Front End (2.7,84/11/28)\00"
@.str.1 = [39 x i8] c"\0A;\09Front End for ASXXXX (2.8,13/01/20)\00"
define void @frontend_version() {
%1 = call i32 @output_string(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @output_string(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"\09Front End (2.7,84/11/28)\00"
@.str.1 = [39 x i8] c"\0A;\09Front End for ASXXXX (2.8,13/01/20)\00"
define void @frontend_version() {
%1 = tail call i32 @output_string(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @output_string(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
long long _f_llrintl(long double);
long long int llrintl(long double x) { return _f_llrintl(x); }


x86 assembly (clang, -O0):
<llrintl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <_f_llrintl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llrintl>:
jmp    1030 <_f_llrintl@plt>

LLVM IR (-O0):
define i64 @llrintl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @_f_llrintl(x86_fp80 %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @llrintl(x86_fp80 %0) {
%2 = tail call i64 @_f_llrintl(x86_fp80 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void sys_get_audio_apis(char *buf) {
  int n = 0;
  strcpy(buf, "{ ");
  strcat(buf, "}");
  if (n < 2)
    strcpy(buf, "{}");
}


x86 assembly (clang, -O0):
<sys_get_audio_apis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1040 <strcat@plt>
cmpl   $0x2,-0xc(%rbp)
jge    116d <sys_get_audio_apis+0x4d>
mov    -0x8(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_get_audio_apis>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1030 <strcpy@plt>
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"{ \00"
@.str.1 = [2 x i8] c"}\00"
@.str.2 = [3 x i8] c"{}\00"
define void @sys_get_audio_apis(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i32 @strcat(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"{ \00"
@.str.1 = [2 x i8] c"}\00"
@.str.2 = [3 x i8] c"{}\00"
define void @sys_get_audio_apis(i8* %0) {
%2 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char const *);
scalar_t__ strlen(char const *);
void dump_string(const char *p) {
  printf("string:%s%s\n", (strlen(p) == 0 ? "" : " "), p);
}


x86 assembly (clang, -O0):
<dump_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
lea    0xece(%rip),%rsi
lea    0xec6(%rip),%rax
cmp    $0x0,%rcx
cmove  %rax,%rsi
mov    -0x8(%rbp),%rdx
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_string>:
mov    %rdi,%rdx
cmpb   $0x0,(%rdi)
lea    0xeef(%rip),%rax
lea    0xee9(%rip),%rsi
cmove  %rax,%rsi
lea    0xed1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"string:%s%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [2 x i8] c" \00"
define void @dump_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%8 = load i8*, i8** %2
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"string:%s%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [2 x i8] c" \00"
define void @dump_string(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %0)
ret void
}
/* Variables and functions */
double sum_double(int, int);
float sum_float(int, int);
int main() {
  float f = sum_float(1, 2);
  double d = sum_double(1, 2);
  return f == d;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <sum_float@plt>
movss  %xmm0,-0x8(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <sum_double@plt>
movsd  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <sum_float@plt>
movss  %xmm0,0x4(%rsp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <sum_double@plt>
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
cmpeqsd %xmm0,%xmm1
movq   %xmm1,%rax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca double
store i32 0, i32* %1
%4 = call float @sum_float(i32 1, i32 2)
store float %4, float* %2
%5 = call double @sum_double(i32 1, i32 2)
store double %5, double* %3
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = load double, double* %3
%9 = fcmp oeq double %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call float @sum_float(i32 1, i32 2)
%2 = tail call double @sum_double(i32 1, i32 2)
%3 = fpext float %1 to double
%4 = fcmp oeq double %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void chaz_ConfWriterPython_add_global_def(const char *sym, const char *value) {
  (void)sym;
  (void)value;
}


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

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

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

LLVM IR (-O2):
define void @chaz_ConfWriterPython_add_global_def(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void free_pairs(char **pairs, unsigned pairs_cnt) {
  unsigned i;
  for (i = 0; i < pairs_cnt; ++i)
    free(pairs[i]);
  free(pairs);
}


x86 assembly (clang, -O0):
<free_pairs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1150 <free_pairs+0x40>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_pairs+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @free_pairs(i8** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ updateOverflow(int, unsigned int *);
void tube_BASICTrans_Error(unsigned int *reg) { updateOverflow(1, reg); }


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

x86 assembly (clang, -O2):
<tube_BASICTrans_Error>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <updateOverflow@plt>

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

LLVM IR (-O2):
define void @tube_BASICTrans_Error(i32* %0) {
%2 = tail call i32 @updateOverflow(i32 1, i32* %0)
ret void
}
void BN_mod_add_quick(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_mod_add_quick() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, unsigned int);
void KeccakP200_ExtractBytes(const void *state, unsigned char *data,
                             unsigned int offset, unsigned int length) {
  assert(offset < 25);
  assert(offset + length <= 25);
  memcpy(data, (unsigned char *)state + offset, length);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
cmpl   $0x19,-0x14(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
cmp    $0x19,%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%eax
add    %rax,%rsi
mov    -0x18(%rbp),%edx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %rsi,%r15
mov    %rdi,%r12
xor    %edi,%edi
cmp    $0x19,%edx
setb   %dil
call   1030 <assert@plt>
lea    (%r14,%rbx,1),%eax
xor    %edi,%edi
cmp    $0x1a,%eax
setb   %dil
call   1030 <assert@plt>
mov    %ebx,%esi
add    %r12,%rsi
mov    %r15,%rdi
mov    %r14d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define void @KeccakP200_ExtractBytes(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = icmp ult i32 %9, 25
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = add i32 %13, %14
%16 = icmp ule i32 %15, 25
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8*, i8** %6
%20 = load i8*, i8** %5
%21 = load i32, i32* %7
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i32, i32* %8
%25 = call i32 @memcpy(i8* %19, i8* %23, i32 %24)
ret void
}

LLVM IR (-O2):
define void @KeccakP200_ExtractBytes(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = icmp ult i32 %2, 25
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = add i32 %3, %2
%9 = icmp ult i32 %8, 26
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = zext i32 %2 to i64
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = tail call i32 @memcpy(i8* %1, i8* %13, i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(void const *, void const *);
bool string_compare(const void *l, const void *r) {
  if (!l || !r) {
    return false;
  }
  return (strcmp(l, r) == 0);
}


x86 assembly (clang, -O0):
<string_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <string_compare+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <string_compare+0x32>
movl   $0x0,-0x4(%rbp)
jmp    115e <string_compare+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_compare>:
xor    %eax,%eax
test   %rdi,%rdi
je     1131 <string_compare+0x21>
test   %rsi,%rsi
je     1131 <string_compare+0x21>
push   %rax
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @string_compare(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @strcmp(i8* %0, i8* %1)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
/* Type definitions */
struct s_cell {
  int dummy;
};

/* Variables and functions */
struct s_cell *ai_select_cell_to_go_to(struct s_cell *src_cell) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
%struct.s_cell = type { i32 }
define noalias %struct.s_cell* @ai_select_cell_to_go_to(%struct.s_cell* nocapture readnone %0) {
ret %struct.s_cell* null
}
int fun641() { return 641; }


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

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

LLVM IR (-O0):
define i32 @fun641() {
ret i32 641
}

LLVM IR (-O2):
define i32 @fun641() {
ret i32 641
}
double r_data() {}


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

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

LLVM IR (-O0):
define double @r_data() {
%1 = alloca double
%2 = load double, double* %1
ret double %2
}

LLVM IR (-O2):
define double @r_data() {
ret double undef
}
/* Variables and functions */
char *next_line(char *);
char *skip_spaces(char *);
char *skip_irrelevant(char *p) {
  p = skip_spaces(p);
  while (*p && *p == '#') {
    p = next_line(p);
    p = skip_spaces(p);
  }
  return p;
}


x86 assembly (clang, -O0):
<skip_irrelevant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <skip_spaces@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     115e <skip_irrelevant+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    116e <skip_irrelevant+0x4e>
jmp    118d <skip_irrelevant+0x6d>
mov    -0x8(%rbp),%rdi
call   1030 <next_line@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <skip_spaces@plt>
mov    %rax,-0x8(%rbp)
jmp    1139 <skip_irrelevant+0x19>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_irrelevant>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1040 <skip_spaces@plt>
cmpb   $0x23,(%rax)
jne    1147 <skip_irrelevant+0x27>
mov    %rax,%rdi
call   1030 <next_line@plt>
mov    %rax,%rdi
jmp    1130 <skip_irrelevant+0x10>
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @skip_irrelevant(i8* %0) {
%2 = tail call i8* @skip_spaces(i8* %0)
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 35
br i1 %4, label %5, label %11
5: ; preds = %1, %5
%6 = phi i8* [ %8, %5 ], [ %2, %1 ]
%7 = tail call i8* @next_line(i8* %6)
%8 = tail call i8* @skip_spaces(i8* %7)
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 35
br i1 %10, label %5, label %11
11: ; preds = %5, %1
%12 = phi i8* [ %2, %1 ], [ %8, %5 ]
ret i8* %12
}
/* Variables and functions */
unsigned long long __blsi_u64(unsigned long long);
unsigned long long test__blsi_u64(unsigned long long __X) {
  return __blsi_u64(__X);
}


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

x86 assembly (clang, -O2):
<test__blsi_u64>:
jmp    1030 <__blsi_u64@plt>

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

LLVM IR (-O2):
define i64 @test__blsi_u64(i64 %0) {
%2 = tail call i64 @__blsi_u64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ my_free1(int *);
scalar_t__ my_malloc2(int, int);
int test4() {
  int *data = (int *)my_malloc2(1, 4);
  my_free1(data);
  data = (int *)my_malloc2(1, 4);
  my_free1(data);
  return *data;
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <my_malloc2@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_free1@plt>
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <my_malloc2@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_free1@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
push   %rbx
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <my_malloc2@plt>
mov    %rax,%rdi
call   1030 <my_free1@plt>
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <my_malloc2@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <my_free1@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test4() {
%1 = alloca i32*
%2 = call i64 @my_malloc2(i32 1, i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @my_free1(i32* %4)
%6 = call i64 @my_malloc2(i32 1, i32 4)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %1
%8 = load i32*, i32** %1
%9 = call i32 @my_free1(i32* %8)
%10 = load i32*, i32** %1
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @test4() {
%1 = tail call i64 @my_malloc2(i32 1, i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @my_free1(i32* %2)
%4 = tail call i64 @my_malloc2(i32 1, i32 4)
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 @my_free1(i32* %5)
%7 = load i32, i32* %5
ret i32 %7
}
/* Type definitions */
struct timespec {
  unsigned int tv_sec;
  unsigned long tv_nsec;
};

/* Variables and functions */
int nanosleep(struct timespec *, struct timespec *);
int delay(unsigned int seconds, unsigned long nano) {
  struct timespec t1, t2;
  t1.tv_sec = seconds;
  t1.tv_nsec = nano;
  return nanosleep(&t1, &t2);
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <nanosleep@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
sub    $0x28,%rsp
mov    %edi,0x8(%rsp)
mov    %rsi,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1030 <nanosleep@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define i32 @delay(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca %struct.timespec
%6 = alloca %struct.timespec
store i32 %0, i32* %3
store i64 %1, i64* %4
%7 = load i32, i32* %3
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
store i32 %7, i32* %8
%9 = load i64, i64* %4
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 1
store i64 %9, i64* %10
%11 = call i32 @nanosleep(%struct.timespec* %5, %struct.timespec* %6)
ret i32 %11
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define i32 @delay(i32 %0, i64 %1) {
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
%5 = bitcast %struct.timespec* %3 to i8*
%6 = bitcast %struct.timespec* %4 to i8*
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 0
store i32 %0, i32* %7
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 1
store i64 %1, i64* %8
%9 = call i32 @nanosleep(%struct.timespec* %3, %struct.timespec* %4)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ test();
void main() {
  test();
  ;
}


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

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
jmp    1030 <test@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @test()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @test()
ret void
}
char inc(char c) { return c + 1; }


x86 assembly (clang, -O0):
<inc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @inc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, 1
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @inc(i8 signext %0) {
%2 = add i8 %0, 1
ret i8 %2
}
/* Variables and functions */
int comp(char *, char *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *str =
      "love love no a love lave live lovf thus a olive abc 123 ikman love";
  char *find = "love";
  int flag = 1;
  printf("%d \n", comp(str, find, flag));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xefd(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <comp@plt>
mov    %eax,%esi
lea    0xede(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xf0f(%rip),%rsi
mov    $0x1,%edx
call   1030 <comp@plt>
lea    0xf03(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [67 x i8] c"love love no a love lave live lovf thus a olive abc 123 ikman love\00"
@.str.1 = [5 x i8] c"love\00"
@.str.2 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i32 1, i32* %4
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @comp(i8* %5, i8* %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [67 x i8] c"love love no a love lave live lovf thus a olive abc 123 ikman love\00"
@.str.1 = [5 x i8] c"love\00"
@.str.2 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = tail call i32 @comp(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
double dot3(double a1[3], double a2[3]) {
  return a1[0] * a2[0] + a1[1] * a2[1] + a1[2] * a2[2];
}


x86 assembly (clang, -O0):
<dot3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot3>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dot3(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %24, double %18)
ret double %25
}

LLVM IR (-O2):
define double @dot3(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
void do_fiq() {}


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

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

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

LLVM IR (-O2):
define void @do_fiq() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("this is cmd1!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%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 = [15 x i8] c"this is cmd1!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"this is cmd1!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}