#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*/ sprintf(char *, char *, char, char, char, char, char, char,
                           char, char);
int ubee_enerate_profanity_free_pass(unsigned char *hash_buff,
                                     unsigned char const *new_pass) {
  sprintf(
      (char *)new_pass, "%c%c%c%c%c%c%c%c",
      "BBCDFFGHJJKLMNPQRSTVVWXYZZ"[((hash_buff[0] + hash_buff[8]) % 0x1Au)],
      "BBCDFFGHJJKLMNPQRSTVVWXYZZ"[((hash_buff[1] + hash_buff[9]) % 0x1Au)],
      "BBCDFFGHJJKLMNPQRSTVVWXYZZ"[((hash_buff[2] + hash_buff[10]) % 0x1Au)],
      "BBCDFFGHJJKLMNPQRSTVVWXYZZ"[((hash_buff[3] + hash_buff[11]) % 0x1Au)],
      "BBCDFFGHJJKLMNPQRSTVVWXYZZ"[((hash_buff[4] + hash_buff[12]) % 0x1Au)],
      "BBCDFFGHJJKLMNPQRSTVVWXYZZ"[((hash_buff[5] + hash_buff[13]) % 0x1Au)],
      "BBCDFFGHJJKLMNPQRSTVVWXYZZ"[((hash_buff[6] + hash_buff[14]) % 0x1Au)],
      "BBCDFFGHJJKLMNPQRSTVVWXYZZ"[((hash_buff[7] + hash_buff[15]) % 0x1Au)]);
  return 0;
}


x86 assembly (clang, -O0):
<ubee_enerate_profanity_free_pass>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movzbl 0x8(%rcx),%ecx
add    %ecx,%eax
mov    $0x1a,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
mov    %eax,%ecx
lea    0xec5(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x21(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    -0x18(%rbp),%rcx
movzbl 0x9(%rcx),%ecx
add    %ecx,%eax
mov    $0x1a,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
mov    %eax,%ecx
lea    0xe99(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x18(%rbp),%rax
movzbl 0x2(%rax),%eax
mov    -0x18(%rbp),%rdx
movzbl 0xa(%rdx),%edx
add    %edx,%eax
mov    $0x1a,%esi
xor    %edx,%edx
div    %esi
mov    %edx,%eax
mov    %eax,%edx
lea    0xe70(%rip),%rax
mov    (%rax,%rdx,1),%r8b
mov    -0x18(%rbp),%rax
movzbl 0x3(%rax),%eax
mov    -0x18(%rbp),%rdx
movzbl 0xb(%rdx),%edx
add    %edx,%eax
mov    $0x1a,%esi
xor    %edx,%edx
div    %esi
mov    %edx,%eax
mov    %eax,%edx
lea    0xe46(%rip),%rax
mov    (%rax,%rdx,1),%r9b
mov    -0x18(%rbp),%rax
movzbl 0x4(%rax),%eax
mov    -0x18(%rbp),%rdx
movzbl 0xc(%rdx),%edx
add    %edx,%eax
mov    $0x1a,%esi
xor    %edx,%edx
div    %esi
mov    %edx,%eax
mov    %eax,%edx
lea    0xe1c(%rip),%rax
mov    (%rax,%rdx,1),%r14b
mov    -0x18(%rbp),%rax
movzbl 0x5(%rax),%eax
mov    -0x18(%rbp),%rdx
movzbl 0xd(%rdx),%edx
add    %edx,%eax
mov    $0x1a,%esi
xor    %edx,%edx
div    %esi
mov    %edx,%eax
mov    %eax,%edx
lea    0xdf2(%rip),%rax
mov    (%rax,%rdx,1),%bl
mov    -0x18(%rbp),%rax
movzbl 0x6(%rax),%eax
mov    -0x18(%rbp),%rdx
movzbl 0xe(%rdx),%edx
add    %edx,%eax
mov    $0x1a,%esi
xor    %edx,%edx
div    %esi
mov    %edx,%eax
mov    %eax,%edx
lea    0xdc9(%rip),%rax
mov    (%rax,%rdx,1),%r11b
mov    -0x18(%rbp),%rax
movzbl 0x7(%rax),%eax
mov    -0x18(%rbp),%rdx
movzbl 0xf(%rdx),%edx
add    %edx,%eax
mov    $0x1a,%esi
xor    %edx,%edx
div    %esi
mov    %edx,%eax
mov    -0x21(%rbp),%dl
mov    %eax,%eax
mov    %eax,%r10d
lea    0xd88(%rip),%rsi
lea    0xd92(%rip),%rax
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r14b,%r14d
mov    %r14d,(%rsp)
movsbl %bl,%ebx
mov    %ebx,0x8(%rsp)
movsbl %r11b,%r11d
mov    %r11d,0x10(%rsp)
movsbl (%rax,%r10,1),%eax
mov    %eax,0x18(%rsp)
call   1030 <sprintf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<ubee_enerate_profanity_free_pass>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r10
movzbl (%rdi),%eax
movzbl 0x8(%rdi),%ecx
add    %eax,%ecx
imul   $0x4ec5,%ecx,%eax
shr    $0x13,%eax
lea    (%rax,%rax,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %eax,%edx
sub    %edx,%ecx
movzwl %cx,%eax
lea    0xed3(%rip),%r14
movsbl (%rax,%r14,1),%edx
movzbl 0x1(%rdi),%eax
movzbl 0x9(%rdi),%ecx
add    %eax,%ecx
imul   $0x4ec5,%ecx,%eax
shr    $0x13,%eax
lea    (%rax,%rax,4),%ebx
lea    (%rbx,%rbx,4),%ebx
add    %eax,%ebx
sub    %ebx,%ecx
movzwl %cx,%eax
movsbl (%rax,%r14,1),%ecx
movzbl 0x2(%rdi),%eax
movzbl 0xa(%rdi),%ebx
add    %eax,%ebx
imul   $0x4ec5,%ebx,%eax
shr    $0x13,%eax
lea    (%rax,%rax,4),%esi
lea    (%rsi,%rsi,4),%esi
add    %eax,%esi
sub    %esi,%ebx
movzwl %bx,%eax
movsbl (%rax,%r14,1),%r8d
movzbl 0x3(%rdi),%eax
movzbl 0xb(%rdi),%esi
add    %eax,%esi
imul   $0x4ec5,%esi,%eax
shr    $0x13,%eax
lea    (%rax,%rax,4),%ebx
lea    (%rbx,%rbx,4),%ebx
add    %eax,%ebx
sub    %ebx,%esi
movzwl %si,%eax
movsbl (%rax,%r14,1),%r9d
movzbl 0x4(%rdi),%eax
movzbl 0xc(%rdi),%esi
add    %eax,%esi
imul   $0x4ec5,%esi,%eax
shr    $0x13,%eax
lea    (%rax,%rax,4),%ebx
lea    (%rbx,%rbx,4),%ebx
add    %eax,%ebx
sub    %ebx,%esi
movzwl %si,%eax
movsbl (%rax,%r14,1),%r11d
movzbl 0x5(%rdi),%eax
movzbl 0xd(%rdi),%esi
add    %eax,%esi
imul   $0x4ec5,%esi,%eax
shr    $0x13,%eax
lea    (%rax,%rax,4),%ebx
lea    (%rbx,%rbx,4),%ebx
add    %eax,%ebx
sub    %ebx,%esi
movzwl %si,%eax
movsbl (%rax,%r14,1),%r15d
movzbl 0x6(%rdi),%esi
movzbl 0xe(%rdi),%ebx
add    %esi,%ebx
imul   $0x4ec5,%ebx,%esi
shr    $0x13,%esi
lea    (%rsi,%rsi,4),%eax
lea    (%rax,%rax,4),%eax
add    %esi,%eax
sub    %eax,%ebx
movzwl %bx,%eax
movsbl (%rax,%r14,1),%ebx
movzbl 0x7(%rdi),%eax
movzbl 0xf(%rdi),%esi
add    %eax,%esi
imul   $0x4ec5,%esi,%eax
shr    $0x13,%eax
lea    (%rax,%rax,4),%edi
lea    (%rdi,%rdi,4),%edi
add    %eax,%edi
sub    %edi,%esi
movzwl %si,%eax
movsbl (%rax,%r14,1),%eax
lea    0xdb3(%rip),%rsi
mov    %r10,%rdi
push   %rax
push   %rbx
push   %r15
push   %r11
call   1030 <sprintf@plt>
add    $0x20,%rsp
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"%c%c%c%c%c%c%c%c\00"
@.str.1 = [27 x i8] c"BBCDFFGHJJKLMNPQRSTVVWXYZZ\00"
define i32 @ubee_enerate_profanity_free_pass(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i16
%5 = getelementptr inbounds i8, i8* %0, i64 8
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = add nuw nsw i16 %7, %4
%9 = urem i16 %8, 26
%10 = zext i16 %9 to i64
%11 = getelementptr inbounds [27 x i8], [27 x i8]* @.str.1, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %0, i64 1
%14 = load i8, i8* %13
%15 = zext i8 %14 to i16
%16 = getelementptr inbounds i8, i8* %0, i64 9
%17 = load i8, i8* %16
%18 = zext i8 %17 to i16
%19 = add nuw nsw i16 %18, %15
%20 = urem i16 %19, 26
%21 = zext i16 %20 to i64
%22 = getelementptr inbounds [27 x i8], [27 x i8]* @.str.1, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = getelementptr inbounds i8, i8* %0, i64 2
%25 = load i8, i8* %24
%26 = zext i8 %25 to i16
%27 = getelementptr inbounds i8, i8* %0, i64 10
%28 = load i8, i8* %27
%29 = zext i8 %28 to i16
%30 = add nuw nsw i16 %29, %26
%31 = urem i16 %30, 26
%32 = zext i16 %31 to i64
%33 = getelementptr inbounds [27 x i8], [27 x i8]* @.str.1, i64 0, i64 %32
%34 = load i8, i8* %33
%35 = getelementptr inbounds i8, i8* %0, i64 3
%36 = load i8, i8* %35
%37 = zext i8 %36 to i16
%38 = getelementptr inbounds i8, i8* %0, i64 11
%39 = load i8, i8* %38
%40 = zext i8 %39 to i16
%41 = add nuw nsw i16 %40, %37
%42 = urem i16 %41, 26
%43 = zext i16 %42 to i64
%44 = getelementptr inbounds [27 x i8], [27 x i8]* @.str.1, i64 0, i64 %43
%45 = load i8, i8* %44
%46 = getelementptr inbounds i8, i8* %0, i64 4
%47 = load i8, i8* %46
%48 = zext i8 %47 to i16
%49 = getelementptr inbounds i8, i8* %0, i64 12
%50 = load i8, i8* %49
%51 = zext i8 %50 to i16
%52 = add nuw nsw i16 %51, %48
%53 = urem i16 %52, 26
%54 = zext i16 %53 to i64
%55 = getelementptr inbounds [27 x i8], [27 x i8]* @.str.1, i64 0, i64 %54
%56 = load i8, i8* %55
%57 = getelementptr inbounds i8, i8* %0, i64 5
%58 = load i8, i8* %57
%59 = zext i8 %58 to i16
%60 = getelementptr inbounds i8, i8* %0, i64 13
%61 = load i8, i8* %60
%62 = zext i8 %61 to i16
%63 = add nuw nsw i16 %62, %59
%64 = urem i16 %63, 26
%65 = zext i16 %64 to i64
%66 = getelementptr inbounds [27 x i8], [27 x i8]* @.str.1, i64 0, i64 %65
%67 = load i8, i8* %66
%68 = getelementptr inbounds i8, i8* %0, i64 6
%69 = load i8, i8* %68
%70 = zext i8 %69 to i16
%71 = getelementptr inbounds i8, i8* %0, i64 14
%72 = load i8, i8* %71
%73 = zext i8 %72 to i16
%74 = add nuw nsw i16 %73, %70
%75 = urem i16 %74, 26
%76 = zext i16 %75 to i64
%77 = getelementptr inbounds [27 x i8], [27 x i8]* @.str.1, i64 0, i64 %76
%78 = load i8, i8* %77
%79 = getelementptr inbounds i8, i8* %0, i64 7
%80 = load i8, i8* %79
%81 = zext i8 %80 to i16
%82 = getelementptr inbounds i8, i8* %0, i64 15
%83 = load i8, i8* %82
%84 = zext i8 %83 to i16
%85 = add nuw nsw i16 %84, %81
%86 = urem i16 %85, 26
%87 = zext i16 %86 to i64
%88 = getelementptr inbounds [27 x i8], [27 x i8]* @.str.1, i64 0, i64 %87
%89 = load i8, i8* %88
%90 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 signext %12, i8 signext %23, i8 signext %34, i8 signext %45, i8 signext %56, i8 signext %67, i8 signext %78, i8 signext %89)
ret i32 0
}