#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 */

/* Variables and functions */
unsigned long bn_mul_add_words(unsigned long *, unsigned long *, int,
                               unsigned long);
unsigned long bn_mul_words(unsigned long *, unsigned long *, int,
                           unsigned long);
void bn_mul_comba4(unsigned long *r, unsigned long *a, unsigned long *b) {
  r[4] = bn_mul_words(&(r[0]), a, 4, b[0]);
  r[5] = bn_mul_add_words(&(r[1]), a, 4, b[1]);
  r[6] = bn_mul_add_words(&(r[2]), a, 4, b[2]);
  r[7] = bn_mul_add_words(&(r[3]), a, 4, b[3]);
}


x86 assembly (clang, -O0):
<bn_mul_comba4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
mov    $0x4,%edx
call   1030 <bn_mul_words@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x20(%rax)
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rcx
mov    $0x4,%edx
call   1040 <bn_mul_add_words@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x28(%rax)
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rcx
mov    $0x4,%edx
call   1040 <bn_mul_add_words@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x30(%rax)
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rcx
mov    $0x4,%edx
call   1040 <bn_mul_add_words@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x38(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bn_mul_comba4>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdx),%rcx
mov    $0x4,%edx
call   1030 <bn_mul_words@plt>
mov    %rax,0x20(%rbx)
lea    0x8(%rbx),%rdi
mov    0x8(%r15),%rcx
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <bn_mul_add_words@plt>
mov    %rax,0x28(%rbx)
lea    0x10(%rbx),%rdi
mov    0x10(%r15),%rcx
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <bn_mul_add_words@plt>
mov    %rax,0x30(%rbx)
lea    0x18(%rbx),%rdi
mov    0x18(%r15),%rcx
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <bn_mul_add_words@plt>
mov    %rax,0x38(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @bn_mul_comba4(i64* %0, i64* %1, i64* %2) {
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i64*
store i64* %0, i64** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i64*, i64** %4
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64*, i64** %5
%10 = load i64*, i64** %6
%11 = getelementptr inbounds i64, i64* %10, i64 0
%12 = load i64, i64* %11
%13 = call i64 @bn_mul_words(i64* %8, i64* %9, i32 4, i64 %12)
%14 = load i64*, i64** %4
%15 = getelementptr inbounds i64, i64* %14, i64 4
store i64 %13, i64* %15
%16 = load i64*, i64** %4
%17 = getelementptr inbounds i64, i64* %16, i64 1
%18 = load i64*, i64** %5
%19 = load i64*, i64** %6
%20 = getelementptr inbounds i64, i64* %19, i64 1
%21 = load i64, i64* %20
%22 = call i64 @bn_mul_add_words(i64* %17, i64* %18, i32 4, i64 %21)
%23 = load i64*, i64** %4
%24 = getelementptr inbounds i64, i64* %23, i64 5
store i64 %22, i64* %24
%25 = load i64*, i64** %4
%26 = getelementptr inbounds i64, i64* %25, i64 2
%27 = load i64*, i64** %5
%28 = load i64*, i64** %6
%29 = getelementptr inbounds i64, i64* %28, i64 2
%30 = load i64, i64* %29
%31 = call i64 @bn_mul_add_words(i64* %26, i64* %27, i32 4, i64 %30)
%32 = load i64*, i64** %4
%33 = getelementptr inbounds i64, i64* %32, i64 6
store i64 %31, i64* %33
%34 = load i64*, i64** %4
%35 = getelementptr inbounds i64, i64* %34, i64 3
%36 = load i64*, i64** %5
%37 = load i64*, i64** %6
%38 = getelementptr inbounds i64, i64* %37, i64 3
%39 = load i64, i64* %38
%40 = call i64 @bn_mul_add_words(i64* %35, i64* %36, i32 4, i64 %39)
%41 = load i64*, i64** %4
%42 = getelementptr inbounds i64, i64* %41, i64 7
store i64 %40, i64* %42
ret void
}

LLVM IR (-O2):
define void @bn_mul_comba4(i64* %0, i64* %1, i64* nocapture %2) {
%4 = load i64, i64* %2
%5 = tail call i64 @bn_mul_words(i64* %0, i64* %1, i32 4, i64 %4)
%6 = getelementptr inbounds i64, i64* %0, i64 4
store i64 %5, i64* %6
%7 = getelementptr inbounds i64, i64* %0, i64 1
%8 = getelementptr inbounds i64, i64* %2, i64 1
%9 = load i64, i64* %8
%10 = tail call i64 @bn_mul_add_words(i64* %7, i64* %1, i32 4, i64 %9)
%11 = getelementptr inbounds i64, i64* %0, i64 5
store i64 %10, i64* %11
%12 = getelementptr inbounds i64, i64* %0, i64 2
%13 = getelementptr inbounds i64, i64* %2, i64 2
%14 = load i64, i64* %13
%15 = tail call i64 @bn_mul_add_words(i64* %12, i64* %1, i32 4, i64 %14)
%16 = getelementptr inbounds i64, i64* %0, i64 6
store i64 %15, i64* %16
%17 = getelementptr inbounds i64, i64* %0, i64 3
%18 = getelementptr inbounds i64, i64* %2, i64 3
%19 = load i64, i64* %18
%20 = tail call i64 @bn_mul_add_words(i64* %17, i64* %1, i32 4, i64 %19)
%21 = getelementptr inbounds i64, i64* %0, i64 7
store i64 %20, i64* %21
ret void
}