xunge/DecIR huggingface dataset:
main(argc, argv) int argc;
char *argv[];
{
  while (--argc)
    striplf(*++argv);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     1157 <main+0x47>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1030 <striplf@plt>
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x1,%edi
je     1144 <main+0x34>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
xor    %eax,%eax
call   1030 <striplf@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add nsw i32 %0, -1
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8** [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @striplf to i32 (i8*, ...)*)(i8* %9)
%11 = add nsw i32 %6, -1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Bool;

/* Variables and functions */
int /*<<< orphan*/ XNVCTRLSetTargetStringAttribute(int /*<<< orphan*/ *,
                                                   int /*<<< orphan*/, int,
                                                   unsigned int, unsigned int,
                                                   char *);
Bool XNVCTRLSetStringAttribute(Display *dpy, int screen,
                               unsigned int display_mask,
                               unsigned int attribute, char *ptr) {
  return XNVCTRLSetTargetStringAttribute(dpy, 0, screen, display_mask,
                                         attribute, ptr);
}


x86 assembly (clang, -O0):
<XNVCTRLSetStringAttribute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x20(%rbp),%r9
xor    %esi,%esi
call   1030 <XNVCTRLSetTargetStringAttribute@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XNVCTRLSetStringAttribute>:
mov    %r8,%r9
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <XNVCTRLSetTargetStringAttribute@plt>

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

LLVM IR (-O2):
define i32 @XNVCTRLSetStringAttribute(i32* %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = tail call i32 @XNVCTRLSetTargetStringAttribute(i32* %0, i32 0, i32 %1, i32 %2, i32 %3, i8* %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ inlineFunc();
void use65() { inlineFunc(); }


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

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

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

LLVM IR (-O2):
define void @use65() {
%1 = tail call i32 (...) @inlineFunc()
ret void
}
apply(int fn(int, int), int a, int b) { return fn(a, b); }


x86 assembly (clang, -O0):
<apply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apply>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %edx,%esi
jmp    *%rax

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

LLVM IR (-O2):
define i32 @apply(i32 (i32, i32)* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 %0(i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int doDivision(int val1, int val2) {
  if (val2 == 0) {
    printf("Division par zero !\n");
    return 0;
  } else {
    return val1 / val2;
  }
}


x86 assembly (clang, -O0):
<doDivision>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1140 <doDivision+0x30>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    114a <doDivision+0x3a>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doDivision>:
test   %esi,%esi
je     111a <doDivision+0xa>
mov    %edi,%eax
cltd
idiv   %esi
ret
push   %rax
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Division par zero !\0A\00"
define i32 @doDivision(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %14
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = sdiv i32 %11, %12
store i32 %13, i32* %3
br label %14
14: ; preds = %10, %8
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@str = [20 x i8] c"Division par zero !\00"
define i32 @doDivision(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
br label %8
6: ; preds = %2
%7 = sdiv i32 %0, %1
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ 0, %4 ], [ %7, %6 ]
ret i32 %9
}
void shift(char *buffer, char *buffer2) {
  unsigned int i;
  for (i = 0; i < 4; i++) {
    buffer[i] = buffer2[(i + 1) % 4];
  }
}


x86 assembly (clang, -O0):
<shift>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jae    1147 <shift+0x47>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
and    $0x3,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <shift+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift>:
mov    0x1(%rsi),%al
mov    %al,(%rdi)
mov    0x2(%rsi),%al
mov    %al,0x1(%rdi)
mov    0x3(%rsi),%al
mov    %al,0x2(%rdi)
mov    (%rsi),%al
mov    %al,0x3(%rdi)
ret

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

LLVM IR (-O2):
define void @shift(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = load i8, i8* %3
store i8 %4, i8* %0
%5 = getelementptr inbounds i8, i8* %1, i64 2
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = getelementptr inbounds i8, i8* %1, i64 3
%9 = load i8, i8* %8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = load i8, i8* %1
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
int test_imm_9Euint16_mem(unsigned short *val) {
  return ((*val) & (-0x9E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_9Euint16_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, -158
%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_9Euint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -158
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct msqid_ds {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int msgctl(int msqid, int cmd, struct msqid_ds *buf) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<msgctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgctl>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.msqid_ds = type { i32 }
@ENOSYS = global i32 0
define i32 @msgctl(i32 %0, i32 %1, %struct.msqid_ds* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.msqid_ds*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.msqid_ds* %2, %struct.msqid_ds** %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
%struct.msqid_ds = type { i32 }
@ENOSYS = global i32 0
define i32 @msgctl(i32 %0, i32 %1, %struct.msqid_ds* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Mem_Display(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *, char *, int);
int /*<<< orphan*/ stderr;
void mem_tag_err(void *p, char *fil, int lin) {
  fprintf(stderr, "Memory tag error - %p - %s(%d)\n", p, fil, lin);
  Mem_Display(stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<mem_tag_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1040 <Mem_Display@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<mem_tag_err>:
push   %rbx
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2e9f(%rip),%rbx
mov    (%rbx),%edi
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
call   1040 <Mem_Display@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Memory tag error - %p - %s(%d)\0A\00"
define void @mem_tag_err(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 i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 %10)
%12 = load i32, i32* @stderr
%13 = call i32 @Mem_Display(i32 %12)
%14 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Memory tag error - %p - %s(%d)\0A\00"
define void @mem_tag_err(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
%6 = load i32, i32* @stderr
%7 = tail call i32 @Mem_Display(i32 %6)
%8 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ is_space(char);
int is_space_underscore(char c1, char c2) {
  return (is_space(c1) && ('_' == c2));
}


x86 assembly (clang, -O0):
<is_space_underscore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_space@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x3(%rbp)
je     1150 <is_space_underscore+0x40>
movsbl -0x2(%rbp),%ecx
mov    $0x5f,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space_underscore>:
push   %rbx
mov    %esi,%ebx
call   1030 <is_space@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_space_underscore(i8 signext %0, i8 signext %1) {
%3 = tail call i64 @is_space(i8 signext %0)
%4 = icmp ne i64 %3, 0
%5 = icmp eq i8 %1, 95
%6 = and i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
double dotProd(double a[3], double b[3]) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}


x86 assembly (clang, -O0):
<dotProd>:
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):
<dotProd>:
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 @dotProd(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 @dotProd(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
}
int clickplc_exe_SubProgrammReturn_dec(unsigned char *stream, void *obj) {
  int encsize = 4;
  return (encsize);
}


x86 assembly (clang, -O0):
<clickplc_exe_SubProgrammReturn_dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @clickplc_exe_SubProgrammReturn_dec(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 4
}
int zzTraceOption(int delta) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @zzTraceOption(i32 %0) {
ret i32 0
}
/* Variables and functions */
int syscall(int, int, char const *, int);
int unlinkat(int fd, const char *path, int flag) {
  return syscall(328, fd, path, flag);
}


x86 assembly (clang, -O0):
<unlinkat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x148,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlinkat>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x148,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @unlinkat(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @syscall(i32 328, i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;
typedef int int32_t;

/* Variables and functions */
uint64_t rotateR_fun_uint64_t(uint64_t x, int32_t i) {
  if ((i %= 64) == 0)
    return x;
  return (x << (64 - i)) | (x >> i);
}


x86 assembly (clang, -O0):
<rotateR_fun_uint64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmp    $0x0,%edx
jne    112c <rotateR_fun_uint64_t+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <rotateR_fun_uint64_t+0x48>
mov    -0x8(%rbp),%eax
mov    $0x40,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateR_fun_uint64_t>:
lea    0x3f(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
and    $0xffffffc0,%eax
sub    %eax,%esi
mov    %esi,%ecx
neg    %cl
mov    %edi,%edx
shl    %cl,%edx
mov    %edi,%eax
mov    %esi,%ecx
sar    %cl,%eax
or     %edx,%eax
test   %esi,%esi
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotateR_fun_uint64_t(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = srem i32 %6, 64
store i32 %7, i32* %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %20
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = sub nsw i32 64, %13
%15 = shl i32 %12, %14
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = ashr i32 %16, %17
%19 = or i32 %15, %18
store i32 %19, i32* %3
br label %20
20: ; preds = %11, %9
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @rotateR_fun_uint64_t(i32 %0, i32 %1) {
%3 = srem i32 %1, 64
%4 = icmp eq i32 %3, 0
%5 = sub nsw i32 64, %3
%6 = shl i32 %0, %5
%7 = ashr i32 %0, %3
%8 = or i32 %6, %7
%9 = select i1 %4, i32 %0, i32 %8
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memory_barrier();
void mmio_write(uint32_t reg, uint32_t data) {
  memory_barrier();
  *(volatile uint32_t *)(reg) = data;
  memory_barrier();
}


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

x86 assembly (clang, -O2):
<mmio_write>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <memory_barrier@plt>
mov    %r14,(%rbx)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <memory_barrier@plt>

LLVM IR (-O0):
define void @mmio_write(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i32 (...) @memory_barrier()
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = inttoptr i64 %7 to i64*
store volatile i64 %6, i64* %8
%9 = call i32 (...) @memory_barrier()
ret void
}

LLVM IR (-O2):
define void @mmio_write(i64 %0, i64 %1) {
%3 = tail call i32 (...) @memory_barrier()
%4 = inttoptr i64 %0 to i64*
store volatile i64 %1, i64* %4
%5 = tail call i32 (...) @memory_barrier()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void _err(const char *str) {
  printf("err: %s\n", str);
  exit(1);
}


x86 assembly (clang, -O0):
<_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_err>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"err: %s\0A\00"
define void @_err(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error_print(char *arr) {
  fprintf(stderr, "\n%s converts the intensity/phase file into xplot file \n",
          arr);
  fprintf(stderr,
          "\nUSAGE: %s F  M_F  where F is the file in gnuplot format,\nM_F is "
          "the xplot readable .off file\n\n",
          arr);
}


x86 assembly (clang, -O0):
<error_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeef(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_print>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xefe(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"\0A%s converts the intensity/phase file into xplot file \0A\00"
@.str.1 = [96 x i8] c"\0AUSAGE: %s F M_F where F is the file in gnuplot format,\0AM_F is the xplot readable .off file\0A\0A\00"
define void @error_print(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 ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"\0A%s converts the intensity/phase file into xplot file \0A\00"
@.str.1 = [96 x i8] c"\0AUSAGE: %s F M_F where F is the file in gnuplot format,\0AM_F is the xplot readable .off file\0A\0A\00"
define void @error_print(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
void *acalloc(int, int);
void *amalloc(int size) { return acalloc(size, 1); }


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

x86 assembly (clang, -O2):
<amalloc>:
mov    $0x1,%esi
jmp    1030 <acalloc@plt>

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

LLVM IR (-O2):
define i8* @amalloc(i32 %0) {
%2 = tail call i8* @acalloc(i32 %0, i32 1)
ret i8* %2
}
/* Variables and functions */
char check_non_repeated(char *);
int /*<<< orphan*/ printf(char *, char);
int main() {
  char string[] = "adegadecb";
  char first;
  first = check_non_repeated(string);
  printf("Final Result: %c\n", first == '\n' ? '0' : first);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xec7(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xe(%rbp),%rdi
call   1040 <check_non_repeated@plt>
mov    %al,-0xf(%rbp)
movsbl -0xf(%rbp),%eax
cmp    $0xa,%eax
jne    116b <main+0x4b>
mov    $0x30,%eax
mov    %eax,-0x14(%rbp)
jmp    1172 <main+0x52>
movsbl -0xf(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
lea    0xe8e(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6365646167656461,%rax
64 65 63
mov    %rax,0x8(%rsp)
movw   $0x62,0x10(%rsp)
lea    0x8(%rsp),%rdi
call   1040 <check_non_repeated@plt>
cmp    $0xa,%al
movzbl %al,%eax
mov    $0x30,%ecx
cmovne %eax,%ecx
movsbl %cl,%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.string = [10 x i8] c"adegadecb\00"
@.str = [18 x i8] c"Final Result: %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca i8
store i32 0, i32* %1
%4 = bitcast [10 x i8]* %2 to i8*
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = call signext i8 @check_non_repeated(i8* %5)
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 10
br i1 %9, label %10, label %11
10: ; preds = %0
br label %14
11: ; preds = %0
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
br label %14
14: ; preds = %11, %10
%15 = phi i32 [ 48, %10 ], [ %13, %11 ]
%16 = trunc i32 %15 to i8
%17 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext %16)
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@__const.main.string = [10 x i8] c"adegadecb\00"
@.str = [18 x i8] c"Final Result: %c\0A\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call signext i8 @check_non_repeated(i8* %2)
%4 = icmp eq i8 %3, 10
%5 = select i1 %4, i8 48, i8 %3
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ atomic_postadd_int64_t(int /*<<< orphan*/ *, int);
int64_t atomic_postinc_int64_t(int64_t *var) {
  return atomic_postadd_int64_t(var, 1);
}


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

x86 assembly (clang, -O2):
<atomic_postinc_int64_t>:
mov    $0x1,%esi
jmp    1030 <atomic_postadd_int64_t@plt>

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

LLVM IR (-O2):
define i32 @atomic_postinc_int64_t(i32* %0) {
%2 = tail call i32 @atomic_postadd_int64_t(i32* %0, i32 1)
ret i32 %2
}
double varicorr(int give) {
  const double var[15] = {0.0084, 0.0333, 0.0749, 0.1331, 0.2079,
                          0.2994, 0.4075, 0.5322, 0.6735, 0.8315,
                          1.1974, 1.8709, 3.326,  20.787, 187.0826};
  return 0 < give && give <= 15 ? var[give - 1] : 0.0;
}


x86 assembly (clang, -O0):
<varicorr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xed7(%rip),%rsi
mov    $0x78,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jge    1163 <varicorr+0x53>
cmpl   $0xf,-0x4(%rbp)
jg     1163 <varicorr+0x53>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x80(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    1173 <varicorr+0x63>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    1173 <varicorr+0x63>
movsd  -0x88(%rbp),%xmm0
ff
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<varicorr>:
add    $0xffffffff,%edi
xorps  %xmm0,%xmm0
cmp    $0xe,%edi
ja     1119 <varicorr+0x19>
mov    %edi,%eax
lea    0xeec(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
@__const.varicorr.var = [15 x double] [double 0x3F813404EA4A8C15, double 3.330000e-02, double 7.490000e-02, double 1.331000e-01, double 2.079000e-01, double 2.994000e-01, double 4.075000e-01, double 5.322000e-01, double 0x3FE58D4FDF3B645A, double 8.315000e-01, double 1.197400e+00, double 1.870900e+00, double 3.326000e+00, double 2.078700e+01, double 0x406762A4A8C154CA]
define double @varicorr(i32 %0) {
%2 = alloca i32
%3 = alloca [15 x double]
store i32 %0, i32* %2
%4 = bitcast [15 x double]* %3 to i8*
%5 = load i32, i32* %2
%6 = icmp slt i32 0, %5
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 15
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %2
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [15 x double], [15 x double]* %3, i64 0, i64 %13
%15 = load double, double* %14
br label %17
16: ; preds = %7, %1
br label %17
17: ; preds = %16, %10
%18 = phi double [ %15, %10 ], [ 0.000000e+00, %16 ]
ret double %18
}

LLVM IR (-O2):
@__const.varicorr.var = [15 x double] [double 0x3F813404EA4A8C15, double 3.330000e-02, double 7.490000e-02, double 1.331000e-01, double 2.079000e-01, double 2.994000e-01, double 4.075000e-01, double 5.322000e-01, double 0x3FE58D4FDF3B645A, double 8.315000e-01, double 1.197400e+00, double 1.870900e+00, double 3.326000e+00, double 2.078700e+01, double 0x406762A4A8C154CA]
define double @varicorr(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 15
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds [15 x double], [15 x double]* @__const.varicorr.var, i64 0, i64 %5
%7 = load double, double* %6
br label %8
8: ; preds = %1, %4
%9 = phi double [ %7, %4 ], [ 0.000000e+00, %1 ]
ret double %9
}
/* Type definitions */
struct aFILE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
int ferror(int /*<<< orphan*/);
int my_ferror(struct aFILE *fp) { return ferror(_get_actual_fp(fp)); }


x86 assembly (clang, -O0):
<my_ferror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_get_actual_fp@plt>
mov    %eax,%edi
call   1030 <ferror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_ferror>:
push   %rax
call   1040 <_get_actual_fp@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ferror@plt>

LLVM IR (-O0):
%struct.aFILE = type { i32 }
define i32 @my_ferror(%struct.aFILE* %0) {
%2 = alloca %struct.aFILE*
store %struct.aFILE* %0, %struct.aFILE** %2
%3 = load %struct.aFILE*, %struct.aFILE** %2
%4 = call i32 @_get_actual_fp(%struct.aFILE* %3)
%5 = call i32 @ferror(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define i32 @my_ferror(%struct.aFILE* %0) {
%2 = tail call i32 @_get_actual_fp(%struct.aFILE* %0)
%3 = tail call i32 @ferror(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ VIDEO_PLAY;
int ioctl(int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int videoPlay(int fd, char *arg) {
  if (arg)
    return -1;
  if (ioctl(fd, VIDEO_PLAY) == -1)
    perror("VIDEO_PLAY");
  return 0;
}


x86 assembly (clang, -O0):
<videoPlay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <videoPlay+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <videoPlay+0x53>
mov    -0x8(%rbp),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    116c <videoPlay+0x4c>
lea    0xe99(%rip),%rdi
call   1040 <perror@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<videoPlay>:
push   %rbx
mov    $0xffffffff,%ebx
test   %rsi,%rsi
jne    1140 <videoPlay+0x20>
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
je     1144 <videoPlay+0x24>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xeb5(%rip),%rdi
call   1040 <perror@plt>
jmp    1140 <videoPlay+0x20>

LLVM IR (-O0):
@VIDEO_PLAY = global i32 0
@.str = [11 x i8] c"VIDEO_PLAY\00"
define i32 @videoPlay(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 -1, i32* %3
br label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* @VIDEO_PLAY
%12 = call i32 @ioctl(i32 %10, i32 %11)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %9
store i32 0, i32* %3
br label %17
17: ; preds = %16, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@VIDEO_PLAY = global i32 0
@.str = [11 x i8] c"VIDEO_PLAY\00"
define i32 @videoPlay(i32 %0, i8* readnone %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = load i32, i32* @VIDEO_PLAY
%6 = tail call i32 @ioctl(i32 %0, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %4, %8, %2
%11 = phi i32 [ -1, %2 ], [ 0, %8 ], [ 0, %4 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x56() {
  Assert_real((isgraph(86)),
              "/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_isgraph.c",
              435, ("isgraph should be 1 for V"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x56>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1b3,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x56>:
push   %rax
mov    $0x56,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1b3,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for V\00"
define void @t_isgraph_0x56() {
%1 = call i32 @isgraph(i32 86)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 435, i8* getelementptr inbounds ([26 x i8], [26 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for V\00"
define void @t_isgraph_0x56() {
%1 = tail call i32 @isgraph(i32 86)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 435, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *strchr(char const *, char);
char *skip_space(const char *pos) {
  pos = strchr(pos, ' ');
  if (!pos)
    return NULL;
  while (*pos == ' ')
    pos++;
  return (char *)pos;
}


x86 assembly (clang, -O0):
<skip_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1146 <skip_space+0x36>
movq   $0x0,-0x8(%rbp)
jmp    1174 <skip_space+0x64>
jmp    114b <skip_space+0x3b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    116c <skip_space+0x5c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    114b <skip_space+0x3b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_space>:
push   %rax
mov    $0x20,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     113f <skip_space+0x2f>
add    $0xffffffffffffffff,%rax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x1(%rax),%rcx
cmpb   $0x20,0x1(%rax)
mov    %rcx,%rax
je     1130 <skip_space+0x20>
jmp    1141 <skip_space+0x31>
xor    %ecx,%ecx
mov    %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @skip_space(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 32)
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %8, %4 ], [ %2, %1 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 32
%8 = getelementptr inbounds i8, i8* %5, i64 1
br i1 %7, label %4, label %9
9: ; preds = %4, %1
%10 = phi i8* [ null, %1 ], [ %5, %4 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int /*<<< orphan*/ semctl(int, int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int /*<<< orphan*/ shmctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
void ipcsyslog_cleanup(int _shmid, int _semid) {
  if (_shmid != -1) {
    shmctl(_shmid, IPC_RMID, NULL);
  }
  if (_semid != -1) {
    semctl(_semid, 0, IPC_RMID, 0);
  }
}


x86 assembly (clang, -O0):
<ipcsyslog_cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
je     114d <ipcsyslog_cleanup+0x2d>
mov    -0x4(%rbp),%edi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <shmctl@plt>
cmpl   $0xffffffff,-0x8(%rbp)
je     116c <ipcsyslog_cleanup+0x4c>
mov    -0x8(%rbp),%edi
mov    0x2e7f(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1040 <semctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipcsyslog_cleanup>:
push   %rbx
mov    %esi,%ebx
cmp    $0xffffffff,%edi
je     1138 <ipcsyslog_cleanup+0x18>
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <shmctl@plt>
cmp    $0xffffffff,%ebx
je     1152 <ipcsyslog_cleanup+0x32>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
xor    %esi,%esi
xor    %ecx,%ecx
pop    %rbx
jmp    1040 <semctl@plt>
pop    %rbx
ret

LLVM IR (-O0):
@IPC_RMID = global i32 0
define void @ipcsyslog_cleanup(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 = icmp ne i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* %3
%9 = load i32, i32* @IPC_RMID
%10 = call i32 @shmctl(i32 %8, i32 %9, i32* null)
br label %11
11: ; preds = %7, %2
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, -1
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i32, i32* %4
%16 = load i32, i32* @IPC_RMID
%17 = call i32 @semctl(i32 %15, i32 0, i32 %16, i32 0)
br label %18
18: ; preds = %14, %11
ret void
}

LLVM IR (-O2):
@IPC_RMID = global i32 0
define void @ipcsyslog_cleanup(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, -1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @IPC_RMID
%6 = tail call i32 @shmctl(i32 %0, i32 %5, i32* null)
br label %7
7: ; preds = %4, %2
%8 = icmp eq i32 %1, -1
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = load i32, i32* @IPC_RMID
%11 = tail call i32 @semctl(i32 %1, i32 0, i32 %10, i32 0)
br label %12
12: ; preds = %9, %7
ret void
}
void early_init(void) {}


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

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

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

LLVM IR (-O2):
define void @early_init() {
ret void
}
/* Type definitions */
typedef char wchar_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwprintf(int /*<<< orphan*/ *, char const *, int);
void uninivar_fwprintf(void) {
  FILE *stream;
  const wchar_t *format;
  int i;
  (void)fwprintf(stream, format, i);
}


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

x86 assembly (clang, -O2):
<uninivar_fwprintf>:
jmp    1030 <fwprintf@plt>

LLVM IR (-O0):
define void @uninivar_fwprintf() {
%1 = alloca i32*
%2 = alloca i8*
%3 = alloca i32
%4 = load i32*, i32** %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = call i32 @fwprintf(i32* %4, i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @uninivar_fwprintf() {
%1 = tail call i32 @fwprintf(i32* undef, i8* undef, i32 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_putstr(char *str) {
  int i;
  i = 0;
  while (str[i] != 0) {
    ft_putchar(str[i]);
    i += 1;
  }
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <ft_putstr+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <ft_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putstr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

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

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

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