#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*/ parse_file(char *, char *, char **, int);
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
void make_config(char *module_name) {
  printf("Make config file %s/%s/config \n", "./", module_name);
  char new_file_name[128];
  char *replace_args[] = {"{{module_name}}", module_name};
  sprintf(new_file_name, "%s/%s/config", "./", module_name);
  parse_file("tpls/config.tpl", new_file_name, replace_args, 2);
}


x86 assembly (clang, -O0):
<make_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xeb6(%rip),%rdi
lea    0xecf(%rip),%rsi
call   1030 <printf@plt>
lea    0xec6(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x98(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rcx
lea    0xeb2(%rip),%rsi
lea    0xe98(%rip),%rdx
call   1050 <sprintf@plt>
lea    -0x90(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
lea    0xe9e(%rip),%rdi
mov    $0x2,%ecx
call   1040 <parse_file@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_config>:
push   %r15
push   %r14
push   %rbx
sub    $0x90,%rsp
mov    %rdi,%rbx
lea    0xeba(%rip),%rdi
lea    0xed3(%rip),%r14
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
lea    0xec4(%rip),%rax
mov    %rax,(%rsp)
mov    %rbx,0x8(%rsp)
lea    0xec4(%rip),%rsi
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1050 <sprintf@plt>
lea    0xeb7(%rip),%rdi
mov    %rsp,%rdx
mov    %r15,%rsi
mov    $0x2,%ecx
call   1040 <parse_file@plt>
add    $0x90,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Make config file %s/%s/config \0A\00"
@.str.1 = [3 x i8] c"./\00"
@.str.2 = [16 x i8] c"{{module_name}}\00"
@.str.3 = [13 x i8] c"%s/%s/config\00"
@.str.4 = [16 x i8] c"tpls/config.tpl\00"
define void @make_config(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
%4 = alloca [2 x i8*]
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %2
store i8* %9, i8** %8
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%11 = load i8*, i8** %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
%15 = call i32 @parse_file(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* %13, i8** %14, i32 2)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Make config file %s/%s/config \0A\00"
@.str.1 = [3 x i8] c"./\00"
@.str.2 = [16 x i8] c"{{module_name}}\00"
@.str.3 = [13 x i8] c"%s/%s/config\00"
@.str.4 = [16 x i8] c"tpls/config.tpl\00"
define void @make_config(i8* %0) {
%2 = alloca [128 x i8]
%3 = alloca [2 x i8*]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%6 = bitcast [2 x i8*]* %3 to i8*
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 1
store i8* %0, i8** %8
%9 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%10 = call i32 @parse_file(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* %5, i8** %7, i32 2)
ret void
}