#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 /*<<< orphan*/ printf(char *, double);
int main(int argc, char **argv) {
  double compute_bearing();
  printf("bearing: %lf\n",
         compute_bearing(73.9380, 42.8145, 118.2420, 34.0515));
  printf("bearing: %lf\n",
         compute_bearing(118.2420, 34.0515, 73.9380, 42.8145));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xed2(%rip),%xmm0
movsd  0xed2(%rip),%xmm1
movsd  0xeb2(%rip),%xmm2
movsd  0xeb2(%rip),%xmm3
mov    $0x4,%al
call   1030 <compute_bearing@plt>
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe8f(%rip),%xmm0
movsd  0xe8f(%rip),%xmm1
movsd  0xe8f(%rip),%xmm2
movsd  0xe8f(%rip),%xmm3
mov    $0x4,%al
call   1030 <compute_bearing@plt>
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
movsd  0xed7(%rip),%xmm2
movsd  0xed7(%rip),%xmm3
mov    $0x4,%al
call   1030 <compute_bearing@plt>
lea    0xed1(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  0xeb1(%rip),%xmm0
movsd  0xeb1(%rip),%xmm1
movsd  0xe91(%rip),%xmm2
movsd  0xe91(%rip),%xmm3
mov    $0x4,%al
call   1030 <compute_bearing@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"bearing: %lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call double (double, double, double, double, ...) bitcast (double (...)* @compute_bearing to double (double, double, double, double, ...)*)(double 7.393800e+01, double 4.281450e+01, double 1.182420e+02, double 3.405150e+01)
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %6)
%8 = call double (double, double, double, double, ...) bitcast (double (...)* @compute_bearing to double (double, double, double, double, ...)*)(double 1.182420e+02, double 3.405150e+01, double 7.393800e+01, double 4.281450e+01)
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"bearing: %lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double (double, double, double, double, ...) bitcast (double (...)* @compute_bearing to double (double, double, double, double, ...)*)(double 7.393800e+01, double 4.281450e+01, double 1.182420e+02, double 3.405150e+01)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %3)
%5 = tail call double (double, double, double, double, ...) bitcast (double (...)* @compute_bearing to double (double, double, double, double, ...)*)(double 1.182420e+02, double 3.405150e+01, double 7.393800e+01, double 4.281450e+01)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %5)
ret i32 0
}