#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 /*<<< orphan*/ spg_get_schoenflies(char *, double **, double **, int *, int,
                                       int);
void test_spg_get_schoenflies(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.5}, {0.3, 0.3, 0},
      {0.7, 0.7, 0}, {0.2, 0.8, 0.5}, {0.8, 0.2, 0.5},
  };
  int types[] = {1, 1, 2, 2, 2, 2};
  int num_atom = 6;
  char symbol[7];
  spg_get_schoenflies(symbol, lattice, position, types, num_atom, 1e-5);
  printf("*** Example of spg_get_schoenflies ***:\n");
  printf("Schoenflies: %s\n", symbol);
}


x86 assembly (clang, -O0):
<test_spg_get_schoenflies>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x48,%edx
call   1040 <memset@plt>
movsd  0xea5(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe83(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0xe0(%rbp),%rdi
lea    0xe80(%rip),%rsi
mov    $0x90,%edx
call   1050 <memcpy@plt>
mov    0xeff(%rip),%rax
mov    %rax,-0x100(%rbp)
mov    0xef9(%rip),%rax
mov    %rax,-0xf8(%rbp)
mov    0xef3(%rip),%rax
mov    %rax,-0xf0(%rbp)
movl   $0x6,-0x104(%rbp)
lea    -0x10b(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0xe0(%rbp),%rdx
lea    -0x100(%rbp),%rcx
mov    -0x104(%rbp),%r8d
xor    %r9d,%r9d
call   1060 <spg_get_schoenflies@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10b(%rbp),%rsi
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_spg_get_schoenflies>:
push   %r14
push   %rbx
sub    $0x118,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x40(%rsp)
movabs $0x4010000000000000,%rax
mov    %rax,0x30(%rsp)
mov    %rax,0x50(%rsp)
movabs $0x4008000000000000,%rax
mov    %rax,0x70(%rsp)
lea    0xe75(%rip),%rsi
lea    0x80(%rsp),%rbx
mov    $0x90,%edx
mov    %rbx,%rdi
call   1050 <memcpy@plt>
mov    0xef9(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x9(%rsp),%r14
lea    0x30(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    %r14,%rdi
mov    %rbx,%rdx
mov    $0x6,%r8d
xor    %r9d,%r9d
call   1060 <spg_get_schoenflies@plt>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x118,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.test_spg_get_schoenflies.position = [6 x [3 x double]] [[3 x double] zeroinitializer, [3 x double] [double 5.000000e-01, double 5.000000e-01, double 5.000000e-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 5.000000e-01], [3 x double] [double 8.000000e-01, double 2.000000e-01, double 5.000000e-01]]
@__const.test_spg_get_schoenflies.types = [6 x i32] [i32 1, i32 1, i32 2, i32 2, i32 2, i32 2]
@.str = [41 x i8] c"*** Example of spg_get_schoenflies ***:\0A\00"
@.str.1 = [17 x i8] c"Schoenflies: %s\0A\00"
define void @test_spg_get_schoenflies() {
%1 = alloca [3 x [3 x double]]
%2 = alloca [6 x [3 x double]]
%3 = alloca [6 x i32]
%4 = alloca i32
%5 = alloca [7 x i8]
%6 = bitcast [3 x [3 x double]]* %1 to i8*
%7 = bitcast i8* %6 to [3 x [3 x double]]*
%8 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i32 0, i32 0
%9 = getelementptr inbounds [3 x double], [3 x double]* %8, i32 0, i32 0
store double 4.000000e+00, double* %9
%10 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i32 0, i32 1
%11 = getelementptr inbounds [3 x double], [3 x double]* %10, i32 0, i32 1
store double 4.000000e+00, double* %11
%12 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %7, i32 0, i32 2
%13 = getelementptr inbounds [3 x double], [3 x double]* %12, i32 0, i32 2
store double 3.000000e+00, double* %13
%14 = bitcast [6 x [3 x double]]* %2 to i8*
%15 = bitcast [6 x i32]* %3 to i8*
store i32 6, i32* %4
%16 = getelementptr inbounds [7 x i8], [7 x i8]* %5, i64 0, i64 0
%17 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %1, i64 0, i64 0
%18 = bitcast [3 x double]* %17 to double**
%19 = getelementptr inbounds [6 x [3 x double]], [6 x [3 x double]]* %2, i64 0, i64 0
%20 = bitcast [3 x double]* %19 to double**
%21 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 0
%22 = load i32, i32* %4
%23 = call i32 @spg_get_schoenflies(i8* %16, double** %18, double** %20, i32* %21, i32 %22, i32 0)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%25 = getelementptr inbounds [7 x i8], [7 x i8]* %5, i64 0, i64 0
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %25)
ret void
}

LLVM IR (-O2):
@__const.test_spg_get_schoenflies.position = [6 x [3 x double]] [[3 x double] zeroinitializer, [3 x double] [double 5.000000e-01, double 5.000000e-01, double 5.000000e-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 5.000000e-01], [3 x double] [double 8.000000e-01, double 2.000000e-01, double 5.000000e-01]]
@__const.test_spg_get_schoenflies.types = [6 x i32] [i32 1, i32 1, i32 2, i32 2, i32 2, i32 2]
@.str.1 = [17 x i8] c"Schoenflies: %s\0A\00"
@str = [40 x i8] c"*** Example of spg_get_schoenflies ***:\00"
define void @test_spg_get_schoenflies() {
%1 = alloca [3 x [3 x double]]
%2 = alloca [6 x [3 x double]]
%3 = alloca [6 x i32]
%4 = alloca [7 x i8]
%5 = bitcast [3 x [3 x double]]* %1 to i8*
%6 = 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* %6
%7 = 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* %7
%8 = 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* %8
%9 = bitcast [6 x [3 x double]]* %2 to i8*
%10 = bitcast [6 x i32]* %3 to i8*
%11 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%12 = bitcast [3 x [3 x double]]* %1 to double**
%13 = bitcast [6 x [3 x double]]* %2 to double**
%14 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 0
%15 = call i32 @spg_get_schoenflies(i8* %11, double** %12, double** %13, i32* %14, i32 6, i32 0)
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %11)
ret void
}