#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 */
double ICDecrement(double);
double ICIncrement(double);
int /*<<< orphan*/ printf(char *, double, double);
int main(int argc, const char *argv[]) {
  double parameters[10] = {1000.0, 2.0, 3.4, 7.0, 50.0, 6, 7, 8, 0.000, -50};
  for (int i = 0; i < 10; ++i) {
    printf("Parameter = %f\n , Increment = %f\n", parameters[i],
           ICIncrement(parameters[i]));
    printf("Parameter = %f\n , Decrement = %f\n", parameters[i],
           ICDecrement(parameters[i]));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xe9c(%rip),%rsi
mov    $0x50,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    11f1 <main+0xb1>
movslq -0x64(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movslq -0x64(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
call   1040 <ICIncrement@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
movslq -0x64(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movslq -0x64(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
call   1060 <ICDecrement@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1175 <main+0x35>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xebf(%rip),%r12
lea    0xf08(%rip),%r14
lea    0xf23(%rip),%r15
nop
movsd  (%rbx,%r12,1),%xmm0
movsd  %xmm0,(%rsp)
call   1040 <ICIncrement@plt>
movaps %xmm0,%xmm1
mov    %r14,%rdi
movsd  (%rsp),%xmm0
call   1030 <printf@plt>
movsd  (%rsp),%xmm0
call   1050 <ICDecrement@plt>
movaps %xmm0,%xmm1
mov    %r15,%rdi
movsd  (%rsp),%xmm0
call   1030 <printf@plt>
add    $0x8,%rbx
cmp    $0x50,%rbx
jne    1150 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.parameters = [10 x double] [double 1.000000e+03, double 2.000000e+00, double 3.400000e+00, double 7.000000e+00, double 5.000000e+01, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00, double 0.000000e+00, double -5.000000e+01]
@.str = [34 x i8] c"Parameter = %f\0A , Increment = %f\0A\00"
@.str.1 = [34 x i8] c"Parameter = %f\0A , Decrement = %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x double]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [10 x double]* %6 to i8*
store i32 0, i32* %7
br label %9
9: ; preds = %33, %2
%10 = load i32, i32* %7
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %36
12: ; preds = %9
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 %14
%16 = load double, double* %15
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 %18
%20 = load double, double* %19
%21 = call double @ICIncrement(double %20)
%22 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), double %16, double %21)
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 %24
%26 = load double, double* %25
%27 = load i32, i32* %7
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 %28
%30 = load double, double* %29
%31 = call double @ICDecrement(double %30)
%32 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), double %26, double %31)
br label %33
33: ; preds = %12
%34 = load i32, i32* %7
%35 = add nsw i32 %34, 1
store i32 %35, i32* %7
br label %9
36: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@__const.main.parameters = [10 x double] [double 1.000000e+03, double 2.000000e+00, double 3.400000e+00, double 7.000000e+00, double 5.000000e+01, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00, double 0.000000e+00, double -5.000000e+01]
@.str = [34 x i8] c"Parameter = %f\0A , Increment = %f\0A\00"
@.str.1 = [34 x i8] c"Parameter = %f\0A , Decrement = %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %4
3: ; preds = %4
ret i32 0
4: ; preds = %2, %4
%5 = phi i64 [ 0, %2 ], [ %12, %4 ]
%6 = getelementptr inbounds [10 x double], [10 x double]* @__const.main.parameters, i64 0, i64 %5
%7 = load double, double* %6
%8 = tail call double @ICIncrement(double %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), double %7, double %8)
%10 = tail call double @ICDecrement(double %7)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), double %7, double %10)
%12 = add nuw nsw i64 %5, 1
%13 = icmp eq i64 %12, 10
br i1 %13, label %3, label %4
}