#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ puts(char *);
void debugDump(double *memoryPtr, double *accumulatorPtr,
               int *instructionCounterPtr, int *instructionRegisterPtr,
               int *operationCodePtr, int *operandPtr, int debugMode) {
  FILE *dumpPtr;
  unsigned int contatoreCicloRighe;
  unsigned int contatoreCicloColonne;
  if (debugMode == 1) {
    dumpPtr = fopen("dump.txt", "w");
    fclose(dumpPtr);
    dumpPtr = fopen("debugDump.txt", "a");
  } else {
    dumpPtr = fopen("dump.txt", "w");
  }
  if (dumpPtr == NULL) {
    puts("Critical Error, dump failed");
  } else {
    fprintf(dumpPtr, "\n%s\n", "REGISTERS:");
    fprintf(dumpPtr, "%-25s %05f\n", "accumulator", *accumulatorPtr);
    fprintf(dumpPtr, "%-25s %02d\n", "instructionCounter",
            *instructionCounterPtr);
    fprintf(dumpPtr, "%-25s %04d\n", "instructionRegister",
            *instructionRegisterPtr);
    fprintf(dumpPtr, "%-25s %02d\n", "instructionCode", *operationCodePtr);
    fprintf(dumpPtr, "%-25s %02d\n\n", "operand", *operandPtr);
    fprintf(dumpPtr, "%s\n", "MEMORY:");
    contatoreCicloRighe = 0;
    fprintf(dumpPtr, "%8s", "");
    while (contatoreCicloRighe <= 9) {
      fprintf(dumpPtr, "%-6d", contatoreCicloRighe);
      contatoreCicloRighe++;
    }
    fprintf(dumpPtr, "%s\n", "");
    contatoreCicloRighe = 0;
    do {
      contatoreCicloColonne = 0;
      fprintf(dumpPtr, "%3d", contatoreCicloRighe);
      while (contatoreCicloColonne <= 9) {
        if (memoryPtr[contatoreCicloRighe + contatoreCicloColonne] == -99999) {
          fprintf(dumpPtr, "%5s", " $FINE");
        } else {
          fprintf(dumpPtr, " %+05.0lf",
                  memoryPtr[contatoreCicloRighe + contatoreCicloColonne]);
        }
        contatoreCicloColonne += 1;
      }
      fprintf(dumpPtr, "%s\n", "");
      contatoreCicloRighe += 10;
    } while (contatoreCicloRighe <= ((1000) - 10));
  }
  fclose(dumpPtr);
  return;
}


x86 assembly (clang, -O0):
<debugDump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x1,0x10(%rbp)
jne    11a9 <debugDump+0x69>
lea    0xe94(%rip),%rdi
lea    0xe96(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xe7f(%rip),%rdi
lea    0xe86(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x38(%rbp)
jmp    11c0 <debugDump+0x80>
lea    0xe58(%rip),%rdi
lea    0xe5a(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    11dc <debugDump+0x9c>
lea    0xe51(%rip),%rdi
call   1030 <puts@plt>
jmp    13ea <debugDump+0x2aa>
mov    -0x38(%rbp),%rdi
lea    0xe58(%rip),%rsi
lea    0xe56(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xe47(%rip),%rsi
lea    0xe4c(%rip),%rdx
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
lea    0xe40(%rip),%rsi
lea    0xe45(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
lea    0xe40(%rip),%rsi
lea    0xe45(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
lea    0xe02(%rip),%rsi
lea    0xe3a(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
lea    0xe32(%rip),%rsi
lea    0xe38(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xda3(%rip),%rsi
lea    0xe27(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x38(%rbp),%rdi
lea    0xe16(%rip),%rsi
lea    0xdfe(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpl   $0x9,-0x3c(%rbp)
ja     12f8 <debugDump+0x1b8>
mov    -0x38(%rbp),%rdi
mov    -0x3c(%rbp),%edx
lea    0xdf4(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12cb <debugDump+0x18b>
mov    -0x38(%rbp),%rdi
lea    0xd3d(%rip),%rsi
lea    0xdb8(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x3c(%rbp),%edx
lea    0xdaf(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpl   $0x9,-0x40(%rbp)
ja     13b6 <debugDump+0x276>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x40(%rbp),%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xca9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1385 <debugDump+0x245>
jp     1385 <debugDump+0x245>
mov    -0x38(%rbp),%rdi
lea    0xd6e(%rip),%rsi
lea    0xd6b(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13a8 <debugDump+0x268>
mov    -0x38(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x40(%rbp),%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm0
lea    0xd4a(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1334 <debugDump+0x1f4>
mov    -0x38(%rbp),%rdi
lea    0xc7f(%rip),%rsi
lea    0xcfa(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x3c(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x3de,-0x3c(%rbp)
jbe    1318 <debugDump+0x1d8>
jmp    13ea <debugDump+0x2aa>
mov    -0x38(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debugDump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,0x10(%rsp)
mov    %r8,0x8(%rsp)
mov    %rcx,%r13
mov    %rdx,%rbp
mov    %rsi,%r15
mov    %rdi,%r14
mov    0x50(%rsp),%r12d
lea    0xe98(%rip),%rdi
lea    0xe9a(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
cmp    $0x1,%r12d
jne    11a3 <debugDump+0x63>
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0xe7f(%rip),%rdi
lea    0xe86(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
test   %rbx,%rbx
je     1626 <debugDump+0x4e6>
lea    0xe8c(%rip),%rsi
lea    0xe8a(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <fprintf@plt>
movsd  (%r15),%xmm0
lea    0xe7f(%rip),%rsi
lea    0xe84(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    0x0(%rbp),%ecx
lea    0xe7c(%rip),%rbp
lea    0xe81(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%ecx
lea    0xe7c(%rip),%rsi
lea    0xe81(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x8(%rsp),%rax
mov    (%rax),%ecx
lea    0xe7d(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%ecx
lea    0xe72(%rip),%rsi
lea    0xe78(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xde4(%rip),%r15
lea    0xe68(%rip),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe5c(%rip),%rsi
lea    0xe44(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe45(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x3,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x6,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x7,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x9,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xd86(%rip),%rbp
lea    0xd83(%rip),%r15
lea    0xd83(%rip),%r12
xor    %r13d,%r13d
jmp    13ac <debugDump+0x26c>
nopl   (%rax)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
lea    0xcb6(%rip),%rsi
lea    0xd31(%rip),%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xa(%r13),%rax
cmp    $0x3d5,%r13
mov    %rax,%r13
jae    1632 <debugDump+0x4f2>
mov    %rbx,%rdi
lea    0xd26(%rip),%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
movsd  (%r14,%r13,8),%xmm0
ucomisd 0xc32(%rip),%xmm0
jne    13f0 <debugDump+0x2b0>
jp     13f0 <debugDump+0x2b0>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    13fd <debugDump+0x2bd>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  0x8(%r14,%r13,8),%xmm0
ucomisd 0xbf4(%rip),%xmm0
jne    1430 <debugDump+0x2f0>
jp     1430 <debugDump+0x2f0>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    143d <debugDump+0x2fd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  0x10(%r14,%r13,8),%xmm0
ucomisd 0xbb4(%rip),%xmm0
jne    1470 <debugDump+0x330>
jp     1470 <debugDump+0x330>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    147d <debugDump+0x33d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  0x18(%r14,%r13,8),%xmm0
ucomisd 0xb74(%rip),%xmm0
jne    14b0 <debugDump+0x370>
jp     14b0 <debugDump+0x370>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    14bd <debugDump+0x37d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  0x20(%r14,%r13,8),%xmm0
ucomisd 0xb34(%rip),%xmm0
jne    14f0 <debugDump+0x3b0>
jp     14f0 <debugDump+0x3b0>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    14fd <debugDump+0x3bd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  0x28(%r14,%r13,8),%xmm0
ucomisd 0xaf4(%rip),%xmm0
jne    1530 <debugDump+0x3f0>
jp     1530 <debugDump+0x3f0>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    153d <debugDump+0x3fd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  0x30(%r14,%r13,8),%xmm0
ucomisd 0xab4(%rip),%xmm0
jne    1570 <debugDump+0x430>
jp     1570 <debugDump+0x430>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    157d <debugDump+0x43d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  0x38(%r14,%r13,8),%xmm0
ucomisd 0xa74(%rip),%xmm0
jne    15b0 <debugDump+0x470>
jp     15b0 <debugDump+0x470>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    15bd <debugDump+0x47d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  0x40(%r14,%r13,8),%xmm0
ucomisd 0xa34(%rip),%xmm0
jne    15f0 <debugDump+0x4b0>
jp     15f0 <debugDump+0x4b0>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    15fd <debugDump+0x4bd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  0x48(%r14,%r13,8),%xmm0
ucomisd 0x9f4(%rip),%xmm0
jne    1614 <debugDump+0x4d4>
jnp    1370 <debugDump+0x230>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
jmp    1380 <debugDump+0x240>
lea    0x9f6(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fclose@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"dump.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [14 x i8] c"debugDump.txt\00"
@.str.3 = [2 x i8] c"a\00"
@.str.4 = [28 x i8] c"Critical Error, dump failed\00"
@.str.5 = [5 x i8] c"\0A%s\0A\00"
@.str.6 = [11 x i8] c"REGISTERS:\00"
@.str.7 = [12 x i8] c"%-25s %05f\0A\00"
@.str.8 = [12 x i8] c"accumulator\00"
@.str.9 = [12 x i8] c"%-25s %02d\0A\00"
@.str.10 = [19 x i8] c"instructionCounter\00"
@.str.11 = [12 x i8] c"%-25s %04d\0A\00"
@.str.12 = [20 x i8] c"instructionRegister\00"
@.str.13 = [16 x i8] c"instructionCode\00"
@.str.14 = [13 x i8] c"%-25s %02d\0A\0A\00"
@.str.15 = [8 x i8] c"operand\00"
@.str.16 = [4 x i8] c"%s\0A\00"
@.str.17 = [8 x i8] c"MEMORY:\00"
@.str.18 = [4 x i8] c"%8s\00"
@.str.19 = [1 x i8] zeroinitializer
@.str.20 = [5 x i8] c"%-6d\00"
@.str.21 = [4 x i8] c"%3d\00"
@.str.22 = [4 x i8] c"%5s\00"
@.str.23 = [7 x i8] c" $FINE\00"
@.str.24 = [10 x i8] c" %+05.0lf\00"
define void @debugDump(double* %0, double* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32 %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32*
%16 = alloca i32
%17 = alloca i32
store double* %0, double** %8
store double* %1, double** %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store i32* %4, i32** %12
store i32* %5, i32** %13
store i32 %6, i32* %14
%18 = load i32, i32* %14
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %25
20: ; preds = %7
%21 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %21, i32** %15
%22 = load i32*, i32** %15
%23 = call i32 @fclose(i32* %22)
%24 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %24, i32** %15
br label %27
25: ; preds = %7
%26 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %26, i32** %15
br label %27
27: ; preds = %25, %20
%28 = load i32*, i32** %15
%29 = icmp eq i32* %28, null
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @puts(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %112
32: ; preds = %27
%33 = load i32*, i32** %15
%34 = call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%35 = load i32*, i32** %15
%36 = load double*, double** %9
%37 = load double, double* %36
%38 = call i32 (i32*, i8*, ...) @fprintf(i32* %35, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), double %37)
%39 = load i32*, i32** %15
%40 = load i32*, i32** %10
%41 = load i32, i32* %40
%42 = call i32 (i32*, i8*, ...) @fprintf(i32* %39, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %41)
%43 = load i32*, i32** %15
%44 = load i32*, i32** %11
%45 = load i32, i32* %44
%46 = call i32 (i32*, i8*, ...) @fprintf(i32* %43, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %45)
%47 = load i32*, i32** %15
%48 = load i32*, i32** %12
%49 = load i32, i32* %48
%50 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32 %49)
%51 = load i32*, i32** %15
%52 = load i32*, i32** %13
%53 = load i32, i32* %52
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %51, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 %53)
%55 = load i32*, i32** %15
%56 = call i32 (i32*, i8*, ...) @fprintf(i32* %55, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
store i32 0, i32* %16
%57 = load i32*, i32** %15
%58 = call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
br label %59
59: ; preds = %62, %32
%60 = load i32, i32* %16
%61 = icmp ule i32 %60, 9
br i1 %61, label %62, label %68
62: ; preds = %59
%63 = load i32*, i32** %15
%64 = load i32, i32* %16
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %63, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 %64)
%66 = load i32, i32* %16
%67 = add i32 %66, 1
store i32 %67, i32* %16
br label %59
68: ; preds = %59
%69 = load i32*, i32** %15
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
store i32 0, i32* %16
br label %71
71: ; preds = %108, %68
store i32 0, i32* %17
%72 = load i32*, i32** %15
%73 = load i32, i32* %16
%74 = call i32 (i32*, i8*, ...) @fprintf(i32* %72, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %73)
br label %75
75: ; preds = %100, %71
%76 = load i32, i32* %17
%77 = icmp ule i32 %76, 9
br i1 %77, label %78, label %103
78: ; preds = %75
%79 = load double*, double** %8
%80 = load i32, i32* %16
%81 = load i32, i32* %17
%82 = add i32 %80, %81
%83 = zext i32 %82 to i64
%84 = getelementptr inbounds double, double* %79, i64 %83
%85 = load double, double* %84
%86 = fcmp oeq double %85, -9.999900e+04
br i1 %86, label %87, label %90
87: ; preds = %78
%88 = load i32*, i32** %15
%89 = call i32 (i32*, i8*, ...) @fprintf(i32* %88, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %100
90: ; preds = %78
%91 = load i32*, i32** %15
%92 = load double*, double** %8
%93 = load i32, i32* %16
%94 = load i32, i32* %17
%95 = add i32 %93, %94
%96 = zext i32 %95 to i64
%97 = getelementptr inbounds double, double* %92, i64 %96
%98 = load double, double* %97
%99 = call i32 (i32*, i8*, ...) @fprintf(i32* %91, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %98)
br label %100
100: ; preds = %90, %87
%101 = load i32, i32* %17
%102 = add i32 %101, 1
store i32 %102, i32* %17
br label %75
103: ; preds = %75
%104 = load i32*, i32** %15
%105 = call i32 (i32*, i8*, ...) @fprintf(i32* %104, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%106 = load i32, i32* %16
%107 = add i32 %106, 10
store i32 %107, i32* %16
br label %108
108: ; preds = %103
%109 = load i32, i32* %16
%110 = icmp ule i32 %109, 990
br i1 %110, label %71, label %111
111: ; preds = %108
br label %112
112: ; preds = %111, %30
%113 = load i32*, i32** %15
%114 = call i32 @fclose(i32* %113)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"dump.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [14 x i8] c"debugDump.txt\00"
@.str.3 = [2 x i8] c"a\00"
@.str.4 = [28 x i8] c"Critical Error, dump failed\00"
@.str.5 = [5 x i8] c"\0A%s\0A\00"
@.str.6 = [11 x i8] c"REGISTERS:\00"
@.str.7 = [12 x i8] c"%-25s %05f\0A\00"
@.str.8 = [12 x i8] c"accumulator\00"
@.str.9 = [12 x i8] c"%-25s %02d\0A\00"
@.str.10 = [19 x i8] c"instructionCounter\00"
@.str.11 = [12 x i8] c"%-25s %04d\0A\00"
@.str.12 = [20 x i8] c"instructionRegister\00"
@.str.13 = [16 x i8] c"instructionCode\00"
@.str.14 = [13 x i8] c"%-25s %02d\0A\0A\00"
@.str.15 = [8 x i8] c"operand\00"
@.str.16 = [4 x i8] c"%s\0A\00"
@.str.17 = [8 x i8] c"MEMORY:\00"
@.str.18 = [4 x i8] c"%8s\00"
@.str.19 = [1 x i8] zeroinitializer
@.str.20 = [5 x i8] c"%-6d\00"
@.str.21 = [4 x i8] c"%3d\00"
@.str.22 = [4 x i8] c"%5s\00"
@.str.23 = [7 x i8] c" $FINE\00"
@.str.24 = [10 x i8] c" %+05.0lf\00"
define void @debugDump(double* nocapture %0, double* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5, i32 %6) {
%8 = icmp eq i32 %6, 1
%9 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br i1 %8, label %10, label %13
10: ; preds = %7
%11 = tail call i32 @fclose(i32* %9)
%12 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %13
13: ; preds = %7, %10
%14 = phi i32* [ %12, %10 ], [ %9, %7 ]
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %139
18: ; preds = %13
%19 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%20 = load double, double* %1
%21 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), double %20)
%22 = load i32, i32* %2
%23 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %3
%25 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %4
%27 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32 %26)
%28 = load i32, i32* %5
%29 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 %28)
%30 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%31 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%32 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 0)
%33 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 1)
%34 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 2)
%35 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 3)
%36 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 4)
%37 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 5)
%38 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 6)
%39 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 7)
%40 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 8)
%41 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 9)
%42 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
br label %43
43: ; preds = %135, %18
%44 = phi i64 [ %137, %135 ], [ 0, %18 ]
%45 = trunc i64 %44 to i32
%46 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %45)
%47 = getelementptr inbounds double, double* %0, i64 %44
%48 = load double, double* %47
%49 = fcmp oeq double %48, -9.999900e+04
br i1 %49, label %50, label %52
50: ; preds = %43
%51 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %54
52: ; preds = %43
%53 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %48)
br label %54
54: ; preds = %52, %50
%55 = or i64 %44, 1
%56 = getelementptr inbounds double, double* %0, i64 %55
%57 = load double, double* %56
%58 = fcmp oeq double %57, -9.999900e+04
br i1 %58, label %61, label %59
59: ; preds = %54
%60 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %57)
br label %63
61: ; preds = %54
%62 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %63
63: ; preds = %61, %59
%64 = add nuw nsw i64 %44, 2
%65 = getelementptr inbounds double, double* %0, i64 %64
%66 = load double, double* %65
%67 = fcmp oeq double %66, -9.999900e+04
br i1 %67, label %70, label %68
68: ; preds = %63
%69 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %66)
br label %72
70: ; preds = %63
%71 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %72
72: ; preds = %70, %68
%73 = add nuw nsw i64 %44, 3
%74 = getelementptr inbounds double, double* %0, i64 %73
%75 = load double, double* %74
%76 = fcmp oeq double %75, -9.999900e+04
br i1 %76, label %79, label %77
77: ; preds = %72
%78 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %75)
br label %81
79: ; preds = %72
%80 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %81
81: ; preds = %79, %77
%82 = add nuw nsw i64 %44, 4
%83 = getelementptr inbounds double, double* %0, i64 %82
%84 = load double, double* %83
%85 = fcmp oeq double %84, -9.999900e+04
br i1 %85, label %88, label %86
86: ; preds = %81
%87 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %84)
br label %90
88: ; preds = %81
%89 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %90
90: ; preds = %88, %86
%91 = add nuw nsw i64 %44, 5
%92 = getelementptr inbounds double, double* %0, i64 %91
%93 = load double, double* %92
%94 = fcmp oeq double %93, -9.999900e+04
br i1 %94, label %97, label %95
95: ; preds = %90
%96 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %93)
br label %99
97: ; preds = %90
%98 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %99
99: ; preds = %97, %95
%100 = add nuw nsw i64 %44, 6
%101 = getelementptr inbounds double, double* %0, i64 %100
%102 = load double, double* %101
%103 = fcmp oeq double %102, -9.999900e+04
br i1 %103, label %106, label %104
104: ; preds = %99
%105 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %102)
br label %108
106: ; preds = %99
%107 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %108
108: ; preds = %106, %104
%109 = add nuw nsw i64 %44, 7
%110 = getelementptr inbounds double, double* %0, i64 %109
%111 = load double, double* %110
%112 = fcmp oeq double %111, -9.999900e+04
br i1 %112, label %115, label %113
113: ; preds = %108
%114 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %111)
br label %117
115: ; preds = %108
%116 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %117
117: ; preds = %115, %113
%118 = add nuw nsw i64 %44, 8
%119 = getelementptr inbounds double, double* %0, i64 %118
%120 = load double, double* %119
%121 = fcmp oeq double %120, -9.999900e+04
br i1 %121, label %124, label %122
122: ; preds = %117
%123 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %120)
br label %126
124: ; preds = %117
%125 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %126
126: ; preds = %124, %122
%127 = add nuw nsw i64 %44, 9
%128 = getelementptr inbounds double, double* %0, i64 %127
%129 = load double, double* %128
%130 = fcmp oeq double %129, -9.999900e+04
br i1 %130, label %133, label %131
131: ; preds = %126
%132 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), double %129)
br label %135
133: ; preds = %126
%134 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0))
br label %135
135: ; preds = %133, %131
%136 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%137 = add nuw nsw i64 %44, 10
%138 = icmp ult i64 %44, 981
br i1 %138, label %43, label %139
139: ; preds = %135, %16
%140 = tail call i32 @fclose(i32* %14)
ret void
}