#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 */
scalar_t__ malloc(int);
int *load_num_nucs(long n_isotopes) {
  int *num_nucs = (int *)malloc(12 * sizeof(int));
  if (n_isotopes == 68)
    num_nucs[0] = 34;
  else
    num_nucs[0] = 321;
  num_nucs[1] = 5;
  num_nucs[2] = 4;
  num_nucs[3] = 4;
  num_nucs[4] = 27;
  num_nucs[5] = 21;
  num_nucs[6] = 21;
  num_nucs[7] = 21;
  num_nucs[8] = 21;
  num_nucs[9] = 21;
  num_nucs[10] = 9;
  num_nucs[11] = 9;
  return num_nucs;
}


x86 assembly (clang, -O0):
<load_num_nucs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x30,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x44,-0x8(%rbp)
jne    1144 <load_num_nucs+0x34>
mov    -0x10(%rbp),%rax
movl   $0x22,(%rax)
jmp    114e <load_num_nucs+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x141,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x5,0x4(%rax)
mov    -0x10(%rbp),%rax
movl   $0x4,0x8(%rax)
mov    -0x10(%rbp),%rax
movl   $0x4,0xc(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1b,0x10(%rax)
mov    -0x10(%rbp),%rax
movl   $0x15,0x14(%rax)
mov    -0x10(%rbp),%rax
movl   $0x15,0x18(%rax)
mov    -0x10(%rbp),%rax
movl   $0x15,0x1c(%rax)
mov    -0x10(%rbp),%rax
movl   $0x15,0x20(%rax)
mov    -0x10(%rbp),%rax
movl   $0x15,0x24(%rax)
mov    -0x10(%rbp),%rax
movl   $0x9,0x28(%rax)
mov    -0x10(%rbp),%rax
movl   $0x9,0x2c(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_num_nucs>:
push   %rbx
mov    %rdi,%rbx
mov    $0x30,%edi
call   1030 <malloc@plt>
cmp    $0x44,%rbx
mov    $0x22,%ecx
mov    $0x141,%edx
cmove  %ecx,%edx
mov    %edx,(%rax)
movaps 0xec8(%rip),%xmm0
movups %xmm0,0x4(%rax)
movaps 0xecd(%rip),%xmm0
movups %xmm0,0x14(%rax)
movabs $0x900000015,%rcx
mov    %rcx,0x24(%rax)
movl   $0x9,0x2c(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i32* @load_num_nucs(i64 %0) {
%2 = alloca i64
%3 = alloca i32*
store i64 %0, i64* %2
%4 = call i64 @malloc(i32 48)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i64, i64* %2
%7 = icmp eq i64 %6, 68
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 0
store i32 34, i32* %10
br label %14
11: ; preds = %1
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 0
store i32 321, i32* %13
br label %14
14: ; preds = %11, %8
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 5, i32* %16
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 4, i32* %18
%19 = load i32*, i32** %3
%20 = getelementptr inbounds i32, i32* %19, i64 3
store i32 4, i32* %20
%21 = load i32*, i32** %3
%22 = getelementptr inbounds i32, i32* %21, i64 4
store i32 27, i32* %22
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i32, i32* %23, i64 5
store i32 21, i32* %24
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i64 6
store i32 21, i32* %26
%27 = load i32*, i32** %3
%28 = getelementptr inbounds i32, i32* %27, i64 7
store i32 21, i32* %28
%29 = load i32*, i32** %3
%30 = getelementptr inbounds i32, i32* %29, i64 8
store i32 21, i32* %30
%31 = load i32*, i32** %3
%32 = getelementptr inbounds i32, i32* %31, i64 9
store i32 21, i32* %32
%33 = load i32*, i32** %3
%34 = getelementptr inbounds i32, i32* %33, i64 10
store i32 9, i32* %34
%35 = load i32*, i32** %3
%36 = getelementptr inbounds i32, i32* %35, i64 11
store i32 9, i32* %36
%37 = load i32*, i32** %3
ret i32* %37
}

LLVM IR (-O2):
define i32* @load_num_nucs(i64 %0) {
%2 = tail call i64 @malloc(i32 48)
%3 = inttoptr i64 %2 to i32*
%4 = icmp eq i64 %0, 68
%5 = select i1 %4, i32 34, i32 321
store i32 %5, i32* %3
%6 = getelementptr inbounds i32, i32* %3, i64 1
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 5, i32 4, i32 4, i32 27>, <4 x i32>* %7
%8 = getelementptr inbounds i32, i32* %3, i64 5
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 21, i32 21, i32 21, i32 21>, <4 x i32>* %9
%10 = getelementptr inbounds i32, i32* %3, i64 9
store i32 21, i32* %10
%11 = getelementptr inbounds i32, i32* %3, i64 10
store i32 9, i32* %11
%12 = getelementptr inbounds i32, i32* %3, i64 11
store i32 9, i32* %12
ret i32* %3
}