#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 */
typedef size_t V;

/* Variables and functions */
int /*<<< orphan*/ resample_post_gamma(int, int **, int *, int, double *,
                                       int ***, int ***);
void initialize_post_gamma(double *post_gamma, int D, int **M, int *N, int V,
                           int ***w, int ***z) {
  int dvv_loop_var_1;
  int dvv_loop_var_2;
  for (dvv_loop_var_1 = 1; dvv_loop_var_1 <= V; dvv_loop_var_1++) {
    post_gamma[dvv_loop_var_1 - 1] = 0.0;
  }
  post_gamma[(V) + (1) - 1] = (0.0) * (((1) + (V)) - (1));
  resample_post_gamma(D, M, N, V, post_gamma, w, z);
}


x86 assembly (clang, -O0):
<initialize_post_gamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1169 <initialize_post_gamma+0x59>
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    113a <initialize_post_gamma+0x2a>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
xorps  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x8(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <resample_post_gamma@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_post_gamma>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8d,%ebp
mov    %rcx,%r15
mov    %rdx,%r12
mov    %esi,%r13d
mov    %rdi,%rbx
test   %r8d,%r8d
jle    1152 <initialize_post_gamma+0x32>
mov    %ebp,%edx
shl    $0x3,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
cvtsi2sd %ebp,%xmm0
xorpd  %xmm1,%xmm1
mulsd  %xmm0,%xmm1
movslq %ebp,%rax
movsd  %xmm1,(%rbx,%rax,8)
mov    %r13d,%edi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %ebp,%ecx
mov    %rbx,%r8
mov    %r14,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <resample_post_gamma@plt>

LLVM IR (-O0):
define void @initialize_post_gamma(double* %0, i32 %1, i32** %2, i32* %3, i32 %4, i32*** %5, i32*** %6) {
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32**
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32***
%14 = alloca i32***
%15 = alloca i32
%16 = alloca i32
store double* %0, double** %8
store i32 %1, i32* %9
store i32** %2, i32*** %10
store i32* %3, i32** %11
store i32 %4, i32* %12
store i32*** %5, i32**** %13
store i32*** %6, i32**** %14
store i32 1, i32* %15
br label %17
17: ; preds = %27, %7
%18 = load i32, i32* %15
%19 = load i32, i32* %12
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load double*, double** %8
%23 = load i32, i32* %15
%24 = sub nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %22, i64 %25
store double 0.000000e+00, double* %26
br label %27
27: ; preds = %21
%28 = load i32, i32* %15
%29 = add nsw i32 %28, 1
store i32 %29, i32* %15
br label %17
30: ; preds = %17
%31 = load i32, i32* %12
%32 = add nsw i32 1, %31
%33 = sub nsw i32 %32, 1
%34 = sitofp i32 %33 to double
%35 = fmul double 0.000000e+00, %34
%36 = load double*, double** %8
%37 = load i32, i32* %12
%38 = add nsw i32 %37, 1
%39 = sub nsw i32 %38, 1
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %36, i64 %40
store double %35, double* %41
%42 = load i32, i32* %9
%43 = load i32**, i32*** %10
%44 = load i32*, i32** %11
%45 = load i32, i32* %12
%46 = load double*, double** %8
%47 = load i32***, i32**** %13
%48 = load i32***, i32**** %14
%49 = call i32 @resample_post_gamma(i32 %42, i32** %43, i32* %44, i32 %45, double* %46, i32*** %47, i32*** %48)
ret void
}

LLVM IR (-O2):
define void @initialize_post_gamma(double* %0, i32 %1, i32** %2, i32* %3, i32 %4, i32*** %5, i32*** %6) {
%8 = icmp slt i32 %4, 1
br i1 %8, label %13, label %9
9: ; preds = %7
%10 = bitcast double* %0 to i8*
%11 = zext i32 %4 to i64
%12 = shl nuw nsw i64 %11, 3
br label %13
13: ; preds = %9, %7
%14 = sitofp i32 %4 to double
%15 = fmul double %14, 0.000000e+00
%16 = sext i32 %4 to i64
%17 = getelementptr inbounds double, double* %0, i64 %16
store double %15, double* %17
%18 = tail call i32 @resample_post_gamma(i32 %1, i32** %2, i32* %3, i32 %4, double* %0, i32*** %5, i32*** %6)
ret void
}