#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*/ free(char *);
char *mallocNCopyMcfio(char *, int);
int mcfioC_DeclareNtuple(int, char *, char *, int, char *);
int mcfio_declarentuple_(int *uid, char *title, char *category, int *stream,
                         char *filename, int la, int lb, int lc) {
  char *aString, *bString, *cString;
  int iret;
  aString = mallocNCopyMcfio(title, la);
  bString = mallocNCopyMcfio(category, lb);
  cString = mallocNCopyMcfio(filename, lc);
  iret = mcfioC_DeclareNtuple(*uid, aString, bString, *stream, cString);
  free(aString);
  free(bString);
  free(cString);
  return iret;
}


x86 assembly (clang, -O0):
<mcfio_declarentuple_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
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    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1050 <mallocNCopyMcfio@plt>
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x10(%rbp),%esi
call   1050 <mallocNCopyMcfio@plt>
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x18(%rbp),%esi
call   1050 <mallocNCopyMcfio@plt>
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x48(%rbp),%r8
call   1040 <mcfioC_DeclareNtuple@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4c(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcfio_declarentuple_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8,%r15
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rdi,%r12
mov    0x40(%rsp),%ebp
mov    %rsi,%rdi
mov    %r9d,%esi
call   1050 <mallocNCopyMcfio@plt>
mov    %rax,%r13
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <mallocNCopyMcfio@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    0x48(%rsp),%esi
call   1050 <mallocNCopyMcfio@plt>
mov    %rax,%rbp
mov    (%r12),%edi
mov    (%r14),%ecx
mov    %r13,%rsi
mov    %rbx,%rdx
mov    %rax,%r8
call   1040 <mcfioC_DeclareNtuple@plt>
mov    %eax,%r14d
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @mcfio_declarentuple_(i32* nocapture %0, i8* %1, i8* %2, i32* nocapture %3, i8* %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call i8* @mallocNCopyMcfio(i8* %1, i32 %5)
%10 = tail call i8* @mallocNCopyMcfio(i8* %2, i32 %6)
%11 = tail call i8* @mallocNCopyMcfio(i8* %4, i32 %7)
%12 = load i32, i32* %0
%13 = load i32, i32* %3
%14 = tail call i32 @mcfioC_DeclareNtuple(i32 %12, i8* %9, i8* %10, i32 %13, i8* %11)
%15 = tail call i32 @free(i8* %9)
%16 = tail call i32 @free(i8* %10)
%17 = tail call i32 @free(i8* %11)
ret i32 %14
}