#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*/ printf(char *, ...);
int spg_get_symmetry_with_collinear_spin(int ***, double **, int *, int,
                                         double **, double **, int *, double *,
                                         int, int);
int test_spg_get_symmetry_with_collinear_spin(void) {
  double lattice[3][3] = {{4, 0, 0}, {0, 4, 0}, {0, 0, 4}};
  double position[][3] = {{0, 0, 0}, {0.5, 0.5, 0.5}};
  int types[] = {1, 1};
  int equivalent_atoms[2];
  double spins[2];
  int num_atom = 2;
  int max_size = 300;
  int i, j, size;
  int rotation[max_size][3][3];
  double translation[max_size][3];
  printf("*** spg_get_symmetry_with_spin (BCC ferro) ***:\n");
  spins[0] = 1;
  spins[1] = 1;
  size = spg_get_symmetry_with_collinear_spin(
      rotation, translation, equivalent_atoms, max_size, lattice, position,
      types, spins, num_atom, 1e-5);
  if (size) {
    for (i = 0; i < size; i++) {
      printf("--- %d ---\n", i + 1);
      for (j = 0; j < 3; j++) {
        printf("%2d %2d %2d\n", rotation[i][j][0], rotation[i][j][1],
               rotation[i][j][2]);
      }
      printf("%f %f %f\n", translation[i][0], translation[i][1],
             translation[i][2]);
    }
  } else {
    return 1;
  }
  printf("*** Example of spg_get_symmetry_with_spin (BCC antiferro) ***:\n");
  spins[0] = 1;
  spins[1] = -1;
  size = spg_get_symmetry_with_collinear_spin(
      rotation, translation, equivalent_atoms, max_size, lattice, position,
      types, spins, num_atom, 1e-5);
  if (size) {
    for (i = 0; i < size; i++) {
      printf("--- %d ---\n", i + 1);
      for (j = 0; j < 3; j++) {
        printf("%2d %2d %2d\n", rotation[i][j][0], rotation[i][j][1],
               rotation[i][j][2]);
      }
      printf("%f %f %f\n", translation[i][0], translation[i][1],
             translation[i][2]);
    }
  } else {
    return 1;
  }
  printf("*** spg_get_symmetry_with_spin (BCC broken spin) ***:\n");
  spins[0] = 1;
  spins[1] = 2;
  size = spg_get_symmetry_with_collinear_spin(
      rotation, translation, equivalent_atoms, max_size, lattice, position,
      types, spins, num_atom, 1e-5);
  if (size) {
    for (i = 0; i < size; i++) {
      printf("--- %d ---\n", i + 1);
      for (j = 0; j < 3; j++) {
        printf("%2d %2d %2d\n", rotation[i][j][0], rotation[i][j][1],
               rotation[i][j][2]);
      }
      printf("%f %f %f\n", translation[i][0], translation[i][1],
             translation[i][2]);
    }
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<test_spg_get_symmetry_with_collinear_spin>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xf8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,-0x30(%rbp)
movaps %xmm0,-0x40(%rbp)
movaps %xmm0,-0x50(%rbp)
movaps %xmm0,-0x60(%rbp)
movq   $0x0,-0x20(%rbp)
movabs $0x4010000000000000,%rax
mov    %rax,-0x60(%rbp)
mov    %rax,-0x40(%rbp)
mov    %rax,-0x20(%rbp)
movaps %xmm0,-0x70(%rbp)
movaps %xmm0,-0x80(%rbp)
movaps %xmm0,-0x90(%rbp)
movabs $0x3fe0000000000000,%rax
mov    %rax,-0x78(%rbp)
mov    %rax,-0x70(%rbp)
mov    %rax,-0x68(%rbp)
mov    0xe8f(%rip),%rax
mov    %rax,-0x98(%rbp)
movl   $0x2,-0xb4(%rbp)
movl   $0x12c,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0xd0(%rbp)
lea    (%rax,%rax,8),%rcx
lea    0xf(,%rcx,4),%rdx
movabs $0x7ffffffff0,%rcx
and    %rcx,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xf8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xd8(%rbp)
mov    -0xb8(%rbp),%eax
lea    (%rax,%rax,2),%rcx
lea    0xf(,%rcx,8),%rdx
movabs $0x3ffffffff0,%rcx
and    %rcx,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xf0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xe0(%rbp)
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xf8(%rbp),%rdi
mov    -0xf0(%rbp),%rsi
movsd  0xdc2(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xdb2(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
lea    -0xa0(%rbp),%rdx
mov    -0xb8(%rbp),%ecx
lea    -0x60(%rbp),%r8
lea    -0x90(%rbp),%r9
lea    -0x98(%rbp),%r11
lea    -0xb0(%rbp),%r10
mov    -0xb4(%rbp),%eax
xor    %ebx,%ebx
sub    $0x20,%rsp
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
movl   $0x0,0x18(%rsp)
call   1030 <spg_get_symmetry_with_collinear_spin@plt>
add    $0x20,%rsp
mov    %eax,-0xc4(%rbp)
cmpl   $0x0,-0xc4(%rbp)
je     13fa <test_spg_get_symmetry_with_collinear_spin+0x2da>
movl   $0x0,-0xbc(%rbp)
mov    -0xbc(%rbp),%eax
cmp    -0xc4(%rbp),%eax
jge    13f5 <test_spg_get_symmetry_with_collinear_spin+0x2d5>
mov    -0xbc(%rbp),%esi
add    $0x1,%esi
lea    0xd6c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xc0(%rbp)
cmpl   $0x3,-0xc0(%rbp)
jge    138e <test_spg_get_symmetry_with_collinear_spin+0x26e>
mov    -0xf8(%rbp),%rax
movslq -0xbc(%rbp),%rcx
imul   $0x24,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movslq -0xc0(%rbp),%rdx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
mov    (%rcx),%esi
movslq -0xbc(%rbp),%rcx
imul   $0x24,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movslq -0xc0(%rbp),%rdx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
mov    0x4(%rcx),%edx
movslq -0xbc(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0xc0(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%ecx
lea    0xcea(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    12f6 <test_spg_get_symmetry_with_collinear_spin+0x1d6>
mov    -0xf0(%rbp),%rax
movslq -0xbc(%rbp),%rcx
imul   $0x18,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movsd  (%rcx),%xmm0
movslq -0xbc(%rbp),%rcx
imul   $0x18,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movsd  0x8(%rcx),%xmm1
movslq -0xbc(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
lea    0xc90(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
jmp    12c3 <test_spg_get_symmetry_with_collinear_spin+0x1a3>
jmp    1410 <test_spg_get_symmetry_with_collinear_spin+0x2f0>
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0xe4(%rbp)
jmp    1808 <test_spg_get_symmetry_with_collinear_spin+0x6e8>
lea    0xc5d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xf8(%rbp),%rdi
mov    -0xf0(%rbp),%rsi
movsd  0xbcc(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xbc4(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
lea    -0xa0(%rbp),%rdx
mov    -0xb8(%rbp),%ecx
lea    -0x60(%rbp),%r8
lea    -0x90(%rbp),%r9
lea    -0x98(%rbp),%r11
lea    -0xb0(%rbp),%r10
mov    -0xb4(%rbp),%eax
xor    %ebx,%ebx
sub    $0x20,%rsp
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
movl   $0x0,0x18(%rsp)
call   1030 <spg_get_symmetry_with_collinear_spin@plt>
add    $0x20,%rsp
mov    %eax,-0xc4(%rbp)
cmpl   $0x0,-0xc4(%rbp)
je     15f0 <test_spg_get_symmetry_with_collinear_spin+0x4d0>
movl   $0x0,-0xbc(%rbp)
mov    -0xbc(%rbp),%eax
cmp    -0xc4(%rbp),%eax
jge    15eb <test_spg_get_symmetry_with_collinear_spin+0x4cb>
mov    -0xbc(%rbp),%esi
add    $0x1,%esi
lea    0xb76(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xc0(%rbp)
cmpl   $0x3,-0xc0(%rbp)
jge    1584 <test_spg_get_symmetry_with_collinear_spin+0x464>
mov    -0xf8(%rbp),%rax
movslq -0xbc(%rbp),%rcx
imul   $0x24,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movslq -0xc0(%rbp),%rdx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
mov    (%rcx),%esi
movslq -0xbc(%rbp),%rcx
imul   $0x24,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movslq -0xc0(%rbp),%rdx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
mov    0x4(%rcx),%edx
movslq -0xbc(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0xc0(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%ecx
lea    0xaf4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    14ec <test_spg_get_symmetry_with_collinear_spin+0x3cc>
mov    -0xf0(%rbp),%rax
movslq -0xbc(%rbp),%rcx
imul   $0x18,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movsd  (%rcx),%xmm0
movslq -0xbc(%rbp),%rcx
imul   $0x18,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movsd  0x8(%rcx),%xmm1
movslq -0xbc(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
lea    0xa9a(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
jmp    14b9 <test_spg_get_symmetry_with_collinear_spin+0x399>
jmp    1606 <test_spg_get_symmetry_with_collinear_spin+0x4e6>
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0xe4(%rbp)
jmp    1808 <test_spg_get_symmetry_with_collinear_spin+0x6e8>
lea    0xaa7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xf8(%rbp),%rdi
mov    -0xf0(%rbp),%rsi
movsd  0x9d6(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0x9d6(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
lea    -0xa0(%rbp),%rdx
mov    -0xb8(%rbp),%ecx
lea    -0x60(%rbp),%r8
lea    -0x90(%rbp),%r9
lea    -0x98(%rbp),%r11
lea    -0xb0(%rbp),%r10
mov    -0xb4(%rbp),%eax
xor    %ebx,%ebx
sub    $0x20,%rsp
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
movl   $0x0,0x18(%rsp)
call   1030 <spg_get_symmetry_with_collinear_spin@plt>
add    $0x20,%rsp
mov    %eax,-0xc4(%rbp)
cmpl   $0x0,-0xc4(%rbp)
je     17f7 <test_spg_get_symmetry_with_collinear_spin+0x6d7>
movl   $0x0,-0xbc(%rbp)
mov    -0xbc(%rbp),%eax
cmp    -0xc4(%rbp),%eax
jge    17e1 <test_spg_get_symmetry_with_collinear_spin+0x6c1>
mov    -0xbc(%rbp),%esi
add    $0x1,%esi
lea    0x980(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xc0(%rbp)
cmpl   $0x3,-0xc0(%rbp)
jge    177a <test_spg_get_symmetry_with_collinear_spin+0x65a>
mov    -0xf8(%rbp),%rax
movslq -0xbc(%rbp),%rcx
imul   $0x24,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movslq -0xc0(%rbp),%rdx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
mov    (%rcx),%esi
movslq -0xbc(%rbp),%rcx
imul   $0x24,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movslq -0xc0(%rbp),%rdx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
mov    0x4(%rcx),%edx
movslq -0xbc(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0xc0(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%ecx
lea    0x8fe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    16e2 <test_spg_get_symmetry_with_collinear_spin+0x5c2>
mov    -0xf0(%rbp),%rax
movslq -0xbc(%rbp),%rcx
imul   $0x18,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movsd  (%rcx),%xmm0
movslq -0xbc(%rbp),%rcx
imul   $0x18,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movsd  0x8(%rcx),%xmm1
movslq -0xbc(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
lea    0x8a4(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
jmp    16af <test_spg_get_symmetry_with_collinear_spin+0x58f>
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0xe4(%rbp)
jmp    1808 <test_spg_get_symmetry_with_collinear_spin+0x6e8>
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0xe4(%rbp)
mov    -0xd0(%rbp),%rax
mov    %rax,%rsp
mov    -0xc(%rbp),%eax
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_spg_get_symmetry_with_collinear_spin>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4708,%rsp
mov    %rsp,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x70(%rsp)
movabs $0x4010000000000000,%rax
mov    %rax,0x60(%rsp)
mov    %rax,0x80(%rsp)
mov    %rax,0xa0(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps 0xe6f(%rip),%xmm0
movups %xmm0,0x48(%rsp)
movabs $0x3fe0000000000000,%rax
mov    %rax,0x58(%rsp)
movabs $0x100000001,%rax
mov    %rax,0x8(%rsp)
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
movaps 0xe49(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rbp
lea    0x8(%rsp),%rax
lea    0xb0(%rsp),%rdi
lea    0x2ae0(%rsp),%rsi
lea    0x28(%rsp),%rdx
lea    0x60(%rsp),%r8
lea    0x30(%rsp),%r9
mov    $0x12c,%ecx
push   $0x0
push   $0x2
push   %rbp
push   %rax
call   1040 <spg_get_symmetry_with_collinear_spin@plt>
add    $0x20,%rsp
mov    $0x1,%ecx
test   %eax,%eax
je     1583 <test_spg_get_symmetry_with_collinear_spin+0x453>
mov    %rbx,(%rsp)
jle    12f6 <test_spg_get_symmetry_with_collinear_spin+0x1c6>
mov    %eax,%eax
lea    0x2af0(%rsp),%r13
shl    $0x2,%rax
lea    (%rax,%rax,8),%r14
mov    $0x1,%ebp
lea    0xe0e(%rip),%rbx
lea    0xe14(%rip),%r12
xor    %r15d,%r15d
nopl   0x0(%rax,%rax,1)
lea    0xde9(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xb0(%rsp,%r15,1),%esi
mov    0xb4(%rsp,%r15,1),%edx
mov    0xb8(%rsp,%r15,1),%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xbc(%rsp,%r15,1),%esi
mov    0xc0(%rsp,%r15,1),%edx
mov    0xc4(%rsp,%r15,1),%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc8(%rsp,%r15,1),%esi
mov    0xcc(%rsp,%r15,1),%edx
mov    0xd0(%rsp,%r15,1),%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  -0x10(%r13),%xmm0
movsd  -0x8(%r13),%xmm1
movsd  0x0(%r13),%xmm2
mov    %r12,%rdi
mov    $0x3,%al
call   1050 <printf@plt>
add    $0x18,%r13
add    $0x24,%r15
add    $0x1,%ebp
cmp    %r15,%r14
jne    1250 <test_spg_get_symmetry_with_collinear_spin+0x120>
lea    0xd96(%rip),%rdi
call   1030 <puts@plt>
movaps 0xd17(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xb0(%rsp),%rdi
lea    0x2ae0(%rsp),%rsi
lea    0x28(%rsp),%rdx
lea    0x60(%rsp),%r8
lea    0x30(%rsp),%r9
mov    $0x12c,%ecx
push   $0x0
push   $0x2
lea    0x20(%rsp),%rax
push   %rax
lea    0x20(%rsp),%rax
push   %rax
call   1040 <spg_get_symmetry_with_collinear_spin@plt>
add    $0x20,%rsp
test   %eax,%eax
je     157a <test_spg_get_symmetry_with_collinear_spin+0x44a>
jle    1432 <test_spg_get_symmetry_with_collinear_spin+0x302>
mov    %eax,%eax
lea    0x2af0(%rsp),%rbx
shl    $0x2,%rax
lea    (%rax,%rax,8),%r14
mov    $0x1,%ebp
lea    0xcd5(%rip),%r13
lea    0xcdb(%rip),%r12
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xca9(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xb0(%rsp,%r15,1),%esi
mov    0xb4(%rsp,%r15,1),%edx
mov    0xb8(%rsp,%r15,1),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xbc(%rsp,%r15,1),%esi
mov    0xc0(%rsp,%r15,1),%edx
mov    0xc4(%rsp,%r15,1),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc8(%rsp,%r15,1),%esi
mov    0xcc(%rsp,%r15,1),%edx
mov    0xd0(%rsp,%r15,1),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  -0x10(%rbx),%xmm0
movsd  -0x8(%rbx),%xmm1
movsd  (%rbx),%xmm2
mov    %r12,%rdi
mov    $0x3,%al
call   1050 <printf@plt>
add    $0x18,%rbx
add    $0x24,%r15
add    $0x1,%ebp
cmp    %r15,%r14
jne    1390 <test_spg_get_symmetry_with_collinear_spin+0x260>
lea    0xc99(%rip),%rdi
call   1030 <puts@plt>
movaps 0xbeb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xb0(%rsp),%rdi
lea    0x2ae0(%rsp),%rsi
lea    0x28(%rsp),%rdx
lea    0x60(%rsp),%r8
lea    0x30(%rsp),%r9
mov    $0x12c,%ecx
push   $0x0
push   $0x2
lea    0x20(%rsp),%rax
push   %rax
lea    0x20(%rsp),%rax
push   %rax
call   1040 <spg_get_symmetry_with_collinear_spin@plt>
add    $0x20,%rsp
test   %eax,%eax
mov    (%rsp),%rbx
mov    $0x1,%ecx
je     1583 <test_spg_get_symmetry_with_collinear_spin+0x453>
jle    1576 <test_spg_get_symmetry_with_collinear_spin+0x446>
mov    %eax,%eax
lea    0x2af0(%rsp),%rbx
shl    $0x2,%rax
lea    (%rax,%rax,8),%r14
mov    $0x1,%ebp
lea    0xb90(%rip),%r13
lea    0xb96(%rip),%r12
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
lea    0xb69(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xb0(%rsp,%r15,1),%esi
mov    0xb4(%rsp,%r15,1),%edx
mov    0xb8(%rsp,%r15,1),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xbc(%rsp,%r15,1),%esi
mov    0xc0(%rsp,%r15,1),%edx
mov    0xc4(%rsp,%r15,1),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc8(%rsp,%r15,1),%esi
mov    0xcc(%rsp,%r15,1),%edx
mov    0xd0(%rsp,%r15,1),%ecx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  -0x10(%rbx),%xmm0
movsd  -0x8(%rbx),%xmm1
movsd  (%rbx),%xmm2
mov    %r12,%rdi
mov    $0x3,%al
call   1050 <printf@plt>
add    $0x18,%rbx
add    $0x24,%r15
add    $0x1,%ebp
cmp    %r15,%r14
jne    14d0 <test_spg_get_symmetry_with_collinear_spin+0x3a0>
mov    (%rsp),%rbx
xor    %ecx,%ecx
jmp    1583 <test_spg_get_symmetry_with_collinear_spin+0x453>
mov    (%rsp),%rbx
mov    $0x1,%ecx
mov    %rbx,%rsp
mov    %ecx,%eax
add    $0x4708,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.test_spg_get_symmetry_with_collinear_spin.types = [2 x i32] [i32 1, i32 1]
@.str = [49 x i8] c"*** spg_get_symmetry_with_spin (BCC ferro) ***:\0A\00"
@.str.1 = [12 x i8] c"--- %d ---\0A\00"
@.str.2 = [13 x i8] c"%2d %2d %2d\0A\00"
@.str.3 = [10 x i8] c"%f %f %f\0A\00"
@.str.4 = [64 x i8] c"*** Example of spg_get_symmetry_with_spin (BCC antiferro) ***:\0A\00"
@.str.5 = [55 x i8] c"*** spg_get_symmetry_with_spin (BCC broken spin) ***:\0A\00"
define i32 @test_spg_get_symmetry_with_collinear_spin() {
%1 = alloca i32
%2 = alloca [3 x [3 x double]]
%3 = alloca [2 x [3 x double]]
%4 = alloca [2 x i32]
%5 = alloca [2 x i32]
%6 = alloca [2 x double]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i64
%15 = alloca i32
%16 = bitcast [3 x [3 x double]]* %2 to i8*
%17 = bitcast i8* %16 to [3 x [3 x double]]*
%18 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %17, i32 0, i32 0
%19 = getelementptr inbounds [3 x double], [3 x double]* %18, i32 0, i32 0
store double 4.000000e+00, double* %19
%20 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %17, i32 0, i32 1
%21 = getelementptr inbounds [3 x double], [3 x double]* %20, i32 0, i32 1
store double 4.000000e+00, double* %21
%22 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %17, i32 0, i32 2
%23 = getelementptr inbounds [3 x double], [3 x double]* %22, i32 0, i32 2
store double 4.000000e+00, double* %23
%24 = bitcast [2 x [3 x double]]* %3 to i8*
%25 = bitcast i8* %24 to [2 x [3 x double]]*
%26 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %25, i32 0, i32 1
%27 = getelementptr inbounds [3 x double], [3 x double]* %26, i32 0, i32 0
store double 5.000000e-01, double* %27
%28 = getelementptr inbounds [3 x double], [3 x double]* %26, i32 0, i32 1
store double 5.000000e-01, double* %28
%29 = getelementptr inbounds [3 x double], [3 x double]* %26, i32 0, i32 2
store double 5.000000e-01, double* %29
%30 = bitcast [2 x i32]* %4 to i8*
store i32 2, i32* %7
store i32 300, i32* %8
%31 = load i32, i32* %8
%32 = zext i32 %31 to i64
%33 = call i8* @llvm.stacksave()
store i8* %33, i8** %12
%34 = alloca [3 x [3 x i32]], i64 %32
store i64 %32, i64* %13
%35 = load i32, i32* %8
%36 = zext i32 %35 to i64
%37 = alloca [3 x double], i64 %36
store i64 %36, i64* %14
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%39 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
store double 1.000000e+00, double* %39
%40 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
store double 1.000000e+00, double* %40
%41 = bitcast [3 x [3 x i32]]* %34 to i32***
%42 = bitcast [3 x double]* %37 to double**
%43 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%44 = load i32, i32* %8
%45 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %2, i64 0, i64 0
%46 = bitcast [3 x double]* %45 to double**
%47 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %3, i64 0, i64 0
%48 = bitcast [3 x double]* %47 to double**
%49 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%50 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%51 = load i32, i32* %7
%52 = call i32 @spg_get_symmetry_with_collinear_spin(i32*** %41, double** %42, i32* %43, i32 %44, double** %46, double** %48, i32* %49, double* %50, i32 %51, i32 0)
store i32 %52, i32* %11
%53 = load i32, i32* %11
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %117
55: ; preds = %0
store i32 0, i32* %9
br label %56
56: ; preds = %113, %55
%57 = load i32, i32* %9
%58 = load i32, i32* %11
%59 = icmp slt i32 %57, %58
br i1 %59, label %60, label %116
60: ; preds = %56
%61 = load i32, i32* %9
%62 = add nsw i32 %61, 1
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %62)
store i32 0, i32* %10
br label %64
64: ; preds = %93, %60
%65 = load i32, i32* %10
%66 = icmp slt i32 %65, 3
br i1 %66, label %67, label %96
67: ; preds = %64
%68 = load i32, i32* %9
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %34, i64 %69
%71 = load i32, i32* %10
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %70, i64 0, i64 %72
%74 = getelementptr inbounds [3 x i32], [3 x i32]* %73, i64 0, i64 0
%75 = load i32, i32* %74
%76 = load i32, i32* %9
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %34, i64 %77
%79 = load i32, i32* %10
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %78, i64 0, i64 %80
%82 = getelementptr inbounds [3 x i32], [3 x i32]* %81, i64 0, i64 1
%83 = load i32, i32* %82
%84 = load i32, i32* %9
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %34, i64 %85
%87 = load i32, i32* %10
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %86, i64 0, i64 %88
%90 = getelementptr inbounds [3 x i32], [3 x i32]* %89, i64 0, i64 2
%91 = load i32, i32* %90
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %75, i32 %83, i32 %91)
br label %93
93: ; preds = %67
%94 = load i32, i32* %10
%95 = add nsw i32 %94, 1
store i32 %95, i32* %10
br label %64
96: ; preds = %64
%97 = load i32, i32* %9
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 %98
%100 = getelementptr inbounds [3 x double], [3 x double]* %99, i64 0, i64 0
%101 = load double, double* %100
%102 = load i32, i32* %9
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 %103
%105 = getelementptr inbounds [3 x double], [3 x double]* %104, i64 0, i64 1
%106 = load double, double* %105
%107 = load i32, i32* %9
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 %108
%110 = getelementptr inbounds [3 x double], [3 x double]* %109, i64 0, i64 2
%111 = load double, double* %110
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), double %101, double %106, double %111)
br label %113
113: ; preds = %96
%114 = load i32, i32* %9
%115 = add nsw i32 %114, 1
store i32 %115, i32* %9
br label %56
116: ; preds = %56
br label %118
117: ; preds = %0
store i32 1, i32* %1
store i32 1, i32* %15
br label %280
118: ; preds = %116
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.4, i64 0, i64 0))
%120 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
store double 1.000000e+00, double* %120
%121 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
store double -1.000000e+00, double* %121
%122 = bitcast [3 x [3 x i32]]* %34 to i32***
%123 = bitcast [3 x double]* %37 to double**
%124 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%125 = load i32, i32* %8
%126 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %2, i64 0, i64 0
%127 = bitcast [3 x double]* %126 to double**
%128 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %3, i64 0, i64 0
%129 = bitcast [3 x double]* %128 to double**
%130 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%131 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%132 = load i32, i32* %7
%133 = call i32 @spg_get_symmetry_with_collinear_spin(i32*** %122, double** %123, i32* %124, i32 %125, double** %127, double** %129, i32* %130, double* %131, i32 %132, i32 0)
store i32 %133, i32* %11
%134 = load i32, i32* %11
%135 = icmp ne i32 %134, 0
br i1 %135, label %136, label %198
136: ; preds = %118
store i32 0, i32* %9
br label %137
137: ; preds = %194, %136
%138 = load i32, i32* %9
%139 = load i32, i32* %11
%140 = icmp slt i32 %138, %139
br i1 %140, label %141, label %197
141: ; preds = %137
%142 = load i32, i32* %9
%143 = add nsw i32 %142, 1
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %143)
store i32 0, i32* %10
br label %145
145: ; preds = %174, %141
%146 = load i32, i32* %10
%147 = icmp slt i32 %146, 3
br i1 %147, label %148, label %177
148: ; preds = %145
%149 = load i32, i32* %9
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %34, i64 %150
%152 = load i32, i32* %10
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %151, i64 0, i64 %153
%155 = getelementptr inbounds [3 x i32], [3 x i32]* %154, i64 0, i64 0
%156 = load i32, i32* %155
%157 = load i32, i32* %9
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %34, i64 %158
%160 = load i32, i32* %10
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %159, i64 0, i64 %161
%163 = getelementptr inbounds [3 x i32], [3 x i32]* %162, i64 0, i64 1
%164 = load i32, i32* %163
%165 = load i32, i32* %9
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %34, i64 %166
%168 = load i32, i32* %10
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %167, i64 0, i64 %169
%171 = getelementptr inbounds [3 x i32], [3 x i32]* %170, i64 0, i64 2
%172 = load i32, i32* %171
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %156, i32 %164, i32 %172)
br label %174
174: ; preds = %148
%175 = load i32, i32* %10
%176 = add nsw i32 %175, 1
store i32 %176, i32* %10
br label %145
177: ; preds = %145
%178 = load i32, i32* %9
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 %179
%181 = getelementptr inbounds [3 x double], [3 x double]* %180, i64 0, i64 0
%182 = load double, double* %181
%183 = load i32, i32* %9
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 %184
%186 = getelementptr inbounds [3 x double], [3 x double]* %185, i64 0, i64 1
%187 = load double, double* %186
%188 = load i32, i32* %9
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 %189
%191 = getelementptr inbounds [3 x double], [3 x double]* %190, i64 0, i64 2
%192 = load double, double* %191
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), double %182, double %187, double %192)
br label %194
194: ; preds = %177
%195 = load i32, i32* %9
%196 = add nsw i32 %195, 1
store i32 %196, i32* %9
br label %137
197: ; preds = %137
br label %199
198: ; preds = %118
store i32 1, i32* %1
store i32 1, i32* %15
br label %280
199: ; preds = %197
%200 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0))
%201 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
store double 1.000000e+00, double* %201
%202 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
store double 2.000000e+00, double* %202
%203 = bitcast [3 x [3 x i32]]* %34 to i32***
%204 = bitcast [3 x double]* %37 to double**
%205 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%206 = load i32, i32* %8
%207 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %2, i64 0, i64 0
%208 = bitcast [3 x double]* %207 to double**
%209 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %3, i64 0, i64 0
%210 = bitcast [3 x double]* %209 to double**
%211 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%212 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%213 = load i32, i32* %7
%214 = call i32 @spg_get_symmetry_with_collinear_spin(i32*** %203, double** %204, i32* %205, i32 %206, double** %208, double** %210, i32* %211, double* %212, i32 %213, i32 0)
store i32 %214, i32* %11
%215 = load i32, i32* %11
%216 = icmp ne i32 %215, 0
br i1 %216, label %217, label %279
217: ; preds = %199
store i32 0, i32* %9
br label %218
218: ; preds = %275, %217
%219 = load i32, i32* %9
%220 = load i32, i32* %11
%221 = icmp slt i32 %219, %220
br i1 %221, label %222, label %278
222: ; preds = %218
%223 = load i32, i32* %9
%224 = add nsw i32 %223, 1
%225 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %224)
store i32 0, i32* %10
br label %226
226: ; preds = %255, %222
%227 = load i32, i32* %10
%228 = icmp slt i32 %227, 3
br i1 %228, label %229, label %258
229: ; preds = %226
%230 = load i32, i32* %9
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %34, i64 %231
%233 = load i32, i32* %10
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %232, i64 0, i64 %234
%236 = getelementptr inbounds [3 x i32], [3 x i32]* %235, i64 0, i64 0
%237 = load i32, i32* %236
%238 = load i32, i32* %9
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %34, i64 %239
%241 = load i32, i32* %10
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %240, i64 0, i64 %242
%244 = getelementptr inbounds [3 x i32], [3 x i32]* %243, i64 0, i64 1
%245 = load i32, i32* %244
%246 = load i32, i32* %9
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %34, i64 %247
%249 = load i32, i32* %10
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %248, i64 0, i64 %250
%252 = getelementptr inbounds [3 x i32], [3 x i32]* %251, i64 0, i64 2
%253 = load i32, i32* %252
%254 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %237, i32 %245, i32 %253)
br label %255
255: ; preds = %229
%256 = load i32, i32* %10
%257 = add nsw i32 %256, 1
store i32 %257, i32* %10
br label %226
258: ; preds = %226
%259 = load i32, i32* %9
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 %260
%262 = getelementptr inbounds [3 x double], [3 x double]* %261, i64 0, i64 0
%263 = load double, double* %262
%264 = load i32, i32* %9
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 %265
%267 = getelementptr inbounds [3 x double], [3 x double]* %266, i64 0, i64 1
%268 = load double, double* %267
%269 = load i32, i32* %9
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 %270
%272 = getelementptr inbounds [3 x double], [3 x double]* %271, i64 0, i64 2
%273 = load double, double* %272
%274 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), double %263, double %268, double %273)
br label %275
275: ; preds = %258
%276 = load i32, i32* %9
%277 = add nsw i32 %276, 1
store i32 %277, i32* %9
br label %218
278: ; preds = %218
store i32 0, i32* %1
store i32 1, i32* %15
br label %280
279: ; preds = %199
store i32 1, i32* %1
store i32 1, i32* %15
br label %280
280: ; preds = %279, %278, %198, %117
%281 = load i8*, i8** %12
%282 = load i32, i32* %1
ret i32 %282
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"--- %d ---\0A\00"
@.str.2 = [13 x i8] c"%2d %2d %2d\0A\00"
@.str.3 = [10 x i8] c"%f %f %f\0A\00"
@str = [48 x i8] c"*** spg_get_symmetry_with_spin (BCC ferro) ***:\00"
@str.6 = [63 x i8] c"*** Example of spg_get_symmetry_with_spin (BCC antiferro) ***:\00"
@str.7 = [54 x i8] c"*** spg_get_symmetry_with_spin (BCC broken spin) ***:\00"
define i32 @test_spg_get_symmetry_with_collinear_spin() {
%1 = alloca [3 x [3 x double]]
%2 = alloca [2 x [3 x double]]
%3 = alloca i64
%4 = alloca [2 x i32]
%5 = alloca <2 x double>
%6 = bitcast [3 x [3 x double]]* %1 to i8*
%7 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %1, i64 0, i64 0, i64 0
store double 4.000000e+00, double* %7
%8 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %1, i64 0, i64 1, i64 1
store double 4.000000e+00, double* %8
%9 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %1, i64 0, i64 2, i64 2
store double 4.000000e+00, double* %9
%10 = bitcast [2 x [3 x double]]* %2 to i8*
%11 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %2, i64 0, i64 1, i64 0
%12 = bitcast double* %11 to <2 x double>*
store <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double>* %12
%13 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %2, i64 0, i64 1, i64 2
store double 5.000000e-01, double* %13
%14 = bitcast i64* %3 to i8*
store i64 4294967297, i64* %3
%15 = bitcast [2 x i32]* %4 to i8*
%16 = bitcast <2 x double>* %5 to i8*
%17 = tail call i8* @llvm.stacksave()
%18 = alloca [300 x [3 x [3 x i32]]]
%19 = alloca [300 x [3 x double]]
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%21 = getelementptr inbounds <2 x double>, <2 x double>* %5, i64 0, i64 0
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %5
%22 = bitcast [300 x [3 x [3 x i32]]]* %18 to i32***
%23 = bitcast [300 x [3 x double]]* %19 to double**
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%25 = bitcast [3 x [3 x double]]* %1 to double**
%26 = bitcast [2 x [3 x double]]* %2 to double**
%27 = bitcast i64* %3 to i32*
%28 = call i32 @spg_get_symmetry_with_collinear_spin(i32*** %22, double** %23, i32* %24, i32 300, double** %25, double** %26, i32* %27, double* %21, i32 2, i32 0)
%29 = icmp eq i32 %28, 0
br i1 %29, label %152, label %30
30: ; preds = %0
%31 = icmp sgt i32 %28, 0
br i1 %31, label %32, label %68
32: ; preds = %30
%33 = zext i32 %28 to i64
br label %34
34: ; preds = %32, %34
%35 = phi i64 [ 0, %32 ], [ %36, %34 ]
%36 = add nuw nsw i64 %35, 1
%37 = trunc i64 %36 to i32
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %35, i64 0, i64 0
%40 = load i32, i32* %39
%41 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %35, i64 0, i64 1
%42 = load i32, i32* %41
%43 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %35, i64 0, i64 2
%44 = load i32, i32* %43
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %40, i32 %42, i32 %44)
%46 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %35, i64 1, i64 0
%47 = load i32, i32* %46
%48 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %35, i64 1, i64 1
%49 = load i32, i32* %48
%50 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %35, i64 1, i64 2
%51 = load i32, i32* %50
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %47, i32 %49, i32 %51)
%53 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %35, i64 2, i64 0
%54 = load i32, i32* %53
%55 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %35, i64 2, i64 1
%56 = load i32, i32* %55
%57 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %35, i64 2, i64 2
%58 = load i32, i32* %57
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %54, i32 %56, i32 %58)
%60 = getelementptr inbounds [300 x [3 x double]], [300 x [3 x double]]* %19, i64 0, i64 %35, i64 0
%61 = load double, double* %60
%62 = getelementptr inbounds [300 x [3 x double]], [300 x [3 x double]]* %19, i64 0, i64 %35, i64 1
%63 = load double, double* %62
%64 = getelementptr inbounds [300 x [3 x double]], [300 x [3 x double]]* %19, i64 0, i64 %35, i64 2
%65 = load double, double* %64
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), double %61, double %63, double %65)
%67 = icmp eq i64 %36, %33
br i1 %67, label %68, label %34
68: ; preds = %34, %30
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.6, i64 0, i64 0))
store <2 x double> <double 1.000000e+00, double -1.000000e+00>, <2 x double>* %5
%70 = call i32 @spg_get_symmetry_with_collinear_spin(i32*** %22, double** %23, i32* %24, i32 300, double** %25, double** %26, i32* %27, double* %21, i32 2, i32 0)
%71 = icmp eq i32 %70, 0
br i1 %71, label %152, label %72
72: ; preds = %68
%73 = icmp sgt i32 %70, 0
br i1 %73, label %74, label %110
74: ; preds = %72
%75 = zext i32 %70 to i64
br label %76
76: ; preds = %74, %76
%77 = phi i64 [ 0, %74 ], [ %78, %76 ]
%78 = add nuw nsw i64 %77, 1
%79 = trunc i64 %78 to i32
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %79)
%81 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %77, i64 0, i64 0
%82 = load i32, i32* %81
%83 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %77, i64 0, i64 1
%84 = load i32, i32* %83
%85 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %77, i64 0, i64 2
%86 = load i32, i32* %85
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %82, i32 %84, i32 %86)
%88 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %77, i64 1, i64 0
%89 = load i32, i32* %88
%90 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %77, i64 1, i64 1
%91 = load i32, i32* %90
%92 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %77, i64 1, i64 2
%93 = load i32, i32* %92
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %89, i32 %91, i32 %93)
%95 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %77, i64 2, i64 0
%96 = load i32, i32* %95
%97 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %77, i64 2, i64 1
%98 = load i32, i32* %97
%99 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %77, i64 2, i64 2
%100 = load i32, i32* %99
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %96, i32 %98, i32 %100)
%102 = getelementptr inbounds [300 x [3 x double]], [300 x [3 x double]]* %19, i64 0, i64 %77, i64 0
%103 = load double, double* %102
%104 = getelementptr inbounds [300 x [3 x double]], [300 x [3 x double]]* %19, i64 0, i64 %77, i64 1
%105 = load double, double* %104
%106 = getelementptr inbounds [300 x [3 x double]], [300 x [3 x double]]* %19, i64 0, i64 %77, i64 2
%107 = load double, double* %106
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), double %103, double %105, double %107)
%109 = icmp eq i64 %78, %75
br i1 %109, label %110, label %76
110: ; preds = %76, %72
%111 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.7, i64 0, i64 0))
store <2 x double> <double 1.000000e+00, double 2.000000e+00>, <2 x double>* %5
%112 = call i32 @spg_get_symmetry_with_collinear_spin(i32*** %22, double** %23, i32* %24, i32 300, double** %25, double** %26, i32* %27, double* %21, i32 2, i32 0)
%113 = icmp eq i32 %112, 0
br i1 %113, label %152, label %114
114: ; preds = %110
%115 = icmp sgt i32 %112, 0
br i1 %115, label %116, label %152
116: ; preds = %114
%117 = zext i32 %112 to i64
br label %118
118: ; preds = %116, %118
%119 = phi i64 [ 0, %116 ], [ %120, %118 ]
%120 = add nuw nsw i64 %119, 1
%121 = trunc i64 %120 to i32
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %121)
%123 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %119, i64 0, i64 0
%124 = load i32, i32* %123
%125 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %119, i64 0, i64 1
%126 = load i32, i32* %125
%127 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %119, i64 0, i64 2
%128 = load i32, i32* %127
%129 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %124, i32 %126, i32 %128)
%130 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %119, i64 1, i64 0
%131 = load i32, i32* %130
%132 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %119, i64 1, i64 1
%133 = load i32, i32* %132
%134 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %119, i64 1, i64 2
%135 = load i32, i32* %134
%136 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %131, i32 %133, i32 %135)
%137 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %119, i64 2, i64 0
%138 = load i32, i32* %137
%139 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %119, i64 2, i64 1
%140 = load i32, i32* %139
%141 = getelementptr inbounds [300 x [3 x [3 x i32]]], [300 x [3 x [3 x i32]]]* %18, i64 0, i64 %119, i64 2, i64 2
%142 = load i32, i32* %141
%143 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %138, i32 %140, i32 %142)
%144 = getelementptr inbounds [300 x [3 x double]], [300 x [3 x double]]* %19, i64 0, i64 %119, i64 0
%145 = load double, double* %144
%146 = getelementptr inbounds [300 x [3 x double]], [300 x [3 x double]]* %19, i64 0, i64 %119, i64 1
%147 = load double, double* %146
%148 = getelementptr inbounds [300 x [3 x double]], [300 x [3 x double]]* %19, i64 0, i64 %119, i64 2
%149 = load double, double* %148
%150 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), double %145, double %147, double %149)
%151 = icmp eq i64 %120, %117
br i1 %151, label %152, label %118
152: ; preds = %118, %114, %110, %68, %0
%153 = phi i32 [ 1, %0 ], [ 1, %68 ], [ 1, %110 ], [ 0, %114 ], [ 0, %118 ]
ret i32 %153
}