#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 */
char *create_clone_filename_get_directory_name(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
char *create_clone_filename_get_clone_folder_compressed_filename(
    char *destination, char **directory_name, char *application_name,
    char *appaserver_data_directory, char *folder_name) {
  *directory_name = create_clone_filename_get_directory_name(
      appaserver_data_directory, *directory_name);
  sprintf(destination, "%s/insert_%s_%s.sql.gz", *directory_name,
          application_name, folder_name);
  return destination;
}


x86 assembly (clang, -O0):
<create_clone_filename_get_clone_folder_compressed_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1030 <create_clone_filename_get_directory_name@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    0xe90(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_clone_filename_get_clone_folder_compressed_filename>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r12
mov    (%rsi),%rsi
mov    %rcx,%rdi
call   1030 <create_clone_filename_get_directory_name@plt>
mov    %rax,(%rbx)
lea    0xeb7(%rip),%rsi
mov    %r12,%rdi
mov    %rax,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1040 <sprintf@plt>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [23 x i8] c"%s/insert_%s_%s.sql.gz\00"
define i8* @create_clone_filename_get_clone_folder_compressed_filename(i8* %0, i8** %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %9
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %12
%14 = call i8* @create_clone_filename_get_directory_name(i8* %11, i8* %13)
%15 = load i8**, i8*** %7
store i8* %14, i8** %15
%16 = load i8*, i8** %6
%17 = load i8**, i8*** %7
%18 = load i8*, i8** %17
%19 = load i8*, i8** %8
%20 = load i8*, i8** %10
%21 = call i32 @sprintf(i8* %16, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %18, i8* %19, i8* %20)
%22 = load i8*, i8** %6
ret i8* %22
}

LLVM IR (-O2):
@.str = [23 x i8] c"%s/insert_%s_%s.sql.gz\00"
define i8* @create_clone_filename_get_clone_folder_compressed_filename(i8* returned writeonly %0, i8** nocapture %1, i8* %2, i8* %3, i8* %4) {
%6 = load i8*, i8** %1
%7 = tail call i8* @create_clone_filename_get_directory_name(i8* %3, i8* %6)
store i8* %7, i8** %1
%8 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %2, i8* %4)
ret i8* %0
}