#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*/ strcpy(char *, char *);
int /*<<< orphan*/ test_orientation(long, long, long **, char **, double **,
                                    long *, long *);
void get_orientation_SS(long i, long j, long **seidx, char **AtomName,
                        double **xyz, char *type) {
  long n1 = 0, n2 = 0, n3 = 0, n4 = 0;
  test_orientation(i, j, seidx, AtomName, xyz, &n1, &n2);
  if (n1 > 0 && n2 > 0) {
    strcpy(type, "s/S");
  } else {
    test_orientation(j, i, seidx, AtomName, xyz, &n3, &n4);
    if (n3 > 0 && n4 > 0)
      strcpy(type, "S/s");
  }
}


x86 assembly (clang, -O0):
<get_orientation_SS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    -0x38(%rbp),%r9
lea    -0x40(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <test_orientation@plt>
cmpq   $0x0,-0x38(%rbp)
jle    11b0 <get_orientation_SS+0x90>
cmpq   $0x0,-0x40(%rbp)
jle    11b0 <get_orientation_SS+0x90>
mov    -0x30(%rbp),%rdi
lea    0xe5a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1200 <get_orientation_SS+0xe0>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    -0x48(%rbp),%r9
lea    -0x50(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <test_orientation@plt>
cmpq   $0x0,-0x48(%rbp)
jle    11fb <get_orientation_SS+0xdb>
cmpq   $0x0,-0x50(%rbp)
jle    11fb <get_orientation_SS+0xdb>
mov    -0x30(%rbp),%rdi
lea    0xe0e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1200 <get_orientation_SS+0xe0>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_orientation_SS>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%rbx
movq   $0x0,0x20(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x18(%rsp),%rax
mov    %rax,(%rsp)
lea    0x20(%rsp),%r9
call   1040 <test_orientation@plt>
cmpq   $0x0,0x20(%rsp)
jle    1190 <get_orientation_SS+0x70>
cmpq   $0x0,0x18(%rsp)
jle    1190 <get_orientation_SS+0x70>
lea    0xe72(%rip),%rsi
jmp    11c9 <get_orientation_SS+0xa9>
lea    0x8(%rsp),%rax
mov    %rax,(%rsp)
lea    0x10(%rsp),%r9
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1040 <test_orientation@plt>
cmpq   $0x0,0x10(%rsp)
jle    11d1 <get_orientation_SS+0xb1>
cmpq   $0x0,0x8(%rsp)
jle    11d1 <get_orientation_SS+0xb1>
lea    0xe3b(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"s/S\00"
@.str.1 = [4 x i8] c"S/s\00"
define void @get_orientation_SS(i64 %0, i64 %1, i64** %2, i8** %3, double** %4, i8* %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64**
%10 = alloca i8**
%11 = alloca double**
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
store i64 %0, i64* %7
store i64 %1, i64* %8
store i64** %2, i64*** %9
store i8** %3, i8*** %10
store double** %4, double*** %11
store i8* %5, i8** %12
store i64 0, i64* %13
store i64 0, i64* %14
store i64 0, i64* %15
store i64 0, i64* %16
%17 = load i64, i64* %7
%18 = load i64, i64* %8
%19 = load i64**, i64*** %9
%20 = load i8**, i8*** %10
%21 = load double**, double*** %11
%22 = call i32 @test_orientation(i64 %17, i64 %18, i64** %19, i8** %20, double** %21, i64* %13, i64* %14)
%23 = load i64, i64* %13
%24 = icmp sgt i64 %23, 0
br i1 %24, label %25, label %31
25: ; preds = %6
%26 = load i64, i64* %14
%27 = icmp sgt i64 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = load i8*, i8** %12
%30 = call i32 @strcpy(i8* %29, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %47
31: ; preds = %25, %6
%32 = load i64, i64* %8
%33 = load i64, i64* %7
%34 = load i64**, i64*** %9
%35 = load i8**, i8*** %10
%36 = load double**, double*** %11
%37 = call i32 @test_orientation(i64 %32, i64 %33, i64** %34, i8** %35, double** %36, i64* %15, i64* %16)
%38 = load i64, i64* %15
%39 = icmp sgt i64 %38, 0
br i1 %39, label %40, label %46
40: ; preds = %31
%41 = load i64, i64* %16
%42 = icmp sgt i64 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %40
%44 = load i8*, i8** %12
%45 = call i32 @strcpy(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %46
46: ; preds = %43, %40, %31
br label %47
47: ; preds = %46, %28
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"s/S\00"
@.str.1 = [4 x i8] c"S/s\00"
define void @get_orientation_SS(i64 %0, i64 %1, i64** %2, i8** %3, double** %4, i8* %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = bitcast i64* %7 to i8*
store i64 0, i64* %7
%12 = bitcast i64* %8 to i8*
store i64 0, i64* %8
%13 = bitcast i64* %9 to i8*
store i64 0, i64* %9
%14 = bitcast i64* %10 to i8*
store i64 0, i64* %10
%15 = call i32 @test_orientation(i64 %0, i64 %1, i64** %2, i8** %3, double** %4, i64* %7, i64* %8)
%16 = load i64, i64* %7
%17 = icmp sgt i64 %16, 0
%18 = load i64, i64* %8
%19 = icmp sgt i64 %18, 0
%20 = select i1 %17, i1 %19, i1 false
br i1 %20, label %28, label %21
21: ; preds = %6
%22 = call i32 @test_orientation(i64 %1, i64 %0, i64** %2, i8** %3, double** %4, i64* %9, i64* %10)
%23 = load i64, i64* %9
%24 = icmp sgt i64 %23, 0
%25 = load i64, i64* %10
%26 = icmp sgt i64 %25, 0
%27 = select i1 %24, i1 %26, i1 false
br i1 %27, label %28, label %31
28: ; preds = %21, %6
%29 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %21 ]
%30 = call i32 @strcpy(i8* %5, i8* %29)
br label %31
31: ; preds = %28, %21
ret void
}