#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 int /*<<< orphan*/ int8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ gen_branch_metrics_n4(int, int /*<<< orphan*/ const *,
                                         int /*<<< orphan*/ const *,
                                         int /*<<< orphan*/ *);
int /*<<< orphan*/ gen_path_metrics(int, int /*<<< orphan*/ *,
                                    int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                    int);
__attribute__((visibility("hidden"))) void
osmo_conv_gen_metrics_k7_n4(const int8_t *seq, const int16_t *out,
                            int16_t *sums, int16_t *paths, int norm) {
  int16_t metrics[32];
  gen_branch_metrics_n4(64, seq, out, metrics);
  gen_path_metrics(64, sums, metrics, paths, norm);
}


x86 assembly (clang, -O0):
<osmo_conv_gen_metrics_k7_n4>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    -0xb0(%rbp),%rcx
mov    $0x40,%edi
call   1040 <gen_branch_metrics_n4@plt>
mov    -0x18(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    $0x40,%edi
call   1030 <gen_path_metrics@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osmo_conv_gen_metrics_k7_n4>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %r8d,%r14d
mov    %rcx,%rbx
mov    %rdx,%rbp
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%r15
mov    $0x40,%edi
mov    %r15,%rcx
call   1040 <gen_branch_metrics_n4@plt>
mov    $0x40,%edi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %r14d,%r8d
call   1030 <gen_path_metrics@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define hidden void @osmo_conv_gen_metrics_k7_n4(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca [32 x i32]
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%12 = load i32*, i32** %6
%13 = load i32*, i32** %7
%14 = getelementptr inbounds [32 x i32], [32 x i32]* %11, i64 0, i64 0
%15 = call i32 @gen_branch_metrics_n4(i32 64, i32* %12, i32* %13, i32* %14)
%16 = load i32*, i32** %8
%17 = getelementptr inbounds [32 x i32], [32 x i32]* %11, i64 0, i64 0
%18 = load i32*, i32** %9
%19 = load i32, i32* %10
%20 = call i32 @gen_path_metrics(i32 64, i32* %16, i32* %17, i32* %18, i32 %19)
ret void
}

LLVM IR (-O2):
define hidden void @osmo_conv_gen_metrics_k7_n4(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4) {
%6 = alloca [32 x i32]
%7 = bitcast [32 x i32]* %6 to i8*
%8 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 0
%9 = call i32 @gen_branch_metrics_n4(i32 64, i32* %0, i32* %1, i32* %8)
%10 = call i32 @gen_path_metrics(i32 64, i32* %2, i32* %8, i32* %3, i32 %4)
ret void
}