#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 rand();
int /*<<< orphan*/ strcpy(char *, char *);
void mob_adjective_default(char *out_string) {
  switch (rand() % 20) {
  case 0:
    strcpy(out_string, "sinister ");
    break;
  case 1:
    strcpy(out_string, "ugly ");
    break;
  case 2:
    strcpy(out_string, "warty ");
    break;
  case 3:
    strcpy(out_string, "limping ");
    break;
  case 4:
    strcpy(out_string, "grisly ");
    break;
  case 5:
    strcpy(out_string, "sweaty ");
    break;
  case 6:
    strcpy(out_string, "smelly ");
    break;
  default:
    strcpy(out_string, "");
    break;
  }
}


x86 assembly (clang, -O0):
<mob_adjective_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
call   1040 <rand@plt>
movslq %eax,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x23,%rdx
add    %ecx,%edx
shl    $0x2,%edx
mov    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x6,%eax
ja     120a <mob_adjective_default+0xea>
mov    -0x10(%rbp),%rax
lea    0xe92(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rdi
lea    0xe9a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    121a <mob_adjective_default+0xfa>
mov    -0x8(%rbp),%rdi
lea    0xe8f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    121a <mob_adjective_default+0xfa>
mov    -0x8(%rbp),%rdi
lea    0xe80(%rip),%rsi
call   1030 <strcpy@plt>
jmp    121a <mob_adjective_default+0xfa>
mov    -0x8(%rbp),%rdi
lea    0xe72(%rip),%rsi
call   1030 <strcpy@plt>
jmp    121a <mob_adjective_default+0xfa>
mov    -0x8(%rbp),%rdi
lea    0xe66(%rip),%rsi
call   1030 <strcpy@plt>
jmp    121a <mob_adjective_default+0xfa>
mov    -0x8(%rbp),%rdi
lea    0xe59(%rip),%rsi
call   1030 <strcpy@plt>
jmp    121a <mob_adjective_default+0xfa>
mov    -0x8(%rbp),%rdi
lea    0xe4c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    121a <mob_adjective_default+0xfa>
mov    -0x8(%rbp),%rdi
lea    0xe26(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mob_adjective_default>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
cmp    $0x6,%eax
ja     1160 <mob_adjective_default+0x40>
cltq
lea    0xee1(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
jmp    1167 <mob_adjective_default+0x47>
lea    0xeb8(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"sinister \00"
@.str.1 = [6 x i8] c"ugly \00"
@.str.2 = [7 x i8] c"warty \00"
@.str.3 = [9 x i8] c"limping \00"
@.str.4 = [8 x i8] c"grisly \00"
@.str.5 = [8 x i8] c"sweaty \00"
@.str.6 = [8 x i8] c"smelly \00"
@.str.7 = [1 x i8] zeroinitializer
define void @mob_adjective_default(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @rand()
%4 = srem i32 %3, 20
switch i32 %4, label %26 [
i32 0, label %5
i32 1, label %8
i32 2, label %11
i32 3, label %14
i32 4, label %17
i32 5, label %20
i32 6, label %23
]
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %29
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %29
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %29
14: ; preds = %1
%15 = load i8*, i8** %2
%16 = call i32 @strcpy(i8* %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %29
17: ; preds = %1
%18 = load i8*, i8** %2
%19 = call i32 @strcpy(i8* %18, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %29
20: ; preds = %1
%21 = load i8*, i8** %2
%22 = call i32 @strcpy(i8* %21, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %29
23: ; preds = %1
%24 = load i8*, i8** %2
%25 = call i32 @strcpy(i8* %24, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %29
26: ; preds = %1
%27 = load i8*, i8** %2
%28 = call i32 @strcpy(i8* %27, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0))
br label %29
29: ; preds = %26, %23, %20, %17, %14, %11, %8, %5
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"sinister \00"
@.str.1 = [6 x i8] c"ugly \00"
@.str.2 = [7 x i8] c"warty \00"
@.str.3 = [9 x i8] c"limping \00"
@.str.4 = [8 x i8] c"grisly \00"
@.str.5 = [8 x i8] c"sweaty \00"
@.str.6 = [8 x i8] c"smelly \00"
@.str.7 = [1 x i8] zeroinitializer
@reltable.mob_adjective_default = [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str to i64), i64 ptrtoint ([7 x i32]* @reltable.mob_adjective_default to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.1 to i64), i64 ptrtoint ([7 x i32]* @reltable.mob_adjective_default to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.2 to i64), i64 ptrtoint ([7 x i32]* @reltable.mob_adjective_default to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.3 to i64), i64 ptrtoint ([7 x i32]* @reltable.mob_adjective_default to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.4 to i64), i64 ptrtoint ([7 x i32]* @reltable.mob_adjective_default to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.5 to i64), i64 ptrtoint ([7 x i32]* @reltable.mob_adjective_default to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.6 to i64), i64 ptrtoint ([7 x i32]* @reltable.mob_adjective_default to i64)) to i32)]
define void @mob_adjective_default(i8* %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = icmp ult i32 %3, 7
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = shl i64 %6, 2
%8 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.mob_adjective_default to i8*), i64 %7)
br label %9
9: ; preds = %1, %5
%10 = phi i8* [ %8, %5 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0), %1 ]
%11 = tail call i32 @strcpy(i8* %0, i8* %10)
ret void
}