#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 *, ...);
scalar_t__ isspace(char);
void cwritepwf_(FILE *fp, char *symbol, double *zeff, int *npspt0, int *nflq,
                int *iproj, int *idi, char *xproj, char *xrpcc, int *igrid,
                double *spacing, double *first, int *numa, double *aorad) {
  if (isspace(symbol[0])) {
    symbol[0] = symbol[1];
    symbol[1] = ' ';
  }
  fprintf(fp, "# Opium generated file\n");
  fprintf(fp, "%-2s                      : Element Symbol\n", symbol);
  fprintf(fp, "%4.1f                    : Zeff\n", *zeff);
  fprintf(fp, "%4d                    : # Local grid points\n", *npspt0);
  fprintf(fp, "y                       : dV/dr?\n");
  fprintf(fp, "%4d %1d                  : # non-local grid points, #proj\n",
          *nflq, *iproj);
  fprintf(fp, "y                       : dV/dr?\n");
  fprintf(fp, "%4s                       : projs\n", xproj);
  fprintf(fp, "y                       : AOs in file?\n");
  fprintf(fp, "%1s                       : PCC in file?\n", xrpcc);
  fprintf(fp, "%4d%7.4f%7.4f %1d    : # AO grid points,h,r1,#AOs in file\n",
          *igrid, *spacing, *first, *idi);
  fprintf(fp, "%4.1f                  : AO radius\n", *aorad);
}


x86 assembly (clang, -O0):
<cwritepwf_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
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    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     118b <cwritepwf_+0x6b>
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x20,0x1(%rax)
mov    -0x8(%rbp),%rdi
lea    0xe6a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe6c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xe7e(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
lea    0xe87(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea3(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    (%rax),%edx
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
lea    0xea7(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe73(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    0x18(%rbp),%rdx
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xecb(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    0x20(%rbp),%rdx
lea    0xedd(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    0x28(%rbp),%rax
mov    (%rax),%edx
mov    0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x38(%rbp),%rax
movsd  (%rax),%xmm1
mov    0x10(%rbp),%rax
mov    (%rax),%ecx
lea    0xed9(%rip),%rsi
mov    $0x2,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    0x48(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xefa(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwritepwf_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%r12
mov    %r8,%r13
mov    %rcx,%rbp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    0xa8(%rsp),%rax
mov    %rax,0x30(%rsp)
mov    0x98(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0x90(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0x88(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x80(%rsp),%rax
mov    %rax,0x8(%rsp)
mov    0x78(%rsp),%rax
mov    %rax,(%rsp)
mov    0x70(%rsp),%rax
mov    %rax,0x18(%rsp)
movsbl (%rsi),%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     11bd <cwritepwf_+0x8d>
mov    0x1(%r15),%al
mov    %al,(%r15)
movb   $0x20,0x1(%r15)
lea    0xe3c(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xe3b(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
movsd  (%r14),%xmm0
lea    0xe4e(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edx
lea    0xe5b(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xe78(%rip),%rbp
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    0x0(%r13),%edx
mov    (%r12),%ecx
lea    0xe76(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xe8b(%rip),%rsi
mov    %rbx,%rdi
mov    (%rsp),%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xe99(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xea8(%rip),%rsi
mov    %rbx,%rdi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%edx
mov    0x20(%rsp),%rax
movsd  (%rax),%xmm0
mov    0x28(%rsp),%rax
movsd  (%rax),%xmm1
mov    0x18(%rsp),%rax
mov    (%rax),%ecx
lea    0xe9c(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <fprintf@plt>
mov    0x30(%rsp),%rax
movsd  (%rax),%xmm0
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1,%al
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"# Opium generated file\0A\00"
@.str.1 = [44 x i8] c"%-2s : Element Symbol\0A\00"
@.str.2 = [33 x i8] c"%4.1f : Zeff\0A\00"
@.str.3 = [46 x i8] c"%4d : # Local grid points\0A\00"
@.str.4 = [34 x i8] c"y : dV/dr?\0A\00"
@.str.5 = [59 x i8] c"%4d %1d : # non-local grid points, #proj\0A\00"
@.str.6 = [35 x i8] c"%4s : projs\0A\00"
@.str.7 = [40 x i8] c"y : AOs in file?\0A\00"
@.str.8 = [42 x i8] c"%1s : PCC in file?\0A\00"
@.str.9 = [59 x i8] c"%4d%7.4f%7.4f %1d : # AO grid points,h,r1,#AOs in file\0A\00"
@.str.10 = [36 x i8] c"%4.1f : AO radius\0A\00"
define void @cwritepwf_(i32* %0, i8* %1, double* %2, i32* %3, i32* %4, i32* %5, i32* %6, i8* %7, i8* %8, i32* %9, double* %10, double* %11, i32* %12, double* %13) {
%15 = alloca i32*
%16 = alloca i8*
%17 = alloca double*
%18 = alloca i32*
%19 = alloca i32*
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca i8*
%23 = alloca i8*
%24 = alloca i32*
%25 = alloca double*
%26 = alloca double*
%27 = alloca i32*
%28 = alloca double*
store i32* %0, i32** %15
store i8* %1, i8** %16
store double* %2, double** %17
store i32* %3, i32** %18
store i32* %4, i32** %19
store i32* %5, i32** %20
store i32* %6, i32** %21
store i8* %7, i8** %22
store i8* %8, i8** %23
store i32* %9, i32** %24
store double* %10, double** %25
store double* %11, double** %26
store i32* %12, i32** %27
store double* %13, double** %28
%29 = load i8*, i8** %16
%30 = getelementptr inbounds i8, i8* %29, i64 0
%31 = load i8, i8* %30
%32 = call i64 @isspace(i8 signext %31)
%33 = icmp ne i64 %32, 0
br i1 %33, label %34, label %42
34: ; preds = %14
%35 = load i8*, i8** %16
%36 = getelementptr inbounds i8, i8* %35, i64 1
%37 = load i8, i8* %36
%38 = load i8*, i8** %16
%39 = getelementptr inbounds i8, i8* %38, i64 0
store i8 %37, i8* %39
%40 = load i8*, i8** %16
%41 = getelementptr inbounds i8, i8* %40, i64 1
store i8 32, i8* %41
br label %42
42: ; preds = %34, %14
%43 = load i32*, i32** %15
%44 = call i32 (i32*, i8*, ...) @fprintf(i32* %43, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%45 = load i32*, i32** %15
%46 = load i8*, i8** %16
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* %46)
%48 = load i32*, i32** %15
%49 = load double*, double** %17
%50 = load double, double* %49
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %48, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), double %50)
%52 = load i32*, i32** %15
%53 = load i32*, i32** %18
%54 = load i32, i32* %53
%55 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 %54)
%56 = load i32*, i32** %15
%57 = call i32 (i32*, i8*, ...) @fprintf(i32* %56, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%58 = load i32*, i32** %15
%59 = load i32*, i32** %19
%60 = load i32, i32* %59
%61 = load i32*, i32** %20
%62 = load i32, i32* %61
%63 = call i32 (i32*, i8*, ...) @fprintf(i32* %58, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i32 %60, i32 %62)
%64 = load i32*, i32** %15
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%66 = load i32*, i32** %15
%67 = load i8*, i8** %22
%68 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i8* %67)
%69 = load i32*, i32** %15
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0))
%71 = load i32*, i32** %15
%72 = load i8*, i8** %23
%73 = call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0), i8* %72)
%74 = load i32*, i32** %15
%75 = load i32*, i32** %24
%76 = load i32, i32* %75
%77 = load double*, double** %25
%78 = load double, double* %77
%79 = load double*, double** %26
%80 = load double, double* %79
%81 = load i32*, i32** %21
%82 = load i32, i32* %81
%83 = call i32 (i32*, i8*, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.9, i64 0, i64 0), i32 %76, double %78, double %80, i32 %82)
%84 = load i32*, i32** %15
%85 = load double*, double** %28
%86 = load double, double* %85
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0), double %86)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"# Opium generated file\0A\00"
@.str.1 = [44 x i8] c"%-2s : Element Symbol\0A\00"
@.str.2 = [33 x i8] c"%4.1f : Zeff\0A\00"
@.str.3 = [46 x i8] c"%4d : # Local grid points\0A\00"
@.str.4 = [34 x i8] c"y : dV/dr?\0A\00"
@.str.5 = [59 x i8] c"%4d %1d : # non-local grid points, #proj\0A\00"
@.str.6 = [35 x i8] c"%4s : projs\0A\00"
@.str.7 = [40 x i8] c"y : AOs in file?\0A\00"
@.str.8 = [42 x i8] c"%1s : PCC in file?\0A\00"
@.str.9 = [59 x i8] c"%4d%7.4f%7.4f %1d : # AO grid points,h,r1,#AOs in file\0A\00"
@.str.10 = [36 x i8] c"%4.1f : AO radius\0A\00"
define void @cwritepwf_(i32* nocapture %0, i8* %1, double* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5, i32* nocapture %6, i8* %7, i8* %8, i32* nocapture %9, double* nocapture %10, double* nocapture %11, i32* nocapture readnone %12, double* nocapture %13) {
%15 = load i8, i8* %1
%16 = tail call i64 @isspace(i8 signext %15)
%17 = icmp eq i64 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %14
%19 = getelementptr inbounds i8, i8* %1, i64 1
%20 = load i8, i8* %19
store i8 %20, i8* %1
store i8 32, i8* %19
br label %21
21: ; preds = %18, %14
%22 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 23, i64 1, i32* %0)
%23 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%24 = load double, double* %2
%25 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), double %24)
%26 = load i32, i32* %3
%27 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i64 33, i64 1, i32* %0)
%29 = load i32, i32* %4
%30 = load i32, i32* %5
%31 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i32 %29, i32 %30)
%32 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i64 33, i64 1, i32* %0)
%33 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i8* %7)
%34 = tail call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0), i64 39, i64 1, i32* %0)
%35 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0), i8* %8)
%36 = load i32, i32* %9
%37 = load double, double* %10
%38 = load double, double* %11
%39 = load i32, i32* %6
%40 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.9, i64 0, i64 0), i32 %36, double %37, double %38, i32 %39)
%41 = load double, double* %13
%42 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0), double %41)
ret void
}