#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_mul1(double *, double *, int, int, double *, int *);
int /*<<< orphan*/ poly_sub1(double *, double *, int, int, double *, int *);
void poly_mul_sub1(double u1[17], double u2[17], double u3[17], double u4[17],
                   int p1, int p2, int p3, int p4, double u5[17], int *p5) {
  double d1[17], d2[17];
  int pd1, pd2;
  poly_mul1(u1, u2, p1, p2, d1, &pd1);
  poly_mul1(u3, u4, p3, p4, d2, &pd2);
  poly_sub1(d1, d2, pd1, pd2, u5, p5);
  return;
}


x86 assembly (clang, -O0):
<poly_mul_sub1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
lea    -0xb0(%rbp),%r8
lea    -0x144(%rbp),%r9
call   1040 <poly_mul1@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x10(%rbp),%edx
mov    0x18(%rbp),%ecx
lea    -0x140(%rbp),%r8
lea    -0x148(%rbp),%r9
call   1040 <poly_mul1@plt>
lea    -0xb0(%rbp),%rdi
lea    -0x140(%rbp),%rsi
mov    -0x144(%rbp),%edx
mov    -0x148(%rbp),%ecx
mov    0x20(%rbp),%r8
mov    0x28(%rbp),%r9
call   1030 <poly_sub1@plt>
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poly_mul_sub1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %r9d,%eax
mov    %rcx,%r12
mov    %rdx,%rbx
mov    0x160(%rsp),%ebp
mov    0x168(%rsp),%r13d
lea    0xa0(%rsp),%r14
lea    0xc(%rsp),%r9
mov    %r8d,%edx
mov    %eax,%ecx
mov    %r14,%r8
call   1040 <poly_mul1@plt>
lea    0x10(%rsp),%r15
lea    0x8(%rsp),%r9
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
mov    %r13d,%ecx
mov    %r15,%r8
call   1040 <poly_mul1@plt>
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
mov    %r14,%rdi
mov    %r15,%rsi
mov    0x170(%rsp),%r8
mov    0x178(%rsp),%r9
call   1030 <poly_sub1@plt>
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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