#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*/ FormFullA(int, int *, double **, int **, int **);
int /*<<< orphan*/ ReadVector(int /*<<< orphan*/ *, int, int *, int, int);
int /*<<< orphan*/ dDumpLine(int /*<<< orphan*/ *);
int /*<<< orphan*/ dParseFloatFormat(char *, int *, int *);
int /*<<< orphan*/ dParseIntFormat(char *, int *, int *);
int /*<<< orphan*/ dReadValues(int /*<<< orphan*/ *, int, double *, int, int);
int /*<<< orphan*/ dallocateA(int, int, double **, int **, int **);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ stdout;
void dreadhb(FILE *fp, int *nrow, int *ncol, int *nonz, double **nzval,
             int **rowind, int **colptr) {
  register int i, numer_lines = 0, rhscrd = 0;
  int tmp, colnum, colsize, rownum, rowsize, valnum, valsize;
  char buf[100], type[4], key[10];
  int sym;
  fgets(buf, 100, fp);
  fputs(buf, stdout);
  for (i = 0; i < 5; i++) {
    fscanf(fp, "%14c", buf);
    buf[14] = 0;
    sscanf(buf, "%d", &tmp);
    if (i == 3)
      numer_lines = tmp;
    if (i == 4 && tmp)
      rhscrd = tmp;
  }
  dDumpLine(fp);
  fscanf(fp, "%3c", type);
  fscanf(fp, "%11c", buf);
  type[3] = 0;
  fscanf(fp, "%14c", buf);
  sscanf(buf, "%d", nrow);
  fscanf(fp, "%14c", buf);
  sscanf(buf, "%d", ncol);
  fscanf(fp, "%14c", buf);
  sscanf(buf, "%d", nonz);
  fscanf(fp, "%14c", buf);
  sscanf(buf, "%d", &tmp);
  if (tmp != 0)
    printf("This is not an assembled matrix!\n");
  if (*nrow != *ncol)
    printf("Matrix is not square.\n");
  dDumpLine(fp);
  dallocateA(*ncol, *nonz, nzval, rowind, colptr);
  fscanf(fp, "%16c", buf);
  dParseIntFormat(buf, &colnum, &colsize);
  fscanf(fp, "%16c", buf);
  dParseIntFormat(buf, &rownum, &rowsize);
  fscanf(fp, "%20c", buf);
  dParseFloatFormat(buf, &valnum, &valsize);
  fscanf(fp, "%20c", buf);
  dDumpLine(fp);
  if (rhscrd)
    dDumpLine(fp);
  ReadVector(fp, *ncol + 1, *colptr, colnum, colsize);
  ReadVector(fp, *nonz, *rowind, rownum, rowsize);
  if (numer_lines) {
    dReadValues(fp, *nonz, *nzval, valnum, valsize);
  }
  sym = (type[1] == 'S' || type[1] == 's');
  if (sym) {
    FormFullA(*ncol, nonz, nzval, rowind, colptr);
  }
  fclose(fp);
}


x86 assembly (clang, -O0):
<dreadhb>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
lea    -0xc0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x64,%esi
call   10a0 <fgets@plt>
lea    -0xc0(%rbp),%rdi
mov    0x2db8(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jge    12b2 <dreadhb+0xe2>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xdae(%rip),%rsi
call   1090 <fscanf@plt>
movb   $0x0,-0xb2(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xd99(%rip),%rsi
lea    -0x40(%rbp),%rdx
call   10c0 <sscanf@plt>
cmpl   $0x3,-0x34(%rbp)
jne    1285 <dreadhb+0xb5>
mov    -0x40(%rbp),%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x4,-0x34(%rbp)
jne    129f <dreadhb+0xcf>
cmpl   $0x0,-0x40(%rbp)
je     129f <dreadhb+0xcf>
mov    -0x40(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    12a4 <dreadhb+0xd4>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1236 <dreadhb+0x66>
mov    -0x8(%rbp),%rdi
call   1040 <dDumpLine@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc4(%rbp),%rdx
lea    0xd3b(%rip),%rsi
call   1090 <fscanf@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xd28(%rip),%rsi
call   1090 <fscanf@plt>
movb   $0x0,-0xc1(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xcfe(%rip),%rsi
call   1090 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xcec(%rip),%rsi
call   10c0 <sscanf@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xcd0(%rip),%rsi
call   1090 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xcbe(%rip),%rsi
call   10c0 <sscanf@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xca2(%rip),%rsi
call   1090 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xc90(%rip),%rsi
call   10c0 <sscanf@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xc74(%rip),%rsi
call   1090 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
lea    0xc66(%rip),%rsi
lea    -0x40(%rbp),%rdx
call   10c0 <sscanf@plt>
cmpl   $0x0,-0x40(%rbp)
je     13be <dreadhb+0x1ee>
lea    0xc58(%rip),%rdi
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
je     13dc <dreadhb+0x20c>
lea    0xc5c(%rip),%rdi
call   1070 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <dDumpLine@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r8
call   10f0 <dallocateA@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xc36(%rip),%rsi
call   1090 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
lea    -0x44(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   10d0 <dParseIntFormat@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xc0b(%rip),%rsi
call   1090 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
lea    -0x4c(%rbp),%rsi
lea    -0x50(%rbp),%rdx
call   10d0 <dParseIntFormat@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xbe5(%rip),%rsi
call   1090 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
lea    -0x54(%rbp),%rsi
lea    -0x58(%rbp),%rdx
call   1030 <dParseFloatFormat@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xbba(%rip),%rsi
call   1090 <fscanf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <dDumpLine@plt>
cmpl   $0x0,-0x3c(%rbp)
je     14b6 <dreadhb+0x2e6>
mov    -0x8(%rbp),%rdi
call   1040 <dDumpLine@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
add    $0x1,%esi
mov    0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x44(%rbp),%ecx
mov    -0x48(%rbp),%r8d
call   10b0 <ReadVector@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
mov    -0x30(%rbp),%rax
mov    (%rax),%rdx
mov    -0x4c(%rbp),%ecx
mov    -0x50(%rbp),%r8d
call   10b0 <ReadVector@plt>
cmpl   $0x0,-0x38(%rbp)
je     151a <dreadhb+0x34a>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
mov    -0x54(%rbp),%ecx
mov    -0x58(%rbp),%r8d
call   10e0 <dReadValues@plt>
movsbl -0xc3(%rbp),%ecx
mov    $0x1,%al
cmp    $0x53,%ecx
mov    %al,-0xd5(%rbp)
je     1545 <dreadhb+0x375>
movsbl -0xc3(%rbp),%eax
cmp    $0x73,%eax
sete   %al
mov    %al,-0xd5(%rbp)
mov    -0xd5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xd4(%rbp)
cmpl   $0x0,-0xd4(%rbp)
je     157e <dreadhb+0x3ae>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r8
call   1060 <FormFullA@plt>
mov    -0x8(%rbp),%rdi
call   1050 <fclose@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dreadhb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %r9,0x48(%rsp)
mov    %r8,0x10(%rsp)
mov    %rcx,0x20(%rsp)
mov    %rdx,0x18(%rsp)
mov    %rsi,%r13
mov    %rdi,%rbx
lea    0x50(%rsp),%r15
mov    %r15,%rdi
mov    $0x64,%esi
mov    %rbx,%rdx
call   10a0 <fgets@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%esi
mov    %r15,%rdi
call   1080 <fputs@plt>
lea    0xdd8(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1090 <fscanf@plt>
movb   $0x0,0x5e(%rsp)
lea    0xdc3(%rip),%r12
lea    0x8(%rsp),%rbp
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
call   10c0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1090 <fscanf@plt>
movb   $0x0,0x5e(%rsp)
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
call   10c0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1090 <fscanf@plt>
movb   $0x0,0x5e(%rsp)
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
call   10c0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1090 <fscanf@plt>
movb   $0x0,0x5e(%rsp)
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
call   10c0 <sscanf@plt>
mov    0x8(%rsp),%eax
mov    %eax,0x2c(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1090 <fscanf@plt>
movb   $0x0,0x5e(%rsp)
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
call   10c0 <sscanf@plt>
mov    0x8(%rsp),%eax
mov    %eax,0x28(%rsp)
mov    %rbx,%rdi
call   1050 <dDumpLine@plt>
lea    0xd10(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1090 <fscanf@plt>
lea    0xd00(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
call   1090 <fscanf@plt>
movb   $0x0,0xf(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1090 <fscanf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
call   10c0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1090 <fscanf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    0x18(%rsp),%rdx
call   10c0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1090 <fscanf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    0x20(%rsp),%rdx
call   10c0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1090 <fscanf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
call   10c0 <sscanf@plt>
cmpl   $0x0,0x8(%rsp)
je     13a3 <dreadhb+0x1d3>
lea    0xc93(%rip),%rdi
call   1040 <puts@plt>
mov    0xf0(%rsp),%r15
mov    0x0(%r13),%eax
mov    0x18(%rsp),%rbp
cmp    0x0(%rbp),%eax
je     13c5 <dreadhb+0x1f5>
lea    0xc5b(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1050 <dDumpLine@plt>
mov    0x0(%rbp),%edi
mov    0x20(%rsp),%rax
mov    (%rax),%esi
mov    0x10(%rsp),%rdx
mov    0x48(%rsp),%r12
mov    %r12,%rcx
mov    %r15,%r8
call   10f0 <dallocateA@plt>
lea    0xc1e(%rip),%r14
lea    0x50(%rsp),%rbp
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1090 <fscanf@plt>
lea    0x44(%rsp),%rsi
lea    0x40(%rsp),%rdx
mov    %rbp,%rdi
call   10d0 <dParseIntFormat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1090 <fscanf@plt>
lea    0x3c(%rsp),%rsi
lea    0x38(%rsp),%rdx
mov    %rbp,%rdi
call   10d0 <dParseIntFormat@plt>
lea    0xbd7(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1090 <fscanf@plt>
lea    0x34(%rsp),%rsi
lea    0x30(%rsp),%rdx
mov    %rbp,%rdi
call   1030 <dParseFloatFormat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1090 <fscanf@plt>
mov    %rbx,%rdi
call   1050 <dDumpLine@plt>
cmpl   $0x0,0x28(%rsp)
je     1484 <dreadhb+0x2b4>
mov    %rbx,%rdi
call   1050 <dDumpLine@plt>
mov    0x18(%rsp),%r13
mov    0x0(%r13),%esi
add    $0x1,%esi
mov    (%r15),%rdx
mov    0x44(%rsp),%ecx
mov    0x40(%rsp),%r8d
mov    %rbx,%rdi
call   10b0 <ReadVector@plt>
mov    0x20(%rsp),%rbp
mov    0x0(%rbp),%esi
mov    (%r12),%rdx
mov    0x3c(%rsp),%ecx
mov    0x38(%rsp),%r8d
mov    %rbx,%rdi
call   10b0 <ReadVector@plt>
cmpl   $0x0,0x2c(%rsp)
je     14e4 <dreadhb+0x314>
mov    0x0(%rbp),%esi
mov    0x10(%rsp),%rax
mov    (%rax),%rdx
mov    0x34(%rsp),%ecx
mov    0x30(%rsp),%r8d
mov    %rbx,%rdi
call   10e0 <dReadValues@plt>
mov    0xd(%rsp),%al
and    $0xdf,%al
cmp    $0x53,%al
jne    1505 <dreadhb+0x335>
mov    0x0(%r13),%edi
mov    %rbp,%rsi
mov    0x10(%rsp),%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1070 <FormFullA@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [5 x i8] c"%14c\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%3c\00"
@.str.3 = [5 x i8] c"%11c\00"
@.str.4 = [34 x i8] c"This is not an assembled matrix!\0A\00"
@.str.5 = [23 x i8] c"Matrix is not square.\0A\00"
@.str.6 = [5 x i8] c"%16c\00"
@.str.7 = [5 x i8] c"%20c\00"
define void @dreadhb(i32* %0, i32* %1, i32* %2, i32* %3, double** %4, i32** %5, i32** %6) {
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca double**
%13 = alloca i32**
%14 = alloca i32**
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca [100 x i8]
%26 = alloca [4 x i8]
%27 = alloca [10 x i8]
%28 = alloca i32
store i32* %0, i32** %8
store i32* %1, i32** %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store double** %4, double*** %12
store i32** %5, i32*** %13
store i32** %6, i32*** %14
store i32 0, i32* %16
store i32 0, i32* %17
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%30 = load i32*, i32** %8
%31 = call i32 @fgets(i8* %29, i32 100, i32* %30)
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%33 = load i32, i32* @stdout
%34 = call i32 @fputs(i8* %32, i32 %33)
store i32 0, i32* %15
br label %35
35: ; preds = %58, %7
%36 = load i32, i32* %15
%37 = icmp slt i32 %36, 5
br i1 %37, label %38, label %61
38: ; preds = %35
%39 = load i32*, i32** %8
%40 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%41 = call i32 @fscanf(i32* %39, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %40)
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 14
store i8 0, i8* %42
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%44 = call i32 @sscanf(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %18)
%45 = load i32, i32* %15
%46 = icmp eq i32 %45, 3
br i1 %46, label %47, label %49
47: ; preds = %38
%48 = load i32, i32* %18
store i32 %48, i32* %16
br label %49
49: ; preds = %47, %38
%50 = load i32, i32* %15
%51 = icmp eq i32 %50, 4
br i1 %51, label %52, label %57
52: ; preds = %49
%53 = load i32, i32* %18
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = load i32, i32* %18
store i32 %56, i32* %17
br label %57
57: ; preds = %55, %52, %49
br label %58
58: ; preds = %57
%59 = load i32, i32* %15
%60 = add nsw i32 %59, 1
store i32 %60, i32* %15
br label %35
61: ; preds = %35
%62 = load i32*, i32** %8
%63 = call i32 @dDumpLine(i32* %62)
%64 = load i32*, i32** %8
%65 = getelementptr inbounds [4 x i8], [4 x i8]* %26, i64 0, i64 0
%66 = call i32 @fscanf(i32* %64, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %65)
%67 = load i32*, i32** %8
%68 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%69 = call i32 @fscanf(i32* %67, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %68)
%70 = getelementptr inbounds [4 x i8], [4 x i8]* %26, i64 0, i64 3
store i8 0, i8* %70
%71 = load i32*, i32** %8
%72 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%73 = call i32 @fscanf(i32* %71, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %72)
%74 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%75 = load i32*, i32** %9
%76 = call i32 @sscanf(i8* %74, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %75)
%77 = load i32*, i32** %8
%78 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%79 = call i32 @fscanf(i32* %77, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %78)
%80 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%81 = load i32*, i32** %10
%82 = call i32 @sscanf(i8* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %81)
%83 = load i32*, i32** %8
%84 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%85 = call i32 @fscanf(i32* %83, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %84)
%86 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%87 = load i32*, i32** %11
%88 = call i32 @sscanf(i8* %86, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %87)
%89 = load i32*, i32** %8
%90 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%91 = call i32 @fscanf(i32* %89, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %90)
%92 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%93 = call i32 @sscanf(i8* %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %18)
%94 = load i32, i32* %18
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %98
96: ; preds = %61
%97 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
br label %98
98: ; preds = %96, %61
%99 = load i32*, i32** %9
%100 = load i32, i32* %99
%101 = load i32*, i32** %10
%102 = load i32, i32* %101
%103 = icmp ne i32 %100, %102
br i1 %103, label %104, label %106
104: ; preds = %98
%105 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %106
106: ; preds = %104, %98
%107 = load i32*, i32** %8
%108 = call i32 @dDumpLine(i32* %107)
%109 = load i32*, i32** %10
%110 = load i32, i32* %109
%111 = load i32*, i32** %11
%112 = load i32, i32* %111
%113 = load double**, double*** %12
%114 = load i32**, i32*** %13
%115 = load i32**, i32*** %14
%116 = call i32 @dallocateA(i32 %110, i32 %112, double** %113, i32** %114, i32** %115)
%117 = load i32*, i32** %8
%118 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%119 = call i32 @fscanf(i32* %117, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %118)
%120 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%121 = call i32 @dParseIntFormat(i8* %120, i32* %19, i32* %20)
%122 = load i32*, i32** %8
%123 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%124 = call i32 @fscanf(i32* %122, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %123)
%125 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%126 = call i32 @dParseIntFormat(i8* %125, i32* %21, i32* %22)
%127 = load i32*, i32** %8
%128 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%129 = call i32 @fscanf(i32* %127, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %128)
%130 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%131 = call i32 @dParseFloatFormat(i8* %130, i32* %23, i32* %24)
%132 = load i32*, i32** %8
%133 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%134 = call i32 @fscanf(i32* %132, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %133)
%135 = load i32*, i32** %8
%136 = call i32 @dDumpLine(i32* %135)
%137 = load i32, i32* %17
%138 = icmp ne i32 %137, 0
br i1 %138, label %139, label %142
139: ; preds = %106
%140 = load i32*, i32** %8
%141 = call i32 @dDumpLine(i32* %140)
br label %142
142: ; preds = %139, %106
%143 = load i32*, i32** %8
%144 = load i32*, i32** %10
%145 = load i32, i32* %144
%146 = add nsw i32 %145, 1
%147 = load i32**, i32*** %14
%148 = load i32*, i32** %147
%149 = load i32, i32* %19
%150 = load i32, i32* %20
%151 = call i32 @ReadVector(i32* %143, i32 %146, i32* %148, i32 %149, i32 %150)
%152 = load i32*, i32** %8
%153 = load i32*, i32** %11
%154 = load i32, i32* %153
%155 = load i32**, i32*** %13
%156 = load i32*, i32** %155
%157 = load i32, i32* %21
%158 = load i32, i32* %22
%159 = call i32 @ReadVector(i32* %152, i32 %154, i32* %156, i32 %157, i32 %158)
%160 = load i32, i32* %16
%161 = icmp ne i32 %160, 0
br i1 %161, label %162, label %171
162: ; preds = %142
%163 = load i32*, i32** %8
%164 = load i32*, i32** %11
%165 = load i32, i32* %164
%166 = load double**, double*** %12
%167 = load double*, double** %166
%168 = load i32, i32* %23
%169 = load i32, i32* %24
%170 = call i32 @dReadValues(i32* %163, i32 %165, double* %167, i32 %168, i32 %169)
br label %171
171: ; preds = %162, %142
%172 = getelementptr inbounds [4 x i8], [4 x i8]* %26, i64 0, i64 1
%173 = load i8, i8* %172
%174 = sext i8 %173 to i32
%175 = icmp eq i32 %174, 83
br i1 %175, label %181, label %176
176: ; preds = %171
%177 = getelementptr inbounds [4 x i8], [4 x i8]* %26, i64 0, i64 1
%178 = load i8, i8* %177
%179 = sext i8 %178 to i32
%180 = icmp eq i32 %179, 115
br label %181
181: ; preds = %176, %171
%182 = phi i1 [ true, %171 ], [ %180, %176 ]
%183 = zext i1 %182 to i32
store i32 %183, i32* %28
%184 = load i32, i32* %28
%185 = icmp ne i32 %184, 0
br i1 %185, label %186, label %194
186: ; preds = %181
%187 = load i32*, i32** %10
%188 = load i32, i32* %187
%189 = load i32*, i32** %11
%190 = load double**, double*** %12
%191 = load i32**, i32*** %13
%192 = load i32**, i32*** %14
%193 = call i32 @FormFullA(i32 %188, i32* %189, double** %190, i32** %191, i32** %192)
br label %194
194: ; preds = %186, %181
%195 = load i32*, i32** %8
%196 = call i32 @fclose(i32* %195)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [5 x i8] c"%14c\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%3c\00"
@.str.3 = [5 x i8] c"%11c\00"
@.str.6 = [5 x i8] c"%16c\00"
@.str.7 = [5 x i8] c"%20c\00"
@str = [22 x i8] c"Matrix is not square.\00"
@str.8 = [33 x i8] c"This is not an assembled matrix!\00"
define void @dreadhb(i32* %0, i32* %1, i32* %2, i32* %3, double** %4, i32** %5, i32** %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca [100 x i8]
%16 = alloca [4 x i8]
%17 = bitcast i32* %8 to i8*
%18 = bitcast i32* %9 to i8*
%19 = bitcast i32* %10 to i8*
%20 = bitcast i32* %11 to i8*
%21 = bitcast i32* %12 to i8*
%22 = bitcast i32* %13 to i8*
%23 = bitcast i32* %14 to i8*
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%25 = getelementptr inbounds [4 x i8], [4 x i8]* %16, i64 0, i64 0
%26 = call i32 @fgets(i8* %24, i32 100, i32* %0)
%27 = load i32, i32* @stdout
%28 = call i32 @fputs(i8* %24, i32 %27)
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 14
%30 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %24)
store i8 0, i8* %29
%31 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%32 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %24)
store i8 0, i8* %29
%33 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%34 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %24)
store i8 0, i8* %29
%35 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%36 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %24)
store i8 0, i8* %29
%37 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%38 = load i32, i32* %8
%39 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %24)
store i8 0, i8* %29
%40 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%41 = load i32, i32* %8
%42 = call i32 @dDumpLine(i32* %0)
%43 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %25)
%44 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %24)
%45 = getelementptr inbounds [4 x i8], [4 x i8]* %16, i64 0, i64 3
store i8 0, i8* %45
%46 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %24)
%47 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%48 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %24)
%49 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%50 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %24)
%51 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%52 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %24)
%53 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%54 = load i32, i32* %8
%55 = icmp eq i32 %54, 0
br i1 %55, label %58, label %56
56: ; preds = %7
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.8, i64 0, i64 0))
br label %58
58: ; preds = %56, %7
%59 = load i32, i32* %1
%60 = load i32, i32* %2
%61 = icmp eq i32 %59, %60
br i1 %61, label %64, label %62
62: ; preds = %58
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %64
64: ; preds = %62, %58
%65 = call i32 @dDumpLine(i32* %0)
%66 = load i32, i32* %2
%67 = load i32, i32* %3
%68 = call i32 @dallocateA(i32 %66, i32 %67, double** %4, i32** %5, i32** %6)
%69 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %24)
%70 = call i32 @dParseIntFormat(i8* %24, i32* %9, i32* %10)
%71 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %24)
%72 = call i32 @dParseIntFormat(i8* %24, i32* %11, i32* %12)
%73 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %24)
%74 = call i32 @dParseFloatFormat(i8* %24, i32* %13, i32* %14)
%75 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %24)
%76 = call i32 @dDumpLine(i32* %0)
%77 = icmp eq i32 %41, 0
br i1 %77, label %80, label %78
78: ; preds = %64
%79 = call i32 @dDumpLine(i32* %0)
br label %80
80: ; preds = %78, %64
%81 = load i32, i32* %2
%82 = add nsw i32 %81, 1
%83 = load i32*, i32** %6
%84 = load i32, i32* %9
%85 = load i32, i32* %10
%86 = call i32 @ReadVector(i32* %0, i32 %82, i32* %83, i32 %84, i32 %85)
%87 = load i32, i32* %3
%88 = load i32*, i32** %5
%89 = load i32, i32* %11
%90 = load i32, i32* %12
%91 = call i32 @ReadVector(i32* %0, i32 %87, i32* %88, i32 %89, i32 %90)
%92 = icmp eq i32 %38, 0
br i1 %92, label %99, label %93
93: ; preds = %80
%94 = load i32, i32* %3
%95 = load double*, double** %4
%96 = load i32, i32* %13
%97 = load i32, i32* %14
%98 = call i32 @dReadValues(i32* %0, i32 %94, double* %95, i32 %96, i32 %97)
br label %99
99: ; preds = %93, %80
%100 = getelementptr inbounds [4 x i8], [4 x i8]* %16, i64 0, i64 1
%101 = load i8, i8* %100
%102 = and i8 %101, -33
%103 = icmp eq i8 %102, 83
br i1 %103, label %104, label %107
104: ; preds = %99
%105 = load i32, i32* %2
%106 = call i32 @FormFullA(i32 %105, i32* %3, double** %4, i32** %5, i32** %6)
br label %107
107: ; preds = %104, %99
%108 = call i32 @fclose(i32* %0)
ret void
}