#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 */
double asin(double);
double atan2(double, double);
double cos(double);
double int4(unsigned char *);
unsigned int regular2ll(unsigned char **, double **, double **);
double sin(double);
double uint4(unsigned char *);
int rot_regular2ll(unsigned char **sec, double **lat, double **lon) {
  unsigned char *gds;
  double units, *tlon, *tlat;
  double sp_lat, sp_lon, angle_rot;
  double sin_a, cos_a;
  int basic_ang, sub_ang;
  unsigned int i, npnts;
  double a, b, r, pr, gr, pm, gm, glat, glon;
  i = regular2ll(sec, lat, lon);
  if (i != 0)
    return i;
  gds = sec[3];
  npnts = uint4(sec[3] + 6);
  basic_ang = int4(gds + 38);
  sub_ang = int4(gds + 42);
  if (basic_ang != 0) {
    units = (double)basic_ang / (double)sub_ang;
  } else {
    units = 0.000001;
  }
  sp_lat = (int4(gds + 72)) * units;
  sp_lon = (uint4(gds + 76)) * units;
  angle_rot = (int4(gds + 80)) * units;
  a = (3.14159265358979323846 / 180.0) * (90.0 + sp_lat);
  b = (3.14159265358979323846 / 180.0) * sp_lon;
  r = (3.14159265358979323846 / 180.0) * angle_rot;
  sin_a = sin(a);
  cos_a = cos(a);
  tlat = *lat;
  tlon = *lon;
#pragma omp parallel for private(i, pr, gr, pm, gm, glat, glon)
  for (i = 0; i < npnts; i++) {
    pr = (3.14159265358979323846 / 180.0) * tlat[i];
    gr = -(3.14159265358979323846 / 180.0) * tlon[i];
    pm = asin(cos(pr) * cos(gr));
    gm = atan2(cos(pr) * sin(gr), -sin(pr));
    glat = (180.0 / 3.14159265358979323846) *
           (asin(sin_a * sin(pm) - cos_a * cos(pm) * cos(gm - r)));
    glon = -(180.0 / 3.14159265358979323846) *
           (-b + atan2(cos(pm) * sin(gm - r),
                       sin_a * cos(pm) * cos(gm - r) + cos_a * sin(pm)));
    tlat[i] = glat;
    tlon[i] = glon;
  }
  return 0;
}


x86 assembly (clang, -O0):
<rot_regular2ll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1060 <regular2ll@plt>
mov    %eax,-0x74(%rbp)
cmpl   $0x0,-0x74(%rbp)
je     11b0 <rot_regular2ll+0x40>
mov    -0x74(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    160e <rot_regular2ll+0x49e>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
add    $0x6,%rdi
call   1040 <uint4@plt>
cvttsd2si %xmm0,%rax
mov    %eax,-0x78(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x26,%rdi
call   1030 <int4@plt>
cvttsd2si %xmm0,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x2a,%rdi
call   1030 <int4@plt>
cvttsd2si %xmm0,%eax
mov    %eax,-0x70(%rbp)
cmpl   $0x0,-0x6c(%rbp)
je     121f <rot_regular2ll+0xaf>
cvtsi2sdl -0x6c(%rbp),%xmm0
cvtsi2sdl -0x70(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    122c <rot_regular2ll+0xbc>
movsd  0xdd9(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x48,%rdi
call   1030 <int4@plt>
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x4c,%rdi
call   1040 <uint4@plt>
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x50,%rdi
call   1030 <int4@plt>
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xd97(%rip),%xmm1
addsd  -0x48(%rbp),%xmm1
movsd  0xd82(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xd71(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xd5c(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1070 <sin@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x80(%rbp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x78(%rbp),%eax
jae    1607 <rot_regular2ll+0x497>
mov    -0x40(%rbp),%rax
mov    -0x74(%rbp),%ecx
movsd  0xcf9(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x38(%rbp),%rax
mov    -0x74(%rbp),%ecx
movsd  0xcfd(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1090 <cos@plt>
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x130(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1080 <asin@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1090 <cos@plt>
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1070 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x128(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1070 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1050 <atan2@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
call   1070 <sin@plt>
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x118(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0x90(%rbp),%xmm0
ff
call   1090 <cos@plt>
movsd  -0x110(%rbp),%xmm1
ff
movsd  -0x108(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x100(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1080 <asin@plt>
movaps %xmm0,%xmm1
movsd  0xb7f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
call   1090 <cos@plt>
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0x90(%rbp),%xmm0
ff
call   1070 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0x90(%rbp),%xmm0
ff
call   1090 <cos@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
call   1070 <sin@plt>
movsd  -0xe8(%rbp),%xmm2
ff
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0xd8(%rbp),%xmm3
ff
movaps %xmm0,%xmm4
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  %xmm4,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
call   1050 <atan2@plt>
movsd  -0xc8(%rbp),%xmm1
ff
addsd  %xmm0,%xmm1
movsd  0xa53(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
mov    -0x74(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
mov    -0x74(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    12f4 <rot_regular2ll+0x184>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot_regular2ll>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1060 <regular2ll@plt>
mov    %eax,%r12d
test   %eax,%eax
jne    146f <rot_regular2ll+0x2ff>
mov    0x18(%rbx),%rbx
lea    0x6(%rbx),%rdi
call   1040 <uint4@plt>
cvttsd2si %xmm0,%r12
lea    0x26(%rbx),%rdi
call   1030 <int4@plt>
cvttsd2si %xmm0,%ebp
lea    0x2a(%rbx),%rdi
call   1030 <int4@plt>
test   %ebp,%ebp
je     11da <rot_regular2ll+0x6a>
cvtsi2sd %ebp,%xmm1
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
jmp    11e7 <rot_regular2ll+0x77>
movsd  0xe1e(%rip),%xmm0
movsd  %xmm0,(%rsp)
lea    0x48(%rbx),%rdi
call   1030 <int4@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x4c(%rbx),%rdi
call   1040 <uint4@plt>
movsd  %xmm0,0x28(%rsp)
add    $0x50,%rbx
mov    %rbx,%rdi
call   1030 <int4@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0xdde(%rip),%xmm0
mulsd  0xdde(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1070 <sin@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1090 <cos@plt>
movapd %xmm0,0x40(%rsp)
test   %r12d,%r12d
je     146c <rot_regular2ll+0x2fc>
movsd  0x20(%rsp),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  0xd9c(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    (%r15),%r15
mov    (%r14),%r13
movsd  0x28(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movapd 0xd9e(%rip),%xmm1
mulsd  0xd76(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
xorpd  0x40(%rsp),%xmm1
movapd %xmm1,0x50(%rsp)
mov    %r12d,%r14d
xor    %r12d,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%r15,%rbx,8),%xmm0
mulsd  0xd42(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x0(%r13,%rbx,8),%xmm1
mulsd  0xd36(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
call   1090 <cos@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1090 <cos@plt>
mulsd  0x8(%rsp),%xmm0
call   1080 <asin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <sin@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1070 <sin@plt>
movaps %xmm0,%xmm1
xorps  0xce6(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1050 <atan2@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%rsp)
call   1090 <cos@plt>
movsd  0x18(%rsp),%xmm1
mulsd  0x50(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
addsd  %xmm1,%xmm0
call   1080 <asin@plt>
mulsd  0xc62(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
call   1070 <sin@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
call   1090 <cos@plt>
mulsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  (%rsp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <sin@plt>
mulsd  0x40(%rsp),%xmm0
movsd  (%rsp),%xmm1
mulsd  0x38(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
call   1050 <atan2@plt>
subsd  0x28(%rsp),%xmm0
mulsd  0xbde(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  %xmm1,(%r15,%rbx,8)
movsd  %xmm0,0x0(%r13,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    12c0 <rot_regular2ll+0x150>
jmp    146f <rot_regular2ll+0x2ff>
xor    %r12d,%r12d
mov    %r12d,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rot_regular2ll(i8** %0, double** %1, double** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double**
%7 = alloca double**
%8 = alloca i8*
%9 = alloca double
%10 = alloca double*
%11 = alloca double*
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
store i8** %0, i8*** %5
store double** %1, double*** %6
store double** %2, double*** %7
%30 = load i8**, i8*** %5
%31 = load double**, double*** %6
%32 = load double**, double*** %7
%33 = call i32 @regular2ll(i8** %30, double** %31, double** %32)
store i32 %33, i32* %19
%34 = load i32, i32* %19
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %3
%37 = load i32, i32* %19
store i32 %37, i32* %4
br label %183
38: ; preds = %3
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 3
%41 = load i8*, i8** %40
store i8* %41, i8** %8
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 3
%44 = load i8*, i8** %43
%45 = getelementptr inbounds i8, i8* %44, i64 6
%46 = call double @uint4(i8* %45)
%47 = fptoui double %46 to i32
store i32 %47, i32* %20
%48 = load i8*, i8** %8
%49 = getelementptr inbounds i8, i8* %48, i64 38
%50 = call double @int4(i8* %49)
%51 = fptosi double %50 to i32
store i32 %51, i32* %17
%52 = load i8*, i8** %8
%53 = getelementptr inbounds i8, i8* %52, i64 42
%54 = call double @int4(i8* %53)
%55 = fptosi double %54 to i32
store i32 %55, i32* %18
%56 = load i32, i32* %17
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %64
58: ; preds = %38
%59 = load i32, i32* %17
%60 = sitofp i32 %59 to double
%61 = load i32, i32* %18
%62 = sitofp i32 %61 to double
%63 = fdiv double %60, %62
store double %63, double* %9
br label %65
64: ; preds = %38
store double 0x3EB0C6F7A0B5ED8D, double* %9
br label %65
65: ; preds = %64, %58
%66 = load i8*, i8** %8
%67 = getelementptr inbounds i8, i8* %66, i64 72
%68 = call double @int4(i8* %67)
%69 = load double, double* %9
%70 = fmul double %68, %69
store double %70, double* %12
%71 = load i8*, i8** %8
%72 = getelementptr inbounds i8, i8* %71, i64 76
%73 = call double @uint4(i8* %72)
%74 = load double, double* %9
%75 = fmul double %73, %74
store double %75, double* %13
%76 = load i8*, i8** %8
%77 = getelementptr inbounds i8, i8* %76, i64 80
%78 = call double @int4(i8* %77)
%79 = load double, double* %9
%80 = fmul double %78, %79
store double %80, double* %14
%81 = load double, double* %12
%82 = fadd double 9.000000e+01, %81
%83 = fmul double 0x3F91DF46A2529D39, %82
store double %83, double* %21
%84 = load double, double* %13
%85 = fmul double 0x3F91DF46A2529D39, %84
store double %85, double* %22
%86 = load double, double* %14
%87 = fmul double 0x3F91DF46A2529D39, %86
store double %87, double* %23
%88 = load double, double* %21
%89 = call double @sin(double %88)
store double %89, double* %15
%90 = load double, double* %21
%91 = call double @cos(double %90)
store double %91, double* %16
%92 = load double**, double*** %6
%93 = load double*, double** %92
store double* %93, double** %11
%94 = load double**, double*** %7
%95 = load double*, double** %94
store double* %95, double** %10
store i32 0, i32* %19
br label %96
96: ; preds = %179, %65
%97 = load i32, i32* %19
%98 = load i32, i32* %20
%99 = icmp ult i32 %97, %98
br i1 %99, label %100, label %182
100: ; preds = %96
%101 = load double*, double** %11
%102 = load i32, i32* %19
%103 = zext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
%105 = load double, double* %104
%106 = fmul double 0x3F91DF46A2529D39, %105
store double %106, double* %24
%107 = load double*, double** %10
%108 = load i32, i32* %19
%109 = zext i32 %108 to i64
%110 = getelementptr inbounds double, double* %107, i64 %109
%111 = load double, double* %110
%112 = fmul double 0xBF91DF46A2529D39, %111
store double %112, double* %25
%113 = load double, double* %24
%114 = call double @cos(double %113)
%115 = load double, double* %25
%116 = call double @cos(double %115)
%117 = fmul double %114, %116
%118 = call double @asin(double %117)
store double %118, double* %26
%119 = load double, double* %24
%120 = call double @cos(double %119)
%121 = load double, double* %25
%122 = call double @sin(double %121)
%123 = fmul double %120, %122
%124 = load double, double* %24
%125 = call double @sin(double %124)
%126 = fneg double %125
%127 = call double @atan2(double %123, double %126)
store double %127, double* %27
%128 = load double, double* %15
%129 = load double, double* %26
%130 = call double @sin(double %129)
%131 = load double, double* %16
%132 = load double, double* %26
%133 = call double @cos(double %132)
%134 = fmul double %131, %133
%135 = load double, double* %27
%136 = load double, double* %23
%137 = fsub double %135, %136
%138 = call double @cos(double %137)
%139 = fmul double %134, %138
%140 = fneg double %139
%141 = call double @llvm.fmuladd.f64(double %128, double %130, double %140)
%142 = call double @asin(double %141)
%143 = fmul double 0x404CA5DC1A63C1F8, %142
store double %143, double* %28
%144 = load double, double* %22
%145 = fneg double %144
%146 = load double, double* %26
%147 = call double @cos(double %146)
%148 = load double, double* %27
%149 = load double, double* %23
%150 = fsub double %148, %149
%151 = call double @sin(double %150)
%152 = fmul double %147, %151
%153 = load double, double* %15
%154 = load double, double* %26
%155 = call double @cos(double %154)
%156 = fmul double %153, %155
%157 = load double, double* %27
%158 = load double, double* %23
%159 = fsub double %157, %158
%160 = call double @cos(double %159)
%161 = load double, double* %16
%162 = load double, double* %26
%163 = call double @sin(double %162)
%164 = fmul double %161, %163
%165 = call double @llvm.fmuladd.f64(double %156, double %160, double %164)
%166 = call double @atan2(double %152, double %165)
%167 = fadd double %145, %166
%168 = fmul double 0xC04CA5DC1A63C1F8, %167
store double %168, double* %29
%169 = load double, double* %28
%170 = load double*, double** %11
%171 = load i32, i32* %19
%172 = zext i32 %171 to i64
%173 = getelementptr inbounds double, double* %170, i64 %172
store double %169, double* %173
%174 = load double, double* %29
%175 = load double*, double** %10
%176 = load i32, i32* %19
%177 = zext i32 %176 to i64
%178 = getelementptr inbounds double, double* %175, i64 %177
store double %174, double* %178
br label %179
179: ; preds = %100
%180 = load i32, i32* %19
%181 = add i32 %180, 1
store i32 %181, i32* %19
br label %96
182: ; preds = %96
store i32 0, i32* %4
br label %183
183: ; preds = %182, %36
%184 = load i32, i32* %4
ret i32 %184
}

LLVM IR (-O2):
define i32 @rot_regular2ll(i8** %0, double** %1, double** %2) {
%4 = tail call i32 @regular2ll(i8** %0, double** %1, double** %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %87
6: ; preds = %3
%7 = getelementptr inbounds i8*, i8** %0, i64 3
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8, i8* %8, i64 6
%10 = tail call double @uint4(i8* %9)
%11 = fptoui double %10 to i32
%12 = getelementptr inbounds i8, i8* %8, i64 38
%13 = tail call double @int4(i8* %12)
%14 = fptosi double %13 to i32
%15 = getelementptr inbounds i8, i8* %8, i64 42
%16 = tail call double @int4(i8* %15)
%17 = icmp eq i32 %14, 0
br i1 %17, label %23, label %18
18: ; preds = %6
%19 = fptosi double %16 to i32
%20 = sitofp i32 %14 to double
%21 = sitofp i32 %19 to double
%22 = fdiv double %20, %21
br label %23
23: ; preds = %6, %18
%24 = phi double [ %22, %18 ], [ 0x3EB0C6F7A0B5ED8D, %6 ]
%25 = getelementptr inbounds i8, i8* %8, i64 72
%26 = tail call double @int4(i8* %25)
%27 = fmul double %24, %26
%28 = getelementptr inbounds i8, i8* %8, i64 76
%29 = tail call double @uint4(i8* %28)
%30 = getelementptr inbounds i8, i8* %8, i64 80
%31 = tail call double @int4(i8* %30)
%32 = fmul double %24, %31
%33 = fadd double %27, 9.000000e+01
%34 = fmul double %33, 0x3F91DF46A2529D39
%35 = fmul double %32, 0x3F91DF46A2529D39
%36 = tail call double @sin(double %34)
%37 = tail call double @cos(double %34)
%38 = load double*, double** %1
%39 = load double*, double** %2
%40 = icmp eq i32 %11, 0
br i1 %40, label %87, label %41
41: ; preds = %23
%42 = fmul double %24, %29
%43 = fneg double %37
%44 = fmul double %42, 0x3F91DF46A2529D39
%45 = zext i32 %11 to i64
br label %46
46: ; preds = %41, %46
%47 = phi i64 [ 0, %41 ], [ %85, %46 ]
%48 = getelementptr inbounds double, double* %38, i64 %47
%49 = load double, double* %48
%50 = fmul double %49, 0x3F91DF46A2529D39
%51 = getelementptr inbounds double, double* %39, i64 %47
%52 = load double, double* %51
%53 = fmul double %52, 0xBF91DF46A2529D39
%54 = tail call double @cos(double %50)
%55 = tail call double @cos(double %53)
%56 = fmul double %54, %55
%57 = tail call double @asin(double %56)
%58 = tail call double @cos(double %50)
%59 = tail call double @sin(double %53)
%60 = fmul double %58, %59
%61 = tail call double @sin(double %50)
%62 = fneg double %61
%63 = tail call double @atan2(double %60, double %62)
%64 = tail call double @sin(double %57)
%65 = tail call double @cos(double %57)
%66 = fsub double %63, %35
%67 = tail call double @cos(double %66)
%68 = fmul double %65, %43
%69 = fmul double %68, %67
%70 = tail call double @llvm.fmuladd.f64(double %36, double %64, double %69)
%71 = tail call double @asin(double %70)
%72 = fmul double %71, 0x404CA5DC1A63C1F8
%73 = tail call double @cos(double %57)
%74 = tail call double @sin(double %66)
%75 = fmul double %73, %74
%76 = tail call double @cos(double %57)
%77 = fmul double %36, %76
%78 = tail call double @cos(double %66)
%79 = tail call double @sin(double %57)
%80 = fmul double %37, %79
%81 = tail call double @llvm.fmuladd.f64(double %77, double %78, double %80)
%82 = tail call double @atan2(double %75, double %81)
%83 = fsub double %82, %44
%84 = fmul double %83, 0xC04CA5DC1A63C1F8
store double %72, double* %48
store double %84, double* %51
%85 = add nuw nsw i64 %47, 1
%86 = icmp eq i64 %85, %45
br i1 %86, label %87, label %46
87: ; preds = %46, %23, %3
%88 = phi i32 [ %4, %3 ], [ 0, %23 ], [ 0, %46 ]
ret i32 %88
}