#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 sqrt(double);
double dt(double F0, double delX, double delY, double xmin, double xmax,
          double ymin, double ymax, int i, int j) {
  double distance, c, x, y, m;
  double modl(double z0);
  x = xmin + (i - 1) * delX;
  y = ymin + (j - 1) * delY;
  m = 1.0;
  c = ymax - xmin;
  distance = (modl(m * x - y + c)) / (sqrt(m * m + 1));
  return (distance / F0);
}


x86 assembly (clang, -O0):
<dt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
mov    %edi,-0x3c(%rbp)
mov    %esi,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm1
mov    -0x3c(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm1
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe65(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x50(%rbp),%xmm0
call   1030 <modl@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdfe(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dt>:
push   %rax
movsd  %xmm0,(%rsp)
movd   %esi,%xmm0
movd   %edi,%xmm4
punpckldq %xmm0,%xmm4
pcmpeqd %xmm0,%xmm0
paddd  %xmm4,%xmm0
cvtdq2pd %xmm0,%xmm0
unpcklpd %xmm2,%xmm1
mulpd  %xmm1,%xmm0
subsd  %xmm3,%xmm6
unpcklpd %xmm5,%xmm3
addpd  %xmm3,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
subsd  %xmm1,%xmm0
addsd  %xmm6,%xmm0
call   1030 <modl@plt>
divsd  0xea1(%rip),%xmm0
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @dt(double %0, double %1, double %2, double %3, double %4, double %5, double %6, i32 %7, i32 %8) {
%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 double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
store double %0, double* %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%24 = load double, double* %13
%25 = load i32, i32* %17
%26 = sub nsw i32 %25, 1
%27 = sitofp i32 %26 to double
%28 = load double, double* %11
%29 = call double @llvm.fmuladd.f64(double %27, double %28, double %24)
store double %29, double* %21
%30 = load double, double* %15
%31 = load i32, i32* %18
%32 = sub nsw i32 %31, 1
%33 = sitofp i32 %32 to double
%34 = load double, double* %12
%35 = call double @llvm.fmuladd.f64(double %33, double %34, double %30)
store double %35, double* %22
store double 1.000000e+00, double* %23
%36 = load double, double* %16
%37 = load double, double* %13
%38 = fsub double %36, %37
store double %38, double* %20
%39 = load double, double* %23
%40 = load double, double* %21
%41 = load double, double* %22
%42 = fneg double %41
%43 = call double @llvm.fmuladd.f64(double %39, double %40, double %42)
%44 = load double, double* %20
%45 = fadd double %43, %44
%46 = call double @modl(double %45)
%47 = load double, double* %23
%48 = load double, double* %23
%49 = call double @llvm.fmuladd.f64(double %47, double %48, double 1.000000e+00)
%50 = call double @sqrt(double %49)
%51 = fdiv double %46, %50
store double %51, double* %19
%52 = load double, double* %19
%53 = load double, double* %10
%54 = fdiv double %52, %53
ret double %54
}

LLVM IR (-O2):
define double @dt(double %0, double %1, double %2, double %3, double %4, double %5, double %6, i32 %7, i32 %8) {
%10 = insertelement <2 x i32> poison, i32 %7, i64 0
%11 = insertelement <2 x i32> %10, i32 %8, i64 1
%12 = add nsw <2 x i32> %11, <i32 -1, i32 -1>
%13 = sitofp <2 x i32> %12 to <2 x double>
%14 = insertelement <2 x double> poison, double %1, i64 0
%15 = insertelement <2 x double> %14, double %2, i64 1
%16 = insertelement <2 x double> poison, double %3, i64 0
%17 = insertelement <2 x double> %16, double %5, i64 1
%18 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %13, <2 x double> %15, <2 x double> %17)
%19 = fsub double %6, %3
%20 = shufflevector <2 x double> %18, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%21 = fsub <2 x double> %18, %20
%22 = extractelement <2 x double> %21, i64 0
%23 = fadd double %19, %22
%24 = tail call double @modl(double %23)
%25 = fdiv double %24, 0x3FF6A09E667F3BCD
%26 = fdiv double %25, %0
ret double %26
}