#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 */
int /*<<< orphan*/ poly_mul2(double **, double **, int *, int *, double **,
                             int *);
int /*<<< orphan*/ poly_sub2(double **, double **, int *, int *, double **,
                             int *);
void poly_mul_sub2(double u1[5][5], double u2[5][5], double u3[5][5],
                   double u4[5][5], int p1[2], int p2[2], int p3[2], int p4[2],
                   double u5[5][5], int p5[2]) {
  double d1[5][5], d2[5][5];
  int pd1[2], pd2[2];
  poly_mul2(u1, u2, p1, p2, d1, pd1);
  poly_mul2(u3, u4, p3, p4, d2, pd2);
  poly_sub2(d1, d2, pd1, pd2, u5, p5);
}


x86 assembly (clang, -O0):
<poly_mul_sub2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1e0,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
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    -0x30(%rbp),%rcx
lea    -0x100(%rbp),%r8
lea    -0x1d8(%rbp),%r9
call   1030 <poly_mul2@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x10(%rbp),%rdx
mov    0x18(%rbp),%rcx
lea    -0x1d0(%rbp),%r8
lea    -0x1e0(%rbp),%r9
call   1030 <poly_mul2@plt>
lea    -0x100(%rbp),%rdi
lea    -0x1d0(%rbp),%rsi
lea    -0x1d8(%rbp),%rdx
lea    -0x1e0(%rbp),%rcx
mov    0x20(%rbp),%r8
mov    0x28(%rbp),%r9
call   1040 <poly_sub2@plt>
add    $0x1e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poly_mul_sub2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
mov    %rcx,%r12
mov    %rdx,%rbx
lea    0xe0(%rsp),%r14
lea    0x8(%rsp),%r15
mov    %r8,%rdx
mov    %r9,%rcx
mov    %r14,%r8
mov    %r15,%r9
call   1030 <poly_mul2@plt>
lea    0x10(%rsp),%r13
mov    %rsp,%rbp
mov    %rbx,%rdi
mov    %r12,%rsi
mov    0x1e0(%rsp),%rdx
mov    0x1e8(%rsp),%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <poly_mul2@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %rbp,%rcx
mov    0x1f0(%rsp),%r8
mov    0x1f8(%rsp),%r9
call   1040 <poly_sub2@plt>
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @poly_mul_sub2([5 x double]* %0, [5 x double]* %1, [5 x double]* %2, [5 x double]* %3, i32* %4, i32* %5, i32* %6, i32* %7, [5 x double]* %8, i32* %9) {
%11 = alloca [5 x double]*
%12 = alloca [5 x double]*
%13 = alloca [5 x double]*
%14 = alloca [5 x double]*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca [5 x double]*
%20 = alloca i32*
%21 = alloca [5 x [5 x double]]
%22 = alloca [5 x [5 x double]]
%23 = alloca [2 x i32]
%24 = alloca [2 x i32]
store [5 x double]* %0, [5 x double]** %11
store [5 x double]* %1, [5 x double]** %12
store [5 x double]* %2, [5 x double]** %13
store [5 x double]* %3, [5 x double]** %14
store i32* %4, i32** %15
store i32* %5, i32** %16
store i32* %6, i32** %17
store i32* %7, i32** %18
store [5 x double]* %8, [5 x double]** %19
store i32* %9, i32** %20
%25 = load [5 x double]*, [5 x double]** %11
%26 = bitcast [5 x double]* %25 to double**
%27 = load [5 x double]*, [5 x double]** %12
%28 = bitcast [5 x double]* %27 to double**
%29 = load i32*, i32** %15
%30 = load i32*, i32** %16
%31 = getelementptr inbounds [5 x [5 x double]], [5 x [5 x double]]* %21, i64 0, i64 0
%32 = bitcast [5 x double]* %31 to double**
%33 = getelementptr inbounds [2 x i32], [2 x i32]* %23, i64 0, i64 0
%34 = call i32 @poly_mul2(double** %26, double** %28, i32* %29, i32* %30, double** %32, i32* %33)
%35 = load [5 x double]*, [5 x double]** %13
%36 = bitcast [5 x double]* %35 to double**
%37 = load [5 x double]*, [5 x double]** %14
%38 = bitcast [5 x double]* %37 to double**
%39 = load i32*, i32** %17
%40 = load i32*, i32** %18
%41 = getelementptr inbounds [5 x [5 x double]], [5 x [5 x double]]* %22, i64 0, i64 0
%42 = bitcast [5 x double]* %41 to double**
%43 = getelementptr inbounds [2 x i32], [2 x i32]* %24, i64 0, i64 0
%44 = call i32 @poly_mul2(double** %36, double** %38, i32* %39, i32* %40, double** %42, i32* %43)
%45 = getelementptr inbounds [5 x [5 x double]], [5 x [5 x double]]* %21, i64 0, i64 0
%46 = bitcast [5 x double]* %45 to double**
%47 = getelementptr inbounds [5 x [5 x double]], [5 x [5 x double]]* %22, i64 0, i64 0
%48 = bitcast [5 x double]* %47 to double**
%49 = getelementptr inbounds [2 x i32], [2 x i32]* %23, i64 0, i64 0
%50 = getelementptr inbounds [2 x i32], [2 x i32]* %24, i64 0, i64 0
%51 = load [5 x double]*, [5 x double]** %19
%52 = bitcast [5 x double]* %51 to double**
%53 = load i32*, i32** %20
%54 = call i32 @poly_sub2(double** %46, double** %48, i32* %49, i32* %50, double** %52, i32* %53)
ret void
}

LLVM IR (-O2):
define void @poly_mul_sub2([5 x double]* %0, [5 x double]* %1, [5 x double]* %2, [5 x double]* %3, i32* %4, i32* %5, i32* %6, i32* %7, [5 x double]* %8, i32* %9) {
%11 = alloca [5 x [5 x double]]
%12 = alloca [5 x [5 x double]]
%13 = alloca [2 x i32]
%14 = alloca [2 x i32]
%15 = bitcast [5 x [5 x double]]* %11 to i8*
%16 = bitcast [5 x [5 x double]]* %12 to i8*
%17 = bitcast [2 x i32]* %13 to i8*
%18 = bitcast [2 x i32]* %14 to i8*
%19 = bitcast [5 x double]* %0 to double**
%20 = bitcast [5 x double]* %1 to double**
%21 = bitcast [5 x [5 x double]]* %11 to double**
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 0
%23 = call i32 @poly_mul2(double** %19, double** %20, i32* %4, i32* %5, double** %21, i32* %22)
%24 = bitcast [5 x double]* %2 to double**
%25 = bitcast [5 x double]* %3 to double**
%26 = bitcast [5 x [5 x double]]* %12 to double**
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %14, i64 0, i64 0
%28 = call i32 @poly_mul2(double** %24, double** %25, i32* %6, i32* %7, double** %26, i32* %27)
%29 = bitcast [5 x double]* %8 to double**
%30 = call i32 @poly_sub2(double** %21, double** %26, i32* %22, i32* %27, double** %29, i32* %9)
ret void
}