#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, int);
void showForGnuplot(int X[], int s) {
  int j;
  for (j = 21; j <= (((21 * 21) + 1) / 2); j++)
    printf("%d %2.5f \n", 2 * j - 1, X[j] * 1.0 / (s * 1.0));
}


x86 assembly (clang, -O0):
<showForGnuplot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x15,-0x10(%rbp)
cmpl   $0xdd,-0x10(%rbp)
jg     1188 <showForGnuplot+0x78>
mov    -0x10(%rbp),%esi
shl    $0x1,%esi
sub    $0x1,%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  0xeaf(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe9e(%rip),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edx
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <showForGnuplot+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showForGnuplot>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r15
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x2a,%ebx
lea    0xece(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2sdl (%r15,%rbx,2),%xmm0
divsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edx
lea    -0x1(%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x2,%rbx
cmp    $0x1bc,%rbx
jne    1140 <showForGnuplot+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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