#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*/ mult_array(double *, double, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ show_array(double *, int);
int main(void) {
  double dip[5] = {5, 10.2, 3, 4, 100};
  printf("the origin dip ary: \n");
  show_array(dip, 5);
  printf("the mult dip ary: \n");
  mult_array(dip, 2.0, 5);
  show_array(dip, 5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe9e(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe89(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe74(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1050 <show_array@plt>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
movsd  0xe35(%rip),%xmm0
mov    $0x5,%esi
call   1060 <mult_array@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1050 <show_array@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movaps 0xec4(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x4059000000000000,%rax
mov    %rax,0x20(%rsp)
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <show_array@plt>
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
movsd  0xe95(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x5,%esi
call   1050 <mult_array@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <show_array@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"the origin dip ary: \0A\00"
@.str.1 = [20 x i8] c"the mult dip ary: \0A\00"
define i32 @main() {
%1 = alloca [5 x double]
%2 = bitcast [5 x double]* %1 to i8*
%3 = bitcast i8* %2 to [5 x double]*
%4 = getelementptr inbounds [5 x double], [5 x double]* %3, i32 0, i32 0
store double 5.000000e+00, double* %4
%5 = getelementptr inbounds [5 x double], [5 x double]* %3, i32 0, i32 1
store double 1.020000e+01, double* %5
%6 = getelementptr inbounds [5 x double], [5 x double]* %3, i32 0, i32 2
store double 3.000000e+00, double* %6
%7 = getelementptr inbounds [5 x double], [5 x double]* %3, i32 0, i32 3
store double 4.000000e+00, double* %7
%8 = getelementptr inbounds [5 x double], [5 x double]* %3, i32 0, i32 4
store double 1.000000e+02, double* %8
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 0
%11 = call i32 @show_array(double* %10, i32 5)
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%13 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 0
%14 = call i32 @mult_array(double* %13, double 2.000000e+00, i32 5)
%15 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 0
%16 = call i32 @show_array(double* %15, i32 5)
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"the origin dip ary: \00"
@str.2 = [19 x i8] c"the mult dip ary: \00"
define i32 @main() {
%1 = alloca [5 x double]
%2 = bitcast [5 x double]* %1 to i8*
%3 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 0
%4 = bitcast [5 x double]* %1 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 1.020000e+01>, <2 x double>* %4
%5 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 2
%6 = bitcast double* %5 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 4.000000e+00>, <2 x double>* %6
%7 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 4
store double 1.000000e+02, double* %7
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%9 = call i32 @show_array(double* %3, i32 5)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.2, i64 0, i64 0))
%11 = call i32 @mult_array(double* %3, double 2.000000e+00, i32 5)
%12 = call i32 @show_array(double* %3, i32 5)
ret i32 0
}