#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 */
struct rnn_parameters {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rnn_backward_context_map(struct rnn_parameters const *,
                                            double *, double const *,
                                            double const *, double *);
int /*<<< orphan*/ rnn_backward_output_map(struct rnn_parameters const *,
                                           double const *, double const *,
                                           double *);
void rnn_backward_map(const struct rnn_parameters *rnn_p,
                      const double *delta_likelihood,
                      const double *next_delta_c_inter, const double *c_state,
                      const double *out_state, double *delta_c_inter,
                      double *delta_o_inter) {
  rnn_backward_output_map(rnn_p, delta_likelihood, out_state, delta_o_inter);
  rnn_backward_context_map(rnn_p, delta_o_inter, next_delta_c_inter, c_state,
                           delta_c_inter);
}


x86 assembly (clang, -O0):
<rnn_backward_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    0x10(%rbp),%rcx
call   1040 <rnn_backward_output_map@plt>
mov    -0x8(%rbp),%rdi
mov    0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1030 <rnn_backward_context_map@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnn_backward_map>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r9,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rdi,%rbx
mov    0x30(%rsp),%r13
mov    %r8,%rdx
mov    %r13,%rcx
call   1040 <rnn_backward_output_map@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <rnn_backward_context_map@plt>

LLVM IR (-O0):
%struct.rnn_parameters = type { i32 }
define void @rnn_backward_map(%struct.rnn_parameters* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6) {
%8 = alloca %struct.rnn_parameters*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
store %struct.rnn_parameters* %0, %struct.rnn_parameters** %8
store double* %1, double** %9
store double* %2, double** %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
%15 = load %struct.rnn_parameters*, %struct.rnn_parameters** %8
%16 = load double*, double** %9
%17 = load double*, double** %12
%18 = load double*, double** %14
%19 = call i32 @rnn_backward_output_map(%struct.rnn_parameters* %15, double* %16, double* %17, double* %18)
%20 = load %struct.rnn_parameters*, %struct.rnn_parameters** %8
%21 = load double*, double** %14
%22 = load double*, double** %10
%23 = load double*, double** %11
%24 = load double*, double** %13
%25 = call i32 @rnn_backward_context_map(%struct.rnn_parameters* %20, double* %21, double* %22, double* %23, double* %24)
ret void
}

LLVM IR (-O2):
%struct.rnn_parameters = type { i32 }
define void @rnn_backward_map(%struct.rnn_parameters* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6) {
%8 = tail call i32 @rnn_backward_output_map(%struct.rnn_parameters* %0, double* %1, double* %4, double* %6)
%9 = tail call i32 @rnn_backward_context_map(%struct.rnn_parameters* %0, double* %6, double* %2, double* %3, double* %5)
ret void
}