#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 */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
size_t randMap(int /*<<< orphan*/, scalar_t__);
int /*<<< orphan*/ stripout(char *, char);
scalar_t__ strlen(char const *);
char tolower(char);
char *makeLevelName() {
  const char *letpairs =
      "..LEXEGEZACEBISOUSESARMAINDIREA.ERATENBERALAVETIEDORQUANTEISRION";
  char *buf;
  int i;
  buf = (char *)malloc(sizeof(char) * 9);
  memset(buf, 0, sizeof(buf));
  for (i = 0; i < 8; i++) {
    buf[i] = letpairs[randMap(0, strlen(letpairs) - 1)];
  }
  buf[8] = 0;
  stripout(buf, '.');
  for (i = 1; i < 8; i++) {
    buf[i] = tolower(buf[i]);
  }
  return buf;
}


x86 assembly (clang, -O0):
<makeLevelName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xe91(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x9,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    11e4 <makeLevelName+0x84>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rsi
sub    $0x1,%rsi
xor    %edi,%edi
call   1070 <randMap@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1198 <makeLevelName+0x38>
mov    -0x10(%rbp),%rax
movb   $0x0,0x8(%rax)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1080 <stripout@plt>
movl   $0x1,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1237 <makeLevelName+0xd7>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <tolower@plt>
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1201 <makeLevelName+0xa1>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeLevelName>:
push   %r14
push   %rbx
push   %rax
mov    $0x9,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    $0x3f,%esi
xor    %edi,%edi
call   1060 <randMap@plt>
lea    0xe7d(%rip),%r14
mov    (%rax,%r14,1),%al
mov    %al,(%rbx)
mov    $0x3f,%esi
xor    %edi,%edi
call   1060 <randMap@plt>
mov    (%rax,%r14,1),%al
mov    %al,0x1(%rbx)
mov    $0x3f,%esi
xor    %edi,%edi
call   1060 <randMap@plt>
mov    (%rax,%r14,1),%al
mov    %al,0x2(%rbx)
mov    $0x3f,%esi
xor    %edi,%edi
call   1060 <randMap@plt>
mov    (%rax,%r14,1),%al
mov    %al,0x3(%rbx)
mov    $0x3f,%esi
xor    %edi,%edi
call   1060 <randMap@plt>
mov    (%rax,%r14,1),%al
mov    %al,0x4(%rbx)
mov    $0x3f,%esi
xor    %edi,%edi
call   1060 <randMap@plt>
mov    (%rax,%r14,1),%al
mov    %al,0x5(%rbx)
mov    $0x3f,%esi
xor    %edi,%edi
call   1060 <randMap@plt>
mov    (%rax,%r14,1),%al
mov    %al,0x6(%rbx)
mov    $0x3f,%esi
xor    %edi,%edi
call   1060 <randMap@plt>
mov    (%rax,%r14,1),%al
mov    %al,0x7(%rbx)
movb   $0x0,0x8(%rbx)
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1070 <stripout@plt>
movsbl 0x1(%rbx),%edi
call   1040 <tolower@plt>
mov    %al,0x1(%rbx)
movsbl 0x2(%rbx),%edi
call   1040 <tolower@plt>
mov    %al,0x2(%rbx)
movsbl 0x3(%rbx),%edi
call   1040 <tolower@plt>
mov    %al,0x3(%rbx)
movsbl 0x4(%rbx),%edi
call   1040 <tolower@plt>
mov    %al,0x4(%rbx)
movsbl 0x5(%rbx),%edi
call   1040 <tolower@plt>
mov    %al,0x5(%rbx)
movsbl 0x6(%rbx),%edi
call   1040 <tolower@plt>
mov    %al,0x6(%rbx)
movsbl 0x7(%rbx),%edi
call   1040 <tolower@plt>
mov    %al,0x7(%rbx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [65 x i8] c"..LEXEGEZACEBISOUSESARMAINDIREA.ERATENBERALAVETIEDORQUANTEISRION\00"
define i8* @makeLevelName() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i32
store i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8** %1
%4 = call i64 @malloc(i32 9)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @memset(i8* %6, i32 0, i32 8)
store i32 0, i32* %3
br label %8
8: ; preds = %23, %0
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 8
br i1 %10, label %11, label %26
11: ; preds = %8
%12 = load i8*, i8** %1
%13 = load i8*, i8** %1
%14 = call i64 @strlen(i8* %13)
%15 = sub nsw i64 %14, 1
%16 = call i64 @randMap(i32 0, i64 %15)
%17 = getelementptr inbounds i8, i8* %12, i64 %16
%18 = load i8, i8* %17
%19 = load i8*, i8** %2
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
store i8 %18, i8* %22
br label %23
23: ; preds = %11
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %8
26: ; preds = %8
%27 = load i8*, i8** %2
%28 = getelementptr inbounds i8, i8* %27, i64 8
store i8 0, i8* %28
%29 = load i8*, i8** %2
%30 = call i32 @stripout(i8* %29, i8 signext 46)
store i32 1, i32* %3
br label %31
31: ; preds = %45, %26
%32 = load i32, i32* %3
%33 = icmp slt i32 %32, 8
br i1 %33, label %34, label %48
34: ; preds = %31
%35 = load i8*, i8** %2
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %35, i64 %37
%39 = load i8, i8* %38
%40 = call signext i8 @tolower(i8 signext %39)
%41 = load i8*, i8** %2
%42 = load i32, i32* %3
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8, i8* %41, i64 %43
store i8 %40, i8* %44
br label %45
45: ; preds = %34
%46 = load i32, i32* %3
%47 = add nsw i32 %46, 1
store i32 %47, i32* %3
br label %31
48: ; preds = %31
%49 = load i8*, i8** %2
ret i8* %49
}

LLVM IR (-O2):
@.str = [65 x i8] c"..LEXEGEZACEBISOUSESARMAINDIREA.ERATENBERALAVETIEDORQUANTEISRION\00"
define i8* @makeLevelName() {
%1 = tail call i64 @malloc(i32 9)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @memset(i8* %2, i32 0, i32 8)
%4 = tail call i64 @randMap(i32 0, i64 63)
%5 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %4
%6 = load i8, i8* %5
store i8 %6, i8* %2
%7 = tail call i64 @randMap(i32 0, i64 63)
%8 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = getelementptr inbounds i8, i8* %2, i64 1
store i8 %9, i8* %10
%11 = tail call i64 @randMap(i32 0, i64 63)
%12 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = getelementptr inbounds i8, i8* %2, i64 2
store i8 %13, i8* %14
%15 = tail call i64 @randMap(i32 0, i64 63)
%16 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = getelementptr inbounds i8, i8* %2, i64 3
store i8 %17, i8* %18
%19 = tail call i64 @randMap(i32 0, i64 63)
%20 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = getelementptr inbounds i8, i8* %2, i64 4
store i8 %21, i8* %22
%23 = tail call i64 @randMap(i32 0, i64 63)
%24 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = getelementptr inbounds i8, i8* %2, i64 5
store i8 %25, i8* %26
%27 = tail call i64 @randMap(i32 0, i64 63)
%28 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = getelementptr inbounds i8, i8* %2, i64 6
store i8 %29, i8* %30
%31 = tail call i64 @randMap(i32 0, i64 63)
%32 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = getelementptr inbounds i8, i8* %2, i64 7
store i8 %33, i8* %34
%35 = getelementptr inbounds i8, i8* %2, i64 8
store i8 0, i8* %35
%36 = tail call i32 @stripout(i8* %2, i8 signext 46)
%37 = load i8, i8* %10
%38 = tail call signext i8 @tolower(i8 signext %37)
store i8 %38, i8* %10
%39 = load i8, i8* %14
%40 = tail call signext i8 @tolower(i8 signext %39)
store i8 %40, i8* %14
%41 = load i8, i8* %18
%42 = tail call signext i8 @tolower(i8 signext %41)
store i8 %42, i8* %18
%43 = load i8, i8* %22
%44 = tail call signext i8 @tolower(i8 signext %43)
store i8 %44, i8* %22
%45 = load i8, i8* %26
%46 = tail call signext i8 @tolower(i8 signext %45)
store i8 %46, i8* %26
%47 = load i8, i8* %30
%48 = tail call signext i8 @tolower(i8 signext %47)
store i8 %48, i8* %30
%49 = load i8, i8* %34
%50 = tail call signext i8 @tolower(i8 signext %49)
store i8 %50, i8* %34
ret i8* %2
}