#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*/ nmult(double *, double *, double *, int, int, int);
int /*<<< orphan*/ smult(double *, double *, double *, int, int, int);
void mmult(double *A, double *B, double *C, int m, int n, int p) {
  if (m + n + p <= 192 / 2) {
    nmult(A, B, C, m, n, p);
  } else {
    smult(A, B, C, m, n, p);
  }
}


x86 assembly (clang, -O0):
<mmult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
add    -0x24(%rbp),%eax
cmp    $0x60,%eax
jg     1172 <mmult+0x52>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1030 <nmult@plt>
jmp    118e <mmult+0x6e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1040 <smult@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmult>:
lea    (%r8,%rcx,1),%eax
add    %r9d,%eax
cmp    $0x60,%eax
jg     1131 <mmult+0x11>
jmp    1030 <nmult@plt>
jmp    1040 <smult@plt>

LLVM IR (-O0):
define void @mmult(double* %0, double* %1, double* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %10
%14 = load i32, i32* %11
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %12
%17 = add nsw i32 %15, %16
%18 = icmp sle i32 %17, 96
br i1 %18, label %19, label %27
19: ; preds = %6
%20 = load double*, double** %7
%21 = load double*, double** %8
%22 = load double*, double** %9
%23 = load i32, i32* %10
%24 = load i32, i32* %11
%25 = load i32, i32* %12
%26 = call i32 @nmult(double* %20, double* %21, double* %22, i32 %23, i32 %24, i32 %25)
br label %35
27: ; preds = %6
%28 = load double*, double** %7
%29 = load double*, double** %8
%30 = load double*, double** %9
%31 = load i32, i32* %10
%32 = load i32, i32* %11
%33 = load i32, i32* %12
%34 = call i32 @smult(double* %28, double* %29, double* %30, i32 %31, i32 %32, i32 %33)
br label %35
35: ; preds = %27, %19
ret void
}

LLVM IR (-O2):
define void @mmult(double* %0, double* %1, double* %2, i32 %3, i32 %4, i32 %5) {
%7 = add nsw i32 %4, %3
%8 = add nsw i32 %7, %5
%9 = icmp slt i32 %8, 97
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = tail call i32 @nmult(double* %0, double* %1, double* %2, i32 %3, i32 %4, i32 %5)
br label %14
12: ; preds = %6
%13 = tail call i32 @smult(double* %0, double* %1, double* %2, i32 %3, i32 %4, i32 %5)
br label %14
14: ; preds = %12, %10
ret void
}