#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double, double,
                           double);
void write_vtkPointCoordinates_debug(FILE *fp, int imax, int jmax, int kmax,
                                     double dx, double dy, double dz) {
  double i, j, k;
  for (k = 0; k < kmax + 3; k += 1) {
    for (j = 0; j < jmax + 3; j += 1) {
      for (i = 0; i < imax + 3; i += 1) {
        fprintf(fp, "%f %f %f\n", i * dx, j * dy, k * dz);
      }
    }
  }
}


x86 assembly (clang, -O0):
<write_vtkPointCoordinates_debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
mov    -0x14(%rbp),%eax
add    $0x3,%eax
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
jbe    1214 <write_vtkPointCoordinates_debug+0x104>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm1
mov    -0x10(%rbp),%eax
add    $0x3,%eax
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
jbe    11f8 <write_vtkPointCoordinates_debug+0xe8>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm1
mov    -0xc(%rbp),%eax
add    $0x3,%eax
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
jbe    11dc <write_vtkPointCoordinates_debug+0xcc>
mov    -0x8(%rbp),%rdi
movsd  -0x38(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mulsd  -0x30(%rbp),%xmm2
lea    0xe48(%rip),%rsi
call   1030 <fprintf@plt>
movsd  0xe33(%rip),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    117e <write_vtkPointCoordinates_debug+0x6e>
jmp    11e1 <write_vtkPointCoordinates_debug+0xd1>
movsd  0xe17(%rip),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    115d <write_vtkPointCoordinates_debug+0x4d>
jmp    11fd <write_vtkPointCoordinates_debug+0xed>
movsd  0xdfb(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    113c <write_vtkPointCoordinates_debug+0x2c>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_vtkPointCoordinates_debug>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x58,%rsp
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x28(%rsp)
cmp    $0xfffffffe,%ecx
jl     1270 <write_vtkPointCoordinates_debug+0x160>
movapd %xmm0,%xmm1
mov    %edx,%r14d
mov    %esi,%r15d
mov    %rdi,%rbx
add    $0x3,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x20(%rsp)
lea    0x3(%r14),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x30(%rsp)
lea    0x3(%r15),%eax
cvtsi2sd %eax,%xmm5
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
lea    0xe92(%rip),%r12
movsd  0xe82(%rip),%xmm4
movsd  %xmm1,0x40(%rsp)
movsd  %xmm5,0x38(%rsp)
jmp    11ae <write_vtkPointCoordinates_debug+0x9e>
nopl   0x0(%rax)
movsd  (%rsp),%xmm3
addsd  %xmm4,%xmm3
movsd  0x20(%rsp),%xmm0
movsd  %xmm3,(%rsp)
ucomisd %xmm3,%xmm0
jbe    1270 <write_vtkPointCoordinates_debug+0x160>
cmp    $0xfffffffe,%r14d
jl     1190 <write_vtkPointCoordinates_debug+0x80>
movsd  (%rsp),%xmm2
mulsd  0x18(%rsp),%xmm2
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  %xmm2,0x48(%rsp)
jmp    11fc <write_vtkPointCoordinates_debug+0xec>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm3
addsd  %xmm4,%xmm3
movsd  0x30(%rsp),%xmm0
movsd  %xmm3,0x8(%rsp)
ucomisd %xmm3,%xmm0
jbe    1190 <write_vtkPointCoordinates_debug+0x80>
cmp    $0xfffffffe,%r15d
jl     11e0 <write_vtkPointCoordinates_debug+0xd0>
movsd  0x8(%rsp),%xmm0
mulsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
xorpd  %xmm0,%xmm0
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x10(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
movsd  0x50(%rsp),%xmm1
call   1030 <fprintf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x48(%rsp),%xmm2
movsd  0xdab(%rip),%xmm4
movsd  0x38(%rsp),%xmm5
movsd  0x40(%rsp),%xmm1
addsd  %xmm4,%xmm0
ucomisd %xmm0,%xmm5
ja     1220 <write_vtkPointCoordinates_debug+0x110>
jmp    11e0 <write_vtkPointCoordinates_debug+0xd0>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%f %f %f\0A\00"
define void @write_vtkPointCoordinates_debug(i32* %0, i32 %1, i32 %2, i32 %3, double %4, double %5, double %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store i32* %0, i32** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
store double 0.000000e+00, double* %17
br label %18
18: ; preds = %58, %7
%19 = load double, double* %17
%20 = load i32, i32* %11
%21 = add nsw i32 %20, 3
%22 = sitofp i32 %21 to double
%23 = fcmp olt double %19, %22
br i1 %23, label %24, label %61
24: ; preds = %18
store double 0.000000e+00, double* %16
br label %25
25: ; preds = %54, %24
%26 = load double, double* %16
%27 = load i32, i32* %10
%28 = add nsw i32 %27, 3
%29 = sitofp i32 %28 to double
%30 = fcmp olt double %26, %29
br i1 %30, label %31, label %57
31: ; preds = %25
store double 0.000000e+00, double* %15
br label %32
32: ; preds = %50, %31
%33 = load double, double* %15
%34 = load i32, i32* %9
%35 = add nsw i32 %34, 3
%36 = sitofp i32 %35 to double
%37 = fcmp olt double %33, %36
br i1 %37, label %38, label %53
38: ; preds = %32
%39 = load i32*, i32** %8
%40 = load double, double* %15
%41 = load double, double* %12
%42 = fmul double %40, %41
%43 = load double, double* %16
%44 = load double, double* %13
%45 = fmul double %43, %44
%46 = load double, double* %17
%47 = load double, double* %14
%48 = fmul double %46, %47
%49 = call i32 @fprintf(i32* %39, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %42, double %45, double %48)
br label %50
50: ; preds = %38
%51 = load double, double* %15
%52 = fadd double %51, 1.000000e+00
store double %52, double* %15
br label %32
53: ; preds = %32
br label %54
54: ; preds = %53
%55 = load double, double* %16
%56 = fadd double %55, 1.000000e+00
store double %56, double* %16
br label %25
57: ; preds = %25
br label %58
58: ; preds = %57
%59 = load double, double* %17
%60 = fadd double %59, 1.000000e+00
store double %60, double* %17
br label %18
61: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%f %f %f\0A\00"
define void @write_vtkPointCoordinates_debug(i32* nocapture %0, i32 %1, i32 %2, i32 %3, double %4, double %5, double %6) {
%8 = add nsw i32 %3, 3
%9 = sitofp i32 %8 to double
%10 = icmp sgt i32 %3, -3
br i1 %10, label %11, label %38
11: ; preds = %7
%12 = add nsw i32 %2, 3
%13 = sitofp i32 %12 to double
%14 = icmp sgt i32 %2, -3
%15 = add nsw i32 %1, 3
%16 = sitofp i32 %15 to double
%17 = icmp sgt i32 %1, -3
br label %18
18: ; preds = %11, %35
%19 = phi double [ 0.000000e+00, %11 ], [ %36, %35 ]
br i1 %14, label %20, label %35
20: ; preds = %18
%21 = fmul double %19, %6
br label %22
22: ; preds = %20, %32
%23 = phi double [ 0.000000e+00, %20 ], [ %33, %32 ]
br i1 %17, label %24, label %32
24: ; preds = %22
%25 = fmul double %23, %5
br label %26
26: ; preds = %24, %26
%27 = phi double [ 0.000000e+00, %24 ], [ %30, %26 ]
%28 = fmul double %27, %4
%29 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %28, double %25, double %21)
%30 = fadd double %27, 1.000000e+00
%31 = fcmp olt double %30, %16
br i1 %31, label %26, label %32
32: ; preds = %26, %22
%33 = fadd double %23, 1.000000e+00
%34 = fcmp olt double %33, %13
br i1 %34, label %22, label %35
35: ; preds = %32, %18
%36 = fadd double %19, 1.000000e+00
%37 = fcmp olt double %36, %9
br i1 %37, label %18, label %38
38: ; preds = %35, %7
ret void
}