#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 */
float fabs(float);
float alex_diag_dm(float nu1, float nu2, float dt) {
  float d1 = 1.0 / nu1 / nu1;
  float d2 = 1.0 / nu2 / nu2;
  float dm_max = dt / 4148.808 / (d2 - d1);
  return fabs(dt / 4148.808 / (d2 - d1));
}


x86 assembly (clang, -O0):
<alex_diag_dm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed0(%rip),%xmm0
divsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea5(%rip),%xmm0
divsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe72(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe42(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <fabs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alex_diag_dm>:
unpcklps %xmm0,%xmm1
cvtps2pd %xmm1,%xmm0
movapd 0xef2(%rip),%xmm1
divpd  %xmm0,%xmm1
divpd  %xmm0,%xmm1
cvtpd2ps %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
divsd  0xef7(%rip),%xmm1
movapd %xmm0,%xmm2
shufps $0x55,%xmm0,%xmm2
subss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
andps  0xec5(%rip),%xmm0
ret

LLVM IR (-O0):
define float @alex_diag_dm(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%10 = load float, float* %4
%11 = fpext float %10 to double
%12 = fdiv double 1.000000e+00, %11
%13 = load float, float* %4
%14 = fpext float %13 to double
%15 = fdiv double %12, %14
%16 = fptrunc double %15 to float
store float %16, float* %7
%17 = load float, float* %5
%18 = fpext float %17 to double
%19 = fdiv double 1.000000e+00, %18
%20 = load float, float* %5
%21 = fpext float %20 to double
%22 = fdiv double %19, %21
%23 = fptrunc double %22 to float
store float %23, float* %8
%24 = load float, float* %6
%25 = fpext float %24 to double
%26 = fdiv double %25, 0x40B034CED916872B
%27 = load float, float* %8
%28 = load float, float* %7
%29 = fsub float %27, %28
%30 = fpext float %29 to double
%31 = fdiv double %26, %30
%32 = fptrunc double %31 to float
store float %32, float* %9
%33 = load float, float* %6
%34 = fpext float %33 to double
%35 = fdiv double %34, 0x40B034CED916872B
%36 = load float, float* %8
%37 = load float, float* %7
%38 = fsub float %36, %37
%39 = fpext float %38 to double
%40 = fdiv double %35, %39
%41 = fptrunc double %40 to float
%42 = call float @fabs(float %41)
ret float %42
}

LLVM IR (-O2):
define float @alex_diag_dm(float %0, float %1, float %2) {
%4 = insertelement <2 x float> poison, float %1, i64 0
%5 = insertelement <2 x float> %4, float %0, i64 1
%6 = fpext <2 x float> %5 to <2 x double>
%7 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %6
%8 = fdiv <2 x double> %7, %6
%9 = fptrunc <2 x double> %8 to <2 x float>
%10 = fpext float %2 to double
%11 = fdiv double %10, 0x40B034CED916872B
%12 = shufflevector <2 x float> %9, <2 x float> poison, <2 x i32> <i32 1, i32 undef>
%13 = fsub <2 x float> %9, %12
%14 = extractelement <2 x float> %13, i64 0
%15 = fpext float %14 to double
%16 = fdiv double %11, %15
%17 = fptrunc double %16 to float
%18 = tail call float @llvm.fabs.f32(float %17)
ret float %18
}