#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*/ euler(double, double, int, double *, int);
int /*<<< orphan*/ printf(char *, double, double);
int main() {
  double w[10000];
  int i;
  double a = 0, b = 1;
  int n = 2;
  double h = (b - a) / n;
  int func = 0;
  euler(a, b, n, w, func);
  for (i = 0; i <= n; i++) {
    printf("%lf\t%.7lf\n", a + i * h, w[i]);
  }
  euler(a, b, 1000, w, func);
  printf("\n1000 iterations: %lf\t%.7lf\n\n", b, w[1000]);
  a = 1;
  b = 2;
  h = 0.5;
  n = (b - a) / h;
  func = 1;
  euler(a, b, n, w, func);
  for (i = 0; i <= n; i++) {
    printf("%lf\t%.7lf\n", a + i * h, w[i]);
  }
  euler(a, b, 1000, w, func);
  printf("\n1000 iterations: %lf\t%.7lf\n\n", b, w[1000]);
  a = 2;
  b = 3;
  h = 0.25;
  n = (b - a) / h;
  func = 2;
  euler(a, b, n, w, func);
  for (i = 0; i <= n; i++) {
    printf("%lf\t%.7lf\n", a + i * h, w[i]);
  }
  euler(a, b, 1000, w, func);
  printf("\n1000 iterations: %lf\t%.7lf\n\n", b, w[1000]);
  a = 1;
  b = 2;
  h = 0.25;
  n = (b - a) / h;
  func = 3;
  euler(a, b, n, w, func);
  for (i = 0; i <= n; i++) {
    printf("%lf\t%.7lf\n", a + i * h, w[i]);
  }
  euler(a, b, 1000, w, func);
  printf("\n1000 iterations: %lf\t%.7lf\n\n", b, w[1000]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x138c0,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x138a0(%rbp)
ff
movsd  0xebb(%rip),%xmm0
movsd  %xmm0,-0x138a8(%rbp)
ff
movl   $0x2,-0x138ac(%rbp)
movsd  -0x138a8(%rbp),%xmm0
ff
subsd  -0x138a0(%rbp),%xmm0
ff
cvtsi2sdl -0x138ac(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x138b8(%rbp)
ff
movl   $0x0,-0x138bc(%rbp)
movsd  -0x138a0(%rbp),%xmm0
ff
movsd  -0x138a8(%rbp),%xmm1
ff
mov    -0x138ac(%rbp),%edi
lea    -0x13890(%rbp),%rsi
mov    -0x138bc(%rbp),%edx
call   1040 <euler@plt>
movl   $0x0,-0x13894(%rbp)
mov    -0x13894(%rbp),%eax
cmp    -0x138ac(%rbp),%eax
jg     1219 <main+0xf9>
movsd  -0x138a0(%rbp),%xmm1
ff
cvtsi2sdl -0x13894(%rbp),%xmm0
ff
movsd  -0x138b8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x13894(%rbp),%rax
movsd  -0x13890(%rbp,%rax,8),%xmm1
fe ff
lea    0xe28(%rip),%rdi
call   1030 <printf@plt>
mov    -0x13894(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13894(%rbp)
jmp    11b7 <main+0x97>
movsd  -0x138a0(%rbp),%xmm0
ff
movsd  -0x138a8(%rbp),%xmm1
ff
lea    -0x13890(%rbp),%rsi
mov    -0x138bc(%rbp),%edx
mov    $0x3e8,%edi
call   1040 <euler@plt>
movsd  -0x138a8(%rbp),%xmm0
ff
movsd  -0x11950(%rbp),%xmm1
ff
lea    0xddc(%rip),%rdi
call   1030 <printf@plt>
movsd  0xd9c(%rip),%xmm0
movsd  %xmm0,-0x138a0(%rbp)
ff
movsd  0xd9c(%rip),%xmm0
movsd  %xmm0,-0x138a8(%rbp)
ff
movsd  0xd84(%rip),%xmm0
movsd  %xmm0,-0x138b8(%rbp)
ff
movsd  -0x138a8(%rbp),%xmm0
ff
subsd  -0x138a0(%rbp),%xmm0
ff
divsd  -0x138b8(%rbp),%xmm0
ff
cvttsd2si %xmm0,%eax
mov    %eax,-0x138ac(%rbp)
movl   $0x1,-0x138bc(%rbp)
movsd  -0x138a0(%rbp),%xmm0
ff
movsd  -0x138a8(%rbp),%xmm1
ff
mov    -0x138ac(%rbp),%edi
lea    -0x13890(%rbp),%rsi
mov    -0x138bc(%rbp),%edx
call   1040 <euler@plt>
movl   $0x0,-0x13894(%rbp)
mov    -0x13894(%rbp),%eax
cmp    -0x138ac(%rbp),%eax
jg     134c <main+0x22c>
movsd  -0x138a0(%rbp),%xmm1
ff
cvtsi2sdl -0x13894(%rbp),%xmm0
ff
movsd  -0x138b8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x13894(%rbp),%rax
movsd  -0x13890(%rbp,%rax,8),%xmm1
fe ff
lea    0xcf5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x13894(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13894(%rbp)
jmp    12ea <main+0x1ca>
movsd  -0x138a0(%rbp),%xmm0
ff
movsd  -0x138a8(%rbp),%xmm1
ff
lea    -0x13890(%rbp),%rsi
mov    -0x138bc(%rbp),%edx
mov    $0x3e8,%edi
call   1040 <euler@plt>
movsd  -0x138a8(%rbp),%xmm0
ff
movsd  -0x11950(%rbp),%xmm1
ff
lea    0xca9(%rip),%rdi
call   1030 <printf@plt>
movsd  0xc79(%rip),%xmm0
movsd  %xmm0,-0x138a0(%rbp)
ff
movsd  0xc79(%rip),%xmm0
movsd  %xmm0,-0x138a8(%rbp)
ff
movsd  0xc61(%rip),%xmm0
movsd  %xmm0,-0x138b8(%rbp)
ff
movsd  -0x138a8(%rbp),%xmm0
ff
subsd  -0x138a0(%rbp),%xmm0
ff
divsd  -0x138b8(%rbp),%xmm0
ff
cvttsd2si %xmm0,%eax
mov    %eax,-0x138ac(%rbp)
movl   $0x2,-0x138bc(%rbp)
movsd  -0x138a0(%rbp),%xmm0
ff
movsd  -0x138a8(%rbp),%xmm1
ff
mov    -0x138ac(%rbp),%edi
lea    -0x13890(%rbp),%rsi
mov    -0x138bc(%rbp),%edx
call   1040 <euler@plt>
movl   $0x0,-0x13894(%rbp)
mov    -0x13894(%rbp),%eax
cmp    -0x138ac(%rbp),%eax
jg     147f <main+0x35f>
movsd  -0x138a0(%rbp),%xmm1
ff
cvtsi2sdl -0x13894(%rbp),%xmm0
ff
movsd  -0x138b8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x13894(%rbp),%rax
movsd  -0x13890(%rbp,%rax,8),%xmm1
fe ff
lea    0xbc2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x13894(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13894(%rbp)
jmp    141d <main+0x2fd>
movsd  -0x138a0(%rbp),%xmm0
ff
movsd  -0x138a8(%rbp),%xmm1
ff
lea    -0x13890(%rbp),%rsi
mov    -0x138bc(%rbp),%edx
mov    $0x3e8,%edi
call   1040 <euler@plt>
movsd  -0x138a8(%rbp),%xmm0
ff
movsd  -0x11950(%rbp),%xmm1
ff
lea    0xb76(%rip),%rdi
call   1030 <printf@plt>
movsd  0xb36(%rip),%xmm0
movsd  %xmm0,-0x138a0(%rbp)
ff
movsd  0xb36(%rip),%xmm0
movsd  %xmm0,-0x138a8(%rbp)
ff
movsd  0xb2e(%rip),%xmm0
movsd  %xmm0,-0x138b8(%rbp)
ff
movsd  -0x138a8(%rbp),%xmm0
ff
subsd  -0x138a0(%rbp),%xmm0
ff
divsd  -0x138b8(%rbp),%xmm0
ff
cvttsd2si %xmm0,%eax
mov    %eax,-0x138ac(%rbp)
movl   $0x3,-0x138bc(%rbp)
movsd  -0x138a0(%rbp),%xmm0
ff
movsd  -0x138a8(%rbp),%xmm1
ff
mov    -0x138ac(%rbp),%edi
lea    -0x13890(%rbp),%rsi
mov    -0x138bc(%rbp),%edx
call   1040 <euler@plt>
movl   $0x0,-0x13894(%rbp)
mov    -0x13894(%rbp),%eax
cmp    -0x138ac(%rbp),%eax
jg     15b2 <main+0x492>
movsd  -0x138a0(%rbp),%xmm1
ff
cvtsi2sdl -0x13894(%rbp),%xmm0
ff
movsd  -0x138b8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x13894(%rbp),%rax
movsd  -0x13890(%rbp,%rax,8),%xmm1
fe ff
lea    0xa8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x13894(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13894(%rbp)
jmp    1550 <main+0x430>
movsd  -0x138a0(%rbp),%xmm0
ff
movsd  -0x138a8(%rbp),%xmm1
ff
lea    -0x13890(%rbp),%rsi
mov    -0x138bc(%rbp),%edx
mov    $0x3e8,%edi
call   1040 <euler@plt>
movsd  -0x138a8(%rbp),%xmm0
ff
movsd  -0x11950(%rbp),%xmm1
ff
lea    0xa43(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x138c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x13880,%rsp
movsd  0xecc(%rip),%xmm1
mov    %rsp,%r14
xorps  %xmm0,%xmm0
mov    $0x2,%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1040 <euler@plt>
movsd  (%rsp),%xmm1
lea    0xefb(%rip),%rbx
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm1
movsd  0xe9a(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0x10(%rsp),%xmm1
mov    %rbx,%rdi
movsd  0xe79(%rip),%xmm0
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movsd  0xe69(%rip),%xmm1
mov    $0x3e8,%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1040 <euler@plt>
movsd  0x1f40(%rsp),%xmm1
lea    0xea5(%rip),%r15
mov    %r15,%rdi
movsd  0xe3f(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xe42(%rip),%xmm1
movsd  0xe2a(%rip),%xmm0
mov    $0x2,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1040 <euler@plt>
movsd  (%rsp),%xmm1
mov    %rbx,%rdi
movsd  0xe08(%rip),%xmm0
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm1
movsd  0xe0d(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0x10(%rsp),%xmm1
mov    %rbx,%rdi
movsd  0xdec(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xdcf(%rip),%xmm0
movsd  0xdd7(%rip),%xmm1
mov    $0x3e8,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1040 <euler@plt>
movsd  0x1f40(%rsp),%xmm1
mov    %r15,%rdi
movsd  0xdb1(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xdb4(%rip),%xmm1
movsd  0xd9c(%rip),%xmm0
mov    $0x4,%edi
mov    %r14,%rsi
mov    $0x2,%edx
call   1040 <euler@plt>
movsd  (%rsp),%xmm1
mov    %rbx,%rdi
movsd  0xd7a(%rip),%xmm0
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm1
movsd  0xd7f(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0x10(%rsp),%xmm1
movsd  0xd71(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm1
movsd  0xd63(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0x20(%rsp),%xmm1
mov    %rbx,%rdi
movsd  0xd32(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xd15(%rip),%xmm0
movsd  0xd1d(%rip),%xmm1
mov    $0x3e8,%edi
mov    %r14,%rsi
mov    $0x2,%edx
call   1040 <euler@plt>
movsd  0x1f40(%rsp),%xmm1
mov    %r15,%rdi
movsd  0xcf7(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xcca(%rip),%xmm0
movsd  0xcd2(%rip),%xmm1
mov    $0x4,%edi
mov    %r14,%rsi
mov    $0x3,%edx
call   1040 <euler@plt>
movsd  (%rsp),%xmm1
mov    %rbx,%rdi
movsd  0xca0(%rip),%xmm0
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm1
movsd  0xccd(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0x10(%rsp),%xmm1
mov    %rbx,%rdi
movsd  0xc8c(%rip),%xmm0
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm1
movsd  0xca9(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0x20(%rsp),%xmm1
mov    %rbx,%rdi
movsd  0xc58(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xc3b(%rip),%xmm0
movsd  0xc43(%rip),%xmm1
mov    $0x3e8,%edi
mov    %r14,%rsi
mov    $0x3,%edx
call   1040 <euler@plt>
movsd  0x1f40(%rsp),%xmm1
mov    %r15,%rdi
movsd  0xc1d(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x13880,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%lf\09%.7lf\0A\00"
@.str.1 = [30 x i8] c"\0A1000 iterations: %lf\09%.7lf\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10000 x double]
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca double
%8 = alloca i32
store i32 0, i32* %1
store double 0.000000e+00, double* %4
store double 1.000000e+00, double* %5
store i32 2, i32* %6
%9 = load double, double* %5
%10 = load double, double* %4
%11 = fsub double %9, %10
%12 = load i32, i32* %6
%13 = sitofp i32 %12 to double
%14 = fdiv double %11, %13
store double %14, double* %7
store i32 0, i32* %8
%15 = load double, double* %4
%16 = load double, double* %5
%17 = load i32, i32* %6
%18 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 0
%19 = load i32, i32* %8
%20 = call i32 @euler(double %15, double %16, i32 %17, double* %18, i32 %19)
store i32 0, i32* %3
br label %21
21: ; preds = %36, %0
%22 = load i32, i32* %3
%23 = load i32, i32* %6
%24 = icmp sle i32 %22, %23
br i1 %24, label %25, label %39
25: ; preds = %21
%26 = load double, double* %4
%27 = load i32, i32* %3
%28 = sitofp i32 %27 to double
%29 = load double, double* %7
%30 = call double @llvm.fmuladd.f64(double %28, double %29, double %26)
%31 = load i32, i32* %3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 %32
%34 = load double, double* %33
%35 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %30, double %34)
br label %36
36: ; preds = %25
%37 = load i32, i32* %3
%38 = add nsw i32 %37, 1
store i32 %38, i32* %3
br label %21
39: ; preds = %21
%40 = load double, double* %4
%41 = load double, double* %5
%42 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 0
%43 = load i32, i32* %8
%44 = call i32 @euler(double %40, double %41, i32 1000, double* %42, i32 %43)
%45 = load double, double* %5
%46 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 1000
%47 = load double, double* %46
%48 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double %45, double %47)
store double 1.000000e+00, double* %4
store double 2.000000e+00, double* %5
store double 5.000000e-01, double* %7
%49 = load double, double* %5
%50 = load double, double* %4
%51 = fsub double %49, %50
%52 = load double, double* %7
%53 = fdiv double %51, %52
%54 = fptosi double %53 to i32
store i32 %54, i32* %6
store i32 1, i32* %8
%55 = load double, double* %4
%56 = load double, double* %5
%57 = load i32, i32* %6
%58 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 0
%59 = load i32, i32* %8
%60 = call i32 @euler(double %55, double %56, i32 %57, double* %58, i32 %59)
store i32 0, i32* %3
br label %61
61: ; preds = %76, %39
%62 = load i32, i32* %3
%63 = load i32, i32* %6
%64 = icmp sle i32 %62, %63
br i1 %64, label %65, label %79
65: ; preds = %61
%66 = load double, double* %4
%67 = load i32, i32* %3
%68 = sitofp i32 %67 to double
%69 = load double, double* %7
%70 = call double @llvm.fmuladd.f64(double %68, double %69, double %66)
%71 = load i32, i32* %3
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 %72
%74 = load double, double* %73
%75 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %70, double %74)
br label %76
76: ; preds = %65
%77 = load i32, i32* %3
%78 = add nsw i32 %77, 1
store i32 %78, i32* %3
br label %61
79: ; preds = %61
%80 = load double, double* %4
%81 = load double, double* %5
%82 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 0
%83 = load i32, i32* %8
%84 = call i32 @euler(double %80, double %81, i32 1000, double* %82, i32 %83)
%85 = load double, double* %5
%86 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 1000
%87 = load double, double* %86
%88 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double %85, double %87)
store double 2.000000e+00, double* %4
store double 3.000000e+00, double* %5
store double 2.500000e-01, double* %7
%89 = load double, double* %5
%90 = load double, double* %4
%91 = fsub double %89, %90
%92 = load double, double* %7
%93 = fdiv double %91, %92
%94 = fptosi double %93 to i32
store i32 %94, i32* %6
store i32 2, i32* %8
%95 = load double, double* %4
%96 = load double, double* %5
%97 = load i32, i32* %6
%98 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 0
%99 = load i32, i32* %8
%100 = call i32 @euler(double %95, double %96, i32 %97, double* %98, i32 %99)
store i32 0, i32* %3
br label %101
101: ; preds = %116, %79
%102 = load i32, i32* %3
%103 = load i32, i32* %6
%104 = icmp sle i32 %102, %103
br i1 %104, label %105, label %119
105: ; preds = %101
%106 = load double, double* %4
%107 = load i32, i32* %3
%108 = sitofp i32 %107 to double
%109 = load double, double* %7
%110 = call double @llvm.fmuladd.f64(double %108, double %109, double %106)
%111 = load i32, i32* %3
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 %112
%114 = load double, double* %113
%115 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %110, double %114)
br label %116
116: ; preds = %105
%117 = load i32, i32* %3
%118 = add nsw i32 %117, 1
store i32 %118, i32* %3
br label %101
119: ; preds = %101
%120 = load double, double* %4
%121 = load double, double* %5
%122 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 0
%123 = load i32, i32* %8
%124 = call i32 @euler(double %120, double %121, i32 1000, double* %122, i32 %123)
%125 = load double, double* %5
%126 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 1000
%127 = load double, double* %126
%128 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double %125, double %127)
store double 1.000000e+00, double* %4
store double 2.000000e+00, double* %5
store double 2.500000e-01, double* %7
%129 = load double, double* %5
%130 = load double, double* %4
%131 = fsub double %129, %130
%132 = load double, double* %7
%133 = fdiv double %131, %132
%134 = fptosi double %133 to i32
store i32 %134, i32* %6
store i32 3, i32* %8
%135 = load double, double* %4
%136 = load double, double* %5
%137 = load i32, i32* %6
%138 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 0
%139 = load i32, i32* %8
%140 = call i32 @euler(double %135, double %136, i32 %137, double* %138, i32 %139)
store i32 0, i32* %3
br label %141
141: ; preds = %156, %119
%142 = load i32, i32* %3
%143 = load i32, i32* %6
%144 = icmp sle i32 %142, %143
br i1 %144, label %145, label %159
145: ; preds = %141
%146 = load double, double* %4
%147 = load i32, i32* %3
%148 = sitofp i32 %147 to double
%149 = load double, double* %7
%150 = call double @llvm.fmuladd.f64(double %148, double %149, double %146)
%151 = load i32, i32* %3
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 %152
%154 = load double, double* %153
%155 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %150, double %154)
br label %156
156: ; preds = %145
%157 = load i32, i32* %3
%158 = add nsw i32 %157, 1
store i32 %158, i32* %3
br label %141
159: ; preds = %141
%160 = load double, double* %4
%161 = load double, double* %5
%162 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 0
%163 = load i32, i32* %8
%164 = call i32 @euler(double %160, double %161, i32 1000, double* %162, i32 %163)
%165 = load double, double* %5
%166 = getelementptr inbounds [10000 x double], [10000 x double]* %2, i64 0, i64 1000
%167 = load double, double* %166
%168 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double %165, double %167)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%lf\09%.7lf\0A\00"
@.str.1 = [30 x i8] c"\0A1000 iterations: %lf\09%.7lf\0A\0A\00"
define i32 @main() {
%1 = alloca [10000 x double]
%2 = bitcast [10000 x double]* %1 to i8*
%3 = getelementptr inbounds [10000 x double], [10000 x double]* %1, i64 0, i64 0
%4 = call i32 @euler(double 0.000000e+00, double 1.000000e+00, i32 2, double* %3, i32 0)
%5 = load double, double* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 0.000000e+00, double %5)
%7 = getelementptr inbounds [10000 x double], [10000 x double]* %1, i64 0, i64 1
%8 = load double, double* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 5.000000e-01, double %8)
%10 = getelementptr inbounds [10000 x double], [10000 x double]* %1, i64 0, i64 2
%11 = load double, double* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double %11)
%13 = call i32 @euler(double 0.000000e+00, double 1.000000e+00, i32 1000, double* %3, i32 0)
%14 = getelementptr inbounds [10000 x double], [10000 x double]* %1, i64 0, i64 1000
%15 = load double, double* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00, double %15)
%17 = call i32 @euler(double 1.000000e+00, double 2.000000e+00, i32 2, double* %3, i32 1)
%18 = load double, double* %3
%19 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double %18)
%20 = load double, double* %7
%21 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 1.500000e+00, double %20)
%22 = load double, double* %10
%23 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 2.000000e+00, double %22)
%24 = call i32 @euler(double 1.000000e+00, double 2.000000e+00, i32 1000, double* %3, i32 1)
%25 = load double, double* %14
%26 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double 2.000000e+00, double %25)
%27 = call i32 @euler(double 2.000000e+00, double 3.000000e+00, i32 4, double* %3, i32 2)
%28 = load double, double* %3
%29 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 2.000000e+00, double %28)
%30 = load double, double* %7
%31 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 2.250000e+00, double %30)
%32 = load double, double* %10
%33 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 2.500000e+00, double %32)
%34 = getelementptr inbounds [10000 x double], [10000 x double]* %1, i64 0, i64 3
%35 = load double, double* %34
%36 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 2.750000e+00, double %35)
%37 = getelementptr inbounds [10000 x double], [10000 x double]* %1, i64 0, i64 4
%38 = load double, double* %37
%39 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 3.000000e+00, double %38)
%40 = call i32 @euler(double 2.000000e+00, double 3.000000e+00, i32 1000, double* %3, i32 2)
%41 = load double, double* %14
%42 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double 3.000000e+00, double %41)
%43 = call i32 @euler(double 1.000000e+00, double 2.000000e+00, i32 4, double* %3, i32 3)
%44 = load double, double* %3
%45 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double %44)
%46 = load double, double* %7
%47 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 1.250000e+00, double %46)
%48 = load double, double* %10
%49 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 1.500000e+00, double %48)
%50 = load double, double* %34
%51 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 1.750000e+00, double %50)
%52 = load double, double* %37
%53 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 2.000000e+00, double %52)
%54 = call i32 @euler(double 1.000000e+00, double 2.000000e+00, i32 1000, double* %3, i32 3)
%55 = load double, double* %14
%56 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double 2.000000e+00, double %55)
ret i32 0
}