#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 spg_get_schoenflies(char *, double **, double **, int *, int, double);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
void spg_get_schoenflies_(int *spacegroup, char symbol[7], double lattice[3][3],
                          double position[][3], int types[], int *num_atom,
                          double *symprec) {
  char symbol_c[10];
  int i, length;
  *spacegroup = spg_get_schoenflies(symbol_c, lattice, position, types,
                                    *num_atom, *symprec);
  if (*spacegroup > 0) {
    length = strlen(symbol_c);
    strncpy(symbol, symbol_c, length);
  } else {
    length = 0;
  }
  for (i = length; i < 7; i++) {
    symbol[i] = ' ';
  }
}


x86 assembly (clang, -O0):
<spg_get_schoenflies_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    -0x3a(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%rax
mov    (%rax),%r8d
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1050 <spg_get_schoenflies@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jle    11ae <spg_get_schoenflies_+0x7e>
lea    -0x3a(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x3a(%rbp),%rsi
mov    -0x44(%rbp),%edx
call   1030 <strncpy@plt>
jmp    11b5 <spg_get_schoenflies_+0x85>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x7,-0x40(%rbp)
jge    11df <spg_get_schoenflies_+0xaf>
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11bb <spg_get_schoenflies_+0x8b>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spg_get_schoenflies_>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %r8,%rax
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    0x30(%rsp),%rsi
mov    (%r9),%r8d
movsd  (%rsi),%xmm0
lea    0x6(%rsp),%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %rax,%rcx
call   1060 <spg_get_schoenflies@plt>
mov    %eax,0x0(%rbp)
test   %eax,%eax
jle    119a <spg_get_schoenflies_+0x5a>
lea    0x6(%rsp),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <strncpy@plt>
cmp    $0x6,%ebp
jle    119c <spg_get_schoenflies_+0x5c>
jmp    11ba <spg_get_schoenflies_+0x7a>
xor    %ebp,%ebp
movslq %ebp,%rax
add    %rax,%rbx
mov    $0x6,%edx
sub    %eax,%edx
add    $0x1,%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1050 <memset@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @spg_get_schoenflies_(i32* %0, i8* %1, [3 x double]* %2, [3 x double]* %3, i32* %4, i32* %5, double* %6) {
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca [3 x double]*
%11 = alloca [3 x double]*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca double*
%15 = alloca [10 x i8]
%16 = alloca i32
%17 = alloca i32
store i32* %0, i32** %8
store i8* %1, i8** %9
store [3 x double]* %2, [3 x double]** %10
store [3 x double]* %3, [3 x double]** %11
store i32* %4, i32** %12
store i32* %5, i32** %13
store double* %6, double** %14
%18 = getelementptr inbounds [10 x i8], [10 x i8]* %15, i64 0, i64 0
%19 = load [3 x double]*, [3 x double]** %10
%20 = bitcast [3 x double]* %19 to double**
%21 = load [3 x double]*, [3 x double]** %11
%22 = bitcast [3 x double]* %21 to double**
%23 = load i32*, i32** %12
%24 = load i32*, i32** %13
%25 = load i32, i32* %24
%26 = load double*, double** %14
%27 = load double, double* %26
%28 = call i32 @spg_get_schoenflies(i8* %18, double** %20, double** %22, i32* %23, i32 %25, double %27)
%29 = load i32*, i32** %8
store i32 %28, i32* %29
%30 = load i32*, i32** %8
%31 = load i32, i32* %30
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %40
33: ; preds = %7
%34 = getelementptr inbounds [10 x i8], [10 x i8]* %15, i64 0, i64 0
%35 = call i32 @strlen(i8* %34)
store i32 %35, i32* %17
%36 = load i8*, i8** %9
%37 = getelementptr inbounds [10 x i8], [10 x i8]* %15, i64 0, i64 0
%38 = load i32, i32* %17
%39 = call i32 @strncpy(i8* %36, i8* %37, i32 %38)
br label %41
40: ; preds = %7
store i32 0, i32* %17
br label %41
41: ; preds = %40, %33
%42 = load i32, i32* %17
store i32 %42, i32* %16
br label %43
43: ; preds = %51, %41
%44 = load i32, i32* %16
%45 = icmp slt i32 %44, 7
br i1 %45, label %46, label %54
46: ; preds = %43
%47 = load i8*, i8** %9
%48 = load i32, i32* %16
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %47, i64 %49
store i8 32, i8* %50
br label %51
51: ; preds = %46
%52 = load i32, i32* %16
%53 = add nsw i32 %52, 1
store i32 %53, i32* %16
br label %43
54: ; preds = %43
ret void
}

LLVM IR (-O2):
define void @spg_get_schoenflies_(i32* nocapture writeonly %0, i8* %1, [3 x double]* %2, [3 x double]* %3, i32* %4, i32* nocapture %5, double* nocapture %6) {
%8 = alloca [10 x i8]
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %8, i64 0, i64 0
%10 = bitcast [3 x double]* %2 to double**
%11 = bitcast [3 x double]* %3 to double**
%12 = load i32, i32* %5
%13 = load double, double* %6
%14 = call i32 @spg_get_schoenflies(i8* %9, double** %10, double** %11, i32* %4, i32 %12, double %13)
store i32 %14, i32* %0
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %7
%17 = call i32 @strlen(i8* %9)
%18 = call i32 @strncpy(i8* %1, i8* %9, i32 %17)
%19 = icmp slt i32 %17, 7
br i1 %19, label %20, label %27
20: ; preds = %7, %16
%21 = phi i32 [ %17, %16 ], [ 0, %7 ]
%22 = sext i32 %21 to i64
%23 = getelementptr i8, i8* %1, i64 %22
%24 = sub i32 6, %21
%25 = zext i32 %24 to i64
%26 = add nuw nsw i64 %25, 1
br label %27
27: ; preds = %20, %16
ret void
}