#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 recurrent_neural_network {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _mu_assert(int, char *, int, char *, int, int);
int rnn_get_total_length(struct recurrent_neural_network *);
void test_rnn_get_total_length(struct recurrent_neural_network *rnn,
                               int total_length) {
  _mu_assert((total_length) == (rnn_get_total_length(rnn)),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/jnamika/rnn/refs/heads/master/src/"
             "unit-test/test_rnn.c",
             657,
             ""
             "expected: %d\n  but was: %d\n",
             (int)(total_length), (int)(rnn_get_total_length(rnn)));
}


x86 assembly (clang, -O0):
<test_rnn_get_total_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <rnn_get_total_length@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <rnn_get_total_length@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%r8d
mov    %eax,%r9d
lea    0xe90(%rip),%rsi
mov    $0x291,%edx
lea    0xf15(%rip),%rcx
call   1030 <_mu_assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rnn_get_total_length>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1040 <rnn_get_total_length@plt>
xor    %ebp,%ebp
cmp    %r14d,%eax
sete   %bpl
mov    %rbx,%rdi
call   1040 <rnn_get_total_length@plt>
lea    0xeb9(%rip),%rsi
lea    0xf43(%rip),%rcx
mov    %ebp,%edi
mov    $0x291,%edx
mov    %r14d,%r8d
mov    %eax,%r9d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <_mu_assert@plt>

LLVM IR (-O0):
%struct.recurrent_neural_network = type { i32 }
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jnamika/rnn/refs/heads/master/src/unit-test/test_rnn.c\00"
@.str.1 = [28 x i8] c"expected: %d\0A but was: %d\0A\00"
define void @test_rnn_get_total_length(%struct.recurrent_neural_network* %0, i32 %1) {
%3 = alloca %struct.recurrent_neural_network*
%4 = alloca i32
store %struct.recurrent_neural_network* %0, %struct.recurrent_neural_network** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load %struct.recurrent_neural_network*, %struct.recurrent_neural_network** %3
%7 = call i32 @rnn_get_total_length(%struct.recurrent_neural_network* %6)
%8 = icmp eq i32 %5, %7
%9 = zext i1 %8 to i32
%10 = load i32, i32* %4
%11 = load %struct.recurrent_neural_network*, %struct.recurrent_neural_network** %3
%12 = call i32 @rnn_get_total_length(%struct.recurrent_neural_network* %11)
%13 = call i32 @_mu_assert(i32 %9, i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 657, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %12)
ret void
}

LLVM IR (-O2):
%struct.recurrent_neural_network = type { i32 }
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jnamika/rnn/refs/heads/master/src/unit-test/test_rnn.c\00"
@.str.1 = [28 x i8] c"expected: %d\0A but was: %d\0A\00"
define void @test_rnn_get_total_length(%struct.recurrent_neural_network* %0, i32 %1) {
%3 = tail call i32 @rnn_get_total_length(%struct.recurrent_neural_network* %0)
%4 = icmp eq i32 %3, %1
%5 = zext i1 %4 to i32
%6 = tail call i32 @rnn_get_total_length(%struct.recurrent_neural_network* %0)
%7 = tail call i32 @_mu_assert(i32 %5, i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 657, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %1, i32 %6)
ret void
}