#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*/ 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*/ *stdin;
int /*<<< orphan*/ stdout;
void dreadhb(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];
  FILE *fp;
  fp = stdin;
  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);
  }
  fclose(fp);
}


x86 assembly (clang, -O0):
<dreadhb>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
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)
mov    0x2df0(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0xd8(%rbp)
lea    -0xc0(%rbp),%rdi
mov    -0xd8(%rbp),%rdx
mov    $0x64,%esi
call   1090 <fgets@plt>
lea    -0xc0(%rbp),%rdi
mov    0x2db0(%rip),%rax
mov    (%rax),%esi
call   1070 <fputs@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jge    12b5 <dreadhb+0xf5>
mov    -0xd8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xdab(%rip),%rsi
call   1080 <fscanf@plt>
movb   $0x0,-0xb2(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xd96(%rip),%rsi
lea    -0x40(%rbp),%rdx
call   10b0 <sscanf@plt>
cmpl   $0x3,-0x34(%rbp)
jne    1288 <dreadhb+0xc8>
mov    -0x40(%rbp),%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x4,-0x34(%rbp)
jne    12a2 <dreadhb+0xe2>
cmpl   $0x0,-0x40(%rbp)
je     12a2 <dreadhb+0xe2>
mov    -0x40(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    12a7 <dreadhb+0xe7>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1236 <dreadhb+0x76>
mov    -0xd8(%rbp),%rdi
call   1040 <dDumpLine@plt>
mov    -0xd8(%rbp),%rdi
lea    -0xc4(%rbp),%rdx
lea    0xd32(%rip),%rsi
call   1080 <fscanf@plt>
mov    -0xd8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xd1c(%rip),%rsi
call   1080 <fscanf@plt>
movb   $0x0,-0xc1(%rbp)
mov    -0xd8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xcef(%rip),%rsi
call   1080 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xcdd(%rip),%rsi
call   10b0 <sscanf@plt>
mov    -0xd8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xcbe(%rip),%rsi
call   1080 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xcac(%rip),%rsi
call   10b0 <sscanf@plt>
mov    -0xd8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xc8d(%rip),%rsi
call   1080 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xc7b(%rip),%rsi
call   10b0 <sscanf@plt>
mov    -0xd8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xc5c(%rip),%rsi
call   1080 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
lea    0xc4e(%rip),%rsi
lea    -0x40(%rbp),%rdx
call   10b0 <sscanf@plt>
cmpl   $0x0,-0x40(%rbp)
je     13d6 <dreadhb+0x216>
lea    0xc40(%rip),%rdi
call   1060 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
je     13f4 <dreadhb+0x234>
lea    0xc44(%rip),%rdi
call   1060 <printf@plt>
mov    -0xd8(%rbp),%rdi
call   1040 <dDumpLine@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   10e0 <dallocateA@plt>
mov    -0xd8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xc18(%rip),%rsi
call   1080 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
lea    -0x44(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   10c0 <dParseIntFormat@plt>
mov    -0xd8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xbea(%rip),%rsi
call   1080 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
lea    -0x4c(%rbp),%rsi
lea    -0x50(%rbp),%rdx
call   10c0 <dParseIntFormat@plt>
mov    -0xd8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xbc1(%rip),%rsi
call   1080 <fscanf@plt>
lea    -0xc0(%rbp),%rdi
lea    -0x54(%rbp),%rsi
lea    -0x58(%rbp),%rdx
call   1030 <dParseFloatFormat@plt>
mov    -0xd8(%rbp),%rdi
lea    -0xc0(%rbp),%rdx
lea    0xb93(%rip),%rsi
call   1080 <fscanf@plt>
mov    -0xd8(%rbp),%rdi
call   1040 <dDumpLine@plt>
cmpl   $0x0,-0x3c(%rbp)
je     14e3 <dreadhb+0x323>
mov    -0xd8(%rbp),%rdi
call   1040 <dDumpLine@plt>
mov    -0xd8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
add    $0x1,%esi
mov    -0x30(%rbp),%rax
mov    (%rax),%rdx
mov    -0x44(%rbp),%ecx
mov    -0x48(%rbp),%r8d
call   10a0 <ReadVector@plt>
mov    -0xd8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
mov    -0x4c(%rbp),%ecx
mov    -0x50(%rbp),%r8d
call   10a0 <ReadVector@plt>
cmpl   $0x0,-0x38(%rbp)
je     1550 <dreadhb+0x390>
mov    -0xd8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
mov    -0x54(%rbp),%ecx
mov    -0x58(%rbp),%r8d
call   10d0 <dReadValues@plt>
mov    -0xd8(%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    $0xc8,%rsp
mov    %r9,0x40(%rsp)
mov    %r8,0x58(%rsp)
mov    %rcx,0x50(%rsp)
mov    %rdx,0x48(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rdi,%r14
mov    0x2df4(%rip),%rax
mov    (%rax),%rbx
lea    0x60(%rsp),%r12
mov    %r12,%rdi
mov    $0x64,%esi
mov    %rbx,%rdx
call   1090 <fgets@plt>
mov    0x2dc5(%rip),%rax
mov    (%rax),%esi
mov    %r12,%rdi
call   1070 <fputs@plt>
lea    0xddc(%rip),%r13
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1080 <fscanf@plt>
movb   $0x0,0x6e(%rsp)
lea    0xdc7(%rip),%r15
lea    0xc(%rsp),%rbp
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
call   10b0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1080 <fscanf@plt>
movb   $0x0,0x6e(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
call   10b0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1080 <fscanf@plt>
movb   $0x0,0x6e(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
call   10b0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1080 <fscanf@plt>
movb   $0x0,0x6e(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
call   10b0 <sscanf@plt>
mov    0xc(%rsp),%eax
mov    %eax,0x20(%rsp)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1080 <fscanf@plt>
movb   $0x0,0x6e(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
call   10b0 <sscanf@plt>
mov    0xc(%rsp),%eax
mov    %eax,0x1c(%rsp)
mov    %rbx,%rdi
call   1050 <dDumpLine@plt>
lea    0xd14(%rip),%rsi
lea    0x3c(%rsp),%rdx
mov    %rbx,%rdi
call   1080 <fscanf@plt>
lea    0xd04(%rip),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
call   1080 <fscanf@plt>
movb   $0x0,0x3f(%rsp)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1080 <fscanf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10b0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1080 <fscanf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    0x10(%rsp),%rdx
call   10b0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1080 <fscanf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    0x48(%rsp),%rdx
mov    %rdx,%rbp
call   10b0 <sscanf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1080 <fscanf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
lea    0xc(%rsp),%rdx
call   10b0 <sscanf@plt>
cmpl   $0x0,0xc(%rsp)
je     13a4 <dreadhb+0x1e4>
lea    0xc92(%rip),%rdi
call   1040 <puts@plt>
mov    (%r14),%eax
mov    0x10(%rsp),%rcx
cmp    (%rcx),%eax
je     13bc <dreadhb+0x1fc>
lea    0xc64(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1050 <dDumpLine@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%edi
mov    %rbp,%r12
mov    0x0(%rbp),%esi
mov    0x50(%rsp),%rdx
mov    %rdx,%r15
mov    0x58(%rsp),%r13
mov    %r13,%rcx
mov    0x40(%rsp),%r8
call   10e0 <dallocateA@plt>
lea    0xc1f(%rip),%r14
lea    0x60(%rsp),%rbp
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1080 <fscanf@plt>
lea    0x38(%rsp),%rsi
lea    0x34(%rsp),%rdx
mov    %rbp,%rdi
call   10c0 <dParseIntFormat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1080 <fscanf@plt>
lea    0x30(%rsp),%rsi
lea    0x2c(%rsp),%rdx
mov    %rbp,%rdi
call   10c0 <dParseIntFormat@plt>
lea    0xbd8(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1080 <fscanf@plt>
lea    0x28(%rsp),%rsi
lea    0x24(%rsp),%rdx
mov    %rbp,%rdi
call   1030 <dParseFloatFormat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1080 <fscanf@plt>
mov    %rbx,%rdi
call   1050 <dDumpLine@plt>
cmpl   $0x0,0x1c(%rsp)
je     1483 <dreadhb+0x2c3>
mov    %rbx,%rdi
call   1050 <dDumpLine@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%esi
add    $0x1,%esi
mov    0x40(%rsp),%rax
mov    (%rax),%rdx
mov    0x38(%rsp),%ecx
mov    0x34(%rsp),%r8d
mov    %rbx,%rdi
call   10a0 <ReadVector@plt>
mov    (%r12),%esi
mov    0x0(%r13),%rdx
mov    0x30(%rsp),%ecx
mov    0x2c(%rsp),%r8d
mov    %rbx,%rdi
call   10a0 <ReadVector@plt>
cmpl   $0x0,0x20(%rsp)
je     14de <dreadhb+0x31e>
mov    (%r12),%esi
mov    (%r15),%rdx
mov    0x28(%rsp),%ecx
mov    0x24(%rsp),%r8d
mov    %rbx,%rdi
call   10d0 <dReadValues@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@stdin = global i32* null
@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, double** %3, i32** %4, i32** %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca [100 x i8]
%15 = alloca [4 x i8]
%16 = bitcast i32* %7 to 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 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%24 = getelementptr inbounds [4 x i8], [4 x i8]* %15, i64 0, i64 0
%25 = load i32*, i32** @stdin
%26 = call i32 @fgets(i8* %23, i32 100, i32* %25)
%27 = load i32, i32* @stdout
%28 = call i32 @fputs(i8* %23, i32 %27)
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 14
%30 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
store i8 0, i8* %29
%31 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%32 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
store i8 0, i8* %29
%33 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%34 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
store i8 0, i8* %29
%35 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%36 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
store i8 0, i8* %29
%37 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%38 = load i32, i32* %7
%39 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
store i8 0, i8* %29
%40 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%41 = load i32, i32* %7
%42 = call i32 @dDumpLine(i32* %25)
%43 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %24)
%44 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %23)
%45 = getelementptr inbounds [4 x i8], [4 x i8]* %15, i64 0, i64 3
store i8 0, i8* %45
%46 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
%47 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %0)
%48 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
%49 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%50 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
%51 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%52 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
%53 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%54 = load i32, i32* %7
%55 = icmp eq i32 %54, 0
br i1 %55, label %58, label %56
56: ; preds = %6
%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, %6
%59 = load i32, i32* %0
%60 = load i32, i32* %1
%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* %25)
%66 = load i32, i32* %1
%67 = load i32, i32* %2
%68 = call i32 @dallocateA(i32 %66, i32 %67, double** %3, i32** %4, i32** %5)
%69 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %23)
%70 = call i32 @dParseIntFormat(i8* %23, i32* %8, i32* %9)
%71 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %23)
%72 = call i32 @dParseIntFormat(i8* %23, i32* %10, i32* %11)
%73 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %23)
%74 = call i32 @dParseFloatFormat(i8* %23, i32* %12, i32* %13)
%75 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %23)
%76 = call i32 @dDumpLine(i32* %25)
%77 = icmp eq i32 %41, 0
br i1 %77, label %80, label %78
78: ; preds = %64
%79 = call i32 @dDumpLine(i32* %25)
br label %80
80: ; preds = %78, %64
%81 = load i32, i32* %1
%82 = add nsw i32 %81, 1
%83 = load i32*, i32** %5
%84 = load i32, i32* %8
%85 = load i32, i32* %9
%86 = call i32 @ReadVector(i32* %25, i32 %82, i32* %83, i32 %84, i32 %85)
%87 = load i32, i32* %2
%88 = load i32*, i32** %4
%89 = load i32, i32* %10
%90 = load i32, i32* %11
%91 = call i32 @ReadVector(i32* %25, 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* %2
%95 = load double*, double** %3
%96 = load i32, i32* %12
%97 = load i32, i32* %13
%98 = call i32 @dReadValues(i32* %25, i32 %94, double* %95, i32 %96, i32 %97)
br label %99
99: ; preds = %93, %80
%100 = call i32 @fclose(i32* %25)
ret void
}