#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*/ memcpy(double *, double ***, int);
void store(int flag, double *real, double local_real[][((64 + 4 - 1) / 4)][128],
           double *img, double local_img[][((64 + 4 - 1) / 4)][128],
           int num_strides) {
#pragma HLS inline off
  if (flag) {
    memcpy(real, local_real, num_strides * 128 * sizeof(double));
    memcpy(img, local_img, num_strides * 128 * sizeof(double));
  }
}


x86 assembly (clang, -O0):
<store>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     116f <store+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x2c(%rbp),%eax
shl    $0x7,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%eax
shl    $0x7,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store>:
test   %edi,%edi
je     1144 <store+0x34>
push   %r15
push   %r14
push   %rbx
mov    %r9d,%ebx
mov    %r8,%r14
mov    %rcx,%r15
shl    $0xa,%ebx
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %ebx,%edx
call   1030 <memcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <memcpy@plt>
ret

LLVM IR (-O0):
define void @store(i32 %0, double* %1, [16 x [128 x double]]* %2, double* %3, [16 x [128 x double]]* %4, i32 %5) {
%7 = alloca i32
%8 = alloca double*
%9 = alloca [16 x [128 x double]]*
%10 = alloca double*
%11 = alloca [16 x [128 x double]]*
%12 = alloca i32
store i32 %0, i32* %7
store double* %1, double** %8
store [16 x [128 x double]]* %2, [16 x [128 x double]]** %9
store double* %3, double** %10
store [16 x [128 x double]]* %4, [16 x [128 x double]]** %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %34
15: ; preds = %6
%16 = load double*, double** %8
%17 = load [16 x [128 x double]]*, [16 x [128 x double]]** %9
%18 = bitcast [16 x [128 x double]]* %17 to double***
%19 = load i32, i32* %12
%20 = mul nsw i32 %19, 128
%21 = sext i32 %20 to i64
%22 = mul i64 %21, 8
%23 = trunc i64 %22 to i32
%24 = call i32 @memcpy(double* %16, double*** %18, i32 %23)
%25 = load double*, double** %10
%26 = load [16 x [128 x double]]*, [16 x [128 x double]]** %11
%27 = bitcast [16 x [128 x double]]* %26 to double***
%28 = load i32, i32* %12
%29 = mul nsw i32 %28, 128
%30 = sext i32 %29 to i64
%31 = mul i64 %30, 8
%32 = trunc i64 %31 to i32
%33 = call i32 @memcpy(double* %25, double*** %27, i32 %32)
br label %34
34: ; preds = %15, %6
ret void
}

LLVM IR (-O2):
define void @store(i32 %0, double* %1, [16 x [128 x double]]* %2, double* %3, [16 x [128 x double]]* %4, i32 %5) {
%7 = icmp eq i32 %0, 0
br i1 %7, label %14, label %8
8: ; preds = %6
%9 = bitcast [16 x [128 x double]]* %2 to double***
%10 = shl i32 %5, 10
%11 = tail call i32 @memcpy(double* %1, double*** %9, i32 %10)
%12 = bitcast [16 x [128 x double]]* %4 to double***
%13 = tail call i32 @memcpy(double* %3, double*** %12, i32 %10)
br label %14
14: ; preds = %8, %6
ret void
}