#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*/ passwd_gen(char *, int, int);
int main() {
  char pal[4] = "abb";
  char stuff[10] = {'a', 'b', 'd', '\0'};
  char text[100] = "dfughrjv;dfnbojhdriogjabdfsihgkjsfkjvbsfkjvb";
  char passwd[127] = {};
  passwd_gen(passwd, 127, 1);
  passwd_gen(passwd, 127, 2);
  passwd_gen(passwd, 127, 4);
  passwd_gen(passwd, 127, 8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xebb(%rip),%ax
mov    %ax,-0xa(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xeb4(%rip),%rsi
mov    $0x64,%edx
call   1040 <memcpy@plt>
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x7f,%edx
call   1030 <memset@plt>
lea    -0x100(%rbp),%rdi
mov    $0x7f,%esi
mov    $0x1,%edx
call   1050 <passwd_gen@plt>
lea    -0x100(%rbp),%rdi
mov    $0x7f,%esi
mov    $0x2,%edx
call   1050 <passwd_gen@plt>
lea    -0x100(%rbp),%rdi
mov    $0x7f,%esi
mov    $0x4,%edx
call   1050 <passwd_gen@plt>
lea    -0x100(%rbp),%rdi
mov    $0x7f,%esi
mov    $0x8,%edx
call   1050 <passwd_gen@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x6f(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x7f,%esi
mov    $0x1,%edx
call   1030 <passwd_gen@plt>
mov    %rbx,%rdi
mov    $0x7f,%esi
mov    $0x2,%edx
call   1030 <passwd_gen@plt>
mov    %rbx,%rdi
mov    $0x7f,%esi
mov    $0x4,%edx
call   1030 <passwd_gen@plt>
mov    %rbx,%rdi
mov    $0x7f,%esi
mov    $0x8,%edx
call   1030 <passwd_gen@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.pal = [4 x i8] c"abb\00"
@__const.main.stuff = [10 x i8] c"abd\00\00\00\00\00\00\00"
@__const.main.text = [100 x i8] c"dfughrjv;dfnbojhdriogjabdfsihgkjsfkjvbsfkjvb\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca [10 x i8]
%4 = alloca [100 x i8]
%5 = alloca [127 x i8]
store i32 0, i32* %1
%6 = bitcast [4 x i8]* %2 to i8*
%7 = bitcast [10 x i8]* %3 to i8*
%8 = bitcast [100 x i8]* %4 to i8*
%9 = bitcast [127 x i8]* %5 to i8*
%10 = getelementptr inbounds [127 x i8], [127 x i8]* %5, i64 0, i64 0
%11 = call i32 @passwd_gen(i8* %10, i32 127, i32 1)
%12 = getelementptr inbounds [127 x i8], [127 x i8]* %5, i64 0, i64 0
%13 = call i32 @passwd_gen(i8* %12, i32 127, i32 2)
%14 = getelementptr inbounds [127 x i8], [127 x i8]* %5, i64 0, i64 0
%15 = call i32 @passwd_gen(i8* %14, i32 127, i32 4)
%16 = getelementptr inbounds [127 x i8], [127 x i8]* %5, i64 0, i64 0
%17 = call i32 @passwd_gen(i8* %16, i32 127, i32 8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [127 x i8]
%2 = getelementptr inbounds [127 x i8], [127 x i8]* %1, i64 0, i64 0
%3 = call i32 @passwd_gen(i8* %2, i32 127, i32 1)
%4 = call i32 @passwd_gen(i8* %2, i32 127, i32 2)
%5 = call i32 @passwd_gen(i8* %2, i32 127, i32 4)
%6 = call i32 @passwd_gen(i8* %2, i32 127, i32 8)
ret i32 0
}