void set_ts_conn_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 < 7; i++) {
    st_array[i] = cur_array[i];
  }
}


x86 assembly (clang, -O0):
<set_ts_conn_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   $0x7,-0x28(%rbp)
jge    1173 <set_ts_conn_record+0x73>
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
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_ts_conn_record+0x1f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_ts_conn_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
movupd %xmm1,(%rsi)
movdqu 0x10(%rcx),%xmm1
movdqa %xmm1,%xmm2
pand   %xmm0,%xmm2
por    %xmm3,%xmm2
psrlq  $0x20,%xmm1
por    %xmm4,%xmm1
subpd  %xmm5,%xmm1
addpd  %xmm2,%xmm1
movupd %xmm1,0x10(%rsi)
movdqu 0x20(%rcx),%xmm1
pand   %xmm1,%xmm0
por    %xmm3,%xmm0
psrlq  $0x20,%xmm1
por    %xmm4,%xmm1
subpd  %xmm5,%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,0x20(%rsi)
movsd  0x30(%rcx),%xmm0
unpcklps 0xea5(%rip),%xmm0
subpd  0xead(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsi)
ret

LLVM IR (-O0):
%struct.module = type opaque
define void @set_ts_conn_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 = %26, %5
%13 = load i32, i32* %11
%14 = icmp slt i32 %13, 7
br i1 %14, label %15, label %29
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 = load double*, double** %7
%23 = load i32, i32* %11
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %22, i64 %24
store double %21, double* %25
br label %26
26: ; preds = %15
%27 = load i32, i32* %11
%28 = add nsw i32 %27, 1
store i32 %28, i32* %11
br label %12
29: ; preds = %12
ret void
}

LLVM IR (-O2):
%struct.module = type opaque
define void @set_ts_conn_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 = bitcast double* %1 to <2 x double>*
store <2 x double> %8, <2 x double>* %9
%10 = getelementptr inbounds i64, i64* %3, i64 2
%11 = getelementptr inbounds double, double* %1, i64 2
%12 = bitcast i64* %10 to <2 x i64>*
%13 = load <2 x i64>, <2 x i64>* %12
%14 = uitofp <2 x i64> %13 to <2 x double>
%15 = bitcast double* %11 to <2 x double>*
store <2 x double> %14, <2 x double>* %15
%16 = getelementptr inbounds i64, i64* %3, i64 4
%17 = getelementptr inbounds double, double* %1, i64 4
%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
%22 = getelementptr inbounds i64, i64* %3, i64 6
%23 = load i64, i64* %22
%24 = uitofp i64 %23 to double
%25 = getelementptr inbounds double, double* %1, i64 6
store double %24, double* %25
ret void
}