#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *);
int /*<<< orphan*/ time_str(int, char *);
void greeting(FILE *outFile) {
  char time[256];
  time_str(256, time);
  fprintf(
      outFile,
      "                                                            \n"
      "+----------------------------------------------------------+\n"
      "|| SQ - Siam Quantum                                       |\n"
      "|| Teepanis Chachiyo <teepanis.chachiyo@gmail.com>         |\n"
      "||                                                         |\n"
      "|| Please cite this work as:                               |\n"
      "|| T. Chachiyo et al., (2016) \"Siam Quantum: a compact     |\n"
      "|| open-source quantum simulation software for molecules,\" |\n"
      "|| Thailand. see https://sites.google.com/site/siamquantum |\n"
      "||                                                         |\n"
      "||                                                         |\n"
      "|| Version: %10s                                     |\n"
      "||                                                         |\n"
      "|| Author                                                  |\n"
      "|| [] Teepanis Chachiyo                                    |\n"
      "||      First prototype RHF                                |\n"
      "||      Unrestricted Hartree-Fock     (UHF)                |\n"
      "||      Density Functional Theory     (DFT)                |\n"
      "||      Moller-Plesset Perturbation   (MP2)                |\n"
      "||      Minimum Energy Crossing Point (MECP)               |\n"
      "||      Excited States                                     |\n"
      "||      Parallelization                                    |\n"
      "||      Geometry Optimization                              |\n"
      "||      Convergence Acceleration                           |\n"
      "||      Integral Memory Storage Scheme                     |\n"
      "||      Fast Energy and Gradients Evaluation               |\n"
      "||                                                         |\n"
      "|| Contributors                                            |\n"
      "|| [] Theerapon Khamla                                     |\n"
      "||      First prototype gradient of energy                 |\n"
      "||      First prototype geometry optimization              |\n"
      "||      Exporting densities for visualization              |\n"
      "|| [] Keerati Maneesai  - Boys gamma function              |\n"
      "|| [] Nanta Sophonrat   - Electric field                   |\n"
      "|| [] Chutchawan Jaisuk - Molecular dynamics               |\n"
      "|| [] Aniwat Kesorn     - Dipole moment                    |\n"
      "||                                                         |\n"
      "|| Acknowledgement                                         |\n"
      "|| [] Narong Pootaddouwng                                  |\n"
      "|| [] Nawee  Jaroonchokanan                                |\n"
      "|| [] Labedev grid: from a C/C++ code by John Burkardt     |\n"
      "|| [] Becke grid: adapted from DFTLIBS by Radovan Bast     |\n"
      "|| [] DFT functional formulas: monologue by Timothy Giesea |\n"
      "|| [] Integrating subroutine (first prototype only): from  |\n"
      "||    PyQuante written by Richard Muller                   |\n"
      "||                                                         |\n"
      "+----------------------------------------------------------+\n"
      "                                                            \n"
      " Copyright (C) 2012,2013,2014,2015,2016 Teepanis Chachiyo\n"
      "                                                         \n"
      "This program is free software; you can redistribute it and/or modify\n"
      "it under the terms of the GNU General Public License as published by\n"
      "the Free Software Foundation; either version 2, or (at your option) \n"
      "any later version.                                                  \n"
      "                                                                    \n"
      "                                                                    \n"
      "Begin: %s\n",
      "3.9.3", time);
}


x86 assembly (clang, -O0):
<greeting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rsi
mov    $0x100,%edi
call   1030 <time_str@plt>
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rcx
lea    0xeae(%rip),%rsi
lea    0x1c2e(%rip),%rdx
call   1040 <fprintf@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<greeting>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    $0x100,%edi
mov    %r14,%rsi
call   1030 <time_str@plt>
lea    0xebc(%rip),%rsi
lea    0x1c3c(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rcx
call   1040 <fprintf@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3463 x i8] c" \0A+----------------------------------------------------------+\0A|| SQ - Siam Quantum |\0A|| Teepanis Chachiyo <teepanis.chachiyo@gmail.com> |\0A|| |\0A|| Please cite this work as: |\0A|| T. Chachiyo et al., (2016) \22Siam Quantum: a compact |\0A|| open-source quantum simulation software for molecules,\22 |\0A|| Thailand. see https://sites.google.com/site/siamquantum |\0A|| |\0A|| |\0A|| Version: %10s |\0A|| |\0A|| Author |\0A|| [] Teepanis Chachiyo |\0A|| First prototype RHF |\0A|| Unrestricted Hartree-Fock (UHF) |\0A|| Density Functional Theory (DFT) |\0A|| Moller-Plesset Perturbation (MP2) |\0A|| Minimum Energy Crossing Point (MECP) |\0A|| Excited States |\0A|| Parallelization |\0A|| Geometry Optimization |\0A|| Convergence Acceleration |\0A|| Integral Memory Storage Scheme |\0A|| Fast Energy and Gradients Evaluation |\0A|| |\0A|| Contributors |\0A|| [] Theerapon Khamla |\0A|| First prototype gradient of energy |\0A|| First prototype geometry optimization |\0A|| Exporting densities for visualization |\0A|| [] Keerati Maneesai - Boys gamma function |\0A|| [] Nanta Sophonrat - Electric field |\0A|| [] Chutchawan Jaisuk - Molecular dynamics |\0A|| [] Aniwat Kesorn - Dipole moment |\0A|| |\0A|| Acknowledgement |\0A|| [] Narong Pootaddouwng |\0A|| [] Nawee Jaroonchokanan |\0A|| [] Labedev grid: from a C/C++ code by John Burkardt |\0A|| [] Becke grid: adapted from DFTLIBS by Radovan Bast |\0A|| [] DFT functional formulas: monologue by Timothy Giesea |\0A|| [] Integrating subroutine (first prototype only): from |\0A|| PyQuante written by Richard Muller |\0A|| |\0A+----------------------------------------------------------+\0A \0A Copyright (C) 2012,2013,2014,2015,2016 Teepanis Chachiyo\0A \0AThis program is free software; you can redistribute it and/or modify\0Ait under the terms of the GNU General Public License as published by\0Athe Free Software Foundation; either version 2, or (at your option) \0Aany later version. \0A \0A \0ABegin: %s\0A\00"
@.str.1 = [6 x i8] c"3.9.3\00"
define void @greeting(i32* %0) {
%2 = alloca i32*
%3 = alloca [256 x i8]
store i32* %0, i32** %2
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @time_str(i32 256, i8* %4)
%6 = load i32*, i32** %2
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([3463 x i8], [3463 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [3463 x i8] c" \0A+----------------------------------------------------------+\0A|| SQ - Siam Quantum |\0A|| Teepanis Chachiyo <teepanis.chachiyo@gmail.com> |\0A|| |\0A|| Please cite this work as: |\0A|| T. Chachiyo et al., (2016) \22Siam Quantum: a compact |\0A|| open-source quantum simulation software for molecules,\22 |\0A|| Thailand. see https://sites.google.com/site/siamquantum |\0A|| |\0A|| |\0A|| Version: %10s |\0A|| |\0A|| Author |\0A|| [] Teepanis Chachiyo |\0A|| First prototype RHF |\0A|| Unrestricted Hartree-Fock (UHF) |\0A|| Density Functional Theory (DFT) |\0A|| Moller-Plesset Perturbation (MP2) |\0A|| Minimum Energy Crossing Point (MECP) |\0A|| Excited States |\0A|| Parallelization |\0A|| Geometry Optimization |\0A|| Convergence Acceleration |\0A|| Integral Memory Storage Scheme |\0A|| Fast Energy and Gradients Evaluation |\0A|| |\0A|| Contributors |\0A|| [] Theerapon Khamla |\0A|| First prototype gradient of energy |\0A|| First prototype geometry optimization |\0A|| Exporting densities for visualization |\0A|| [] Keerati Maneesai - Boys gamma function |\0A|| [] Nanta Sophonrat - Electric field |\0A|| [] Chutchawan Jaisuk - Molecular dynamics |\0A|| [] Aniwat Kesorn - Dipole moment |\0A|| |\0A|| Acknowledgement |\0A|| [] Narong Pootaddouwng |\0A|| [] Nawee Jaroonchokanan |\0A|| [] Labedev grid: from a C/C++ code by John Burkardt |\0A|| [] Becke grid: adapted from DFTLIBS by Radovan Bast |\0A|| [] DFT functional formulas: monologue by Timothy Giesea |\0A|| [] Integrating subroutine (first prototype only): from |\0A|| PyQuante written by Richard Muller |\0A|| |\0A+----------------------------------------------------------+\0A \0A Copyright (C) 2012,2013,2014,2015,2016 Teepanis Chachiyo\0A \0AThis program is free software; you can redistribute it and/or modify\0Ait under the terms of the GNU General Public License as published by\0Athe Free Software Foundation; either version 2, or (at your option) \0Aany later version. \0A \0A \0ABegin: %s\0A\00"
@.str.1 = [6 x i8] c"3.9.3\00"
define void @greeting(i32* nocapture %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @time_str(i32 256, i8* %3)
%5 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([3463 x i8], [3463 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}