#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*/ get_data(int *, int *, int *);
int /*<<< orphan*/ print_data(int, double, double, int);
int main(void) {
  int m, n, u, j, k;
  double h_x, h_t;
  double t;
  get_data(&m, &n, &u);
  h_x = 1.0 / m;
  h_t = 1.0 / n;
  for (j = 0; j <= n; j++) {
    t = j * h_t;
    print_data(m, h_x, t, k);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <get_data@plt>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xeb3(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe9d(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11b1 <main+0x91>
cvtsi2sdl -0x14(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%edi
movsd  -0x20(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mov    -0x18(%rbp),%esi
call   1030 <print_data@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1173 <main+0x53>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
lea    0x1c(%rsp),%rdx
call   1040 <get_data@plt>
mov    (%rsp),%eax
test   %eax,%eax
js     11b6 <main+0x96>
mov    0x4(%rsp),%edi
cvtsi2sd %edi,%xmm3
movsd  0xeb2(%rip),%xmm2
movapd %xmm2,%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm3,%xmm0
divsd  %xmm1,%xmm2
xorpd  %xmm1,%xmm1
movsd  %xmm2,0x10(%rsp)
mulsd  %xmm2,%xmm1
movsd  %xmm0,0x8(%rsp)
call   1030 <print_data@plt>
cmpl   $0x0,(%rsp)
jle    11b6 <main+0x96>
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x4(%rsp),%edi
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
mulsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
call   1030 <print_data@plt>
lea    0x1(%rbx),%eax
cmp    (%rsp),%ebx
mov    %eax,%ebx
jl     1190 <main+0x70>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
store i32 0, i32* %1
%10 = call i32 @get_data(i32* %2, i32* %3, i32* %4)
%11 = load i32, i32* %2
%12 = sitofp i32 %11 to double
%13 = fdiv double 1.000000e+00, %12
store double %13, double* %7
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to double
%16 = fdiv double 1.000000e+00, %15
store double %16, double* %8
store i32 0, i32* %5
br label %17
17: ; preds = %31, %0
%18 = load i32, i32* %5
%19 = load i32, i32* %3
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %34
21: ; preds = %17
%22 = load i32, i32* %5
%23 = sitofp i32 %22 to double
%24 = load double, double* %8
%25 = fmul double %23, %24
store double %25, double* %9
%26 = load i32, i32* %2
%27 = load double, double* %7
%28 = load double, double* %9
%29 = load i32, i32* %6
%30 = call i32 @print_data(i32 %26, double %27, double %28, i32 %29)
br label %31
31: ; preds = %21
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
br label %17
34: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @get_data(i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = sitofp i32 %8 to double
%10 = fdiv double 1.000000e+00, %9
%11 = load i32, i32* %2
%12 = sitofp i32 %11 to double
%13 = fdiv double 1.000000e+00, %12
%14 = icmp slt i32 %11, 0
br i1 %14, label %29, label %15
15: ; preds = %0
%16 = fmul double %13, 0.000000e+00
%17 = call i32 @print_data(i32 %8, double %10, double %16, i32 undef)
%18 = load i32, i32* %2
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %29
20: ; preds = %15, %20
%21 = phi i32 [ %22, %20 ], [ 0, %15 ]
%22 = add nuw nsw i32 %21, 1
%23 = load i32, i32* %1
%24 = sitofp i32 %22 to double
%25 = fmul double %13, %24
%26 = call i32 @print_data(i32 %23, double %10, double %25, i32 undef)
%27 = load i32, i32* %2
%28 = icmp slt i32 %22, %27
br i1 %28, label %20, label %29
29: ; preds = %20, %15, %0
ret i32 0
}