#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*/ chk_int2(int);
int /*<<< orphan*/ xmp_desc_of(int **);
int /*<<< orphan*/ xmp_matmul(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/);
void test_mm_ninjnj_b_c_bc_i4_d() {
  int n1 = 21, n2 = 23, n3 = 25;
  int a[n1][n2], b[n2][n3], x[n1][n3];
#pragma xmp nodes p[2][2]
#pragma xmp template tx[n2][n1]
#pragma xmp template ty[n3][n2]
#pragma xmp template tz[n3][n1]
#pragma xmp distribute tx[block][block] onto p
#pragma xmp distribute ty[cyclic][cyclic] onto p
#pragma xmp distribute tz[cyclic(2)][cyclic(2)] onto p
#pragma xmp align a[*][j] with tx[j][*]
#pragma xmp align b[i][*] with ty[*][i]
#pragma xmp align x[i][*] with tz[*][i]
  int i, j, ierr;
  double rn1, rn2, rn3, rn4, rn5, rn6, ra, rb;
  for (i = 0; i < n1; i++) {
#pragma xmp loop on tx[j][*]
    for (j = 0; j < n2; j++) {
      a[i][j] = i * n1 + j + 1;
    }
  }
#pragma xmp loop on ty[*][i]
  for (i = 0; i < n2; i++) {
    for (j = 0; j < n3; j++) {
      b[i][j] = j * n3 + i + 1;
    }
  }
#pragma xmp loop on tz[*][i]
  for (i = 0; i < n1; i++) {
    for (j = 0; j < n3; j++) {
      x[i][j] = 0;
    }
  }
  xmp_matmul(xmp_desc_of(x), xmp_desc_of(a), xmp_desc_of(b));
  ierr = 0;
  rn1 = n1;
  rn2 = n2;
  rn3 = n3;
  rn4 = rn2 * (rn2 + 1) * (2 * rn2 + 1) / 6.0;
  rn5 = rn2 * (rn2 + 1) / 2.0;
#pragma xmp loop on tz[*][i]
  for (i = 0; i < n1; i++) {
    for (j = 0; j < n3; j++) {
      ra = i * rn1;
      rb = j * rn3;
      rn6 = rn4 + rn5 * (ra + rb) + ra * rb * rn2;
      ierr = ierr + (x[i][j] - rn6);
    }
  }
#pragma xmp task on p[0][0 : 2]
  { chk_int2(ierr); }
}


x86 assembly (clang, -O0):
<test_mm_ninjnj_b_c_bc_i4_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x15,-0x4(%rbp)
movl   $0x17,-0x8(%rbp)
movl   $0x19,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
mov    %rax,-0xc8(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0xc0(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
mov    %rax,-0xb8(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x38(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
mov    %rax,-0xa8(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0xa0(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x40(%rbp)
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    127d <test_mm_ninjnj_b_c_bc_i4_d+0x14d>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    126a <test_mm_ninjnj_b_c_bc_i4_d+0x13a>
mov    -0xc0(%rbp),%rax
mov    -0xc8(%rbp),%rsi
mov    -0x4c(%rbp),%edx
imul   -0x4(%rbp),%edx
add    -0x50(%rbp),%edx
add    $0x1,%edx
movslq -0x4c(%rbp),%rcx
imul   %rsi,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x50(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    121f <test_mm_ninjnj_b_c_bc_i4_d+0xef>
jmp    126f <test_mm_ninjnj_b_c_bc_i4_d+0x13f>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    120c <test_mm_ninjnj_b_c_bc_i4_d+0xdc>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12f5 <test_mm_ninjnj_b_c_bc_i4_d+0x1c5>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12e2 <test_mm_ninjnj_b_c_bc_i4_d+0x1b2>
mov    -0xb0(%rbp),%rax
mov    -0xb8(%rbp),%rsi
mov    -0x50(%rbp),%edx
imul   -0xc(%rbp),%edx
add    -0x4c(%rbp),%edx
add    $0x1,%edx
movslq -0x4c(%rbp),%rcx
imul   %rsi,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x50(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1297 <test_mm_ninjnj_b_c_bc_i4_d+0x167>
jmp    12e7 <test_mm_ninjnj_b_c_bc_i4_d+0x1b7>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1284 <test_mm_ninjnj_b_c_bc_i4_d+0x154>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1364 <test_mm_ninjnj_b_c_bc_i4_d+0x234>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1351 <test_mm_ninjnj_b_c_bc_i4_d+0x221>
mov    -0xa0(%rbp),%rax
mov    -0xa8(%rbp),%rdx
movslq -0x4c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x50(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    130f <test_mm_ninjnj_b_c_bc_i4_d+0x1df>
jmp    1356 <test_mm_ninjnj_b_c_bc_i4_d+0x226>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12fc <test_mm_ninjnj_b_c_bc_i4_d+0x1cc>
mov    -0xa0(%rbp),%rdi
call   1050 <xmp_desc_of@plt>
mov    -0xc0(%rbp),%rdi
mov    %eax,-0xd0(%rbp)
call   1050 <xmp_desc_of@plt>
mov    -0xb0(%rbp),%rdi
mov    %eax,-0xcc(%rbp)
call   1050 <xmp_desc_of@plt>
mov    -0xd0(%rbp),%edi
mov    -0xcc(%rbp),%esi
mov    %eax,%edx
call   1040 <xmp_matmul@plt>
movl   $0x0,-0x54(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  0xc2f(%rip),%xmm1
addsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xc15(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc0d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  0xbef(%rip),%xmm1
addsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbd6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1523 <test_mm_ninjnj_b_c_bc_i4_d+0x3f3>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1510 <test_mm_ninjnj_b_c_bc_i4_d+0x3e0>
mov    -0xa0(%rbp),%rax
mov    -0xa8(%rbp),%rdx
cvtsi2sdl -0x4c(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cvtsi2sdl -0x50(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm2
ff
addsd  -0x98(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
cvtsi2sdl -0x54(%rbp),%xmm0
movslq -0x4c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x50(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm1
subsd  -0x88(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x54(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    144d <test_mm_ninjnj_b_c_bc_i4_d+0x31d>
jmp    1515 <test_mm_ninjnj_b_c_bc_i4_d+0x3e5>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    143a <test_mm_ninjnj_b_c_bc_i4_d+0x30a>
mov    -0x54(%rbp),%edi
call   1030 <chk_int2@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_ninjnj_b_c_bc_i4_d>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18c8,%rsp
lea    0x58(%rsp),%rax
xor    %ecx,%ecx
movdqa 0xea4(%rip),%xmm0
movdqa 0xeac(%rip),%xmm1
movdqa 0xeb4(%rip),%xmm2
movdqa 0xebc(%rip),%xmm3
movdqa 0xec4(%rip),%xmm4
xor    %edx,%edx
xchg   %ax,%ax
movd   %ecx,%xmm5
pshufd $0x0,%xmm5,%xmm5
movdqa %xmm5,%xmm6
paddd  %xmm0,%xmm6
movdqu %xmm6,-0x58(%rax)
movdqa %xmm5,%xmm6
paddd  %xmm1,%xmm6
movdqu %xmm6,-0x48(%rax)
movdqa %xmm5,%xmm6
paddd  %xmm2,%xmm6
movdqu %xmm6,-0x38(%rax)
movdqa %xmm5,%xmm6
paddd  %xmm3,%xmm6
movdqu %xmm6,-0x28(%rax)
paddd  %xmm4,%xmm5
movdqu %xmm5,-0x18(%rax)
add    $0x15,%rdx
mov    %edx,-0x8(%rax)
lea    0x16(%rcx),%esi
mov    %esi,-0x4(%rax)
add    $0x17,%ecx
mov    %ecx,(%rax)
add    $0x5c,%rax
mov    %rdx,%rcx
cmp    $0x1b9,%rdx
jne    1180 <test_mm_ninjnj_b_c_bc_i4_d+0x40>
lea    0x790(%rsp),%rax
xor    %ecx,%ecx
movdqa 0xe56(%rip),%xmm0
movdqa 0xe5e(%rip),%xmm1
movdqa 0xe66(%rip),%xmm2
movdqa 0xe6e(%rip),%xmm3
movdqa 0xe76(%rip),%xmm4
movdqa 0xe7e(%rip),%xmm5
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movd   %ecx,%xmm6
lea    0x1(%rcx),%rdx
mov    %edx,(%rax)
pshufd $0x0,%xmm6,%xmm6
movdqa %xmm6,%xmm7
paddd  %xmm0,%xmm7
movdqu %xmm7,0x4(%rax)
movdqa %xmm6,%xmm7
paddd  %xmm1,%xmm7
movdqu %xmm7,0x14(%rax)
movdqa %xmm6,%xmm7
paddd  %xmm2,%xmm7
movdqu %xmm7,0x24(%rax)
movdqa %xmm6,%xmm7
paddd  %xmm3,%xmm7
movdqu %xmm7,0x34(%rax)
movdqa %xmm6,%xmm7
paddd  %xmm4,%xmm7
movdqu %xmm7,0x44(%rax)
paddd  %xmm5,%xmm6
movdqu %xmm6,0x54(%rax)
add    $0x64,%rax
mov    %rdx,%rcx
cmp    $0x17,%rdx
jne    1230 <test_mm_ninjnj_b_c_bc_i4_d+0xf0>
lea    0x1090(%rsp),%rbx
xor    %ebp,%ebp
mov    $0x834,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rdi
call   1060 <xmp_desc_of@plt>
mov    %eax,%r14d
mov    %rsp,%rdi
call   1060 <xmp_desc_of@plt>
mov    %eax,%r15d
lea    0x790(%rsp),%rdi
call   1060 <xmp_desc_of@plt>
mov    %r14d,%edi
mov    %r15d,%esi
mov    %eax,%edx
call   1050 <xmp_matmul@plt>
movsd  0xdc8(%rip),%xmm8
movsd  0xdc8(%rip),%xmm1
movsd  0xdc8(%rip),%xmm2
movsd  0xdc8(%rip),%xmm3
movsd  0xdc8(%rip),%xmm4
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
xorps  %xmm5,%xmm5
cvtsi2sd %ebp,%xmm5
mulsd  %xmm8,%xmm5
xor    %eax,%eax
xchg   %ax,%ax
xorps  %xmm6,%xmm6
cvtsi2sd %eax,%xmm6
mulsd  %xmm1,%xmm6
movapd %xmm5,%xmm7
addsd  %xmm6,%xmm7
mulsd  %xmm2,%xmm7
addsd  %xmm3,%xmm7
mulsd  %xmm5,%xmm6
mulsd  %xmm4,%xmm6
addsd  %xmm7,%xmm6
xorps  %xmm7,%xmm7
cvtsi2sd %edi,%xmm7
xorps  %xmm0,%xmm0
cvtsi2sdl (%rbx,%rax,4),%xmm0
subsd  %xmm6,%xmm0
addsd  %xmm7,%xmm0
cvttsd2si %xmm0,%edi
add    $0x1,%rax
cmp    $0x19,%rax
jne    1320 <test_mm_ninjnj_b_c_bc_i4_d+0x1e0>
add    $0x1,%rbp
add    $0x64,%rbx
cmp    $0x15,%rbp
jne    1310 <test_mm_ninjnj_b_c_bc_i4_d+0x1d0>
call   1040 <chk_int2@plt>
add    $0x18c8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @test_mm_ninjnj_b_c_bc_i4_d() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store i32 21, i32* %1
store i32 23, i32* %2
store i32 25, i32* %3
%22 = load i32, i32* %1
%23 = zext i32 %22 to i64
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
%26 = call i8* @llvm.stacksave()
store i8* %26, i8** %4
%27 = mul nuw i64 %23, %25
%28 = alloca i32, i64 %27
store i64 %23, i64* %5
store i64 %25, i64* %6
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
%31 = load i32, i32* %3
%32 = zext i32 %31 to i64
%33 = mul nuw i64 %30, %32
%34 = alloca i32, i64 %33
store i64 %30, i64* %7
store i64 %32, i64* %8
%35 = load i32, i32* %1
%36 = zext i32 %35 to i64
%37 = load i32, i32* %3
%38 = zext i32 %37 to i64
%39 = mul nuw i64 %36, %38
%40 = alloca i32, i64 %39
store i64 %36, i64* %9
store i64 %38, i64* %10
store i32 0, i32* %11
br label %41
41: ; preds = %68, %0
%42 = load i32, i32* %11
%43 = load i32, i32* %1
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %71
45: ; preds = %41
store i32 0, i32* %12
br label %46
46: ; preds = %64, %45
%47 = load i32, i32* %12
%48 = load i32, i32* %2
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %67
50: ; preds = %46
%51 = load i32, i32* %11
%52 = load i32, i32* %1
%53 = mul nsw i32 %51, %52
%54 = load i32, i32* %12
%55 = add nsw i32 %53, %54
%56 = add nsw i32 %55, 1
%57 = load i32, i32* %11
%58 = sext i32 %57 to i64
%59 = mul nsw i64 %58, %25
%60 = getelementptr inbounds i32, i32* %28, i64 %59
%61 = load i32, i32* %12
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i32, i32* %60, i64 %62
store i32 %56, i32* %63
br label %64
64: ; preds = %50
%65 = load i32, i32* %12
%66 = add nsw i32 %65, 1
store i32 %66, i32* %12
br label %46
67: ; preds = %46
br label %68
68: ; preds = %67
%69 = load i32, i32* %11
%70 = add nsw i32 %69, 1
store i32 %70, i32* %11
br label %41
71: ; preds = %41
store i32 0, i32* %11
br label %72
72: ; preds = %99, %71
%73 = load i32, i32* %11
%74 = load i32, i32* %2
%75 = icmp slt i32 %73, %74
br i1 %75, label %76, label %102
76: ; preds = %72
store i32 0, i32* %12
br label %77
77: ; preds = %95, %76
%78 = load i32, i32* %12
%79 = load i32, i32* %3
%80 = icmp slt i32 %78, %79
br i1 %80, label %81, label %98
81: ; preds = %77
%82 = load i32, i32* %12
%83 = load i32, i32* %3
%84 = mul nsw i32 %82, %83
%85 = load i32, i32* %11
%86 = add nsw i32 %84, %85
%87 = add nsw i32 %86, 1
%88 = load i32, i32* %11
%89 = sext i32 %88 to i64
%90 = mul nsw i64 %89, %32
%91 = getelementptr inbounds i32, i32* %34, i64 %90
%92 = load i32, i32* %12
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i32, i32* %91, i64 %93
store i32 %87, i32* %94
br label %95
95: ; preds = %81
%96 = load i32, i32* %12
%97 = add nsw i32 %96, 1
store i32 %97, i32* %12
br label %77
98: ; preds = %77
br label %99
99: ; preds = %98
%100 = load i32, i32* %11
%101 = add nsw i32 %100, 1
store i32 %101, i32* %11
br label %72
102: ; preds = %72
store i32 0, i32* %11
br label %103
103: ; preds = %124, %102
%104 = load i32, i32* %11
%105 = load i32, i32* %1
%106 = icmp slt i32 %104, %105
br i1 %106, label %107, label %127
107: ; preds = %103
store i32 0, i32* %12
br label %108
108: ; preds = %120, %107
%109 = load i32, i32* %12
%110 = load i32, i32* %3
%111 = icmp slt i32 %109, %110
br i1 %111, label %112, label %123
112: ; preds = %108
%113 = load i32, i32* %11
%114 = sext i32 %113 to i64
%115 = mul nsw i64 %114, %38
%116 = getelementptr inbounds i32, i32* %40, i64 %115
%117 = load i32, i32* %12
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i32, i32* %116, i64 %118
store i32 0, i32* %119
br label %120
120: ; preds = %112
%121 = load i32, i32* %12
%122 = add nsw i32 %121, 1
store i32 %122, i32* %12
br label %108
123: ; preds = %108
br label %124
124: ; preds = %123
%125 = load i32, i32* %11
%126 = add nsw i32 %125, 1
store i32 %126, i32* %11
br label %103
127: ; preds = %103
%128 = bitcast i32* %40 to i32**
%129 = call i32 @xmp_desc_of(i32** %128)
%130 = bitcast i32* %28 to i32**
%131 = call i32 @xmp_desc_of(i32** %130)
%132 = bitcast i32* %34 to i32**
%133 = call i32 @xmp_desc_of(i32** %132)
%134 = call i32 @xmp_matmul(i32 %129, i32 %131, i32 %133)
store i32 0, i32* %13
%135 = load i32, i32* %1
%136 = sitofp i32 %135 to double
store double %136, double* %14
%137 = load i32, i32* %2
%138 = sitofp i32 %137 to double
store double %138, double* %15
%139 = load i32, i32* %3
%140 = sitofp i32 %139 to double
store double %140, double* %16
%141 = load double, double* %15
%142 = load double, double* %15
%143 = fadd double %142, 1.000000e+00
%144 = fmul double %141, %143
%145 = load double, double* %15
%146 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %145, double 1.000000e+00)
%147 = fmul double %144, %146
%148 = fdiv double %147, 6.000000e+00
store double %148, double* %17
%149 = load double, double* %15
%150 = load double, double* %15
%151 = fadd double %150, 1.000000e+00
%152 = fmul double %149, %151
%153 = fdiv double %152, 2.000000e+00
store double %153, double* %18
store i32 0, i32* %11
br label %154
154: ; preds = %202, %127
%155 = load i32, i32* %11
%156 = load i32, i32* %1
%157 = icmp slt i32 %155, %156
br i1 %157, label %158, label %205
158: ; preds = %154
store i32 0, i32* %12
br label %159
159: ; preds = %198, %158
%160 = load i32, i32* %12
%161 = load i32, i32* %3
%162 = icmp slt i32 %160, %161
br i1 %162, label %163, label %201
163: ; preds = %159
%164 = load i32, i32* %11
%165 = sitofp i32 %164 to double
%166 = load double, double* %14
%167 = fmul double %165, %166
store double %167, double* %20
%168 = load i32, i32* %12
%169 = sitofp i32 %168 to double
%170 = load double, double* %16
%171 = fmul double %169, %170
store double %171, double* %21
%172 = load double, double* %17
%173 = load double, double* %18
%174 = load double, double* %20
%175 = load double, double* %21
%176 = fadd double %174, %175
%177 = call double @llvm.fmuladd.f64(double %173, double %176, double %172)
%178 = load double, double* %20
%179 = load double, double* %21
%180 = fmul double %178, %179
%181 = load double, double* %15
%182 = call double @llvm.fmuladd.f64(double %180, double %181, double %177)
store double %182, double* %19
%183 = load i32, i32* %13
%184 = sitofp i32 %183 to double
%185 = load i32, i32* %11
%186 = sext i32 %185 to i64
%187 = mul nsw i64 %186, %38
%188 = getelementptr inbounds i32, i32* %40, i64 %187
%189 = load i32, i32* %12
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds i32, i32* %188, i64 %190
%192 = load i32, i32* %191
%193 = sitofp i32 %192 to double
%194 = load double, double* %19
%195 = fsub double %193, %194
%196 = fadd double %184, %195
%197 = fptosi double %196 to i32
store i32 %197, i32* %13
br label %198
198: ; preds = %163
%199 = load i32, i32* %12
%200 = add nsw i32 %199, 1
store i32 %200, i32* %12
br label %159
201: ; preds = %159
br label %202
202: ; preds = %201
%203 = load i32, i32* %11
%204 = add nsw i32 %203, 1
store i32 %204, i32* %11
br label %154
205: ; preds = %154
%206 = load i32, i32* %13
%207 = call i32 @chk_int2(i32 %206)
%208 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
define void @test_mm_ninjnj_b_c_bc_i4_d() {
%1 = alloca [483 x i32]
%2 = alloca [575 x i32]
%3 = alloca [525 x i32]
%4 = bitcast [525 x i32]* %3 to i8*
br label %5
5: ; preds = %0, %5
%6 = phi i64 [ 0, %0 ], [ %40, %5 ]
%7 = mul nuw nsw i64 %6, 21
%8 = mul nuw nsw i64 %6, 23
%9 = getelementptr inbounds [483 x i32], [483 x i32]* %1, i64 0, i64 %8
%10 = insertelement <4 x i64> poison, i64 %7, i64 0
%11 = shufflevector <4 x i64> %10, <4 x i64> poison, <4 x i32> zeroinitializer
%12 = trunc <4 x i64> %11 to <4 x i32>
%13 = add <4 x i32> %12, <i32 1, i32 2, i32 3, i32 4>
%14 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> %13, <4 x i32>* %14
%15 = getelementptr inbounds i32, i32* %9, i64 4
%16 = trunc <4 x i64> %11 to <4 x i32>
%17 = add <4 x i32> %16, <i32 5, i32 6, i32 7, i32 8>
%18 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> %17, <4 x i32>* %18
%19 = getelementptr inbounds i32, i32* %9, i64 8
%20 = trunc <4 x i64> %11 to <4 x i32>
%21 = add <4 x i32> %20, <i32 9, i32 10, i32 11, i32 12>
%22 = bitcast i32* %19 to <4 x i32>*
store <4 x i32> %21, <4 x i32>* %22
%23 = getelementptr inbounds i32, i32* %9, i64 12
%24 = trunc <4 x i64> %11 to <4 x i32>
%25 = add <4 x i32> %24, <i32 13, i32 14, i32 15, i32 16>
%26 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> %25, <4 x i32>* %26
%27 = getelementptr inbounds i32, i32* %9, i64 16
%28 = trunc <4 x i64> %11 to <4 x i32>
%29 = add <4 x i32> %28, <i32 17, i32 18, i32 19, i32 20>
%30 = bitcast i32* %27 to <4 x i32>*
store <4 x i32> %29, <4 x i32>* %30
%31 = getelementptr inbounds i32, i32* %9, i64 20
%32 = trunc i64 %7 to i32
%33 = add i32 %32, 21
store i32 %33, i32* %31
%34 = getelementptr inbounds i32, i32* %9, i64 21
%35 = trunc i64 %7 to i32
%36 = add i32 %35, 22
store i32 %36, i32* %34
%37 = getelementptr inbounds i32, i32* %9, i64 22
%38 = trunc i64 %7 to i32
%39 = add i32 %38, 23
store i32 %39, i32* %37
%40 = add nuw nsw i64 %6, 1
%41 = icmp eq i64 %40, 21
br i1 %41, label %42, label %5
42: ; preds = %5, %42
%43 = phi i64 [ %44, %42 ], [ 0, %5 ]
%44 = add nuw nsw i64 %43, 1
%45 = mul nuw nsw i64 %43, 25
%46 = getelementptr inbounds [575 x i32], [575 x i32]* %2, i64 0, i64 %45
%47 = trunc i64 %44 to i32
store i32 %47, i32* %46
%48 = getelementptr inbounds i32, i32* %46, i64 1
%49 = insertelement <4 x i64> poison, i64 %43, i64 0
%50 = shufflevector <4 x i64> %49, <4 x i64> poison, <4 x i32> zeroinitializer
%51 = trunc <4 x i64> %50 to <4 x i32>
%52 = add <4 x i32> %51, <i32 26, i32 51, i32 76, i32 101>
%53 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> %52, <4 x i32>* %53
%54 = getelementptr inbounds i32, i32* %46, i64 5
%55 = trunc <4 x i64> %50 to <4 x i32>
%56 = add <4 x i32> %55, <i32 126, i32 151, i32 176, i32 201>
%57 = bitcast i32* %54 to <4 x i32>*
store <4 x i32> %56, <4 x i32>* %57
%58 = getelementptr inbounds i32, i32* %46, i64 9
%59 = trunc <4 x i64> %50 to <4 x i32>
%60 = add <4 x i32> %59, <i32 226, i32 251, i32 276, i32 301>
%61 = bitcast i32* %58 to <4 x i32>*
store <4 x i32> %60, <4 x i32>* %61
%62 = getelementptr inbounds i32, i32* %46, i64 13
%63 = trunc <4 x i64> %50 to <4 x i32>
%64 = add <4 x i32> %63, <i32 326, i32 351, i32 376, i32 401>
%65 = bitcast i32* %62 to <4 x i32>*
store <4 x i32> %64, <4 x i32>* %65
%66 = getelementptr inbounds i32, i32* %46, i64 17
%67 = trunc <4 x i64> %50 to <4 x i32>
%68 = add <4 x i32> %67, <i32 426, i32 451, i32 476, i32 501>
%69 = bitcast i32* %66 to <4 x i32>*
store <4 x i32> %68, <4 x i32>* %69
%70 = getelementptr inbounds i32, i32* %46, i64 21
%71 = trunc <4 x i64> %50 to <4 x i32>
%72 = add <4 x i32> %71, <i32 526, i32 551, i32 576, i32 601>
%73 = bitcast i32* %70 to <4 x i32>*
store <4 x i32> %72, <4 x i32>* %73
%74 = icmp eq i64 %44, 23
br i1 %74, label %75, label %42
75: ; preds = %42
%76 = bitcast [525 x i32]* %3 to i32**
%77 = call i32 @xmp_desc_of(i32** %76)
%78 = bitcast [483 x i32]* %1 to i32**
%79 = call i32 @xmp_desc_of(i32** %78)
%80 = bitcast [575 x i32]* %2 to i32**
%81 = call i32 @xmp_desc_of(i32** %80)
%82 = call i32 @xmp_matmul(i32 %77, i32 %79, i32 %81)
br label %83
83: ; preds = %75, %110
%84 = phi i64 [ 0, %75 ], [ %111, %110 ]
%85 = phi i32 [ 0, %75 ], [ %107, %110 ]
%86 = trunc i64 %84 to i32
%87 = sitofp i32 %86 to double
%88 = fmul double %87, 2.100000e+01
%89 = mul nuw nsw i64 %84, 25
%90 = getelementptr inbounds [525 x i32], [525 x i32]* %3, i64 0, i64 %89
br label %91
91: ; preds = %83, %91
%92 = phi i64 [ 0, %83 ], [ %108, %91 ]
%93 = phi i32 [ %85, %83 ], [ %107, %91 ]
%94 = trunc i64 %92 to i32
%95 = sitofp i32 %94 to double
%96 = fmul double %95, 2.500000e+01
%97 = fadd double %88, %96
%98 = call double @llvm.fmuladd.f64(double %97, double 2.760000e+02, double 4.324000e+03)
%99 = fmul double %88, %96
%100 = call double @llvm.fmuladd.f64(double %99, double 2.300000e+01, double %98)
%101 = sitofp i32 %93 to double
%102 = getelementptr inbounds i32, i32* %90, i64 %92
%103 = load i32, i32* %102
%104 = sitofp i32 %103 to double
%105 = fsub double %104, %100
%106 = fadd double %105, %101
%107 = fptosi double %106 to i32
%108 = add nuw nsw i64 %92, 1
%109 = icmp eq i64 %108, 25
br i1 %109, label %110, label %91
110: ; preds = %91
%111 = add nuw nsw i64 %84, 1
%112 = icmp eq i64 %111, 21
br i1 %112, label %113, label %83
113: ; preds = %110
%114 = call i32 @chk_int2(i32 %107)
ret void
}