#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*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
const char *GetDefaultMappingFile() {
  static char DefaultMappingPath[260 + 1] = {'\0'};
  char *pProfile;
  if (DefaultMappingPath[0] == '\0') {
    strcpy(DefaultMappingPath, "/etc/simias/");
    strcat(DefaultMappingPath, "SimiasDirectoryMapping");
  }
  return (const char *)DefaultMappingPath;
}


x86 assembly (clang, -O0):
<GetDefaultMappingFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsbl 0x2f11(%rip),%eax
cmp    $0x0,%eax
jne    115e <GetDefaultMappingFile+0x3e>
lea    0x2f01(%rip),%rdi
lea    0xeba(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x2eee(%rip),%rdi
lea    0xeb4(%rip),%rsi
call   1040 <strcat@plt>
lea    0x2edb(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetDefaultMappingFile>:
push   %rbx
cmpb   $0x0,0x2f18(%rip)
jne    114f <GetDefaultMappingFile+0x2f>
lea    0x2f0f(%rip),%rbx
lea    0xec8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec6(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
lea    0x2eea(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@GetDefaultMappingFile.DefaultMappingPath = internal global [261 x i8] zeroinitializer
@.str = [13 x i8] c"/etc/simias/\00"
@.str.1 = [23 x i8] c"SimiasDirectoryMapping\00"
define i8* @GetDefaultMappingFile() {
%1 = alloca i8*
%2 = load i8, i8* getelementptr inbounds ([261 x i8], [261 x i8]* @GetDefaultMappingFile.DefaultMappingPath, i64 0, i64 0)
%3 = sext i8 %2 to i32
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @strcpy(i8* getelementptr inbounds ([261 x i8], [261 x i8]* @GetDefaultMappingFile.DefaultMappingPath, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @strcat(i8* getelementptr inbounds ([261 x i8], [261 x i8]* @GetDefaultMappingFile.DefaultMappingPath, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %5, %0
ret i8* getelementptr inbounds ([261 x i8], [261 x i8]* @GetDefaultMappingFile.DefaultMappingPath, i64 0, i64 0)
}

LLVM IR (-O2):
@GetDefaultMappingFile.DefaultMappingPath = internal global [261 x i8] zeroinitializer
@.str = [13 x i8] c"/etc/simias/\00"
@.str.1 = [23 x i8] c"SimiasDirectoryMapping\00"
define i8* @GetDefaultMappingFile() {
%1 = load i8, i8* getelementptr inbounds ([261 x i8], [261 x i8]* @GetDefaultMappingFile.DefaultMappingPath, i64 0, i64 0)
%2 = icmp eq i8 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @strcpy(i8* getelementptr inbounds ([261 x i8], [261 x i8]* @GetDefaultMappingFile.DefaultMappingPath, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @strcat(i8* getelementptr inbounds ([261 x i8], [261 x i8]* @GetDefaultMappingFile.DefaultMappingPath, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %3, %0
ret i8* getelementptr inbounds ([261 x i8], [261 x i8]* @GetDefaultMappingFile.DefaultMappingPath, i64 0, i64 0)
}