#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*/ map;

/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ suggest(char *, char *, int, int /*<<< orphan*/, char **,
                           int);
void main() {
  char password[] = "password";
  int len = strlen(password);
  char out[len];
  char map[3][2] = {{'a', '@'}, {'s', '$'}, {'o', '0'}};
  int map_len = sizeof(map) / sizeof(map[0]);
  suggest(password, out, len, 0, map, map_len);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movabs $0x64726f7773736170,%rax
6f 72 64
mov    %rax,-0x10(%rbp)
movb   $0x0,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x28(%rbp)
mov    0xe9b(%rip),%eax
mov    %eax,-0x2e(%rbp)
mov    0xe95(%rip),%ax
mov    %ax,-0x2a(%rbp)
movl   $0x3,-0x34(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    -0x2e(%rbp),%r8
mov    -0x34(%rbp),%r9d
xor    %ecx,%ecx
call   1040 <suggest@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
movabs $0x64726f7773736170,%rax
6f 72 64
mov    %rax,-0x28(%rbp)
movb   $0x0,-0x20(%rbp)
lea    -0x28(%rbp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rsp,%rbx
mov    %eax,%ecx
mov    %rsp,%rsi
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rsi
mov    %rsi,%rsp
movzwl 0xea7(%rip),%ecx
mov    %cx,-0x14(%rbp)
mov    0xe99(%rip),%ecx
mov    %ecx,-0x18(%rbp)
lea    -0x18(%rbp),%r8
mov    %r14,%rdi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x3,%r9d
call   1040 <suggest@plt>
mov    %rbx,%rsp
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.password = [9 x i8] c"password\00"
@__const.main.map = [3 x [2 x i8]] [[2 x i8] c"a@", [2 x i8] c"s$", [2 x i8] c"o0"]
define void @main() {
%1 = alloca [9 x i8]
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca [3 x [2 x i8]]
%6 = alloca i32
%7 = bitcast [9 x i8]* %1 to i8*
%8 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %3
%13 = alloca i8, i64 %11
store i64 %11, i64* %4
%14 = bitcast [3 x [2 x i8]]* %5 to i8*
store i32 3, i32* %6
%15 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%16 = load i32, i32* %2
%17 = getelementptr inbounds [3 x [2 x i8]], [3 x [2 x i8]]* %5, i64 0, i64 0
%18 = bitcast [2 x i8]* %17 to i8**
%19 = load i32, i32* %6
%20 = call i32 @suggest(i8* %15, i8* %13, i32 %16, i32 0, i8** %18, i32 %19)
%21 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
@__const.main.password = [9 x i8] c"password\00"
@__const.main.map = [3 x [2 x i8]] [[2 x i8] c"a@", [2 x i8] c"s$", [2 x i8] c"o0"]
define void @main() {
%1 = alloca [9 x i8]
%2 = alloca [3 x [2 x i8]]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%4 = call i32 @strlen(i8* %3)
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
%7 = alloca i8, i64 %5
%8 = getelementptr inbounds [3 x [2 x i8]], [3 x [2 x i8]]* %2, i64 0, i64 0, i64 0
%9 = bitcast [3 x [2 x i8]]* %2 to i8**
%10 = call i32 @suggest(i8* %3, i8* %7, i32 %4, i32 0, i8** %9, i32 3)
ret void
}