void character_name(struct mtwist_state *mt, char *buffer, int buflen) {
  switch (mtwist_int(mt, 8)) {
  case 0:
    snprintf(buffer, buflen, "%s %s %s %s%s", character_title(mt),
             random_name(mt), random_name(mt), random_name(mt),
             post_nominal_letters(mt));
    break;
  case 1:
    snprintf(buffer, buflen, "%s %c. %c. %s%s", character_title(mt),
             random_initial(mt), random_initial(mt), random_name(mt),
             post_nominal_letters(mt));
    break;
  case 2:
  case 3:
    snprintf(buffer, buflen, "%s %c. %s %s%s", character_title(mt),
             random_initial(mt), random_name(mt), random_name(mt),
             post_nominal_letters(mt));
    break;
  case 4:
    snprintf(buffer, buflen, "%s %c. %s%s", character_title(mt),
             random_initial(mt), random_name(mt), post_nominal_letters(mt));
    break;
  case 5:
    snprintf(buffer, buflen, "%s %s%s", character_title(mt), random_name(mt),
             post_nominal_letters(mt));
    break;
  case 6:
    snprintf(buffer, buflen, "%s %s %s%s", character_title(mt), random_name(mt),
             random_name(mt), post_nominal_letters(mt));
    break;
  case 7:
  default:
    snprintf(buffer, buflen, "%s %c. %c. %s%s", character_title(mt),
             random_initial(mt), random_initial(mt), random_name(mt),
             post_nominal_letters(mt));
    break;
  }
}


x86 assembly (clang, -O0):
<character_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    $0x8,%esi
call   1050 <mtwist_int@plt>
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x7,%eax
ja     14c9 <character_name+0x369>
mov    -0x20(%rbp),%rax
lea    0xe60(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1070 <character_title@plt>
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <post_nominal_letters@plt>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x30(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    -0x24(%rbp),%r10d
lea    0xe06(%rip),%rdx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    156d <character_name+0x40d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1070 <character_title@plt>
mov    %eax,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <random_initial@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <random_initial@plt>
mov    %eax,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0x44(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <post_nominal_letters@plt>
mov    -0x60(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x50(%rbp),%ecx
mov    -0x4c(%rbp),%r8d
mov    -0x48(%rbp),%r9d
mov    -0x44(%rbp),%r10d
lea    0xd8f(%rip),%rdx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    156d <character_name+0x40d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x80(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1070 <character_title@plt>
mov    %eax,-0x70(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <random_initial@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0x64(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <post_nominal_letters@plt>
mov    -0x80(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    -0x70(%rbp),%ecx
mov    -0x6c(%rbp),%r8d
mov    -0x68(%rbp),%r9d
mov    -0x64(%rbp),%r10d
lea    0xd1a(%rip),%rdx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    156d <character_name+0x40d>
mov    -0x10(%rbp),%rax
mov    %rax,-0xa0(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1070 <character_title@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <random_initial@plt>
mov    %eax,-0x88(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0x84(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <post_nominal_letters@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x98(%rbp),%rsi
mov    -0x8c(%rbp),%ecx
mov    -0x88(%rbp),%r8d
mov    -0x84(%rbp),%r9d
lea    0xc98(%rip),%rdx
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    156d <character_name+0x40d>
mov    -0x10(%rbp),%rax
mov    %rax,-0xb8(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1070 <character_title@plt>
mov    %eax,-0xa8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0xa4(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <post_nominal_letters@plt>
mov    -0xb8(%rbp),%rdi
mov    -0xb0(%rbp),%rsi
mov    -0xa8(%rbp),%ecx
mov    -0xa4(%rbp),%r8d
mov    %eax,%r9d
lea    0xc19(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    156d <character_name+0x40d>
mov    -0x10(%rbp),%rax
mov    %rax,-0xd8(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1070 <character_title@plt>
mov    %eax,-0xc4(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0xc0(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0xbc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <post_nominal_letters@plt>
mov    -0xd8(%rbp),%rdi
mov    -0xd0(%rbp),%rsi
mov    -0xc4(%rbp),%ecx
mov    -0xc0(%rbp),%r8d
mov    -0xbc(%rbp),%r9d
lea    0xb6e(%rip),%rdx
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    156d <character_name+0x40d>
jmp    14c9 <character_name+0x369>
mov    -0x10(%rbp),%rax
mov    %rax,-0xf8(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1070 <character_title@plt>
mov    %eax,-0xe8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <random_initial@plt>
mov    %eax,-0xe4(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <random_initial@plt>
mov    %eax,-0xe0(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1080 <random_name@plt>
mov    %eax,-0xdc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <post_nominal_letters@plt>
mov    -0xf8(%rbp),%rdi
mov    -0xf0(%rbp),%rsi
mov    -0xe8(%rbp),%ecx
mov    -0xe4(%rbp),%r8d
mov    -0xe0(%rbp),%r9d
mov    -0xdc(%rbp),%r10d
lea    0xad0(%rip),%rdx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <snprintf@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<character_name>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%r13
mov    %rdi,%rbx
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <mtwist_int@plt>
cmp    $0x6,%eax
ja     11fd <character_name+0x9d>
mov    %eax,%eax
lea    0xe73(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movslq %ebp,%rax
mov    %rax,(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <character_title@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <random_initial@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <post_nominal_letters@plt>
mov    %eax,%ebx
lea    0xe57(%rip),%rdx
mov    %r13,%rdi
mov    (%rsp),%rsi
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %ebp,%r9d
xor    %eax,%eax
push   %rbx
push   %r14
jmp    13fd <character_name+0x29d>
movslq %ebp,%rax
mov    %rax,(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <character_title@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <random_initial@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <random_initial@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <post_nominal_letters@plt>
mov    %eax,%ebx
lea    0xde0(%rip),%rdx
mov    %r13,%rdi
mov    (%rsp),%rsi
mov    %r14d,%ecx
mov    %r12d,%r8d
jmp    130b <character_name+0x1ab>
movslq %ebp,%rax
mov    %rax,(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <character_title@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %r13,%r14
mov    %eax,%r13d
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <post_nominal_letters@plt>
mov    %eax,%ebx
lea    0xd70(%rip),%rdx
jmp    12fe <character_name+0x19e>
movslq %ebp,%rax
mov    %rax,(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <character_title@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <random_initial@plt>
mov    %r13,%r14
mov    %eax,%r13d
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <random_initial@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <post_nominal_letters@plt>
mov    %eax,%ebx
lea    0xd2c(%rip),%rdx
mov    %r14,%rdi
mov    (%rsp),%rsi
mov    %r12d,%ecx
mov    %r13d,%r8d
mov    %ebp,%r9d
xor    %eax,%eax
push   %rbx
push   %r15
jmp    13fd <character_name+0x29d>
movslq %ebp,%r14
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <character_title@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <post_nominal_letters@plt>
lea    0xcfc(%rip),%rdx
mov    %r13,%rdi
mov    %r14,%rsi
mov    %r15d,%ecx
mov    %ebp,%r8d
mov    %eax,%r9d
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <snprintf@plt>
movslq %ebp,%r14
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <character_title@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <post_nominal_letters@plt>
mov    %eax,%ebx
sub    $0x8,%rsp
lea    0xc76(%rip),%rdx
jmp    13eb <character_name+0x28b>
movslq %ebp,%r14
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <character_title@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <random_initial@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <random_name@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <post_nominal_letters@plt>
mov    %eax,%ebx
sub    $0x8,%rsp
lea    0xc5e(%rip),%rdx
mov    %r13,%rdi
mov    %r14,%rsi
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    %ebp,%r9d
xor    %eax,%eax
push   %rbx
call   1030 <snprintf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.mtwist_state = type opaque
@.str = [14 x i8] c"%s %s %s %s%s\00"
@.str.1 = [16 x i8] c"%s %c. %c. %s%s\00"
@.str.2 = [15 x i8] c"%s %c. %s %s%s\00"
@.str.3 = [12 x i8] c"%s %c. %s%s\00"
@.str.4 = [8 x i8] c"%s %s%s\00"
@.str.5 = [11 x i8] c"%s %s %s%s\00"
define void @character_name(%struct.mtwist_state* %0, i8* %1, i32 %2) {
%4 = alloca %struct.mtwist_state*
%5 = alloca i8*
%6 = alloca i32
store %struct.mtwist_state* %0, %struct.mtwist_state** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%8 = call i32 (%struct.mtwist_state*, i32, ...) bitcast (i32 (...)* @mtwist_int to i32 (%struct.mtwist_state*, i32, ...)*)(%struct.mtwist_state* %7, i32 8)
switch i32 %8, label %92 [
i32 0, label %9
i32 1, label %24
i32 2, label %39
i32 3, label %39
i32 4, label %54
i32 5, label %67
i32 6, label %78
i32 7, label %91
]
9: ; preds = %3
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%14 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %13)
%15 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%16 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %15)
%17 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%18 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %17)
%19 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%20 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %19)
%21 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%22 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %21)
%23 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %10, i64 %12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %16, i32 %18, i32 %20, i32 %22)
br label %107
24: ; preds = %3
%25 = load i8*, i8** %5
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%29 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %28)
%30 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%31 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %30)
%32 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%33 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %32)
%34 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%35 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %34)
%36 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%37 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %36)
%38 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %25, i64 %27, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %29, i32 %31, i32 %33, i32 %35, i32 %37)
br label %107
39: ; preds = %3, %3
%40 = load i8*, i8** %5
%41 = load i32, i32* %6
%42 = sext i32 %41 to i64
%43 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%44 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %43)
%45 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%46 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %45)
%47 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%48 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %47)
%49 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%50 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %49)
%51 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%52 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %51)
%53 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %40, i64 %42, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %44, i32 %46, i32 %48, i32 %50, i32 %52)
br label %107
54: ; preds = %3
%55 = load i8*, i8** %5
%56 = load i32, i32* %6
%57 = sext i32 %56 to i64
%58 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%59 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %58)
%60 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%61 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %60)
%62 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%63 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %62)
%64 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%65 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %64)
%66 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %55, i64 %57, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %59, i32 %61, i32 %63, i32 %65)
br label %107
67: ; preds = %3
%68 = load i8*, i8** %5
%69 = load i32, i32* %6
%70 = sext i32 %69 to i64
%71 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%72 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %71)
%73 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%74 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %73)
%75 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%76 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %75)
%77 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %68, i64 %70, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %72, i32 %74, i32 %76)
br label %107
78: ; preds = %3
%79 = load i8*, i8** %5
%80 = load i32, i32* %6
%81 = sext i32 %80 to i64
%82 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%83 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %82)
%84 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%85 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %84)
%86 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%87 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %86)
%88 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%89 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %88)
%90 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %79, i64 %81, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 %83, i32 %85, i32 %87, i32 %89)
br label %107
91: ; preds = %3
br label %92
92: ; preds = %3, %91
%93 = load i8*, i8** %5
%94 = load i32, i32* %6
%95 = sext i32 %94 to i64
%96 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%97 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %96)
%98 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%99 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %98)
%100 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%101 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %100)
%102 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%103 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %102)
%104 = load %struct.mtwist_state*, %struct.mtwist_state** %4
%105 = call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %104)
%106 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %93, i64 %95, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %97, i32 %99, i32 %101, i32 %103, i32 %105)
br label %107
107: ; preds = %92, %78, %67, %54, %39, %24, %9
ret void
}

LLVM IR (-O2):
%struct.mtwist_state = type opaque
@.str = [14 x i8] c"%s %s %s %s%s\00"
@.str.1 = [16 x i8] c"%s %c. %c. %s%s\00"
@.str.2 = [15 x i8] c"%s %c. %s %s%s\00"
@.str.3 = [12 x i8] c"%s %c. %s%s\00"
@.str.4 = [8 x i8] c"%s %s%s\00"
@.str.5 = [11 x i8] c"%s %s %s%s\00"
define void @character_name(%struct.mtwist_state* %0, i8* nocapture writeonly %1, i32 %2) {
%4 = tail call i32 (%struct.mtwist_state*, i32, ...) bitcast (i32 (...)* @mtwist_int to i32 (%struct.mtwist_state*, i32, ...)*)(%struct.mtwist_state* %0, i32 8)
switch i32 %4, label %49 [
i32 0, label %5
i32 1, label %13
i32 2, label %21
i32 3, label %21
i32 4, label %29
i32 5, label %36
i32 6, label %42
]
5: ; preds = %3
%6 = sext i32 %2 to i64
%7 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%8 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%9 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%10 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%11 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%12 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %1, i64 %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9, i32 %10, i32 %11)
br label %57
13: ; preds = %3
%14 = sext i32 %2 to i64
%15 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%16 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%17 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%18 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%19 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%20 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %1, i64 %14, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %16, i32 %17, i32 %18, i32 %19)
br label %57
21: ; preds = %3, %3
%22 = sext i32 %2 to i64
%23 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%24 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%25 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%26 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%27 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%28 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %1, i64 %22, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %23, i32 %24, i32 %25, i32 %26, i32 %27)
br label %57
29: ; preds = %3
%30 = sext i32 %2 to i64
%31 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%32 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%33 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%34 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%35 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %1, i64 %30, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %31, i32 %32, i32 %33, i32 %34)
br label %57
36: ; preds = %3
%37 = sext i32 %2 to i64
%38 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%39 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%40 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%41 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %1, i64 %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %38, i32 %39, i32 %40)
br label %57
42: ; preds = %3
%43 = sext i32 %2 to i64
%44 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%45 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%46 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%47 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%48 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %1, i64 %43, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 %44, i32 %45, i32 %46, i32 %47)
br label %57
49: ; preds = %3
%50 = sext i32 %2 to i64
%51 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @character_title to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%52 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%53 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_initial to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%54 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @random_name to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%55 = tail call i32 (%struct.mtwist_state*, ...) bitcast (i32 (...)* @post_nominal_letters to i32 (%struct.mtwist_state*, ...)*)(%struct.mtwist_state* %0)
%56 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %1, i64 %50, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %51, i32 %52, i32 %53, i32 %54, i32 %55)
br label %57
57: ; preds = %49, %42, %36, %29, %21, %13, %5
ret void
}