#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*/ printf(char *, int, double, double);
void show_plot_points(int n, double rr[], double tt[]) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%5d %10.5f %10.5f\n", i, rr[i], tt[i]);
  }
}


x86 assembly (clang, -O0):
<show_plot_points>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    116d <show_plot_points+0x5d>
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112a <show_plot_points+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_plot_points>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %edi,%edi
jle    114f <show_plot_points+0x3f>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %edi,%r13d
xor    %ebx,%ebx
lea    0xed1(%rip),%r12
nop
movsd  (%r15,%rbx,8),%xmm0
movsd  (%r14,%rbx,8),%xmm1
mov    %r12,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1130 <show_plot_points+0x20>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [19 x i8] c"%5d %10.5f %10.5f\0A\00"
define void @show_plot_points(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
store i32 0, i32* %7
br label %8
8: ; preds = %25, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %28
12: ; preds = %8
%13 = load i32, i32* %7
%14 = load double*, double** %5
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %14, i64 %16
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double, double* %19, i64 %21
%23 = load double, double* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %13, double %18, double %23)
br label %25
25: ; preds = %12
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
br label %8
28: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"%5d %10.5f %10.5f\0A\00"
define void @show_plot_points(i32 %0, double* nocapture %1, double* nocapture %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %15, %7 ]
%9 = getelementptr inbounds double, double* %1, i64 %8
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %2, i64 %8
%12 = load double, double* %11
%13 = trunc i64 %8 to i32
%14 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %13, double %10, double %12)
%15 = add nuw nsw i64 %8, 1
%16 = icmp eq i64 %15, %6
br i1 %16, label %17, label %7
17: ; preds = %7, %3
ret void
}