#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 */
int atan(int);
int /*<<< orphan*/ localHourAngle(double *, double, double, double,
                                  int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, double);
int main() {
  int i = 0;
  double t = 0.0;
  for (i = 0; i < 86400; i += 3600) {
    localHourAngle(&t, (double)i, 0.0, 0.0, 0);
    printf("%d   %f\n", i, (t * 180) / (4 * atan(1)));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x15180,-0x8(%rbp)
jge    11c9 <main+0x99>
cvtsi2sdl -0x8(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
xorps  %xmm2,%xmm2
xor    %esi,%esi
movaps %xmm2,%xmm1
call   1050 <localHourAngle@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  0xe7a(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x1,%edi
call   1040 <atan@plt>
movsd  -0x20(%rbp),%xmm0
mov    -0x14(%rbp),%esi
shl    $0x2,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xe10,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <main+0x25>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
movq   $0x0,0x10(%rsp)
xorpd  %xmm0,%xmm0
mov    $0xfffff1f0,%ebx
lea    0x10(%rsp),%r14
lea    0xeb9(%rip),%r15
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,0x8(%rsp)
add    $0xe10,%ebx
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    %r14,%rdi
movsd  0x8(%rsp),%xmm0
xor    %esi,%esi
call   1050 <localHourAngle@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xe70(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    $0x1,%edi
call   1040 <atan@plt>
shl    $0x2,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x18(%rsp),%xmm0
divsd  %xmm1,%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
addsd  0xe3c(%rip),%xmm0
cmp    $0x14370,%ebx
jb     1160 <main+0x30>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
store i32 0, i32* %2
store double 0.000000e+00, double* %3
store i32 0, i32* %2
br label %4
4: ; preds = %19, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 86400
br i1 %6, label %7, label %22
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sitofp i32 %8 to double
%10 = call i32 @localHourAngle(double* %3, double %9, double 0.000000e+00, double 0.000000e+00, i32 0)
%11 = load i32, i32* %2
%12 = load double, double* %3
%13 = fmul double %12, 1.800000e+02
%14 = call i32 @atan(i32 1)
%15 = mul nsw i32 4, %14
%16 = sitofp i32 %15 to double
%17 = fdiv double %13, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %11, double %17)
br label %19
19: ; preds = %7
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 3600
store i32 %21, i32* %2
br label %4
22: ; preds = %4
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %14, %3 ]
%5 = sitofp i32 %4 to double
%6 = call i32 @localHourAngle(double* %1, double %5, double 0.000000e+00, double 0.000000e+00, i32 0)
%7 = load double, double* %1
%8 = fmul double %7, 1.800000e+02
%9 = call i32 @atan(i32 1)
%10 = shl nsw i32 %9, 2
%11 = sitofp i32 %10 to double
%12 = fdiv double %8, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4, double %12)
%14 = add nuw nsw i32 %4, 3600
%15 = icmp ult i32 %4, 82800
br i1 %15, label %3, label %16
16: ; preds = %3
ret i32 0
}