void set_load_record(struct module *mod, double st_array[],
                     unsigned long long pre_array[],
                     unsigned long long cur_array[], int inter) {
  int i;
  for (i = 0; i < 3; i++) {
    st_array[i] = cur_array[i] / 100.0;
  }
  st_array[3] = cur_array[3];
  st_array[4] = cur_array[4];
}


x86 assembly (clang, -O0):
<set_load_record>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x3,-0x28(%rbp)
jge    117f <set_load_record+0x7f>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movq   (%rax,%rcx,8),%xmm0
movaps 0xec3(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0xec7(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xec0(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    111f <set_load_record+0x1f>
mov    -0x20(%rbp),%rax
movq   0x18(%rax),%xmm0
movaps 0xe71(%rip),%xmm2
punpckldq %xmm2,%xmm0
movapd 0xe75(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm3
unpckhpd %xmm0,%xmm0
addsd  %xmm3,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x20(%rbp),%rax
movq   0x20(%rax),%xmm0
punpckldq %xmm2,%xmm0
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_load_record>:
movdqu (%rcx),%xmm1
movdqa 0xef4(%rip),%xmm0
movdqa %xmm1,%xmm2
pand   %xmm0,%xmm2
movdqa 0xef4(%rip),%xmm3
por    %xmm3,%xmm2
psrlq  $0x20,%xmm1
movdqa 0xef3(%rip),%xmm4
por    %xmm4,%xmm1
movapd 0xef7(%rip),%xmm5
subpd  %xmm5,%xmm1
addpd  %xmm2,%xmm1
divpd  0xef7(%rip),%xmm1
movupd %xmm1,(%rsi)
movsd  0x10(%rcx),%xmm1
unpcklps 0xef7(%rip),%xmm1
subpd  0xeff(%rip),%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
addsd  %xmm1,%xmm2
divsd  0xefb(%rip),%xmm2
movsd  %xmm2,0x10(%rsi)
movdqu 0x18(%rcx),%xmm1
pand   %xmm1,%xmm0
por    %xmm3,%xmm0
psrlq  $0x20,%xmm1
por    %xmm4,%xmm1
subpd  %xmm5,%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,0x18(%rsi)
ret

LLVM IR (-O0):
%struct.module = type opaque
define void @set_load_record(%struct.module* %0, double* %1, i64* %2, i64* %3, i32 %4) {
%6 = alloca %struct.module*
%7 = alloca double*
%8 = alloca i64*
%9 = alloca i64*
%10 = alloca i32
%11 = alloca i32
store %struct.module* %0, %struct.module** %6
store double* %1, double** %7
store i64* %2, i64** %8
store i64* %3, i64** %9
store i32 %4, i32* %10
store i32 0, i32* %11
br label %12
12: ; preds = %27, %5
%13 = load i32, i32* %11
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %30
15: ; preds = %12
%16 = load i64*, i64** %9
%17 = load i32, i32* %11
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i64, i64* %16, i64 %18
%20 = load i64, i64* %19
%21 = uitofp i64 %20 to double
%22 = fdiv double %21, 1.000000e+02
%23 = load double*, double** %7
%24 = load i32, i32* %11
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %23, i64 %25
store double %22, double* %26
br label %27
27: ; preds = %15
%28 = load i32, i32* %11
%29 = add nsw i32 %28, 1
store i32 %29, i32* %11
br label %12
30: ; preds = %12
%31 = load i64*, i64** %9
%32 = getelementptr inbounds i64, i64* %31, i64 3
%33 = load i64, i64* %32
%34 = uitofp i64 %33 to double
%35 = load double*, double** %7
%36 = getelementptr inbounds double, double* %35, i64 3
store double %34, double* %36
%37 = load i64*, i64** %9
%38 = getelementptr inbounds i64, i64* %37, i64 4
%39 = load i64, i64* %38
%40 = uitofp i64 %39 to double
%41 = load double*, double** %7
%42 = getelementptr inbounds double, double* %41, i64 4
store double %40, double* %42
ret void
}

LLVM IR (-O2):
%struct.module = type opaque
define void @set_load_record(%struct.module* nocapture readnone %0, double* nocapture writeonly %1, i64* nocapture readnone %2, i64* nocapture %3, i32 %4) {
%6 = bitcast i64* %3 to <2 x i64>*
%7 = load <2 x i64>, <2 x i64>* %6
%8 = uitofp <2 x i64> %7 to <2 x double>
%9 = fdiv <2 x double> %8, <double 1.000000e+02, double 1.000000e+02>
%10 = bitcast double* %1 to <2 x double>*
store <2 x double> %9, <2 x double>* %10
%11 = getelementptr inbounds i64, i64* %3, i64 2
%12 = load i64, i64* %11
%13 = uitofp i64 %12 to double
%14 = fdiv double %13, 1.000000e+02
%15 = getelementptr inbounds double, double* %1, i64 2
store double %14, double* %15
%16 = getelementptr inbounds i64, i64* %3, i64 3
%17 = getelementptr inbounds double, double* %1, i64 3
%18 = bitcast i64* %16 to <2 x i64>*
%19 = load <2 x i64>, <2 x i64>* %18
%20 = uitofp <2 x i64> %19 to <2 x double>
%21 = bitcast double* %17 to <2 x double>*
store <2 x double> %20, <2 x double>* %21
ret void
}