#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 */
struct icom {
  int dummy;
};

/* Variables and functions */
float atof(char *);
int imget_fits_float_value(struct icom *, char *, float *);
int imget_fits_value(struct icom *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, float);
int /*<<< orphan*/ strcpy(char *, char *);
int imc_getWCS(struct icom *icom, char *crval1, char *crval2, char *equinox,
               char *cdelt1, char *cdelt2, char *longpole, char *ctype1,
               char *ctype2, char *cunit1, char *cunit2, char *crpix1,
               char *crpix2, char *cd11, char *cd12, char *cd21, char *cd22) {
  float pc11 = 0, pc12 = 0, pc21 = 0, pc22 = 0;
  if (imget_fits_value(icom, "CRVAL1", crval1) == 1 &&
      imget_fits_value(icom, "CRVAL2", crval2) == 1 &&
      imget_fits_value(icom, "EQUINOX", equinox) == 1 &&
      imget_fits_value(icom, "CTYPE1", ctype1) == 1 &&
      imget_fits_value(icom, "CTYPE2", ctype2) == 1 &&
      imget_fits_value(icom, "CRPIX1", crpix1) == 1 &&
      imget_fits_value(icom, "CRPIX2", crpix2) == 1) {
    imget_fits_value(icom, "CUNIT1", cunit1);
    imget_fits_value(icom, "CUNIT2", cunit2);
    if (imget_fits_value(icom, "LONPOLE", longpole) != 1 ||
        imget_fits_value(icom, "LONGPOLE", longpole) != 1)
      strcpy(longpole, "180.0");
    if ((imget_fits_value(icom, "CD1_1", cd11) +
         imget_fits_value(icom, "CD1_2", cd12) +
         imget_fits_value(icom, "CD2_1", cd21) +
         imget_fits_value(icom, "CD2_2", cd22)) != 0) {
      return 1;
    } else if (imget_fits_value(icom, "CDELT1", cdelt1) == 1 &&
               imget_fits_value(icom, "CDELT2", cdelt2) == 1 &&
               imget_fits_float_value(icom, "PC001001", &pc11) == 1 &&
               imget_fits_float_value(icom, "PC001002", &pc12) == 1 &&
               imget_fits_float_value(icom, "PC002001", &pc21) == 1 &&
               imget_fits_float_value(icom, "PC002002", &pc22) == 1) {
      sprintf(cd11, "%f", pc11 * atof(cdelt1));
      sprintf(cd12, "%f", pc12 * atof(cdelt1));
      sprintf(cd21, "%f", pc21 * atof(cdelt2));
      sprintf(cd22, "%f", pc22 * atof(cdelt2));
      return 1;
    } else
      return 0;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<imc_getWCS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
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,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe32(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    152d <imc_getWCS+0x3dd>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xe1c(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    152d <imc_getWCS+0x3dd>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rdx
lea    0xe06(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    152d <imc_getWCS+0x3dd>
mov    -0x10(%rbp),%rdi
mov    0x18(%rbp),%rdx
lea    0xdf1(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    152d <imc_getWCS+0x3dd>
mov    -0x10(%rbp),%rdi
mov    0x20(%rbp),%rdx
lea    0xddb(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    152d <imc_getWCS+0x3dd>
mov    -0x10(%rbp),%rdi
mov    0x38(%rbp),%rdx
lea    0xdc5(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    152d <imc_getWCS+0x3dd>
mov    -0x10(%rbp),%rdi
mov    0x40(%rbp),%rdx
lea    0xdaf(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    152d <imc_getWCS+0x3dd>
mov    -0x10(%rbp),%rdi
mov    0x28(%rbp),%rdx
lea    0xd99(%rip),%rsi
call   1070 <imget_fits_value@plt>
mov    -0x10(%rbp),%rdi
mov    0x30(%rbp),%rdx
lea    0xd8c(%rip),%rsi
call   1070 <imget_fits_value@plt>
mov    -0x10(%rbp),%rdi
mov    0x10(%rbp),%rdx
lea    0xd7f(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    12ec <imc_getWCS+0x19c>
mov    -0x10(%rbp),%rdi
mov    0x10(%rbp),%rdx
lea    0xd6a(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
je     12fc <imc_getWCS+0x1ac>
mov    0x10(%rbp),%rdi
lea    0xd5a(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
mov    0x48(%rbp),%rdx
lea    0xd4c(%rip),%rsi
call   1070 <imget_fits_value@plt>
mov    %eax,-0x54(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x50(%rbp),%rdx
lea    0xd3b(%rip),%rsi
call   1070 <imget_fits_value@plt>
mov    %eax,%ecx
mov    -0x54(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x58(%rbp),%rdx
lea    0xd23(%rip),%rsi
call   1070 <imget_fits_value@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x60(%rbp),%rdx
lea    0xd0b(%rip),%rsi
call   1070 <imget_fits_value@plt>
mov    %eax,%ecx
mov    -0x4c(%rbp),%eax
add    %ecx,%eax
cmp    $0x0,%eax
je     137f <imc_getWCS+0x22f>
movl   $0x1,-0x4(%rbp)
jmp    1534 <imc_getWCS+0x3e4>
mov    -0x10(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xce1(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    1521 <imc_getWCS+0x3d1>
mov    -0x10(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xccb(%rip),%rsi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    1521 <imc_getWCS+0x3d1>
mov    -0x10(%rbp),%rdi
lea    0xcb9(%rip),%rsi
lea    -0x3c(%rbp),%rdx
call   1050 <imget_fits_float_value@plt>
cmp    $0x1,%eax
jne    1521 <imc_getWCS+0x3d1>
mov    -0x10(%rbp),%rdi
lea    0xca5(%rip),%rsi
lea    -0x40(%rbp),%rdx
call   1050 <imget_fits_float_value@plt>
cmp    $0x1,%eax
jne    1521 <imc_getWCS+0x3d1>
mov    -0x10(%rbp),%rdi
lea    0xc91(%rip),%rsi
lea    -0x44(%rbp),%rdx
call   1050 <imget_fits_float_value@plt>
cmp    $0x1,%eax
jne    1521 <imc_getWCS+0x3d1>
mov    -0x10(%rbp),%rdi
lea    0xc7d(%rip),%rsi
lea    -0x48(%rbp),%rdx
call   1050 <imget_fits_float_value@plt>
cmp    $0x1,%eax
jne    1521 <imc_getWCS+0x3d1>
mov    0x48(%rbp),%rax
mov    %rax,-0x90(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
mov    -0x30(%rbp),%rdi
call   1040 <atof@plt>
mov    -0x90(%rbp),%rdi
movaps %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
mulss  %xmm1,%xmm0
lea    0xc36(%rip),%rsi
call   1060 <sprintf@plt>
mov    0x50(%rbp),%rax
mov    %rax,-0x80(%rbp)
movss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
mov    -0x30(%rbp),%rdi
call   1040 <atof@plt>
mov    -0x80(%rbp),%rdi
movaps %xmm0,%xmm1
movss  -0x74(%rbp),%xmm0
mulss  %xmm1,%xmm0
lea    0xbff(%rip),%rsi
call   1060 <sprintf@plt>
mov    0x58(%rbp),%rax
mov    %rax,-0x70(%rbp)
movss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
mov    -0x38(%rbp),%rdi
call   1040 <atof@plt>
mov    -0x70(%rbp),%rdi
movaps %xmm0,%xmm1
movss  -0x64(%rbp),%xmm0
mulss  %xmm1,%xmm0
lea    0xbc8(%rip),%rsi
call   1060 <sprintf@plt>
mov    0x60(%rbp),%rax
mov    %rax,-0x60(%rbp)
movss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x58(%rbp)
mov    -0x38(%rbp),%rdi
call   1040 <atof@plt>
mov    -0x60(%rbp),%rdi
movaps %xmm0,%xmm1
movss  -0x58(%rbp),%xmm0
mulss  %xmm1,%xmm0
lea    0xb91(%rip),%rsi
call   1060 <sprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1534 <imc_getWCS+0x3e4>
movl   $0x0,-0x4(%rbp)
jmp    1534 <imc_getWCS+0x3e4>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imc_getWCS>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%rbp
mov    %rdx,%rbx
mov    %rsi,%rdx
mov    %rdi,%r12
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xe69(%rip),%rsi
call   1070 <imget_fits_value@plt>
xor    %r13d,%r13d
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
lea    0xe58(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
lea    0xe44(%rip),%rsi
mov    %r12,%rdi
mov    %rbp,%rdx
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
mov    0x58(%rsp),%rdx
lea    0xe2c(%rip),%rsi
mov    %r12,%rdi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
mov    0x60(%rsp),%rdx
lea    0xe16(%rip),%rsi
mov    %r12,%rdi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
mov    0x78(%rsp),%rdx
lea    0xe00(%rip),%rsi
mov    %r12,%rdi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
mov    0x80(%rsp),%rdx
lea    0xde7(%rip),%rsi
mov    %r12,%rdi
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
mov    0x70(%rsp),%rbp
mov    0x68(%rsp),%rdx
mov    0x50(%rsp),%rbx
lea    0xdc7(%rip),%rsi
mov    %r12,%rdi
call   1070 <imget_fits_value@plt>
lea    0xdbf(%rip),%rsi
mov    %r12,%rdi
mov    %rbp,%rdx
call   1070 <imget_fits_value@plt>
lea    0xdb4(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    12b3 <imc_getWCS+0x163>
lea    0xda5(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
je     12c2 <imc_getWCS+0x172>
lea    0xd97(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xd8e(%rip),%rsi
mov    %r12,%rdi
mov    0x88(%rsp),%rdx
call   1070 <imget_fits_value@plt>
mov    %eax,%ebx
lea    0xd7b(%rip),%rsi
mov    %r12,%rdi
mov    0x90(%rsp),%rdx
call   1070 <imget_fits_value@plt>
mov    %eax,%ebp
add    %ebx,%ebp
lea    0xd66(%rip),%rsi
mov    %r12,%rdi
mov    0x98(%rsp),%rdx
call   1070 <imget_fits_value@plt>
mov    %eax,%ebx
add    %ebp,%ebx
lea    0xd51(%rip),%rsi
mov    %r12,%rdi
mov    0xa0(%rsp),%rbp
mov    %rbp,%rdx
call   1070 <imget_fits_value@plt>
add    %ebx,%eax
jne    1487 <imc_getWCS+0x337>
lea    0xd35(%rip),%rsi
mov    %r12,%rdi
mov    %r15,%rdx
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
lea    0xd21(%rip),%rsi
mov    %r12,%rdi
mov    %r14,%rdx
call   1070 <imget_fits_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
lea    0xd0d(%rip),%rsi
lea    0x14(%rsp),%rdx
mov    %r12,%rdi
call   1050 <imget_fits_float_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
lea    0xcf9(%rip),%rsi
lea    0x10(%rsp),%rdx
mov    %r12,%rdi
call   1050 <imget_fits_float_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
lea    0xce5(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %r12,%rdi
call   1050 <imget_fits_float_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
lea    0xcd1(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %r12,%rdi
call   1050 <imget_fits_float_value@plt>
cmp    $0x1,%eax
jne    148d <imc_getWCS+0x33d>
movss  0x14(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
mov    %r15,%rdi
call   1040 <atof@plt>
mulss  0x4(%rsp),%xmm0
lea    0xca3(%rip),%rbx
mov    0x88(%rsp),%rdi
mov    %rbx,%rsi
call   1060 <sprintf@plt>
movss  0x10(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
mov    %r15,%rdi
call   1040 <atof@plt>
mulss  0x4(%rsp),%xmm0
mov    0x90(%rsp),%rdi
mov    %rbx,%rsi
call   1060 <sprintf@plt>
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
mov    %r14,%rdi
call   1040 <atof@plt>
mulss  0x4(%rsp),%xmm0
mov    0x98(%rsp),%rdi
mov    %rbx,%rsi
call   1060 <sprintf@plt>
movss  0x8(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
mov    %r14,%rdi
call   1040 <atof@plt>
mulss  0x4(%rsp),%xmm0
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1060 <sprintf@plt>
mov    $0x1,%r13d
mov    %r13d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.icom = type { i32 }
@.str = [7 x i8] c"CRVAL1\00"
@.str.1 = [7 x i8] c"CRVAL2\00"
@.str.2 = [8 x i8] c"EQUINOX\00"
@.str.3 = [7 x i8] c"CTYPE1\00"
@.str.4 = [7 x i8] c"CTYPE2\00"
@.str.5 = [7 x i8] c"CRPIX1\00"
@.str.6 = [7 x i8] c"CRPIX2\00"
@.str.7 = [7 x i8] c"CUNIT1\00"
@.str.8 = [7 x i8] c"CUNIT2\00"
@.str.9 = [8 x i8] c"LONPOLE\00"
@.str.10 = [9 x i8] c"LONGPOLE\00"
@.str.11 = [6 x i8] c"180.0\00"
@.str.12 = [6 x i8] c"CD1_1\00"
@.str.13 = [6 x i8] c"CD1_2\00"
@.str.14 = [6 x i8] c"CD2_1\00"
@.str.15 = [6 x i8] c"CD2_2\00"
@.str.16 = [7 x i8] c"CDELT1\00"
@.str.17 = [7 x i8] c"CDELT2\00"
@.str.18 = [9 x i8] c"PC001001\00"
@.str.19 = [9 x i8] c"PC001002\00"
@.str.20 = [9 x i8] c"PC002001\00"
@.str.21 = [9 x i8] c"PC002002\00"
@.str.22 = [3 x i8] c"%f\00"
define i32 @imc_getWCS(%struct.icom* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9, i8* %10, i8* %11, i8* %12, i8* %13, i8* %14, i8* %15, i8* %16) {
%18 = alloca i32
%19 = alloca %struct.icom*
%20 = alloca i8*
%21 = alloca i8*
%22 = alloca i8*
%23 = alloca i8*
%24 = alloca i8*
%25 = alloca i8*
%26 = alloca i8*
%27 = alloca i8*
%28 = alloca i8*
%29 = alloca i8*
%30 = alloca i8*
%31 = alloca i8*
%32 = alloca i8*
%33 = alloca i8*
%34 = alloca i8*
%35 = alloca i8*
%36 = alloca float
%37 = alloca float
%38 = alloca float
%39 = alloca float
store %struct.icom* %0, %struct.icom** %19
store i8* %1, i8** %20
store i8* %2, i8** %21
store i8* %3, i8** %22
store i8* %4, i8** %23
store i8* %5, i8** %24
store i8* %6, i8** %25
store i8* %7, i8** %26
store i8* %8, i8** %27
store i8* %9, i8** %28
store i8* %10, i8** %29
store i8* %11, i8** %30
store i8* %12, i8** %31
store i8* %13, i8** %32
store i8* %14, i8** %33
store i8* %15, i8** %34
store i8* %16, i8** %35
store float 0.000000e+00, float* %36
store float 0.000000e+00, float* %37
store float 0.000000e+00, float* %38
store float 0.000000e+00, float* %39
%40 = load %struct.icom*, %struct.icom** %19
%41 = load i8*, i8** %20
%42 = call i32 @imget_fits_value(%struct.icom* %40, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %41)
%43 = icmp eq i32 %42, 1
br i1 %43, label %44, label %163
44: ; preds = %17
%45 = load %struct.icom*, %struct.icom** %19
%46 = load i8*, i8** %21
%47 = call i32 @imget_fits_value(%struct.icom* %45, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %46)
%48 = icmp eq i32 %47, 1
br i1 %48, label %49, label %163
49: ; preds = %44
%50 = load %struct.icom*, %struct.icom** %19
%51 = load i8*, i8** %22
%52 = call i32 @imget_fits_value(%struct.icom* %50, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %51)
%53 = icmp eq i32 %52, 1
br i1 %53, label %54, label %163
54: ; preds = %49
%55 = load %struct.icom*, %struct.icom** %19
%56 = load i8*, i8** %26
%57 = call i32 @imget_fits_value(%struct.icom* %55, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %56)
%58 = icmp eq i32 %57, 1
br i1 %58, label %59, label %163
59: ; preds = %54
%60 = load %struct.icom*, %struct.icom** %19
%61 = load i8*, i8** %27
%62 = call i32 @imget_fits_value(%struct.icom* %60, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %61)
%63 = icmp eq i32 %62, 1
br i1 %63, label %64, label %163
64: ; preds = %59
%65 = load %struct.icom*, %struct.icom** %19
%66 = load i8*, i8** %30
%67 = call i32 @imget_fits_value(%struct.icom* %65, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %66)
%68 = icmp eq i32 %67, 1
br i1 %68, label %69, label %163
69: ; preds = %64
%70 = load %struct.icom*, %struct.icom** %19
%71 = load i8*, i8** %31
%72 = call i32 @imget_fits_value(%struct.icom* %70, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %71)
%73 = icmp eq i32 %72, 1
br i1 %73, label %74, label %163
74: ; preds = %69
%75 = load %struct.icom*, %struct.icom** %19
%76 = load i8*, i8** %28
%77 = call i32 @imget_fits_value(%struct.icom* %75, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* %76)
%78 = load %struct.icom*, %struct.icom** %19
%79 = load i8*, i8** %29
%80 = call i32 @imget_fits_value(%struct.icom* %78, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* %79)
%81 = load %struct.icom*, %struct.icom** %19
%82 = load i8*, i8** %25
%83 = call i32 @imget_fits_value(%struct.icom* %81, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8* %82)
%84 = icmp ne i32 %83, 1
br i1 %84, label %90, label %85
85: ; preds = %74
%86 = load %struct.icom*, %struct.icom** %19
%87 = load i8*, i8** %25
%88 = call i32 @imget_fits_value(%struct.icom* %86, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* %87)
%89 = icmp ne i32 %88, 1
br i1 %89, label %90, label %93
90: ; preds = %85, %74
%91 = load i8*, i8** %25
%92 = call i32 @strcpy(i8* %91, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %93
93: ; preds = %90, %85
%94 = load %struct.icom*, %struct.icom** %19
%95 = load i8*, i8** %32
%96 = call i32 @imget_fits_value(%struct.icom* %94, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i8* %95)
%97 = load %struct.icom*, %struct.icom** %19
%98 = load i8*, i8** %33
%99 = call i32 @imget_fits_value(%struct.icom* %97, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i8* %98)
%100 = add nsw i32 %96, %99
%101 = load %struct.icom*, %struct.icom** %19
%102 = load i8*, i8** %34
%103 = call i32 @imget_fits_value(%struct.icom* %101, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %102)
%104 = add nsw i32 %100, %103
%105 = load %struct.icom*, %struct.icom** %19
%106 = load i8*, i8** %35
%107 = call i32 @imget_fits_value(%struct.icom* %105, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8* %106)
%108 = add nsw i32 %104, %107
%109 = icmp ne i32 %108, 0
br i1 %109, label %110, label %111
110: ; preds = %93
store i32 1, i32* %18
br label %164
111: ; preds = %93
%112 = load %struct.icom*, %struct.icom** %19
%113 = load i8*, i8** %23
%114 = call i32 @imget_fits_value(%struct.icom* %112, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i8* %113)
%115 = icmp eq i32 %114, 1
br i1 %115, label %116, label %162
116: ; preds = %111
%117 = load %struct.icom*, %struct.icom** %19
%118 = load i8*, i8** %24
%119 = call i32 @imget_fits_value(%struct.icom* %117, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* %118)
%120 = icmp eq i32 %119, 1
br i1 %120, label %121, label %162
121: ; preds = %116
%122 = load %struct.icom*, %struct.icom** %19
%123 = call i32 @imget_fits_float_value(%struct.icom* %122, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i64 0, i64 0), float* %36)
%124 = icmp eq i32 %123, 1
br i1 %124, label %125, label %162
125: ; preds = %121
%126 = load %struct.icom*, %struct.icom** %19
%127 = call i32 @imget_fits_float_value(%struct.icom* %126, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), float* %37)
%128 = icmp eq i32 %127, 1
br i1 %128, label %129, label %162
129: ; preds = %125
%130 = load %struct.icom*, %struct.icom** %19
%131 = call i32 @imget_fits_float_value(%struct.icom* %130, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0), float* %38)
%132 = icmp eq i32 %131, 1
br i1 %132, label %133, label %162
133: ; preds = %129
%134 = load %struct.icom*, %struct.icom** %19
%135 = call i32 @imget_fits_float_value(%struct.icom* %134, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0), float* %39)
%136 = icmp eq i32 %135, 1
br i1 %136, label %137, label %162
137: ; preds = %133
%138 = load i8*, i8** %32
%139 = load float, float* %36
%140 = load i8*, i8** %23
%141 = call float @atof(i8* %140)
%142 = fmul float %139, %141
%143 = call i32 @sprintf(i8* %138, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), float %142)
%144 = load i8*, i8** %33
%145 = load float, float* %37
%146 = load i8*, i8** %23
%147 = call float @atof(i8* %146)
%148 = fmul float %145, %147
%149 = call i32 @sprintf(i8* %144, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), float %148)
%150 = load i8*, i8** %34
%151 = load float, float* %38
%152 = load i8*, i8** %24
%153 = call float @atof(i8* %152)
%154 = fmul float %151, %153
%155 = call i32 @sprintf(i8* %150, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), float %154)
%156 = load i8*, i8** %35
%157 = load float, float* %39
%158 = load i8*, i8** %24
%159 = call float @atof(i8* %158)
%160 = fmul float %157, %159
%161 = call i32 @sprintf(i8* %156, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), float %160)
store i32 1, i32* %18
br label %164
162: ; preds = %133, %129, %125, %121, %116, %111
store i32 0, i32* %18
br label %164
163: ; preds = %69, %64, %59, %54, %49, %44, %17
store i32 0, i32* %18
br label %164
164: ; preds = %163, %162, %137, %110
%165 = load i32, i32* %18
ret i32 %165
}

LLVM IR (-O2):
%struct.icom = type { i32 }
@.str = [7 x i8] c"CRVAL1\00"
@.str.1 = [7 x i8] c"CRVAL2\00"
@.str.2 = [8 x i8] c"EQUINOX\00"
@.str.3 = [7 x i8] c"CTYPE1\00"
@.str.4 = [7 x i8] c"CTYPE2\00"
@.str.5 = [7 x i8] c"CRPIX1\00"
@.str.6 = [7 x i8] c"CRPIX2\00"
@.str.7 = [7 x i8] c"CUNIT1\00"
@.str.8 = [7 x i8] c"CUNIT2\00"
@.str.9 = [8 x i8] c"LONPOLE\00"
@.str.10 = [9 x i8] c"LONGPOLE\00"
@.str.11 = [6 x i8] c"180.0\00"
@.str.12 = [6 x i8] c"CD1_1\00"
@.str.13 = [6 x i8] c"CD1_2\00"
@.str.14 = [6 x i8] c"CD2_1\00"
@.str.15 = [6 x i8] c"CD2_2\00"
@.str.16 = [7 x i8] c"CDELT1\00"
@.str.17 = [7 x i8] c"CDELT2\00"
@.str.18 = [9 x i8] c"PC001001\00"
@.str.19 = [9 x i8] c"PC001002\00"
@.str.20 = [9 x i8] c"PC002001\00"
@.str.21 = [9 x i8] c"PC002002\00"
@.str.22 = [3 x i8] c"%f\00"
define i32 @imc_getWCS(%struct.icom* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9, i8* %10, i8* %11, i8* %12, i8* %13, i8* %14, i8* %15, i8* %16) {
%18 = alloca float
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = bitcast float* %18 to i8*
store float 0.000000e+00, float* %18
%23 = bitcast float* %19 to i8*
store float 0.000000e+00, float* %19
%24 = bitcast float* %20 to i8*
store float 0.000000e+00, float* %20
%25 = bitcast float* %21 to i8*
store float 0.000000e+00, float* %21
%26 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1)
%27 = icmp eq i32 %26, 1
br i1 %27, label %28, label %100
28: ; preds = %17
%29 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%30 = icmp eq i32 %29, 1
br i1 %30, label %31, label %100
31: ; preds = %28
%32 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%33 = icmp eq i32 %32, 1
br i1 %33, label %34, label %100
34: ; preds = %31
%35 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %100
37: ; preds = %34
%38 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %8)
%39 = icmp eq i32 %38, 1
br i1 %39, label %40, label %100
40: ; preds = %37
%41 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %11)
%42 = icmp eq i32 %41, 1
br i1 %42, label %43, label %100
43: ; preds = %40
%44 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %12)
%45 = icmp eq i32 %44, 1
br i1 %45, label %46, label %100
46: ; preds = %43
%47 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* %9)
%48 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* %10)
%49 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8* %6)
%50 = icmp eq i32 %49, 1
br i1 %50, label %51, label %54
51: ; preds = %46
%52 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* %6)
%53 = icmp eq i32 %52, 1
br i1 %53, label %56, label %54
54: ; preds = %51, %46
%55 = tail call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %56
56: ; preds = %54, %51
%57 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i8* %13)
%58 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i8* %14)
%59 = add nsw i32 %58, %57
%60 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %15)
%61 = add nsw i32 %59, %60
%62 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8* %16)
%63 = sub i32 0, %62
%64 = icmp eq i32 %61, %63
br i1 %64, label %65, label %100
65: ; preds = %56
%66 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i8* %4)
%67 = icmp eq i32 %66, 1
br i1 %67, label %68, label %100
68: ; preds = %65
%69 = tail call i32 @imget_fits_value(%struct.icom* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* %5)
%70 = icmp eq i32 %69, 1
br i1 %70, label %71, label %100
71: ; preds = %68
%72 = call i32 @imget_fits_float_value(%struct.icom* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i64 0, i64 0), float* %18)
%73 = icmp eq i32 %72, 1
br i1 %73, label %74, label %100
74: ; preds = %71
%75 = call i32 @imget_fits_float_value(%struct.icom* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), float* %19)
%76 = icmp eq i32 %75, 1
br i1 %76, label %77, label %100
77: ; preds = %74
%78 = call i32 @imget_fits_float_value(%struct.icom* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0), float* %20)
%79 = icmp eq i32 %78, 1
br i1 %79, label %80, label %100
80: ; preds = %77
%81 = call i32 @imget_fits_float_value(%struct.icom* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0), float* %21)
%82 = icmp eq i32 %81, 1
br i1 %82, label %83, label %100
83: ; preds = %80
%84 = load float, float* %18
%85 = call float @atof(i8* %4)
%86 = fmul float %84, %85
%87 = call i32 @sprintf(i8* dereferenceable(1) %13, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), float %86)
%88 = load float, float* %19
%89 = call float @atof(i8* %4)
%90 = fmul float %88, %89
%91 = call i32 @sprintf(i8* dereferenceable(1) %14, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), float %90)
%92 = load float, float* %20
%93 = call float @atof(i8* %5)
%94 = fmul float %92, %93
%95 = call i32 @sprintf(i8* dereferenceable(1) %15, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), float %94)
%96 = load float, float* %21
%97 = call float @atof(i8* %5)
%98 = fmul float %96, %97
%99 = call i32 @sprintf(i8* dereferenceable(1) %16, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), float %98)
br label %100
100: ; preds = %17, %28, %31, %34, %37, %40, %43, %65, %68, %71, %74, %77, %80, %56, %83
%101 = phi i32 [ 1, %83 ], [ 1, %56 ], [ 0, %80 ], [ 0, %77 ], [ 0, %74 ], [ 0, %71 ], [ 0, %68 ], [ 0, %65 ], [ 0, %43 ], [ 0, %40 ], [ 0, %37 ], [ 0, %34 ], [ 0, %31 ], [ 0, %28 ], [ 0, %17 ]
ret i32 %101
}