#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*/ nrerror(char *);
int /*<<< orphan*/ strcpy(char *, char *);
void atom_info(long idx, char atoms_list[12][3], double *covalence_radii,
               double *vdw_radii) {
  static char *ALIST[12] = {"XX", "C ", "O ", "H ", "N ", "S ",
                            "P ", "F ", "CL", "BR", "I ", "SI"};
  static double CRADII[12] = {1.200, 0.762, 0.646, 0.352, 0.689, 1.105,
                              1.000, 0.619, 1.022, 1.183, 1.378, 1.105};
  static double VRADII[12] = {2.00, 1.70, 1.52, 1.20, 1.55, 1.80,
                              1.80, 1.47, 1.75, 1.85, 1.98, 2.10};
  long i;
  if (idx == 1)
    for (i = 0; i < 12; i++)
      strcpy(atoms_list[i], ALIST[i]);
  else if (idx == 2)
    for (i = 0; i < 12; i++)
      covalence_radii[i] = CRADII[i];
  else if (idx == 3)
    for (i = 0; i < 12; i++)
      vdw_radii[i] = VRADII[i];
  else
    nrerror("wrong options for <atom_info>: should be 1, 2 or 3");
}


x86 assembly (clang, -O0):
<atom_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x1,-0x8(%rbp)
jne    118c <atom_info+0x6c>
movq   $0x0,-0x28(%rbp)
cmpq   $0xc,-0x28(%rbp)
jge    1187 <atom_info+0x67>
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x28(%rbp),%rax
add    %rax,%rdi
mov    -0x28(%rbp),%rcx
lea    0x2ed3(%rip),%rax
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    114b <atom_info+0x2b>
jmp    1244 <atom_info+0x124>
cmpq   $0x2,-0x8(%rbp)
jne    11dd <atom_info+0xbd>
movq   $0x0,-0x28(%rbp)
cmpq   $0xc,-0x28(%rbp)
jge    11d8 <atom_info+0xb8>
mov    -0x28(%rbp),%rcx
lea    0x2eeb(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    119f <atom_info+0x7f>
jmp    123f <atom_info+0x11f>
cmpq   $0x3,-0x8(%rbp)
jne    122e <atom_info+0x10e>
movq   $0x0,-0x28(%rbp)
cmpq   $0xc,-0x28(%rbp)
jge    1229 <atom_info+0x109>
mov    -0x28(%rbp),%rcx
lea    0x2efa(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11f0 <atom_info+0xd0>
jmp    123a <atom_info+0x11a>
lea    0xdef(%rip),%rdi
call   1040 <nrerror@plt>
jmp    123f <atom_info+0x11f>
jmp    1244 <atom_info+0x124>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atom_info>:
push   %rbx
cmp    $0x1,%rdi
je     117e <atom_info+0x5e>
cmp    $0x2,%rdi
je     1244 <atom_info+0x124>
cmp    $0x3,%rdi
jne    1287 <atom_info+0x167>
movaps 0xfce(%rip),%xmm0
movups %xmm0,0x50(%rcx)
movaps 0xfb3(%rip),%xmm0
movups %xmm0,0x40(%rcx)
movaps 0xf98(%rip),%xmm0
movups %xmm0,0x30(%rcx)
movaps 0xf7d(%rip),%xmm0
movups %xmm0,0x20(%rcx)
movaps 0xf62(%rip),%xmm0
movups %xmm0,0x10(%rcx)
movaps 0xf47(%rip),%xmm0
movups %xmm0,(%rcx)
pop    %rbx
ret
mov    %rsi,%rbx
lea    0xe78(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0x3(%rbx),%rdi
lea    0xe68(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x6(%rbx),%rdi
lea    0xe5b(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x9(%rbx),%rdi
lea    0xe4e(%rip),%rsi
call   1030 <strcpy@plt>
lea    0xc(%rbx),%rdi
lea    0xe41(%rip),%rsi
call   1030 <strcpy@plt>
lea    0xf(%rbx),%rdi
lea    0xe34(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x12(%rbx),%rdi
lea    0xe27(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x15(%rbx),%rdi
lea    0xe1a(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x18(%rbx),%rdi
lea    0xe0d(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x1b(%rbx),%rdi
lea    0xe00(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x1e(%rbx),%rdi
lea    0xdf3(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x21,%rbx
lea    0xde6(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strcpy@plt>
movaps 0xe65(%rip),%xmm0
movups %xmm0,0x50(%rdx)
movaps 0xe4a(%rip),%xmm0
movups %xmm0,0x40(%rdx)
movaps 0xe2f(%rip),%xmm0
movups %xmm0,0x30(%rdx)
movaps 0xe14(%rip),%xmm0
movups %xmm0,0x20(%rdx)
movaps 0xdf9(%rip),%xmm0
movups %xmm0,0x10(%rdx)
movaps 0xdde(%rip),%xmm0
movups %xmm0,(%rdx)
pop    %rbx
ret
lea    0xd96(%rip),%rdi
pop    %rbx
jmp    1040 <nrerror@plt>

LLVM IR (-O0):
@atom_info.ALIST = internal global [12 x i8*] [i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i32 0, i32 0)]
@.str = [3 x i8] c"XX\00"
@.str.1 = [3 x i8] c"C \00"
@.str.2 = [3 x i8] c"O \00"
@.str.3 = [3 x i8] c"H \00"
@.str.4 = [3 x i8] c"N \00"
@.str.5 = [3 x i8] c"S \00"
@.str.6 = [3 x i8] c"P \00"
@.str.7 = [3 x i8] c"F \00"
@.str.8 = [3 x i8] c"CL\00"
@.str.9 = [3 x i8] c"BR\00"
@.str.10 = [3 x i8] c"I \00"
@.str.11 = [3 x i8] c"SI\00"
@atom_info.CRADII = internal global [12 x double] [double 1.200000e+00, double 7.620000e-01, double 6.460000e-01, double 3.520000e-01, double 6.890000e-01, double 1.105000e+00, double 1.000000e+00, double 0x3FE3CED916872B02, double 1.022000e+00, double 1.183000e+00, double 1.378000e+00, double 1.105000e+00]
@atom_info.VRADII = internal global [12 x double] [double 2.000000e+00, double 1.700000e+00, double 1.520000e+00, double 1.200000e+00, double 1.550000e+00, double 1.800000e+00, double 1.800000e+00, double 1.470000e+00, double 1.750000e+00, double 1.850000e+00, double 1.980000e+00, double 2.100000e+00]
@.str.12 = [51 x i8] c"wrong options for <atom_info>: should be 1, 2 or 3\00"
define void @atom_info(i64 %0, [3 x i8]* %1, double* %2, double* %3) {
%5 = alloca i64
%6 = alloca [3 x i8]*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i64
store i64 %0, i64* %5
store [3 x i8]* %1, [3 x i8]** %6
store double* %2, double** %7
store double* %3, double** %8
%10 = load i64, i64* %5
%11 = icmp eq i64 %10, 1
br i1 %11, label %12, label %29
12: ; preds = %4
store i64 0, i64* %9
br label %13
13: ; preds = %25, %12
%14 = load i64, i64* %9
%15 = icmp slt i64 %14, 12
br i1 %15, label %16, label %28
16: ; preds = %13
%17 = load [3 x i8]*, [3 x i8]** %6
%18 = load i64, i64* %9
%19 = getelementptr inbounds [3 x i8], [3 x i8]* %17, i64 %18
%20 = getelementptr inbounds [3 x i8], [3 x i8]* %19, i64 0, i64 0
%21 = load i64, i64* %9
%22 = getelementptr inbounds [12 x i8*], [12 x i8*]* @atom_info.ALIST, i64 0, i64 %21
%23 = load i8*, i8** %22
%24 = call i32 @strcpy(i8* %20, i8* %23)
br label %25
25: ; preds = %16
%26 = load i64, i64* %9
%27 = add nsw i64 %26, 1
store i64 %27, i64* %9
br label %13
28: ; preds = %13
br label %69
29: ; preds = %4
%30 = load i64, i64* %5
%31 = icmp eq i64 %30, 2
br i1 %31, label %32, label %47
32: ; preds = %29
store i64 0, i64* %9
br label %33
33: ; preds = %43, %32
%34 = load i64, i64* %9
%35 = icmp slt i64 %34, 12
br i1 %35, label %36, label %46
36: ; preds = %33
%37 = load i64, i64* %9
%38 = getelementptr inbounds [12 x double], [12 x double]* @atom_info.CRADII, i64 0, i64 %37
%39 = load double, double* %38
%40 = load double*, double** %7
%41 = load i64, i64* %9
%42 = getelementptr inbounds double, double* %40, i64 %41
store double %39, double* %42
br label %43
43: ; preds = %36
%44 = load i64, i64* %9
%45 = add nsw i64 %44, 1
store i64 %45, i64* %9
br label %33
46: ; preds = %33
br label %68
47: ; preds = %29
%48 = load i64, i64* %5
%49 = icmp eq i64 %48, 3
br i1 %49, label %50, label %65
50: ; preds = %47
store i64 0, i64* %9
br label %51
51: ; preds = %61, %50
%52 = load i64, i64* %9
%53 = icmp slt i64 %52, 12
br i1 %53, label %54, label %64
54: ; preds = %51
%55 = load i64, i64* %9
%56 = getelementptr inbounds [12 x double], [12 x double]* @atom_info.VRADII, i64 0, i64 %55
%57 = load double, double* %56
%58 = load double*, double** %8
%59 = load i64, i64* %9
%60 = getelementptr inbounds double, double* %58, i64 %59
store double %57, double* %60
br label %61
61: ; preds = %54
%62 = load i64, i64* %9
%63 = add nsw i64 %62, 1
store i64 %63, i64* %9
br label %51
64: ; preds = %51
br label %67
65: ; preds = %47
%66 = call i32 @nrerror(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0))
br label %67
67: ; preds = %65, %64
br label %68
68: ; preds = %67, %46
br label %69
69: ; preds = %68, %28
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"XX\00"
@.str.1 = [3 x i8] c"C \00"
@.str.2 = [3 x i8] c"O \00"
@.str.3 = [3 x i8] c"H \00"
@.str.4 = [3 x i8] c"N \00"
@.str.5 = [3 x i8] c"S \00"
@.str.6 = [3 x i8] c"P \00"
@.str.7 = [3 x i8] c"F \00"
@.str.8 = [3 x i8] c"CL\00"
@.str.9 = [3 x i8] c"BR\00"
@.str.10 = [3 x i8] c"I \00"
@.str.11 = [3 x i8] c"SI\00"
@atom_info.CRADII = internal unnamed_addr constant [12 x double] [double 1.200000e+00, double 7.620000e-01, double 6.460000e-01, double 3.520000e-01, double 6.890000e-01, double 1.105000e+00, double 1.000000e+00, double 0x3FE3CED916872B02, double 1.022000e+00, double 1.183000e+00, double 1.378000e+00, double 1.105000e+00]
@atom_info.VRADII = internal unnamed_addr constant [12 x double] [double 2.000000e+00, double 1.700000e+00, double 1.520000e+00, double 1.200000e+00, double 1.550000e+00, double 1.800000e+00, double 1.800000e+00, double 1.470000e+00, double 1.750000e+00, double 1.850000e+00, double 1.980000e+00, double 2.100000e+00]
@.str.12 = [51 x i8] c"wrong options for <atom_info>: should be 1, 2 or 3\00"
define void @atom_info(i64 %0, [3 x i8]* %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
switch i64 %0, label %34 [
i64 1, label %9
i64 2, label %7
i64 3, label %5
]
5: ; preds = %4
%6 = bitcast double* %3 to i8*
br label %36
7: ; preds = %4
%8 = bitcast double* %2 to i8*
br label %36
9: ; preds = %4
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%11 = tail call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 1, i64 0
%13 = tail call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 2, i64 0
%15 = tail call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%16 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 3, i64 0
%17 = tail call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%18 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 4, i64 0
%19 = tail call i32 @strcpy(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%20 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 5, i64 0
%21 = tail call i32 @strcpy(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%22 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 6, i64 0
%23 = tail call i32 @strcpy(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%24 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 7, i64 0
%25 = tail call i32 @strcpy(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%26 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 8, i64 0
%27 = tail call i32 @strcpy(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%28 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 9, i64 0
%29 = tail call i32 @strcpy(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%30 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 10, i64 0
%31 = tail call i32 @strcpy(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%32 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 11, i64 0
%33 = tail call i32 @strcpy(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
br label %36
34: ; preds = %4
%35 = tail call i32 @nrerror(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0))
br label %36
36: ; preds = %5, %7, %9, %34
ret void
}