#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 /*<<< orphan*/ scanf(char *, double *);
void dobldobl_read_point(int n, double *x) {
  int k;
  for (k = 0; k < n; k++) {
    printf("Give the real part for x[%d] : ", k);
    scanf("%lf", &x[4 * k]);
    scanf("%lf", &x[4 * k + 1]);
    printf("Give the imaginary part for x[%d] : ", k);
    scanf("%lf", &x[4 * k + 2]);
    scanf("%lf", &x[4 * k + 3]);
  }
  if (1 > 0) {
    printf("The coordinates of the point :\n");
    for (k = 0; k < n; k++)
      printf("x[%d] = %.15e  %.15e  %.15e  %.15e\n", k, x[4 * k], x[4 * k + 1],
             x[4 * k + 2], x[4 * k + 3]);
  }
}


x86 assembly (clang, -O0):
<dobldobl_read_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11f7 <dobldobl_read_point+0xd7>
mov    -0x14(%rbp),%esi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    0xeb3(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x2,%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    0xe91(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%esi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x2,%eax
add    $0x2,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    0xe5e(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x2,%eax
add    $0x3,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    0xe3c(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <dobldobl_read_point+0x16>
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1288 <dobldobl_read_point+0x168>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm3
lea    0xdf6(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    120c <dobldobl_read_point+0xec>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dobldobl_read_point>:
test   %edi,%edi
jle    123b <dobldobl_read_point+0x10b>
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,0x4(%rsp)
mov    %edi,%r15d
mov    $0x3,%r14d
lea    0xec6(%rip),%r13
lea    0xec3(%rip),%r12
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xe89(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    -0x3(%r14),%eax
lea    (%rbx,%rax,8),%rsi
mov    %r13,%rdi
call   1050 <scanf@plt>
lea    -0x2(%r14),%eax
lea    (%rbx,%rax,8),%rsi
mov    %r13,%rdi
call   1050 <scanf@plt>
mov    %r12,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    -0x1(%r14),%eax
lea    (%rbx,%rax,8),%rsi
mov    %r13,%rdi
call   1050 <scanf@plt>
mov    %r14d,%eax
lea    (%rbx,%rax,8),%rsi
mov    %r13,%rdi
call   1050 <scanf@plt>
add    $0x1,%rbp
add    $0x4,%r14d
cmp    %rbp,%r15
jne    1170 <dobldobl_read_point+0x40>
lea    0xe8e(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0x4(%rsp)
jle    122c <dobldobl_read_point+0xfc>
add    $0x18,%rbx
xor    %ebp,%ebp
lea    0xe51(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsd  -0x18(%rbx),%xmm0
movsd  -0x10(%rbx),%xmm1
movsd  -0x8(%rbx),%xmm2
movsd  (%rbx),%xmm3
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x4,%al
call   1040 <printf@plt>
add    $0x1,%rbp
add    $0x20,%rbx
cmp    %rbp,%r15
jne    1200 <dobldobl_read_point+0xd0>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe2b(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Give the real part for x[%d] : \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [37 x i8] c"Give the imaginary part for x[%d] : \00"
@.str.3 = [32 x i8] c"The coordinates of the point :\0A\00"
@.str.4 = [36 x i8] c"x[%d] = %.15e %.15e %.15e %.15e\0A\00"
define void @dobldobl_read_point(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
store i32 %0, i32* %3
store double* %1, double** %4
store i32 0, i32* %5
br label %6
6: ; preds = %42, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %45
10: ; preds = %6
%11 = load i32, i32* %5
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load double*, double** %4
%14 = load i32, i32* %5
%15 = mul nsw i32 4, %14
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %13, i64 %16
%18 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %17)
%19 = load double*, double** %4
%20 = load i32, i32* %5
%21 = mul nsw i32 4, %20
%22 = add nsw i32 %21, 1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds double, double* %19, i64 %23
%25 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %24)
%26 = load i32, i32* %5
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %26)
%28 = load double*, double** %4
%29 = load i32, i32* %5
%30 = mul nsw i32 4, %29
%31 = add nsw i32 %30, 2
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %28, i64 %32
%34 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %33)
%35 = load double*, double** %4
%36 = load i32, i32* %5
%37 = mul nsw i32 4, %36
%38 = add nsw i32 %37, 3
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %35, i64 %39
%41 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %40)
br label %42
42: ; preds = %10
%43 = load i32, i32* %5
%44 = add nsw i32 %43, 1
store i32 %44, i32* %5
br label %6
45: ; preds = %6
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %5
br label %47
47: ; preds = %81, %45
%48 = load i32, i32* %5
%49 = load i32, i32* %3
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %84
51: ; preds = %47
%52 = load i32, i32* %5
%53 = load double*, double** %4
%54 = load i32, i32* %5
%55 = mul nsw i32 4, %54
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %53, i64 %56
%58 = load double, double* %57
%59 = load double*, double** %4
%60 = load i32, i32* %5
%61 = mul nsw i32 4, %60
%62 = add nsw i32 %61, 1
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %59, i64 %63
%65 = load double, double* %64
%66 = load double*, double** %4
%67 = load i32, i32* %5
%68 = mul nsw i32 4, %67
%69 = add nsw i32 %68, 2
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %66, i64 %70
%72 = load double, double* %71
%73 = load double*, double** %4
%74 = load i32, i32* %5
%75 = mul nsw i32 4, %74
%76 = add nsw i32 %75, 3
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %73, i64 %77
%79 = load double, double* %78
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %52, double %58, double %65, double %72, double %79)
br label %81
81: ; preds = %51
%82 = load i32, i32* %5
%83 = add nsw i32 %82, 1
store i32 %83, i32* %5
br label %47
84: ; preds = %47
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Give the real part for x[%d] : \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [37 x i8] c"Give the imaginary part for x[%d] : \00"
@.str.4 = [36 x i8] c"x[%d] = %.15e %.15e %.15e %.15e\0A\00"
@str = [31 x i8] c"The coordinates of the point :\00"
define void @dobldobl_read_point(i32 %0, double* %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
br label %53
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %29, %8 ]
%10 = trunc i64 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = shl nsw i32 %10, 2
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds double, double* %1, i64 %13
%15 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %14)
%16 = or i32 %12, 1
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds double, double* %1, i64 %17
%19 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %18)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%21 = or i32 %12, 2
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds double, double* %1, i64 %22
%24 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %23)
%25 = or i32 %12, 3
%26 = zext i32 %25 to i64
%27 = getelementptr inbounds double, double* %1, i64 %26
%28 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %27)
%29 = add nuw nsw i64 %9, 1
%30 = icmp eq i64 %29, %7
br i1 %30, label %31, label %8
31: ; preds = %8
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
br i1 %3, label %33, label %53
33: ; preds = %31
%34 = zext i32 %0 to i64
br label %35
35: ; preds = %33, %35
%36 = phi i64 [ 0, %33 ], [ %51, %35 ]
%37 = shl nsw i64 %36, 2
%38 = getelementptr inbounds double, double* %1, i64 %37
%39 = load double, double* %38
%40 = or i64 %37, 1
%41 = getelementptr inbounds double, double* %1, i64 %40
%42 = load double, double* %41
%43 = or i64 %37, 2
%44 = getelementptr inbounds double, double* %1, i64 %43
%45 = load double, double* %44
%46 = or i64 %37, 3
%47 = getelementptr inbounds double, double* %1, i64 %46
%48 = load double, double* %47
%49 = trunc i64 %36 to i32
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %49, double %39, double %42, double %45, double %48)
%51 = add nuw nsw i64 %36, 1
%52 = icmp eq i64 %51, %34
br i1 %52, label %53, label %35
53: ; preds = %35, %4, %31
ret void
}