#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*/ NC_vector(long, long, long, char **, char *, double **,
                             double *, double *, double *);
int /*<<< orphan*/ cross(double *, double *, double *);
double dot(double *, double *);
int /*<<< orphan*/ strcpy(char *, char *);
void cis_or_trans(long i, long j, char *bseq, long **seidx, char **AtomName,
                  double **xyz, char *cis_tran) {
  long ib, ie, k;
  double nn_vec[4], vc1[4], vc2[4], vector_NC_1[4], vector_NC_2[4], a;
  double xyz1[4], xyz2[4], N_xyz1[4], N_xyz2[4];
  ib = seidx[i][1];
  ie = seidx[i][2];
  NC_vector(i, ib, ie, AtomName, bseq, xyz, N_xyz1, xyz1, vector_NC_1);
  ib = seidx[j][1];
  ie = seidx[j][2];
  NC_vector(j, ib, ie, AtomName, bseq, xyz, N_xyz2, xyz2, vector_NC_2);
  for (k = 1; k <= 3; k++)
    nn_vec[k] = xyz2[k] - xyz1[k];
  cross(vector_NC_1, nn_vec, vc1);
  cross(vector_NC_2, nn_vec, vc2);
  a = dot(vc1, vc2);
  if (a > 0)
    strcpy(cis_tran, " cis ");
  else
    strcpy(cis_tran, " tran");
  return;
}


x86 assembly (clang, -O0):
<cis_or_trans>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%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)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x30(%rbp),%r9
lea    -0x160(%rbp),%r11
lea    -0x120(%rbp),%r10
lea    -0xd0(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1050 <NC_vector@plt>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x30(%rbp),%r9
lea    -0x180(%rbp),%r11
lea    -0x140(%rbp),%r10
lea    -0xf0(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1050 <NC_vector@plt>
movq   $0x1,-0x48(%rbp)
cmpq   $0x3,-0x48(%rbp)
jg     127f <cis_or_trans+0x13f>
mov    -0x48(%rbp),%rax
movsd  -0x140(%rbp,%rax,8),%xmm0
ff ff
mov    -0x48(%rbp),%rax
subsd  -0x120(%rbp,%rax,8),%xmm0
ff ff
mov    -0x48(%rbp),%rax
movsd  %xmm0,-0x70(%rbp,%rax,8)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    123f <cis_or_trans+0xff>
lea    -0xd0(%rbp),%rdi
lea    -0x70(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   1060 <cross@plt>
lea    -0xf0(%rbp),%rdi
lea    -0x70(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
call   1060 <cross@plt>
lea    -0x90(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
call   1030 <dot@plt>
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    12f2 <cis_or_trans+0x1b2>
mov    0x10(%rbp),%rdi
lea    0xd18(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1302 <cis_or_trans+0x1c2>
mov    0x10(%rbp),%rdi
lea    0xd09(%rip),%rsi
call   1040 <strcpy@plt>
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cis_or_trans>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %r9,%r12
mov    %r8,%r13
mov    %rcx,%rbp
mov    %rdx,%rbx
mov    %rsi,%r14
mov    (%rcx,%rdi,8),%rax
mov    0x8(%rax),%rsi
mov    0x10(%rax),%rdx
sub    $0x8,%rsp
lea    0x68(%rsp),%rax
lea    0x28(%rsp),%r11
lea    0xa8(%rsp),%r10
mov    %r8,%rcx
mov    %rbx,%r8
push   %rax
push   %r11
push   %r10
call   1050 <NC_vector@plt>
add    $0x20,%rsp
mov    0x0(%rbp,%r14,8),%rax
mov    0x8(%rax),%rsi
mov    0x10(%rax),%rdx
sub    $0x8,%rsp
lea    0xc8(%rsp),%r15
lea    0x8(%rsp),%rax
lea    0x88(%rsp),%rbp
mov    %r14,%rdi
mov    %r13,%rcx
mov    %rbx,%r8
mov    %r12,%r9
push   %r15
push   %rax
push   %rbp
call   1050 <NC_vector@plt>
add    $0x20,%rsp
movupd 0x8(%rsp),%xmm0
movupd 0x28(%rsp),%xmm1
subpd  %xmm1,%xmm0
movupd %xmm0,0x48(%rsp)
movsd  0x18(%rsp),%xmm0
subsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x58(%rsp)
lea    0x40(%rsp),%rbx
lea    0x100(%rsp),%r14
lea    0x60(%rsp),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1060 <cross@plt>
lea    0xe0(%rsp),%rbp
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1060 <cross@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1030 <dot@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
lea    0xdb6(%rip),%rax
lea    0xdb5(%rip),%rsi
cmova  %rax,%rsi
mov    0x160(%rsp),%rdi
call   1040 <strcpy@plt>
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c" cis \00"
@.str.1 = [6 x i8] c" tran\00"
define void @cis_or_trans(i64 %0, i64 %1, i8* %2, i64** %3, i8** %4, double** %5, i8* %6) {
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64**
%12 = alloca i8**
%13 = alloca double**
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca [4 x double]
%19 = alloca [4 x double]
%20 = alloca [4 x double]
%21 = alloca [4 x double]
%22 = alloca [4 x double]
%23 = alloca double
%24 = alloca [4 x double]
%25 = alloca [4 x double]
%26 = alloca [4 x double]
%27 = alloca [4 x double]
store i64 %0, i64* %8
store i64 %1, i64* %9
store i8* %2, i8** %10
store i64** %3, i64*** %11
store i8** %4, i8*** %12
store double** %5, double*** %13
store i8* %6, i8** %14
%28 = load i64**, i64*** %11
%29 = load i64, i64* %8
%30 = getelementptr inbounds i64*, i64** %28, i64 %29
%31 = load i64*, i64** %30
%32 = getelementptr inbounds i64, i64* %31, i64 1
%33 = load i64, i64* %32
store i64 %33, i64* %15
%34 = load i64**, i64*** %11
%35 = load i64, i64* %8
%36 = getelementptr inbounds i64*, i64** %34, i64 %35
%37 = load i64*, i64** %36
%38 = getelementptr inbounds i64, i64* %37, i64 2
%39 = load i64, i64* %38
store i64 %39, i64* %16
%40 = load i64, i64* %8
%41 = load i64, i64* %15
%42 = load i64, i64* %16
%43 = load i8**, i8*** %12
%44 = load i8*, i8** %10
%45 = load double**, double*** %13
%46 = getelementptr inbounds [4 x double], [4 x double]* %26, i64 0, i64 0
%47 = getelementptr inbounds [4 x double], [4 x double]* %24, i64 0, i64 0
%48 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 0
%49 = call i32 @NC_vector(i64 %40, i64 %41, i64 %42, i8** %43, i8* %44, double** %45, double* %46, double* %47, double* %48)
%50 = load i64**, i64*** %11
%51 = load i64, i64* %9
%52 = getelementptr inbounds i64*, i64** %50, i64 %51
%53 = load i64*, i64** %52
%54 = getelementptr inbounds i64, i64* %53, i64 1
%55 = load i64, i64* %54
store i64 %55, i64* %15
%56 = load i64**, i64*** %11
%57 = load i64, i64* %9
%58 = getelementptr inbounds i64*, i64** %56, i64 %57
%59 = load i64*, i64** %58
%60 = getelementptr inbounds i64, i64* %59, i64 2
%61 = load i64, i64* %60
store i64 %61, i64* %16
%62 = load i64, i64* %9
%63 = load i64, i64* %15
%64 = load i64, i64* %16
%65 = load i8**, i8*** %12
%66 = load i8*, i8** %10
%67 = load double**, double*** %13
%68 = getelementptr inbounds [4 x double], [4 x double]* %27, i64 0, i64 0
%69 = getelementptr inbounds [4 x double], [4 x double]* %25, i64 0, i64 0
%70 = getelementptr inbounds [4 x double], [4 x double]* %22, i64 0, i64 0
%71 = call i32 @NC_vector(i64 %62, i64 %63, i64 %64, i8** %65, i8* %66, double** %67, double* %68, double* %69, double* %70)
store i64 1, i64* %17
br label %72
72: ; preds = %85, %7
%73 = load i64, i64* %17
%74 = icmp sle i64 %73, 3
br i1 %74, label %75, label %88
75: ; preds = %72
%76 = load i64, i64* %17
%77 = getelementptr inbounds [4 x double], [4 x double]* %25, i64 0, i64 %76
%78 = load double, double* %77
%79 = load i64, i64* %17
%80 = getelementptr inbounds [4 x double], [4 x double]* %24, i64 0, i64 %79
%81 = load double, double* %80
%82 = fsub double %78, %81
%83 = load i64, i64* %17
%84 = getelementptr inbounds [4 x double], [4 x double]* %18, i64 0, i64 %83
store double %82, double* %84
br label %85
85: ; preds = %75
%86 = load i64, i64* %17
%87 = add nsw i64 %86, 1
store i64 %87, i64* %17
br label %72
88: ; preds = %72
%89 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 0
%90 = getelementptr inbounds [4 x double], [4 x double]* %18, i64 0, i64 0
%91 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 0
%92 = call i32 @cross(double* %89, double* %90, double* %91)
%93 = getelementptr inbounds [4 x double], [4 x double]* %22, i64 0, i64 0
%94 = getelementptr inbounds [4 x double], [4 x double]* %18, i64 0, i64 0
%95 = getelementptr inbounds [4 x double], [4 x double]* %20, i64 0, i64 0
%96 = call i32 @cross(double* %93, double* %94, double* %95)
%97 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 0
%98 = getelementptr inbounds [4 x double], [4 x double]* %20, i64 0, i64 0
%99 = call double @dot(double* %97, double* %98)
store double %99, double* %23
%100 = load double, double* %23
%101 = fcmp ogt double %100, 0.000000e+00
br i1 %101, label %102, label %105
102: ; preds = %88
%103 = load i8*, i8** %14
%104 = call i32 @strcpy(i8* %103, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %108
105: ; preds = %88
%106 = load i8*, i8** %14
%107 = call i32 @strcpy(i8* %106, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %108
108: ; preds = %105, %102
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c" cis \00"
@.str.1 = [6 x i8] c" tran\00"
define void @cis_or_trans(i64 %0, i64 %1, i8* %2, i64** nocapture %3, i8** %4, double** %5, i8* %6) {
%8 = alloca [4 x double]
%9 = alloca [4 x double]
%10 = alloca [4 x double]
%11 = alloca [4 x double]
%12 = alloca [4 x double]
%13 = alloca [4 x double]
%14 = alloca [4 x double]
%15 = alloca [4 x double]
%16 = alloca [4 x double]
%17 = bitcast [4 x double]* %8 to i8*
%18 = bitcast [4 x double]* %9 to i8*
%19 = bitcast [4 x double]* %10 to i8*
%20 = bitcast [4 x double]* %11 to i8*
%21 = bitcast [4 x double]* %12 to i8*
%22 = bitcast [4 x double]* %13 to i8*
%23 = bitcast [4 x double]* %14 to i8*
%24 = bitcast [4 x double]* %15 to i8*
%25 = bitcast [4 x double]* %16 to i8*
%26 = getelementptr inbounds i64*, i64** %3, i64 %0
%27 = load i64*, i64** %26
%28 = getelementptr inbounds i64, i64* %27, i64 1
%29 = load i64, i64* %28
%30 = getelementptr inbounds i64, i64* %27, i64 2
%31 = load i64, i64* %30
%32 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 0
%33 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 0
%34 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 0
%35 = call i32 @NC_vector(i64 %0, i64 %29, i64 %31, i8** %4, i8* %2, double** %5, double* %32, double* %33, double* %34)
%36 = getelementptr inbounds i64*, i64** %3, i64 %1
%37 = load i64*, i64** %36
%38 = getelementptr inbounds i64, i64* %37, i64 1
%39 = load i64, i64* %38
%40 = getelementptr inbounds i64, i64* %37, i64 2
%41 = load i64, i64* %40
%42 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 0
%43 = getelementptr inbounds [4 x double], [4 x double]* %14, i64 0, i64 0
%44 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 0
%45 = call i32 @NC_vector(i64 %1, i64 %39, i64 %41, i8** %4, i8* %2, double** %5, double* %42, double* %43, double* %44)
%46 = getelementptr inbounds [4 x double], [4 x double]* %14, i64 0, i64 1
%47 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 1
%48 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 1
%49 = bitcast double* %46 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = bitcast double* %47 to <2 x double>*
%52 = load <2 x double>, <2 x double>* %51
%53 = fsub <2 x double> %50, %52
%54 = bitcast double* %48 to <2 x double>*
store <2 x double> %53, <2 x double>* %54
%55 = getelementptr inbounds [4 x double], [4 x double]* %14, i64 0, i64 3
%56 = load double, double* %55
%57 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 3
%58 = load double, double* %57
%59 = fsub double %56, %58
%60 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 3
store double %59, double* %60
%61 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 0
%62 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 0
%63 = call i32 @cross(double* %34, double* %61, double* %62)
%64 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%65 = call i32 @cross(double* %44, double* %61, double* %64)
%66 = call double @dot(double* %62, double* %64)
%67 = fcmp ogt double %66, 0.000000e+00
%68 = select i1 %67, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%69 = call i32 @strcpy(i8* %6, i8* %68)
ret void
}