#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(int ***, double **, int, double **, double **, int *, int,
                     int);
int test_spg_get_symmetry(void) {
  double lattice[3][3] = {{4, 0, 0}, {0, 4, 0}, {0, 0, 3}};
  double position[][3] = {{0, 0, 0},       {0.5, 0.5, 0.25}, {0.3, 0.3, 0},
                          {0.7, 0.7, 0},   {0.2, 0.8, 0.25}, {0.8, 0.2, 0.25},
                          {0, 0, 0.5},     {0.5, 0.5, 0.75}, {0.3, 0.3, 0.5},
                          {0.7, 0.7, 0.5}, {0.2, 0.8, 0.75}, {0.8, 0.2, 0.75}};
  int types[] = {1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2};
  int num_atom = 12;
  int max_size = 50;
  int i, j, size;
  int rotation[max_size][3][3];
  double translation[max_size][3];
  double origin_shift[3] = {0.1, 0.1, 0};
  for (i = 0; i < num_atom; i++) {
    for (j = 0; j < 3; j++) {
      position[i][j] += origin_shift[j];
    }
  }
  printf("*** spg_get_symmetry (Rutile two unit cells) ***:\n");
  size = spg_get_symmetry(rotation, translation, max_size, lattice, position,
                          types, 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>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,-0x20(%rbp)
movaps %xmm0,-0x30(%rbp)
movaps %xmm0,-0x40(%rbp)
movaps %xmm0,-0x50(%rbp)
movq   $0x0,-0x10(%rbp)
movabs $0x4010000000000000,%rax
mov    %rax,-0x50(%rbp)
mov    %rax,-0x30(%rbp)
movabs $0x4008000000000000,%rax
mov    %rax,-0x10(%rbp)
lea    0xe83(%rip),%rsi
lea    -0x170(%rbp),%rdi
mov    $0x120,%edx
call   1050 <memcpy@plt>
movaps 0xfab(%rip),%xmm0
movaps %xmm0,-0x180(%rbp)
movaps 0xf8d(%rip),%xmm0
movaps %xmm0,-0x190(%rbp)
movaps 0xf6f(%rip),%xmm0
movaps %xmm0,-0x1a0(%rbp)
movl   $0xc,-0x1a4(%rbp)
movl   $0x32,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x1c0(%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,-0x208(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x1c8(%rbp)
mov    -0x1a8(%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,-0x200(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x1d0(%rbp)
mov    0xf07(%rip),%rax
mov    %rax,-0x1f0(%rbp)
mov    0xf01(%rip),%rax
mov    %rax,-0x1e8(%rbp)
mov    0xefb(%rip),%rax
mov    %rax,-0x1e0(%rbp)
movl   $0x0,-0x1ac(%rbp)
mov    -0x1ac(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jge    1302 <test_spg_get_symmetry+0x1d2>
movl   $0x0,-0x1b0(%rbp)
cmpl   $0x3,-0x1b0(%rbp)
jge    12e9 <test_spg_get_symmetry+0x1b9>
movslq -0x1b0(%rbp),%rax
movsd  -0x1f0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x1ac(%rbp),%rcx
lea    -0x170(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x1b0(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1b0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b0(%rbp)
jmp    1292 <test_spg_get_symmetry+0x162>
jmp    12ee <test_spg_get_symmetry+0x1be>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    1276 <test_spg_get_symmetry+0x146>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x208(%rbp),%rdi
mov    -0x200(%rbp),%rsi
mov    -0x1a8(%rbp),%edx
lea    -0x50(%rbp),%rcx
lea    -0x170(%rbp),%r8
lea    -0x1a0(%rbp),%r9
mov    -0x1a4(%rbp),%eax
xor    %r10d,%r10d
sub    $0x10,%rsp
mov    %eax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1040 <spg_get_symmetry@plt>
add    $0x10,%rsp
mov    %eax,-0x1b4(%rbp)
cmpl   $0x0,-0x1b4(%rbp)
je     14bc <test_spg_get_symmetry+0x38c>
movl   $0x0,-0x1ac(%rbp)
mov    -0x1ac(%rbp),%eax
cmp    -0x1b4(%rbp),%eax
jge    14a6 <test_spg_get_symmetry+0x376>
mov    -0x1ac(%rbp),%esi
add    $0x1,%esi
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1b0(%rbp)
cmpl   $0x3,-0x1b0(%rbp)
jge    143f <test_spg_get_symmetry+0x30f>
mov    -0x208(%rbp),%rax
movslq -0x1ac(%rbp),%rcx
imul   $0x24,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movslq -0x1b0(%rbp),%rdx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
mov    (%rcx),%esi
movslq -0x1ac(%rbp),%rcx
imul   $0x24,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movslq -0x1b0(%rbp),%rdx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
mov    0x4(%rcx),%edx
movslq -0x1ac(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x1b0(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%ecx
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1b0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b0(%rbp)
jmp    13a7 <test_spg_get_symmetry+0x277>
mov    -0x200(%rbp),%rax
movslq -0x1ac(%rbp),%rcx
imul   $0x18,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movsd  (%rcx),%xmm0
movslq -0x1ac(%rbp),%rcx
imul   $0x18,%rcx,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
movsd  0x8(%rcx),%xmm1
movslq -0x1ac(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
lea    0xd29(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    1374 <test_spg_get_symmetry+0x244>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x1f4(%rbp)
jmp    14cd <test_spg_get_symmetry+0x39d>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x1f4(%rbp)
mov    -0x1c0(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_spg_get_symmetry>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd78,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x140(%rsp)
movabs $0x4010000000000000,%rax
mov    %rax,0x130(%rsp)
mov    %rax,0x150(%rsp)
movabs $0x4008000000000000,%rax
mov    %rax,0x170(%rsp)
lea    0xe69(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    $0x120,%edx
mov    %rbx,%rdi
call   1060 <memcpy@plt>
mov    %rsp,%rbp
movaps 0xf8d(%rip),%xmm0
movaps %xmm0,0x1a0(%rsp)
movaps 0xf6e(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
movaps 0xf4f(%rip),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
movsd  0x20(%rsp),%xmm4
movhpd 0x28(%rsp),%xmm2
movapd 0xdff(%rip),%xmm0
addpd  %xmm0,%xmm2
movhpd 0x30(%rsp),%xmm3
addpd  %xmm0,%xmm3
movhpd 0x38(%rsp),%xmm4
xorpd  %xmm6,%xmm6
addpd  %xmm6,%xmm4
movapd %xmm2,%xmm5
unpcklpd %xmm3,%xmm5
movsd  %xmm4,%xmm2
movhlps %xmm3,%xmm4
movsd  0x40(%rsp),%xmm3
movaps %xmm4,0x30(%rsp)
movapd %xmm2,0x20(%rsp)
movapd %xmm5,0x10(%rsp)
movhpd 0x58(%rsp),%xmm3
movaps %xmm1,0x180(%rsp)
movsd  0x48(%rsp),%xmm1
movhpd 0x60(%rsp),%xmm1
addpd  %xmm0,%xmm3
movsd  0x50(%rsp),%xmm2
movhpd 0x68(%rsp),%xmm2
addpd  %xmm0,%xmm1
addpd  %xmm6,%xmm2
xorpd  %xmm5,%xmm5
movapd %xmm1,%xmm4
unpckhpd %xmm2,%xmm4
shufpd $0x2,%xmm3,%xmm2
unpcklpd %xmm1,%xmm3
movapd %xmm3,0x40(%rsp)
movapd %xmm2,0x50(%rsp)
movapd %xmm4,0x60(%rsp)
movsd  0x70(%rsp),%xmm1
movhpd 0x88(%rsp),%xmm1
addpd  %xmm0,%xmm1
movsd  0x78(%rsp),%xmm2
movhpd 0x90(%rsp),%xmm2
addpd  %xmm0,%xmm2
movsd  0x80(%rsp),%xmm3
movhpd 0x98(%rsp),%xmm3
addpd  %xmm5,%xmm3
movapd %xmm2,%xmm4
unpckhpd %xmm3,%xmm4
shufpd $0x2,%xmm1,%xmm3
unpcklpd %xmm2,%xmm1
movapd %xmm1,0x70(%rsp)
movapd %xmm3,0x80(%rsp)
movapd %xmm4,0x90(%rsp)
movsd  0xa0(%rsp),%xmm1
movsd  0xa8(%rsp),%xmm2
movsd  0xb0(%rsp),%xmm3
movhpd 0xb8(%rsp),%xmm1
addpd  %xmm0,%xmm1
movhpd 0xc0(%rsp),%xmm2
movhpd 0xc8(%rsp),%xmm3
addpd  %xmm0,%xmm2
addpd  %xmm5,%xmm3
movapd %xmm1,%xmm4
unpcklpd %xmm2,%xmm4
movsd  %xmm3,%xmm1
movhlps %xmm2,%xmm3
movaps %xmm3,0xc0(%rsp)
movapd %xmm1,0xb0(%rsp)
movapd %xmm4,0xa0(%rsp)
movsd  0xd0(%rsp),%xmm1
movsd  0xd8(%rsp),%xmm2
movhpd 0xe8(%rsp),%xmm1
movsd  0xe0(%rsp),%xmm3
addpd  %xmm0,%xmm1
movhpd 0xf0(%rsp),%xmm2
addpd  %xmm0,%xmm2
movhpd 0xf8(%rsp),%xmm3
addpd  %xmm5,%xmm3
movapd %xmm1,%xmm4
unpcklpd %xmm2,%xmm4
movsd  %xmm3,%xmm1
movhlps %xmm2,%xmm3
movaps %xmm3,0xf0(%rsp)
movapd %xmm1,0xe0(%rsp)
movapd %xmm4,0xd0(%rsp)
movsd  0x100(%rsp),%xmm1
movsd  0x108(%rsp),%xmm2
movsd  0x110(%rsp),%xmm3
movhpd 0x118(%rsp),%xmm1
addpd  %xmm0,%xmm1
movhpd 0x120(%rsp),%xmm2
movhpd 0x128(%rsp),%xmm3
addpd  %xmm0,%xmm2
addpd  %xmm5,%xmm3
movapd %xmm1,%xmm0
unpcklpd %xmm2,%xmm0
movsd  %xmm3,%xmm1
movhlps %xmm2,%xmm3
movaps %xmm3,0x120(%rsp)
movapd %xmm1,0x110(%rsp)
movapd %xmm0,0x100(%rsp)
lea    0xd3a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1b0(%rsp),%rdi
lea    0x8c0(%rsp),%rsi
lea    0x130(%rsp),%rcx
lea    0x180(%rsp),%r9
mov    $0x32,%edx
mov    %rbx,%r8
push   $0x0
push   $0xc
call   1050 <spg_get_symmetry@plt>
add    $0x10,%rsp
test   %eax,%eax
je     156f <test_spg_get_symmetry+0x42f>
jle    156b <test_spg_get_symmetry+0x42b>
mov    %rbp,0x8(%rsp)
mov    %eax,%eax
lea    0x8d0(%rsp),%r13
shl    $0x2,%rax
lea    (%rax,%rax,8),%r14
mov    $0x1,%ebp
lea    0xcb8(%rip),%rbx
lea    0xcbe(%rip),%r12
xor    %r15d,%r15d
xchg   %ax,%ax
lea    0xc99(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1b0(%rsp,%r15,1),%esi
mov    0x1b4(%rsp,%r15,1),%edx
mov    0x1b8(%rsp,%r15,1),%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1bc(%rsp,%r15,1),%esi
mov    0x1c0(%rsp,%r15,1),%edx
mov    0x1c4(%rsp,%r15,1),%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c8(%rsp,%r15,1),%esi
mov    0x1cc(%rsp,%r15,1),%edx
mov    0x1d0(%rsp,%r15,1),%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  -0x10(%r13),%xmm0
movsd  -0x8(%r13),%xmm1
movsd  0x0(%r13),%xmm2
mov    %r12,%rdi
mov    $0x3,%al
call   1040 <printf@plt>
add    $0x18,%r13
add    $0x24,%r15
add    $0x1,%ebp
cmp    %r15,%r14
jne    14c0 <test_spg_get_symmetry+0x380>
mov    0x8(%rsp),%rbp
xor    %eax,%eax
jmp    1574 <test_spg_get_symmetry+0x434>
mov    $0x1,%eax
mov    %rbp,%rsp
add    $0xd78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.test_spg_get_symmetry.position = [12 x [3 x double]] [[3 x double] zeroinitializer, [3 x double] [double 5.000000e-01, double 5.000000e-01, double 2.500000e-01], [3 x double] [double 3.000000e-01, double 3.000000e-01, double 0.000000e+00], [3 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 0.000000e+00], [3 x double] [double 2.000000e-01, double 8.000000e-01, double 2.500000e-01], [3 x double] [double 8.000000e-01, double 2.000000e-01, double 2.500000e-01], [3 x double] [double 0.000000e+00, double 0.000000e+00, double 5.000000e-01], [3 x double] [double 5.000000e-01, double 5.000000e-01, double 7.500000e-01], [3 x double] [double 3.000000e-01, double 3.000000e-01, double 5.000000e-01], [3 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 5.000000e-01], [3 x double] [double 2.000000e-01, double 8.000000e-01, double 7.500000e-01], [3 x double] [double 8.000000e-01, double 2.000000e-01, double 7.500000e-01]]
@__const.test_spg_get_symmetry.types = [12 x i32] [i32 1, i32 1, i32 2, i32 2, i32 2, i32 2, i32 1, i32 1, i32 2, i32 2, i32 2, i32 2]
@__const.test_spg_get_symmetry.origin_shift = [3 x double] [double 1.000000e-01, double 1.000000e-01, double 0.000000e+00]
@.str = [51 x i8] c"*** spg_get_symmetry (Rutile two unit cells) ***:\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"
define i32 @test_spg_get_symmetry() {
%1 = alloca i32
%2 = alloca [3 x [3 x double]]
%3 = alloca [12 x [3 x double]]
%4 = alloca [12 x i32]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i64
%13 = alloca [3 x double]
%14 = alloca i32
%15 = bitcast [3 x [3 x double]]* %2 to i8*
%16 = bitcast i8* %15 to [3 x [3 x double]]*
%17 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %16, i32 0, i32 0
%18 = getelementptr inbounds [3 x double], [3 x double]* %17, i32 0, i32 0
store double 4.000000e+00, double* %18
%19 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %16, i32 0, i32 1
%20 = getelementptr inbounds [3 x double], [3 x double]* %19, i32 0, i32 1
store double 4.000000e+00, double* %20
%21 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %16, i32 0, i32 2
%22 = getelementptr inbounds [3 x double], [3 x double]* %21, i32 0, i32 2
store double 3.000000e+00, double* %22
%23 = bitcast [12 x [3 x double]]* %3 to i8*
%24 = bitcast [12 x i32]* %4 to i8*
store i32 12, i32* %5
store i32 50, i32* %6
%25 = load i32, i32* %6
%26 = zext i32 %25 to i64
%27 = call i8* @llvm.stacksave()
store i8* %27, i8** %10
%28 = alloca [3 x [3 x i32]], i64 %26
store i64 %26, i64* %11
%29 = load i32, i32* %6
%30 = zext i32 %29 to i64
%31 = alloca [3 x double], i64 %30
store i64 %30, i64* %12
%32 = bitcast [3 x double]* %13 to i8*
store i32 0, i32* %7
br label %33
33: ; preds = %58, %0
%34 = load i32, i32* %7
%35 = load i32, i32* %5
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %61
37: ; preds = %33
store i32 0, i32* %8
br label %38
38: ; preds = %54, %37
%39 = load i32, i32* %8
%40 = icmp slt i32 %39, 3
br i1 %40, label %41, label %57
41: ; preds = %38
%42 = load i32, i32* %8
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 %43
%45 = load double, double* %44
%46 = load i32, i32* %7
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %3, i64 0, i64 %47
%49 = load i32, i32* %8
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [3 x double], [3 x double]* %48, i64 0, i64 %50
%52 = load double, double* %51
%53 = fadd double %52, %45
store double %53, double* %51
br label %54
54: ; preds = %41
%55 = load i32, i32* %8
%56 = add nsw i32 %55, 1
store i32 %56, i32* %8
br label %38
57: ; preds = %38
br label %58
58: ; preds = %57
%59 = load i32, i32* %7
%60 = add nsw i32 %59, 1
store i32 %60, i32* %7
br label %33
61: ; preds = %33
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%63 = bitcast [3 x [3 x i32]]* %28 to i32***
%64 = bitcast [3 x double]* %31 to double**
%65 = load i32, i32* %6
%66 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %2, i64 0, i64 0
%67 = bitcast [3 x double]* %66 to double**
%68 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %3, i64 0, i64 0
%69 = bitcast [3 x double]* %68 to double**
%70 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 0
%71 = load i32, i32* %5
%72 = call i32 @spg_get_symmetry(i32*** %63, double** %64, i32 %65, double** %67, double** %69, i32* %70, i32 %71, i32 0)
store i32 %72, i32* %9
%73 = load i32, i32* %9
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %137
75: ; preds = %61
store i32 0, i32* %7
br label %76
76: ; preds = %133, %75
%77 = load i32, i32* %7
%78 = load i32, i32* %9
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %136
80: ; preds = %76
%81 = load i32, i32* %7
%82 = add nsw i32 %81, 1
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %82)
store i32 0, i32* %8
br label %84
84: ; preds = %113, %80
%85 = load i32, i32* %8
%86 = icmp slt i32 %85, 3
br i1 %86, label %87, label %116
87: ; preds = %84
%88 = load i32, i32* %7
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %28, i64 %89
%91 = load i32, i32* %8
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %90, i64 0, i64 %92
%94 = getelementptr inbounds [3 x i32], [3 x i32]* %93, i64 0, i64 0
%95 = load i32, i32* %94
%96 = load i32, i32* %7
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %28, i64 %97
%99 = load i32, i32* %8
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %98, i64 0, i64 %100
%102 = getelementptr inbounds [3 x i32], [3 x i32]* %101, i64 0, i64 1
%103 = load i32, i32* %102
%104 = load i32, i32* %7
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %28, i64 %105
%107 = load i32, i32* %8
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %106, i64 0, i64 %108
%110 = getelementptr inbounds [3 x i32], [3 x i32]* %109, i64 0, i64 2
%111 = load i32, i32* %110
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %95, i32 %103, i32 %111)
br label %113
113: ; preds = %87
%114 = load i32, i32* %8
%115 = add nsw i32 %114, 1
store i32 %115, i32* %8
br label %84
116: ; preds = %84
%117 = load i32, i32* %7
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [3 x double], [3 x double]* %31, i64 %118
%120 = getelementptr inbounds [3 x double], [3 x double]* %119, i64 0, i64 0
%121 = load double, double* %120
%122 = load i32, i32* %7
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [3 x double], [3 x double]* %31, i64 %123
%125 = getelementptr inbounds [3 x double], [3 x double]* %124, i64 0, i64 1
%126 = load double, double* %125
%127 = load i32, i32* %7
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [3 x double], [3 x double]* %31, i64 %128
%130 = getelementptr inbounds [3 x double], [3 x double]* %129, i64 0, i64 2
%131 = load double, double* %130
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), double %121, double %126, double %131)
br label %133
133: ; preds = %116
%134 = load i32, i32* %7
%135 = add nsw i32 %134, 1
store i32 %135, i32* %7
br label %76
136: ; preds = %76
store i32 0, i32* %1
store i32 1, i32* %14
br label %138
137: ; preds = %61
store i32 1, i32* %1
store i32 1, i32* %14
br label %138
138: ; preds = %137, %136
%139 = load i8*, i8** %10
%140 = load i32, i32* %1
ret i32 %140
}

LLVM IR (-O2):
@__const.test_spg_get_symmetry.position = [12 x [3 x double]] [[3 x double] zeroinitializer, [3 x double] [double 5.000000e-01, double 5.000000e-01, double 2.500000e-01], [3 x double] [double 3.000000e-01, double 3.000000e-01, double 0.000000e+00], [3 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 0.000000e+00], [3 x double] [double 2.000000e-01, double 8.000000e-01, double 2.500000e-01], [3 x double] [double 8.000000e-01, double 2.000000e-01, double 2.500000e-01], [3 x double] [double 0.000000e+00, double 0.000000e+00, double 5.000000e-01], [3 x double] [double 5.000000e-01, double 5.000000e-01, double 7.500000e-01], [3 x double] [double 3.000000e-01, double 3.000000e-01, double 5.000000e-01], [3 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 5.000000e-01], [3 x double] [double 2.000000e-01, double 8.000000e-01, double 7.500000e-01], [3 x double] [double 8.000000e-01, double 2.000000e-01, double 7.500000e-01]]
@__const.test_spg_get_symmetry.types = [12 x i32] [i32 1, i32 1, i32 2, i32 2, i32 2, i32 2, i32 1, i32 1, i32 2, i32 2, i32 2, i32 2]
@.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 = [50 x i8] c"*** spg_get_symmetry (Rutile two unit cells) ***:\00"
define i32 @test_spg_get_symmetry() {
%1 = alloca [3 x [3 x double]]
%2 = alloca [12 x [3 x double]]
%3 = alloca [12 x i32]
%4 = bitcast [3 x [3 x double]]* %1 to i8*
%5 = 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* %5
%6 = 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* %6
%7 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %1, i64 0, i64 2, i64 2
store double 3.000000e+00, double* %7
%8 = bitcast [12 x [3 x double]]* %2 to i8*
%9 = bitcast [12 x i32]* %3 to i8*
%10 = tail call i8* @llvm.stacksave()
%11 = alloca [50 x [3 x [3 x i32]]]
%12 = alloca [50 x [3 x double]]
%13 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 0, i64 0
%14 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 1, i64 0
%15 = load double, double* %13
%16 = load double, double* %14
%17 = insertelement <2 x double> poison, double %15, i64 0
%18 = insertelement <2 x double> %17, double %16, i64 1
%19 = fadd <2 x double> %18, <double 1.000000e-01, double 1.000000e-01>
%20 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 0, i64 1
%21 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 1, i64 1
%22 = load double, double* %20
%23 = load double, double* %21
%24 = insertelement <2 x double> poison, double %22, i64 0
%25 = insertelement <2 x double> %24, double %23, i64 1
%26 = fadd <2 x double> %25, <double 1.000000e-01, double 1.000000e-01>
%27 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 0, i64 2
%28 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 1, i64 2
%29 = load double, double* %27
%30 = load double, double* %28
%31 = insertelement <2 x double> poison, double %29, i64 0
%32 = insertelement <2 x double> %31, double %30, i64 1
%33 = fadd <2 x double> %32, zeroinitializer
%34 = bitcast [12 x [3 x double]]* %2 to <6 x double>*
%35 = shufflevector <2 x double> %19, <2 x double> %26, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%36 = shufflevector <2 x double> %33, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%37 = shufflevector <4 x double> %35, <4 x double> %36, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
store <6 x double> %37, <6 x double>* %34
%38 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 2, i64 0
%39 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 3, i64 0
%40 = load double, double* %38
%41 = load double, double* %39
%42 = insertelement <2 x double> poison, double %40, i64 0
%43 = insertelement <2 x double> %42, double %41, i64 1
%44 = fadd <2 x double> %43, <double 1.000000e-01, double 1.000000e-01>
%45 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 2, i64 1
%46 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 3, i64 1
%47 = load double, double* %45
%48 = load double, double* %46
%49 = insertelement <2 x double> poison, double %47, i64 0
%50 = insertelement <2 x double> %49, double %48, i64 1
%51 = fadd <2 x double> %50, <double 1.000000e-01, double 1.000000e-01>
%52 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 2, i64 2
%53 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 3, i64 2
%54 = load double, double* %52
%55 = load double, double* %53
%56 = insertelement <2 x double> poison, double %54, i64 0
%57 = insertelement <2 x double> %56, double %55, i64 1
%58 = fadd <2 x double> %57, zeroinitializer
%59 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 2, i64 0
%60 = bitcast double* %59 to <6 x double>*
%61 = shufflevector <2 x double> %44, <2 x double> %51, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%62 = shufflevector <2 x double> %58, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%63 = shufflevector <4 x double> %61, <4 x double> %62, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
store <6 x double> %63, <6 x double>* %60
%64 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 4, i64 0
%65 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 5, i64 0
%66 = load double, double* %64
%67 = load double, double* %65
%68 = insertelement <2 x double> poison, double %66, i64 0
%69 = insertelement <2 x double> %68, double %67, i64 1
%70 = fadd <2 x double> %69, <double 1.000000e-01, double 1.000000e-01>
%71 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 4, i64 1
%72 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 5, i64 1
%73 = load double, double* %71
%74 = load double, double* %72
%75 = insertelement <2 x double> poison, double %73, i64 0
%76 = insertelement <2 x double> %75, double %74, i64 1
%77 = fadd <2 x double> %76, <double 1.000000e-01, double 1.000000e-01>
%78 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 4, i64 2
%79 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 5, i64 2
%80 = load double, double* %78
%81 = load double, double* %79
%82 = insertelement <2 x double> poison, double %80, i64 0
%83 = insertelement <2 x double> %82, double %81, i64 1
%84 = fadd <2 x double> %83, zeroinitializer
%85 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 4, i64 0
%86 = bitcast double* %85 to <6 x double>*
%87 = shufflevector <2 x double> %70, <2 x double> %77, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%88 = shufflevector <2 x double> %84, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%89 = shufflevector <4 x double> %87, <4 x double> %88, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
store <6 x double> %89, <6 x double>* %86
%90 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 6, i64 0
%91 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 7, i64 0
%92 = load double, double* %90
%93 = load double, double* %91
%94 = insertelement <2 x double> poison, double %92, i64 0
%95 = insertelement <2 x double> %94, double %93, i64 1
%96 = fadd <2 x double> %95, <double 1.000000e-01, double 1.000000e-01>
%97 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 6, i64 1
%98 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 7, i64 1
%99 = load double, double* %97
%100 = load double, double* %98
%101 = insertelement <2 x double> poison, double %99, i64 0
%102 = insertelement <2 x double> %101, double %100, i64 1
%103 = fadd <2 x double> %102, <double 1.000000e-01, double 1.000000e-01>
%104 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 6, i64 2
%105 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 7, i64 2
%106 = load double, double* %104
%107 = load double, double* %105
%108 = insertelement <2 x double> poison, double %106, i64 0
%109 = insertelement <2 x double> %108, double %107, i64 1
%110 = fadd <2 x double> %109, zeroinitializer
%111 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 6, i64 0
%112 = bitcast double* %111 to <6 x double>*
%113 = shufflevector <2 x double> %96, <2 x double> %103, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%114 = shufflevector <2 x double> %110, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%115 = shufflevector <4 x double> %113, <4 x double> %114, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
store <6 x double> %115, <6 x double>* %112
%116 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 8, i64 0
%117 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 9, i64 0
%118 = load double, double* %116
%119 = load double, double* %117
%120 = insertelement <2 x double> poison, double %118, i64 0
%121 = insertelement <2 x double> %120, double %119, i64 1
%122 = fadd <2 x double> %121, <double 1.000000e-01, double 1.000000e-01>
%123 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 8, i64 1
%124 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 9, i64 1
%125 = load double, double* %123
%126 = load double, double* %124
%127 = insertelement <2 x double> poison, double %125, i64 0
%128 = insertelement <2 x double> %127, double %126, i64 1
%129 = fadd <2 x double> %128, <double 1.000000e-01, double 1.000000e-01>
%130 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 8, i64 2
%131 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 9, i64 2
%132 = load double, double* %130
%133 = load double, double* %131
%134 = insertelement <2 x double> poison, double %132, i64 0
%135 = insertelement <2 x double> %134, double %133, i64 1
%136 = fadd <2 x double> %135, zeroinitializer
%137 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 8, i64 0
%138 = bitcast double* %137 to <6 x double>*
%139 = shufflevector <2 x double> %122, <2 x double> %129, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%140 = shufflevector <2 x double> %136, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%141 = shufflevector <4 x double> %139, <4 x double> %140, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
store <6 x double> %141, <6 x double>* %138
%142 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 10, i64 0
%143 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 11, i64 0
%144 = load double, double* %142
%145 = load double, double* %143
%146 = insertelement <2 x double> poison, double %144, i64 0
%147 = insertelement <2 x double> %146, double %145, i64 1
%148 = fadd <2 x double> %147, <double 1.000000e-01, double 1.000000e-01>
%149 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 10, i64 1
%150 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 11, i64 1
%151 = load double, double* %149
%152 = load double, double* %150
%153 = insertelement <2 x double> poison, double %151, i64 0
%154 = insertelement <2 x double> %153, double %152, i64 1
%155 = fadd <2 x double> %154, <double 1.000000e-01, double 1.000000e-01>
%156 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 10, i64 2
%157 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 11, i64 2
%158 = load double, double* %156
%159 = load double, double* %157
%160 = insertelement <2 x double> poison, double %158, i64 0
%161 = insertelement <2 x double> %160, double %159, i64 1
%162 = fadd <2 x double> %161, zeroinitializer
%163 = getelementptr inbounds [12 x [3 x double]], [12 x [3 x double]]* %2, i64 0, i64 10, i64 0
%164 = bitcast double* %163 to <6 x double>*
%165 = shufflevector <2 x double> %148, <2 x double> %155, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%166 = shufflevector <2 x double> %162, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%167 = shufflevector <4 x double> %165, <4 x double> %166, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
store <6 x double> %167, <6 x double>* %164
%168 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%169 = bitcast [50 x [3 x [3 x i32]]]* %11 to i32***
%170 = bitcast [50 x [3 x double]]* %12 to double**
%171 = bitcast [3 x [3 x double]]* %1 to double**
%172 = bitcast [12 x [3 x double]]* %2 to double**
%173 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%174 = call i32 @spg_get_symmetry(i32*** %169, double** %170, i32 50, double** %171, double** %172, i32* %173, i32 12, i32 0)
%175 = icmp eq i32 %174, 0
br i1 %175, label %214, label %176
176: ; preds = %0
%177 = icmp sgt i32 %174, 0
br i1 %177, label %178, label %214
178: ; preds = %176
%179 = zext i32 %174 to i64
br label %180
180: ; preds = %178, %180
%181 = phi i64 [ 0, %178 ], [ %182, %180 ]
%182 = add nuw nsw i64 %181, 1
%183 = trunc i64 %182 to i32
%184 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %183)
%185 = getelementptr inbounds [50 x [3 x [3 x i32]]], [50 x [3 x [3 x i32]]]* %11, i64 0, i64 %181, i64 0, i64 0
%186 = load i32, i32* %185
%187 = getelementptr inbounds [50 x [3 x [3 x i32]]], [50 x [3 x [3 x i32]]]* %11, i64 0, i64 %181, i64 0, i64 1
%188 = load i32, i32* %187
%189 = getelementptr inbounds [50 x [3 x [3 x i32]]], [50 x [3 x [3 x i32]]]* %11, i64 0, i64 %181, i64 0, i64 2
%190 = load i32, i32* %189
%191 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %186, i32 %188, i32 %190)
%192 = getelementptr inbounds [50 x [3 x [3 x i32]]], [50 x [3 x [3 x i32]]]* %11, i64 0, i64 %181, i64 1, i64 0
%193 = load i32, i32* %192
%194 = getelementptr inbounds [50 x [3 x [3 x i32]]], [50 x [3 x [3 x i32]]]* %11, i64 0, i64 %181, i64 1, i64 1
%195 = load i32, i32* %194
%196 = getelementptr inbounds [50 x [3 x [3 x i32]]], [50 x [3 x [3 x i32]]]* %11, i64 0, i64 %181, i64 1, i64 2
%197 = load i32, i32* %196
%198 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %193, i32 %195, i32 %197)
%199 = getelementptr inbounds [50 x [3 x [3 x i32]]], [50 x [3 x [3 x i32]]]* %11, i64 0, i64 %181, i64 2, i64 0
%200 = load i32, i32* %199
%201 = getelementptr inbounds [50 x [3 x [3 x i32]]], [50 x [3 x [3 x i32]]]* %11, i64 0, i64 %181, i64 2, i64 1
%202 = load i32, i32* %201
%203 = getelementptr inbounds [50 x [3 x [3 x i32]]], [50 x [3 x [3 x i32]]]* %11, i64 0, i64 %181, i64 2, i64 2
%204 = load i32, i32* %203
%205 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %200, i32 %202, i32 %204)
%206 = getelementptr inbounds [50 x [3 x double]], [50 x [3 x double]]* %12, i64 0, i64 %181, i64 0
%207 = load double, double* %206
%208 = getelementptr inbounds [50 x [3 x double]], [50 x [3 x double]]* %12, i64 0, i64 %181, i64 1
%209 = load double, double* %208
%210 = getelementptr inbounds [50 x [3 x double]], [50 x [3 x double]]* %12, i64 0, i64 %181, i64 2
%211 = load double, double* %210
%212 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), double %207, double %209, double %211)
%213 = icmp eq i64 %182, %179
br i1 %213, label %214, label %180
214: ; preds = %180, %176, %0
%215 = phi i32 [ 1, %0 ], [ 0, %176 ], [ 0, %180 ]
ret i32 %215
}