#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 */

/* Variables and functions */
int /*<<< orphan*/ SubMtx_blockDiagonalInfo(int **);
double *ZV_entries();
void SubMtx_fillRowZV(int irow) {
  double *rowvec = ZV_entries();
  double *entries;
  int ii, ipivot, jrow, kk, m;
  int *pivotsizes;
  SubMtx_blockDiagonalInfo(&pivotsizes);
  for (jrow = ipivot = kk = 0; jrow <= irow; ipivot++) {
    m = pivotsizes[ipivot];
    if (jrow <= irow && irow < jrow + m)
      for (ii = jrow; ii < irow; ii++) {
        rowvec[2 * ii] = entries[2 * kk];
        rowvec[2 * ii + 1] = entries[2 * kk + 1];
      }
    jrow += m;
  }
}


x86 assembly (clang, -O0):
<SubMtx_fillRowZV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <ZV_entries@plt>
mov    %rax,-0x10(%rbp)
lea    -0x38(%rbp),%rdi
call   1040 <SubMtx_blockDiagonalInfo@plt>
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1215 <SubMtx_fillRowZV+0xf5>
mov    -0x38(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     11fe <SubMtx_fillRowZV+0xde>
mov    -0x4(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    -0x2c(%rbp),%ecx
cmp    %ecx,%eax
jge    11fe <SubMtx_fillRowZV+0xde>
mov    -0x24(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11f9 <SubMtx_fillRowZV+0xd9>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1191 <SubMtx_fillRowZV+0x71>
jmp    11fe <SubMtx_fillRowZV+0xde>
mov    -0x2c(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1154 <SubMtx_fillRowZV+0x34>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SubMtx_fillRowZV>:
push   %rax
xor    %eax,%eax
call   1030 <ZV_entries@plt>
mov    %rsp,%rdi
call   1040 <SubMtx_blockDiagonalInfo@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @SubMtx_fillRowZV(i32 %0) {
%2 = alloca i32
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
store i32 %0, i32* %2
%11 = call double* (...) @ZV_entries()
store double* %11, double** %3
%12 = call i32 @SubMtx_blockDiagonalInfo(i32** %10)
store i32 0, i32* %8
store i32 0, i32* %6
store i32 0, i32* %7
br label %13
13: ; preds = %71, %1
%14 = load i32, i32* %7
%15 = load i32, i32* %2
%16 = icmp sle i32 %14, %15
br i1 %16, label %17, label %74
17: ; preds = %13
%18 = load i32*, i32** %10
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
store i32 %22, i32* %9
%23 = load i32, i32* %7
%24 = load i32, i32* %2
%25 = icmp sle i32 %23, %24
br i1 %25, label %26, label %67
26: ; preds = %17
%27 = load i32, i32* %2
%28 = load i32, i32* %7
%29 = load i32, i32* %9
%30 = add nsw i32 %28, %29
%31 = icmp slt i32 %27, %30
br i1 %31, label %32, label %67
32: ; preds = %26
%33 = load i32, i32* %7
store i32 %33, i32* %5
br label %34
34: ; preds = %63, %32
%35 = load i32, i32* %5
%36 = load i32, i32* %2
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %66
38: ; preds = %34
%39 = load double*, double** %4
%40 = load i32, i32* %8
%41 = mul nsw i32 2, %40
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %39, i64 %42
%44 = load double, double* %43
%45 = load double*, double** %3
%46 = load i32, i32* %5
%47 = mul nsw i32 2, %46
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double, double* %45, i64 %48
store double %44, double* %49
%50 = load double*, double** %4
%51 = load i32, i32* %8
%52 = mul nsw i32 2, %51
%53 = add nsw i32 %52, 1
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %50, i64 %54
%56 = load double, double* %55
%57 = load double*, double** %3
%58 = load i32, i32* %5
%59 = mul nsw i32 2, %58
%60 = add nsw i32 %59, 1
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %57, i64 %61
store double %56, double* %62
br label %63
63: ; preds = %38
%64 = load i32, i32* %5
%65 = add nsw i32 %64, 1
store i32 %65, i32* %5
br label %34
66: ; preds = %34
br label %67
67: ; preds = %66, %26, %17
%68 = load i32, i32* %9
%69 = load i32, i32* %7
%70 = add nsw i32 %69, %68
store i32 %70, i32* %7
br label %71
71: ; preds = %67
%72 = load i32, i32* %6
%73 = add nsw i32 %72, 1
store i32 %73, i32* %6
br label %13
74: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @SubMtx_fillRowZV(i32 %0) {
%2 = alloca i32*
%3 = tail call double* (...) @ZV_entries()
%4 = bitcast i32** %2 to i8*
%5 = call i32 @SubMtx_blockDiagonalInfo(i32** %2)
ret void
}