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

/* Variables and functions */
int /*<<< orphan*/ _MM_SHUFFLE(int, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ _mm_add_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_load_ps(float *);
int /*<<< orphan*/ _mm_loadh_pi(int /*<<< orphan*/, float *);
int /*<<< orphan*/ _mm_loadl_pi(int /*<<< orphan*/, float *);
int /*<<< orphan*/ _mm_loadu_ps(float *);
int /*<<< orphan*/ _mm_mul_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_shuffle_ps(int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/);
int /*<<< orphan*/ _mm_store_ps(float *, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_sub_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ assert(int);
void seismic_exec(float **VEL, float **PPF, float **APF, float **NPF,
                  float *seismicPulseVector, int spPosX, int spPosY, int xDim,
                  int yDim, int timeSteps) {
  int i, j;
  int t;
  assert(xDim % 4 == 0);
  __m128 s_ppf, s_vel, s_actual, s_above1, s_left1, s_under1, s_right1, s_two,
      s_sixteen, s_sixty;
  __m128 s_above2, s_under2, s_left2, s_right2;
  float two[4] = {2.0f, 2.0f, 2.0f, 2.0f};
  float sixteen[4] = {16.0f, 16.0f, 16.0f, 16.0f};
  float sixty[4] = {60.f, 60.f, 60.f, 60.f};
  s_two = _mm_load_ps(two);
  s_sixteen = _mm_load_ps(sixteen);
  s_sixty = _mm_load_ps(sixty);
  for (t = 0; t < timeSteps; t++) {
    APF[spPosY][spPosX] += seismicPulseVector[t];
    for (i = 2; i < (yDim - 2); i++) {
      for (j = 2 + 2; j < (xDim - 2); j += 4) {
        s_ppf = _mm_load_ps(&(PPF[i][j]));
        s_vel = _mm_load_ps(&(VEL[i][j]));
        s_actual = _mm_load_ps(&(APF[i][j]));
        s_left1 = _mm_load_ps(&(APF[i - 1][j]));
        s_left2 = _mm_load_ps(&(APF[i - 2][j]));
        s_right2 = _mm_load_ps(&(APF[i + 2][j]));
        s_right1 = _mm_load_ps(&(APF[i + 1][j]));
        s_above1 = _mm_loadu_ps(&(APF[i][j - 1]));
        s_under1 = _mm_loadu_ps(&(APF[i][j + 1]));
        s_above2 = _mm_loadl_pi(
            _mm_shuffle_ps(s_actual, s_actual, _MM_SHUFFLE(1, 0, 0, 0)),
            &(APF[i][j - 2]));
        s_under2 = _mm_loadh_pi(
            _mm_shuffle_ps(s_actual, s_actual, _MM_SHUFFLE(0, 0, 3, 2)),
            &(APF[i][j + 4]));
        s_under1 = _mm_add_ps(
            s_under1, _mm_add_ps(s_above1, _mm_add_ps(s_left1, s_right1)));
        s_above2 = _mm_add_ps(
            s_left2, _mm_add_ps(s_right2, _mm_add_ps(s_under2, s_above2)));
        s_under1 = _mm_mul_ps(s_sixteen, s_under1);
        s_under1 = _mm_sub_ps(_mm_sub_ps(s_under1, s_above2),
                              _mm_mul_ps(s_sixty, s_actual));
        s_under1 = _mm_add_ps(_mm_mul_ps(s_vel, s_under1),
                              _mm_sub_ps(_mm_mul_ps(s_two, s_actual), s_ppf));
        _mm_store_ps(&(NPF[i][j]), s_under1);
      }
    }
    PPF = APF;
    APF = NPF;
    NPF = PPF;
  }
}


x86 assembly (clang, -O0):
<seismic_exec>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
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    %r9d,-0x2c(%rbp)
mov    0x18(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1080 <assert@plt>
mov    0xdff(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xdfc(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xdf9(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xdf3(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xded(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xde7(%rip),%rax
mov    %rax,-0x98(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,-0x58(%rbp)
lea    -0x90(%rbp),%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,-0x5c(%rbp)
lea    -0xa0(%rbp),%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,-0x60(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    1610 <seismic_exec+0x460>
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq 0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
movss  %xmm0,(%rax,%rcx,4)
movl   $0x2,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    0x20(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    15ea <seismic_exec+0x43a>
movl   $0x4,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    0x18(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    15d7 <seismic_exec+0x427>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,-0x44(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,-0x54(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1070 <_mm_loadu_ps@plt>
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x34(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1070 <_mm_loadu_ps@plt>
mov    %eax,-0x50(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xc8(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    $0x1,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1040 <_MM_SHUFFLE@plt>
mov    -0xc8(%rbp),%edi
mov    -0xc4(%rbp),%esi
mov    %eax,%edx
call   1050 <_mm_shuffle_ps@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x34(%rbp),%eax
sub    $0x2,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1060 <_mm_loadl_pi@plt>
mov    %eax,-0x64(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xbc(%rbp)
xor    %esi,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
mov    %esi,%edi
call   1040 <_MM_SHUFFLE@plt>
mov    -0xc0(%rbp),%edi
mov    -0xbc(%rbp),%esi
mov    %eax,%edx
call   1050 <_mm_shuffle_ps@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x34(%rbp),%eax
add    $0x4,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   10d0 <_mm_loadh_pi@plt>
mov    %eax,-0x68(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0xb8(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x54(%rbp),%esi
call   10c0 <_mm_add_ps@plt>
mov    -0xb8(%rbp),%edi
mov    %eax,%esi
call   10c0 <_mm_add_ps@plt>
mov    -0xb4(%rbp),%edi
mov    %eax,%esi
call   10c0 <_mm_add_ps@plt>
mov    %eax,-0x50(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0x70(%rbp),%eax
mov    %eax,-0xb0(%rbp)
mov    -0x68(%rbp),%edi
mov    -0x64(%rbp),%esi
call   10c0 <_mm_add_ps@plt>
mov    -0xb0(%rbp),%edi
mov    %eax,%esi
call   10c0 <_mm_add_ps@plt>
mov    -0xac(%rbp),%edi
mov    %eax,%esi
call   10c0 <_mm_add_ps@plt>
mov    %eax,-0x64(%rbp)
mov    -0x5c(%rbp),%edi
mov    -0x50(%rbp),%esi
call   1090 <_mm_mul_ps@plt>
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%edi
mov    -0x64(%rbp),%esi
call   10a0 <_mm_sub_ps@plt>
mov    %eax,-0xa8(%rbp)
mov    -0x60(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1090 <_mm_mul_ps@plt>
mov    -0xa8(%rbp),%edi
mov    %eax,%esi
call   10a0 <_mm_sub_ps@plt>
mov    %eax,-0x50(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x50(%rbp),%esi
call   1090 <_mm_mul_ps@plt>
mov    %eax,-0xa4(%rbp)
mov    -0x58(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1090 <_mm_mul_ps@plt>
mov    %eax,%edi
mov    -0x3c(%rbp),%esi
call   10a0 <_mm_sub_ps@plt>
mov    -0xa4(%rbp),%edi
mov    %eax,%esi
call   10c0 <_mm_add_ps@plt>
mov    %eax,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x50(%rbp),%esi
call   10b0 <_mm_store_ps@plt>
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
jmp    12cb <seismic_exec+0x11b>
jmp    15dc <seismic_exec+0x42c>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12b3 <seismic_exec+0x103>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1279 <seismic_exec+0xc9>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seismic_exec>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9d,%r15d
mov    %r8,0x60(%rsp)
mov    %rcx,0x8(%rsp)
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,0x88(%rsp)
mov    0x128(%rsp),%ebp
mov    0x118(%rsp),%eax
xor    %edi,%edi
test   $0x3,%al
sete   %dil
call   1080 <assert@plt>
movaps 0xe02(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xe03(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xe04(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
lea    0xc0(%rsp),%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,0x1c(%rsp)
lea    0xb0(%rsp),%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,0x18(%rsp)
lea    0xa0(%rsp),%rdi
call   1030 <_mm_load_ps@plt>
test   %ebp,%ebp
jle    1573 <seismic_exec+0x3c3>
mov    %r12,%rcx
mov    %eax,%edx
mov    0x120(%rsp),%eax
movslq 0x110(%rsp),%rsi
mov    %rsi,0x58(%rsp)
movslq %r15d,%rsi
mov    %rsi,0x50(%rsp)
lea    -0x2(%rax),%edi
mov    0x118(%rsp),%eax
add    $0xfffffffe,%eax
movslq %eax,%rbx
mov    %ebp,%eax
mov    %rax,0x48(%rsp)
xor    %esi,%esi
mov    %rdi,0x70(%rsp)
mov    %rbx,0x80(%rsp)
mov    %edx,0x14(%rsp)
jmp    12d4 <seismic_exec+0x124>
nopl   0x0(%rax,%rax,1)
mov    0x68(%rsp),%rsi
add    $0x1,%rsi
mov    %r14,%rcx
mov    %r14,%rax
mov    0x8(%rsp),%r14
mov    %rax,0x8(%rsp)
cmp    0x48(%rsp),%rsi
je     1573 <seismic_exec+0x3c3>
mov    0x60(%rsp),%rax
mov    %rsi,0x68(%rsp)
movss  (%rax,%rsi,4),%xmm0
mov    0x58(%rsp),%rax
mov    (%r14,%rax,8),%rax
mov    0x50(%rsp),%rsi
addss  (%rax,%rsi,4),%xmm0
movss  %xmm0,(%rax,%rsi,4)
mov    0x120(%rsp),%eax
cmp    $0x5,%eax
jl     12b0 <seismic_exec+0x100>
mov    $0x2,%r12d
mov    %rcx,0x90(%rsp)
jmp    132c <seismic_exec+0x17c>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12
mov    %r12,%rax
cmp    %rdi,%rax
je     12b0 <seismic_exec+0x100>
mov    0x118(%rsp),%eax
cmp    $0x6,%eax
jle    1320 <seismic_exec+0x170>
lea    0x2(%r12),%eax
mov    %rax,0x98(%rsp)
lea    0x1(%r12),%rax
mov    %rax,0x78(%rsp)
mov    $0x4,%ebp
mov    $0x10,%r15d
nopw   0x0(%rax,%rax,1)
mov    (%rcx,%r12,8),%rdi
add    %r15,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,0x44(%rsp)
mov    0x88(%rsp),%rax
mov    (%rax,%r12,8),%rdi
add    %r15,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,0x40(%rsp)
mov    (%r14,%r12,8),%rdi
add    %r15,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,%ebx
mov    -0x8(%r14,%r12,8),%rdi
add    %r15,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,0x34(%rsp)
mov    -0x10(%r14,%r12,8),%rdi
add    %r15,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,0x3c(%rsp)
mov    0x98(%rsp),%rax
mov    (%r14,%rax,8),%rdi
add    %r15,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,0x38(%rsp)
mov    0x8(%r14,%r12,8),%rdi
add    %r15,%rdi
call   1030 <_mm_load_ps@plt>
mov    %eax,0x30(%rsp)
mov    (%r14,%r12,8),%rax
lea    (%rax,%r15,1),%rdi
add    $0xfffffffffffffffc,%rdi
call   1070 <_mm_loadu_ps@plt>
mov    %eax,0x28(%rsp)
mov    (%r14,%r12,8),%rax
lea    (%rax,%r15,1),%rdi
add    $0x4,%rdi
call   1070 <_mm_loadu_ps@plt>
mov    %eax,0x24(%rsp)
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <_MM_SHUFFLE@plt>
mov    %ebx,%edi
mov    %ebx,%esi
mov    %eax,%edx
call   1050 <_mm_shuffle_ps@plt>
mov    (%r14,%r12,8),%rcx
lea    (%rcx,%r15,1),%rsi
add    $0xfffffffffffffff8,%rsi
mov    %eax,%edi
call   1060 <_mm_loadl_pi@plt>
mov    %eax,0x20(%rsp)
xor    %edi,%edi
xor    %esi,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
call   1040 <_MM_SHUFFLE@plt>
mov    %ebx,0x2c(%rsp)
mov    %ebx,%edi
mov    %ebx,%esi
mov    %eax,%edx
call   1050 <_mm_shuffle_ps@plt>
mov    (%r14,%r12,8),%rcx
mov    %rbp,%r13
add    $0x4,%r13
lea    (%rcx,%r15,1),%rsi
add    $0x10,%rsi
mov    %eax,%edi
call   10d0 <_mm_loadh_pi@plt>
mov    %r14,%rbx
mov    %eax,%r14d
mov    0x34(%rsp),%edi
mov    0x30(%rsp),%esi
call   10c0 <_mm_add_ps@plt>
mov    0x28(%rsp),%edi
mov    %eax,%esi
call   10c0 <_mm_add_ps@plt>
mov    0x24(%rsp),%edi
mov    %eax,%esi
call   10c0 <_mm_add_ps@plt>
mov    %eax,%ebp
mov    %r14d,%edi
mov    %rbx,%r14
mov    0x20(%rsp),%esi
call   10c0 <_mm_add_ps@plt>
mov    0x38(%rsp),%edi
mov    %eax,%esi
call   10c0 <_mm_add_ps@plt>
mov    0x3c(%rsp),%edi
mov    %eax,%esi
call   10c0 <_mm_add_ps@plt>
mov    %eax,%ebx
mov    0x18(%rsp),%edi
mov    %ebp,%esi
call   1090 <_mm_mul_ps@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   10a0 <_mm_sub_ps@plt>
mov    %eax,%ebx
mov    0x14(%rsp),%edi
mov    0x2c(%rsp),%ebp
mov    %ebp,%esi
call   1090 <_mm_mul_ps@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   10a0 <_mm_sub_ps@plt>
mov    0x40(%rsp),%edi
mov    %eax,%esi
call   1090 <_mm_mul_ps@plt>
mov    %eax,%ebx
mov    0x1c(%rsp),%edi
mov    %ebp,%esi
call   1090 <_mm_mul_ps@plt>
mov    %eax,%edi
mov    0x44(%rsp),%esi
call   10a0 <_mm_sub_ps@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   10c0 <_mm_add_ps@plt>
mov    0x8(%rsp),%rcx
mov    (%rcx,%r12,8),%rdi
add    %r15,%rdi
mov    %eax,%esi
call   10b0 <_mm_store_ps@plt>
mov    0x80(%rsp),%rbx
mov    0x90(%rsp),%rcx
add    $0x10,%r15
mov    %r13,%rbp
cmp    %rbx,%r13
jl     1360 <seismic_exec+0x1b0>
mov    0x78(%rsp),%rax
mov    %rax,%r12
mov    0x70(%rsp),%rdi
cmp    %rdi,%rax
jne    132c <seismic_exec+0x17c>
jmp    12b0 <seismic_exec+0x100>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.seismic_exec.two = [4 x float] [float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00]
@__const.seismic_exec.sixteen = [4 x float] [float 1.600000e+01, float 1.600000e+01, float 1.600000e+01, float 1.600000e+01]
@__const.seismic_exec.sixty = [4 x float] [float 6.000000e+01, float 6.000000e+01, float 6.000000e+01, float 6.000000e+01]
define void @seismic_exec(float** %0, float** %1, float** %2, float** %3, float* %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca float**
%12 = alloca float**
%13 = alloca float**
%14 = alloca float**
%15 = alloca float*
%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 i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca [4 x float]
%39 = alloca [4 x float]
%40 = alloca [4 x float]
store float** %0, float*** %11
store float** %1, float*** %12
store float** %2, float*** %13
store float** %3, float*** %14
store float* %4, float** %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
store i32 %9, i32* %20
%41 = load i32, i32* %18
%42 = srem i32 %41, 4
%43 = icmp eq i32 %42, 0
%44 = zext i1 %43 to i32
%45 = call i32 @assert(i32 %44)
%46 = bitcast [4 x float]* %38 to i8*
%47 = bitcast [4 x float]* %39 to i8*
%48 = bitcast [4 x float]* %40 to i8*
%49 = getelementptr inbounds [4 x float], [4 x float]* %38, i64 0, i64 0
%50 = call i32 @_mm_load_ps(float* %49)
store i32 %50, i32* %31
%51 = getelementptr inbounds [4 x float], [4 x float]* %39, i64 0, i64 0
%52 = call i32 @_mm_load_ps(float* %51)
store i32 %52, i32* %32
%53 = getelementptr inbounds [4 x float], [4 x float]* %40, i64 0, i64 0
%54 = call i32 @_mm_load_ps(float* %53)
store i32 %54, i32* %33
store i32 0, i32* %23
br label %55
55: ; preds = %256, %10
%56 = load i32, i32* %23
%57 = load i32, i32* %20
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %259
59: ; preds = %55
%60 = load float*, float** %15
%61 = load i32, i32* %23
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds float, float* %60, i64 %62
%64 = load float, float* %63
%65 = load float**, float*** %13
%66 = load i32, i32* %17
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds float*, float** %65, i64 %67
%69 = load float*, float** %68
%70 = load i32, i32* %16
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds float, float* %69, i64 %71
%73 = load float, float* %72
%74 = fadd float %73, %64
store float %74, float* %72
store i32 2, i32* %21
br label %75
75: ; preds = %249, %59
%76 = load i32, i32* %21
%77 = load i32, i32* %19
%78 = sub nsw i32 %77, 2
%79 = icmp slt i32 %76, %78
br i1 %79, label %80, label %252
80: ; preds = %75
store i32 4, i32* %22
br label %81
81: ; preds = %245, %80
%82 = load i32, i32* %22
%83 = load i32, i32* %18
%84 = sub nsw i32 %83, 2
%85 = icmp slt i32 %82, %84
br i1 %85, label %86, label %248
86: ; preds = %81
%87 = load float**, float*** %12
%88 = load i32, i32* %21
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds float*, float** %87, i64 %89
%91 = load float*, float** %90
%92 = load i32, i32* %22
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds float, float* %91, i64 %93
%95 = call i32 @_mm_load_ps(float* %94)
store i32 %95, i32* %24
%96 = load float**, float*** %11
%97 = load i32, i32* %21
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds float*, float** %96, i64 %98
%100 = load float*, float** %99
%101 = load i32, i32* %22
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds float, float* %100, i64 %102
%104 = call i32 @_mm_load_ps(float* %103)
store i32 %104, i32* %25
%105 = load float**, float*** %13
%106 = load i32, i32* %21
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds float*, float** %105, i64 %107
%109 = load float*, float** %108
%110 = load i32, i32* %22
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds float, float* %109, i64 %111
%113 = call i32 @_mm_load_ps(float* %112)
store i32 %113, i32* %26
%114 = load float**, float*** %13
%115 = load i32, i32* %21
%116 = sub nsw i32 %115, 1
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds float*, float** %114, i64 %117
%119 = load float*, float** %118
%120 = load i32, i32* %22
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds float, float* %119, i64 %121
%123 = call i32 @_mm_load_ps(float* %122)
store i32 %123, i32* %28
%124 = load float**, float*** %13
%125 = load i32, i32* %21
%126 = sub nsw i32 %125, 2
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds float*, float** %124, i64 %127
%129 = load float*, float** %128
%130 = load i32, i32* %22
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds float, float* %129, i64 %131
%133 = call i32 @_mm_load_ps(float* %132)
store i32 %133, i32* %36
%134 = load float**, float*** %13
%135 = load i32, i32* %21
%136 = add nsw i32 %135, 2
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds float*, float** %134, i64 %137
%139 = load float*, float** %138
%140 = load i32, i32* %22
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds float, float* %139, i64 %141
%143 = call i32 @_mm_load_ps(float* %142)
store i32 %143, i32* %37
%144 = load float**, float*** %13
%145 = load i32, i32* %21
%146 = add nsw i32 %145, 1
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds float*, float** %144, i64 %147
%149 = load float*, float** %148
%150 = load i32, i32* %22
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds float, float* %149, i64 %151
%153 = call i32 @_mm_load_ps(float* %152)
store i32 %153, i32* %30
%154 = load float**, float*** %13
%155 = load i32, i32* %21
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds float*, float** %154, i64 %156
%158 = load float*, float** %157
%159 = load i32, i32* %22
%160 = sub nsw i32 %159, 1
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds float, float* %158, i64 %161
%163 = call i32 @_mm_loadu_ps(float* %162)
store i32 %163, i32* %27
%164 = load float**, float*** %13
%165 = load i32, i32* %21
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds float*, float** %164, i64 %166
%168 = load float*, float** %167
%169 = load i32, i32* %22
%170 = add nsw i32 %169, 1
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds float, float* %168, i64 %171
%173 = call i32 @_mm_loadu_ps(float* %172)
store i32 %173, i32* %29
%174 = load i32, i32* %26
%175 = load i32, i32* %26
%176 = call i32 @_MM_SHUFFLE(i32 1, i32 0, i32 0, i32 0)
%177 = call i32 @_mm_shuffle_ps(i32 %174, i32 %175, i32 %176)
%178 = load float**, float*** %13
%179 = load i32, i32* %21
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds float*, float** %178, i64 %180
%182 = load float*, float** %181
%183 = load i32, i32* %22
%184 = sub nsw i32 %183, 2
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds float, float* %182, i64 %185
%187 = call i32 @_mm_loadl_pi(i32 %177, float* %186)
store i32 %187, i32* %34
%188 = load i32, i32* %26
%189 = load i32, i32* %26
%190 = call i32 @_MM_SHUFFLE(i32 0, i32 0, i32 3, i32 2)
%191 = call i32 @_mm_shuffle_ps(i32 %188, i32 %189, i32 %190)
%192 = load float**, float*** %13
%193 = load i32, i32* %21
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds float*, float** %192, i64 %194
%196 = load float*, float** %195
%197 = load i32, i32* %22
%198 = add nsw i32 %197, 4
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds float, float* %196, i64 %199
%201 = call i32 @_mm_loadh_pi(i32 %191, float* %200)
store i32 %201, i32* %35
%202 = load i32, i32* %29
%203 = load i32, i32* %27
%204 = load i32, i32* %28
%205 = load i32, i32* %30
%206 = call i32 @_mm_add_ps(i32 %204, i32 %205)
%207 = call i32 @_mm_add_ps(i32 %203, i32 %206)
%208 = call i32 @_mm_add_ps(i32 %202, i32 %207)
store i32 %208, i32* %29
%209 = load i32, i32* %36
%210 = load i32, i32* %37
%211 = load i32, i32* %35
%212 = load i32, i32* %34
%213 = call i32 @_mm_add_ps(i32 %211, i32 %212)
%214 = call i32 @_mm_add_ps(i32 %210, i32 %213)
%215 = call i32 @_mm_add_ps(i32 %209, i32 %214)
store i32 %215, i32* %34
%216 = load i32, i32* %32
%217 = load i32, i32* %29
%218 = call i32 @_mm_mul_ps(i32 %216, i32 %217)
store i32 %218, i32* %29
%219 = load i32, i32* %29
%220 = load i32, i32* %34
%221 = call i32 @_mm_sub_ps(i32 %219, i32 %220)
%222 = load i32, i32* %33
%223 = load i32, i32* %26
%224 = call i32 @_mm_mul_ps(i32 %222, i32 %223)
%225 = call i32 @_mm_sub_ps(i32 %221, i32 %224)
store i32 %225, i32* %29
%226 = load i32, i32* %25
%227 = load i32, i32* %29
%228 = call i32 @_mm_mul_ps(i32 %226, i32 %227)
%229 = load i32, i32* %31
%230 = load i32, i32* %26
%231 = call i32 @_mm_mul_ps(i32 %229, i32 %230)
%232 = load i32, i32* %24
%233 = call i32 @_mm_sub_ps(i32 %231, i32 %232)
%234 = call i32 @_mm_add_ps(i32 %228, i32 %233)
store i32 %234, i32* %29
%235 = load float**, float*** %14
%236 = load i32, i32* %21
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds float*, float** %235, i64 %237
%239 = load float*, float** %238
%240 = load i32, i32* %22
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds float, float* %239, i64 %241
%243 = load i32, i32* %29
%244 = call i32 @_mm_store_ps(float* %242, i32 %243)
br label %245
245: ; preds = %86
%246 = load i32, i32* %22
%247 = add nsw i32 %246, 4
store i32 %247, i32* %22
br label %81
248: ; preds = %81
br label %249
249: ; preds = %248
%250 = load i32, i32* %21
%251 = add nsw i32 %250, 1
store i32 %251, i32* %21
br label %75
252: ; preds = %75
%253 = load float**, float*** %13
store float** %253, float*** %12
%254 = load float**, float*** %14
store float** %254, float*** %13
%255 = load float**, float*** %12
store float** %255, float*** %14
br label %256
256: ; preds = %252
%257 = load i32, i32* %23
%258 = add nsw i32 %257, 1
store i32 %258, i32* %23
br label %55
259: ; preds = %55
ret void
}

LLVM IR (-O2):
@__const.seismic_exec.two = [4 x float] [float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00]
@__const.seismic_exec.sixteen = [4 x float] [float 1.600000e+01, float 1.600000e+01, float 1.600000e+01, float 1.600000e+01]
@__const.seismic_exec.sixty = [4 x float] [float 6.000000e+01, float 6.000000e+01, float 6.000000e+01, float 6.000000e+01]
define void @seismic_exec(float** nocapture %0, float** nocapture %1, float** nocapture %2, float** nocapture %3, float* nocapture %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca [4 x float]
%12 = alloca [4 x float]
%13 = alloca [4 x float]
%14 = and i32 %7, 3
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
%18 = bitcast [4 x float]* %11 to i8*
%19 = bitcast [4 x float]* %12 to i8*
%20 = bitcast [4 x float]* %13 to i8*
%21 = getelementptr inbounds [4 x float], [4 x float]* %11, i64 0, i64 0
%22 = call i32 @_mm_load_ps(float* %21)
%23 = getelementptr inbounds [4 x float], [4 x float]* %12, i64 0, i64 0
%24 = call i32 @_mm_load_ps(float* %23)
%25 = getelementptr inbounds [4 x float], [4 x float]* %13, i64 0, i64 0
%26 = call i32 @_mm_load_ps(float* %25)
%27 = icmp sgt i32 %9, 0
br i1 %27, label %28, label %136
28: ; preds = %10
%29 = sext i32 %6 to i64
%30 = sext i32 %5 to i64
%31 = add i32 %8, -2
%32 = icmp sgt i32 %8, 4
%33 = add nsw i32 %7, -2
%34 = icmp sgt i32 %7, 6
%35 = sext i32 %33 to i64
%36 = zext i32 %9 to i64
%37 = zext i32 %31 to i64
br label %38
38: ; preds = %28, %133
%39 = phi i64 [ 0, %28 ], [ %134, %133 ]
%40 = phi float** [ %1, %28 ], [ %41, %133 ]
%41 = phi float** [ %2, %28 ], [ %42, %133 ]
%42 = phi float** [ %3, %28 ], [ %41, %133 ]
%43 = getelementptr inbounds float, float* %4, i64 %39
%44 = load float, float* %43
%45 = getelementptr inbounds float*, float** %41, i64 %29
%46 = load float*, float** %45
%47 = getelementptr inbounds float, float* %46, i64 %30
%48 = load float, float* %47
%49 = fadd float %44, %48
store float %49, float* %47
br i1 %32, label %50, label %133
50: ; preds = %38, %130
%51 = phi i64 [ %131, %130 ], [ 2, %38 ]
br i1 %34, label %54, label %52
52: ; preds = %50
%53 = add nuw nsw i64 %51, 1
br label %130
54: ; preds = %50
%55 = getelementptr inbounds float*, float** %40, i64 %51
%56 = getelementptr inbounds float*, float** %0, i64 %51
%57 = getelementptr inbounds float*, float** %41, i64 %51
%58 = add nsw i64 %51, -1
%59 = getelementptr inbounds float*, float** %41, i64 %58
%60 = add nsw i64 %51, -2
%61 = getelementptr inbounds float*, float** %41, i64 %60
%62 = add i64 %51, 2
%63 = and i64 %62, 4294967295
%64 = getelementptr inbounds float*, float** %41, i64 %63
%65 = add nuw nsw i64 %51, 1
%66 = getelementptr inbounds float*, float** %41, i64 %65
%67 = getelementptr inbounds float*, float** %42, i64 %51
br label %68
68: ; preds = %54, %68
%69 = phi i64 [ 4, %54 ], [ %108, %68 ]
%70 = load float*, float** %55
%71 = getelementptr inbounds float, float* %70, i64 %69
%72 = call i32 @_mm_load_ps(float* %71)
%73 = load float*, float** %56
%74 = getelementptr inbounds float, float* %73, i64 %69
%75 = call i32 @_mm_load_ps(float* %74)
%76 = load float*, float** %57
%77 = getelementptr inbounds float, float* %76, i64 %69
%78 = call i32 @_mm_load_ps(float* %77)
%79 = load float*, float** %59
%80 = getelementptr inbounds float, float* %79, i64 %69
%81 = call i32 @_mm_load_ps(float* %80)
%82 = load float*, float** %61
%83 = getelementptr inbounds float, float* %82, i64 %69
%84 = call i32 @_mm_load_ps(float* %83)
%85 = load float*, float** %64
%86 = getelementptr inbounds float, float* %85, i64 %69
%87 = call i32 @_mm_load_ps(float* %86)
%88 = load float*, float** %66
%89 = getelementptr inbounds float, float* %88, i64 %69
%90 = call i32 @_mm_load_ps(float* %89)
%91 = load float*, float** %57
%92 = add nsw i64 %69, -1
%93 = getelementptr inbounds float, float* %91, i64 %92
%94 = call i32 @_mm_loadu_ps(float* %93)
%95 = load float*, float** %57
%96 = or i64 %69, 1
%97 = getelementptr inbounds float, float* %95, i64 %96
%98 = call i32 @_mm_loadu_ps(float* %97)
%99 = call i32 @_MM_SHUFFLE(i32 1, i32 0, i32 0, i32 0)
%100 = call i32 @_mm_shuffle_ps(i32 %78, i32 %78, i32 %99)
%101 = load float*, float** %57
%102 = add nsw i64 %69, -2
%103 = getelementptr inbounds float, float* %101, i64 %102
%104 = call i32 @_mm_loadl_pi(i32 %100, float* %103)
%105 = call i32 @_MM_SHUFFLE(i32 0, i32 0, i32 3, i32 2)
%106 = call i32 @_mm_shuffle_ps(i32 %78, i32 %78, i32 %105)
%107 = load float*, float** %57
%108 = add nuw i64 %69, 4
%109 = and i64 %108, 4294967292
%110 = getelementptr inbounds float, float* %107, i64 %109
%111 = call i32 @_mm_loadh_pi(i32 %106, float* %110)
%112 = call i32 @_mm_add_ps(i32 %81, i32 %90)
%113 = call i32 @_mm_add_ps(i32 %94, i32 %112)
%114 = call i32 @_mm_add_ps(i32 %98, i32 %113)
%115 = call i32 @_mm_add_ps(i32 %111, i32 %104)
%116 = call i32 @_mm_add_ps(i32 %87, i32 %115)
%117 = call i32 @_mm_add_ps(i32 %84, i32 %116)
%118 = call i32 @_mm_mul_ps(i32 %24, i32 %114)
%119 = call i32 @_mm_sub_ps(i32 %118, i32 %117)
%120 = call i32 @_mm_mul_ps(i32 %26, i32 %78)
%121 = call i32 @_mm_sub_ps(i32 %119, i32 %120)
%122 = call i32 @_mm_mul_ps(i32 %75, i32 %121)
%123 = call i32 @_mm_mul_ps(i32 %22, i32 %78)
%124 = call i32 @_mm_sub_ps(i32 %123, i32 %72)
%125 = call i32 @_mm_add_ps(i32 %122, i32 %124)
%126 = load float*, float** %67
%127 = getelementptr inbounds float, float* %126, i64 %69
%128 = call i32 @_mm_store_ps(float* %127, i32 %125)
%129 = icmp slt i64 %108, %35
br i1 %129, label %68, label %130
130: ; preds = %68, %52
%131 = phi i64 [ %53, %52 ], [ %65, %68 ]
%132 = icmp eq i64 %131, %37
br i1 %132, label %133, label %50
133: ; preds = %130, %38
%134 = add nuw nsw i64 %39, 1
%135 = icmp eq i64 %134, %36
br i1 %135, label %136, label %38
136: ; preds = %133, %10
ret void
}