#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*/ Deb_Fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ exit(int);
double sqrt(double);
int /*<<< orphan*/ stderr;
double Phys_DoppShiftFreq(double freq, double vel) {
  double c = 2.997924580000000e+08;
  {
    if (!(vel < c)) {
      Deb_Fprintf(stderr,
                  "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/itahsieh/sparx-alpha/refs/"
                  "heads/alpha3.stable/src/physics.c",
                  17, "Assertion failed\n");
      exit(1);
    }
  };
  return sqrt((1.0 + vel / c) / (1.0 - vel / c)) * freq;
}


x86 assembly (clang, -O0):
<Phys_DoppShiftFreq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeb6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     118e <Phys_DoppShiftFreq+0x5e>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
lea    0xe9d(%rip),%rsi
mov    $0x11,%edx
lea    0xf27(%rip),%rcx
call   1030 <Deb_Fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
movsd  -0x10(%rbp),%xmm1
divsd  -0x18(%rbp),%xmm1
movsd  0xe68(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm2
divsd  -0x18(%rbp),%xmm2
movsd  0xe52(%rip),%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
mulsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Phys_DoppShiftFreq>:
push   %rax
movapd %xmm0,%xmm3
movsd  0xec3(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1188 <Phys_DoppShiftFreq+0x58>
divsd  0xeb5(%rip),%xmm1
movsd  0xeb5(%rip),%xmm2
movapd %xmm1,%xmm0
addsd  %xmm2,%xmm0
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1173 <Phys_DoppShiftFreq+0x43>
sqrtsd %xmm0,%xmm0
jmp    1182 <Phys_DoppShiftFreq+0x52>
movsd  %xmm3,(%rsp)
call   1040 <sqrt@plt>
movsd  (%rsp),%xmm3
mulsd  %xmm3,%xmm0
pop    %rax
ret
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
lea    0xe78(%rip),%rsi
lea    0xf07(%rip),%rcx
mov    $0x11,%edx
call   1030 <Deb_Fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/itahsieh/sparx-alpha/refs/heads/alpha3.stable/src/physics.c\00"
@.str.1 = [18 x i8] c"Assertion failed\0A\00"
define double @Phys_DoppShiftFreq(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0x41B1DE784A000000, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @Deb_Fprintf(i32 %10, i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i32 17, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
%14 = load double, double* %4
%15 = load double, double* %5
%16 = fdiv double %14, %15
%17 = fadd double 1.000000e+00, %16
%18 = load double, double* %4
%19 = load double, double* %5
%20 = fdiv double %18, %19
%21 = fsub double 1.000000e+00, %20
%22 = fdiv double %17, %21
%23 = call double @sqrt(double %22)
%24 = load double, double* %3
%25 = fmul double %23, %24
ret double %25
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/itahsieh/sparx-alpha/refs/heads/alpha3.stable/src/physics.c\00"
@.str.1 = [18 x i8] c"Assertion failed\0A\00"
define double @Phys_DoppShiftFreq(double %0, double %1) {
%3 = fcmp olt double %1, 0x41B1DE784A000000
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @Deb_Fprintf(i32 %5, i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i32 17, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = fdiv double %1, 0x41B1DE784A000000
%10 = fadd double %9, 1.000000e+00
%11 = fsub double 1.000000e+00, %9
%12 = fdiv double %10, %11
%13 = tail call double @sqrt(double %12)
%14 = fmul double %13, %0
ret double %14
}