void test_rnn_lyapunov_setup(struct recurrent_neural_network *rnn,
                             unsigned long seed, int in_state_size,
                             int c_state_size, int out_state_size) {
  init_genrand(seed);
  init_recurrent_neural_network(rnn, in_state_size, c_state_size,
                                out_state_size);
  test_rnn_state_setup(rnn, 1, (int[]){100});
}


x86 assembly (clang, -O0):
<test_rnn_lyapunov_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <init_genrand@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    $0x0,%al
call   1050 <init_recurrent_neural_network@plt>
mov    -0x8(%rbp),%rdi
movl   $0x64,-0x20(%rbp)
lea    -0x20(%rbp),%rdx
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <test_rnn_state_setup@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rnn_lyapunov_setup>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%ebx
mov    %rdi,%rbp
mov    %rsi,%rdi
xor    %eax,%eax
call   1030 <init_genrand@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1050 <init_recurrent_neural_network@plt>
movl   $0x64,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <test_rnn_state_setup@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.recurrent_neural_network = type opaque
define void @test_rnn_lyapunov_setup(%struct.recurrent_neural_network* %0, i64 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.recurrent_neural_network*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [1 x i32]
store %struct.recurrent_neural_network* %0, %struct.recurrent_neural_network** %6
store i64 %1, i64* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i64, i64* %7
%13 = call i32 (i64, ...) bitcast (i32 (...)* @init_genrand to i32 (i64, ...)*)(i64 %12)
%14 = load %struct.recurrent_neural_network*, %struct.recurrent_neural_network** %6
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = call i32 (%struct.recurrent_neural_network*, i32, i32, i32, ...) bitcast (i32 (...)* @init_recurrent_neural_network to i32 (%struct.recurrent_neural_network*, i32, i32, i32, ...)*)(%struct.recurrent_neural_network* %14, i32 %15, i32 %16, i32 %17)
%19 = load %struct.recurrent_neural_network*, %struct.recurrent_neural_network** %6
%20 = getelementptr inbounds [1 x i32], [1 x i32]* %11, i64 0, i64 0
store i32 100, i32* %20
%21 = getelementptr inbounds [1 x i32], [1 x i32]* %11, i64 0, i64 0
%22 = call i32 (%struct.recurrent_neural_network*, i32, i32*, ...) bitcast (i32 (...)* @test_rnn_state_setup to i32 (%struct.recurrent_neural_network*, i32, i32*, ...)*)(%struct.recurrent_neural_network* %19, i32 1, i32* %21)
ret void
}

LLVM IR (-O2):
%struct.recurrent_neural_network = type opaque
define void @test_rnn_lyapunov_setup(%struct.recurrent_neural_network* %0, i64 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca [1 x i32]
%7 = tail call i32 (i64, ...) bitcast (i32 (...)* @init_genrand to i32 (i64, ...)*)(i64 %1)
%8 = tail call i32 (%struct.recurrent_neural_network*, i32, i32, i32, ...) bitcast (i32 (...)* @init_recurrent_neural_network to i32 (%struct.recurrent_neural_network*, i32, i32, i32, ...)*)(%struct.recurrent_neural_network* %0, i32 %2, i32 %3, i32 %4)
%9 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 0
store i32 100, i32* %9
%10 = call i32 (%struct.recurrent_neural_network*, i32, i32*, ...) bitcast (i32 (...)* @test_rnn_state_setup to i32 (%struct.recurrent_neural_network*, i32, i32*, ...)*)(%struct.recurrent_neural_network* %0, i32 1, i32* %9)
ret void
}