#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_compile(char *module_name) {
  printf("Make compile.sh %s/%s/comile.sh \n", "./", module_name);
  char new_file_name[128];
  char *replace_args[] = {"{{src_dir}}", "./"};
  sprintf(new_file_name, "%s/%s/compile.sh", "./", module_name);
  parse_file("tpls/compile.tpl", new_file_name, replace_args, 2);
}


x86 assembly (clang, -O0):
<make_compile>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xeb6(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1030 <printf@plt>
mov    0x2cb3(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0x2cad(%rip),%rax
mov    %rax,-0x98(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rcx
lea    0xead(%rip),%rsi
lea    0xe97(%rip),%rdx
call   1050 <sprintf@plt>
lea    -0x90(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
lea    0xe9d(%rip),%rdi
mov    $0x2,%ecx
call   1040 <parse_file@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_compile>:
push   %r15
push   %r14
push   %rbx
sub    $0x90,%rsp
mov    %rdi,%rbx
lea    0xeba(%rip),%rdi
lea    0xed5(%rip),%r14
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
movaps 0x2cb1(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xec7(%rip),%rsi
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1050 <sprintf@plt>
lea    0xebe(%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 = [34 x i8] c"Make compile.sh %s/%s/comile.sh \0A\00"
@.str.1 = [3 x i8] c"./\00"
@.str.2 = [12 x i8] c"{{src_dir}}\00"
@__const.make_compile.replace_args = [2 x i8*] [i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0)]
@.str.3 = [17 x i8] c"%s/%s/compile.sh\00"
@.str.4 = [17 x i8] c"tpls/compile.tpl\00"
define void @make_compile(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 ([34 x i8], [34 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 = bitcast [2 x i8*]* %4 to i8*
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%9 = load i8*, i8** %2
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
%13 = call i32 @parse_file(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* %11, i8** %12, i32 2)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Make compile.sh %s/%s/comile.sh \0A\00"
@.str.1 = [3 x i8] c"./\00"
@.str.2 = [12 x i8] c"{{src_dir}}\00"
@__const.make_compile.replace_args = [2 x i8*] [i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0)]
@.str.3 = [17 x i8] c"%s/%s/compile.sh\00"
@.str.4 = [17 x i8] c"tpls/compile.tpl\00"
define void @make_compile(i8* %0) {
%2 = alloca [128 x i8]
%3 = alloca [2 x i8*]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 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 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 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)
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%9 = call i32 @parse_file(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* %5, i8** %8, i32 2)
ret void
}