// File: /workspace/github_c_makefile_star2_O1/pavel-demin[P]ft8d-c/pffft.c
// Function: validate_pffft_simd
void validate_pffft_simd(void) {
  float f[16] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 };
  v4sf_union a0, a1, a2, a3, t, u;
  memcpy(a0.f, f, 4*sizeof(float));
  memcpy(a1.f, f+4, 4*sizeof(float));
  memcpy(a2.f, f+8, 4*sizeof(float));
  memcpy(a3.f, f+12, 4*sizeof(float));

  t = a0; u = a1; t.v = VZERO();
  printf("VZERO=[%2g %2g %2g %2g]\n", t.f[0], t.f[1], t.f[2], t.f[3]); assertv4(t, 0, 0, 0, 0);
  t.v = VADD(a1.v, a2.v);
  printf("VADD(4:7,8:11)=[%2g %2g %2g %2g]\n", t.f[0], t.f[1], t.f[2], t.f[3]); assertv4(t, 12, 14, 16, 18);
  t.v = VMUL(a1.v, a2.v);
  printf("VMUL(4:7,8:11)=[%2g %2g %2g %2g]\n", t.f[0], t.f[1], t.f[2], t.f[3]); assertv4(t, 32, 45, 60, 77);
  t.v = VMADD(a1.v, a2.v,a0.v);
  printf("VMADD(4:7,8:11,0:3)=[%2g %2g %2g %2g]\n", t.f[0], t.f[1], t.f[2], t.f[3]); assertv4(t, 32, 46, 62, 80);

  INTERLEAVE2(a1.v,a2.v,t.v,u.v);
  printf("INTERLEAVE2(4:7,8:11)=[%2g %2g %2g %2g] [%2g %2g %2g %2g]\n", t.f[0], t.f[1], t.f[2], t.f[3], u.f[0], u.f[1], u.f[2], u.f[3]);
  assertv4(t, 4, 8, 5, 9); assertv4(u, 6, 10, 7, 11);
  UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
  printf("UNINTERLEAVE2(4:7,8:11)=[%2g %2g %2g %2g] [%2g %2g %2g %2g]\n", t.f[0], t.f[1], t.f[2], t.f[3], u.f[0], u.f[1], u.f[2], u.f[3]);
  assertv4(t, 4, 6, 8, 10); assertv4(u, 5, 7, 9, 11);

  t.v=LD_PS1(f[15]);
  printf("LD_PS1(15)=[%2g %2g %2g %2g]\n", t.f[0], t.f[1], t.f[2], t.f[3]);
  assertv4(t, 15, 15, 15, 15);
  t.v = VSWAPHL(a1.v, a2.v);
  printf("VSWAPHL(4:7,8:11)=[%2g %2g %2g %2g]\n", t.f[0], t.f[1], t.f[2], t.f[3]);
  assertv4(t, 8, 9, 6, 7);
  VTRANSPOSE4(a0.v, a1.v, a2.v, a3.v);
  printf("VTRANSPOSE4(0:3,4:7,8:11,12:15)=[%2g %2g %2g %2g] [%2g %2g %2g %2g] [%2g %2g %2g %2g] [%2g %2g %2g %2g]\n",
         a0.f[0], a0.f[1], a0.f[2], a0.f[3], a1.f[0], a1.f[1], a1.f[2], a1.f[3],
         a2.f[0], a2.f[1], a2.f[2], a2.f[3], a3.f[0], a3.f[1], a3.f[2], a3.f[3]);
  assertv4(a0, 0, 4, 8, 12); assertv4(a1, 1, 5, 9, 13); assertv4(a2, 2, 6, 10, 14); assertv4(a3, 3, 7, 11, 15);
}

// Assembly:
pushq %rbx
leaq 0x6f8c(%rip), %rdi      # 0x8210
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
movb $0x4, %al
callq 0x1080
leaq 0x6f93(%rip), %rdi      # 0x8231
movsd 0x6d62(%rip), %xmm0     # 0x8008
movsd 0x6d62(%rip), %xmm1     # 0x8010
movsd 0x6d62(%rip), %xmm2     # 0x8018
movsd 0x6d62(%rip), %xmm3     # 0x8020
movb $0x4, %al
callq 0x1080
leaq 0x6f87(%rip), %rdi      # 0x8253
movsd 0x6d54(%rip), %xmm0     # 0x8028
movsd 0x6d54(%rip), %xmm1     # 0x8030
movsd 0x6d54(%rip), %xmm2     # 0x8038
movsd 0x6d54(%rip), %xmm3     # 0x8040
movb $0x4, %al
callq 0x1080
leaq 0x6f7b(%rip), %rdi      # 0x8275
movsd 0x6d46(%rip), %xmm1     # 0x8048
movsd 0x6d46(%rip), %xmm2     # 0x8050
movsd 0x6d46(%rip), %xmm3     # 0x8058
movsd 0x6d0e(%rip), %xmm0     # 0x8028
movb $0x4, %al
callq 0x1080
leaq 0x6f76(%rip), %rdi      # 0x829e
movsd 0x6d30(%rip), %xmm0     # 0x8060
movsd 0x6d30(%rip), %xmm1     # 0x8068
movsd 0x6d30(%rip), %xmm2     # 0x8070
movsd 0x6d30(%rip), %xmm3     # 0x8078
movsd 0x6d30(%rip), %xmm4     # 0x8080
movsd 0x6d30(%rip), %xmm5     # 0x8088
movsd 0x6d30(%rip), %xmm6     # 0x8090
movsd 0x6d30(%rip), %xmm7     # 0x8098
movb $0x8, %al
callq 0x1080
leaq 0x6f26(%rip), %rdi      # 0x829c
movsd 0x6ce2(%rip), %xmm0     # 0x8060
movsd 0x6cfa(%rip), %xmm1     # 0x8080
movsd 0x6cda(%rip), %xmm2     # 0x8068
movsd 0x6cf2(%rip), %xmm3     # 0x8088
movsd 0x6cd2(%rip), %xmm4     # 0x8070
movsd 0x6cea(%rip), %xmm5     # 0x8090
movsd 0x6cca(%rip), %xmm6     # 0x8078
movsd 0x6ce2(%rip), %xmm7     # 0x8098
movb $0x8, %al
callq 0x1080
leaq 0x6f15(%rip), %rdi      # 0x82d9
movsd 0x6cd4(%rip), %xmm0     # 0x80a0
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm0, %xmm3
movb $0x4, %al
callq 0x1080
leaq 0x6f14(%rip), %rdi      # 0x82f7
movsd 0x6c7d(%rip), %xmm0     # 0x8068
movsd 0x6c85(%rip), %xmm1     # 0x8078
movsd 0x6c85(%rip), %xmm2     # 0x8080
movsd 0x6c8d(%rip), %xmm3     # 0x8090
movb $0x4, %al
callq 0x1080
movabsq $0x402e000000000000, %rcx # imm = 0x402E000000000000
movabsq $0x4026000000000000, %rdx # imm = 0x4026000000000000
movabsq $0x401c000000000000, %rsi # imm = 0x401C000000000000
movabsq $0x4008000000000000, %r8 # imm = 0x4008000000000000
movabsq $0x402c000000000000, %r9 # imm = 0x402C000000000000
movabsq $0x4024000000000000, %r10 # imm = 0x4024000000000000
movabsq $0x4018000000000000, %r11 # imm = 0x4018000000000000
movabsq $0x4000000000000000, %rbx # imm = 0x4000000000000000
leaq 0x6ebb(%rip), %rdi      # 0x831c
movsd 0x6c3f(%rip), %xmm4     # 0x80a8
movsd 0x6c3f(%rip), %xmm7     # 0x80b0
xorps %xmm0, %xmm0
movsd 0x6be4(%rip), %xmm1     # 0x8060
movsd 0x6be4(%rip), %xmm2     # 0x8068
movsd 0x6b7c(%rip), %xmm3     # 0x8008
movsd 0x6bdc(%rip), %xmm5     # 0x8070
movsd 0x6bdc(%rip), %xmm6     # 0x8078
movb $0x8, %al
pushq %rcx
pushq %rdx
pushq %rsi
pushq %r8
pushq %r9
pushq %r10
pushq %r11
pushq %rbx
callq 0x1080
addq $0x40, %rsp
popq %rbx
retq