#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*/ fprint_ddense2mm(char *, char *, int, int, double const *);
int /*<<< orphan*/ sprintf(char *, char *, char const *, int);
void fprint_suff_ddense2mm(const char *fname, int suff, const char *name, int m,
                           int n, const double *A) {
  char buf1[128];
  char buf2[128];
  sprintf(buf1, "%s_%i.mm", name, suff);
  sprintf(buf2, "%s_%i", name, suff);
  fprint_ddense2mm(buf1, buf2, m, n, A);
}


x86 assembly (clang, -O0):
<fprint_suff_ddense2mm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
lea    -0xb0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeaa(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x130(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xe99(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0xb0(%rbp),%rdi
lea    -0x130(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8
call   1030 <fprint_ddense2mm@plt>
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_suff_ddense2mm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x108,%rsp
mov    %r9,%r14
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %rdx,%rbp
mov    %esi,%ebx
lea    0xeba(%rip),%rsi
mov    %rsp,%rdi
mov    %ebx,%ecx
call   1040 <sprintf@plt>
lea    0xeb2(%rip),%rsi
lea    0x80(%rsp),%r13
mov    %r13,%rdi
mov    %rbp,%rdx
mov    %ebx,%ecx
call   1040 <sprintf@plt>
mov    %rsp,%rdi
mov    %r13,%rsi
mov    %r12d,%edx
mov    %r15d,%ecx
mov    %r14,%r8
call   1030 <fprint_ddense2mm@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%s_%i.mm\00"
@.str.1 = [6 x i8] c"%s_%i\00"
define void @fprint_suff_ddense2mm(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, double* %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca [128 x i8]
%14 = alloca [128 x i8]
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store double* %5, double** %12
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %13, i64 0, i64 0
%16 = load i8*, i8** %9
%17 = load i32, i32* %8
%18 = call i32 @sprintf(i8* %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %16, i32 %17)
%19 = getelementptr inbounds [128 x i8], [128 x i8]* %14, i64 0, i64 0
%20 = load i8*, i8** %9
%21 = load i32, i32* %8
%22 = call i32 @sprintf(i8* %19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %20, i32 %21)
%23 = getelementptr inbounds [128 x i8], [128 x i8]* %13, i64 0, i64 0
%24 = getelementptr inbounds [128 x i8], [128 x i8]* %14, i64 0, i64 0
%25 = load i32, i32* %10
%26 = load i32, i32* %11
%27 = load double*, double** %12
%28 = call i32 @fprint_ddense2mm(i8* %23, i8* %24, i32 %25, i32 %26, double* %27)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s_%i.mm\00"
@.str.1 = [6 x i8] c"%s_%i\00"
define void @fprint_suff_ddense2mm(i8* nocapture readnone %0, i32 %1, i8* %2, i32 %3, i32 %4, double* %5) {
%7 = alloca [128 x i8]
%8 = alloca [128 x i8]
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 0
%11 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %1)
%12 = call i32 @sprintf(i8* %10, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %1)
%13 = call i32 @fprint_ddense2mm(i8* %9, i8* %10, i32 %3, i32 %4, double* %5)
ret void
}