#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*/ printf(char *, char);
int /*<<< orphan*/ puts(char *);
size_t rand();
int main(void) {
  size_t sz = 36;
  char data[] = "QWERTYUIOPLKJHGFDSAZXCVBNM1234567890";
  for (size_t i = 0; i < 64; i++) {
    printf("%c", data[rand() % sz]);
  }
  puts("");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x24,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xe9e(%rip),%rsi
mov    $0x25,%edx
call   1050 <memcpy@plt>
movq   $0x0,-0x48(%rbp)
cmpq   $0x40,-0x48(%rbp)
jae    11b0 <main+0x70>
mov    $0x0,%al
call   1060 <rand@plt>
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
lea    0xe90(%rip),%rdi
movsbl -0x40(%rbp,%rdx,1),%esi
call   1040 <printf@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1174 <main+0x34>
lea    0xe70(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    $0x40,%ebx
movabs $0xe38e38e38e38e38f,%r15
38 8e e3
lea    0xeb2(%rip),%r12
lea    0xed0(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1050 <rand@plt>
mov    %rax,%rcx
mul    %r15
shr    $0x3,%rdx
and    $0xfffffffffffffffc,%rdx
lea    (%rdx,%rdx,8),%rax
sub    %rax,%rcx
movsbl (%r12,%rcx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0xffffffffffffffff,%rbx
jne    1160 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.data = [37 x i8] c"QWERTYUIOPLKJHGFDSAZXCVBNM1234567890\00"
@.str = [3 x i8] c"%c\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca [37 x i8]
%4 = alloca i64
store i32 0, i32* %1
store i64 36, i64* %2
%5 = bitcast [37 x i8]* %3 to i8*
store i64 0, i64* %4
br label %6
6: ; preds = %16, %0
%7 = load i64, i64* %4
%8 = icmp ult i64 %7, 64
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = call i64 (...) @rand()
%11 = load i64, i64* %2
%12 = urem i64 %10, %11
%13 = getelementptr inbounds [37 x i8], [37 x i8]* %3, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %14)
br label %16
16: ; preds = %9
%17 = load i64, i64* %4
%18 = add i64 %17, 1
store i64 %18, i64* %4
br label %6
19: ; preds = %6
%20 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.data = [37 x i8] c"QWERTYUIOPLKJHGFDSAZXCVBNM1234567890\00"
@.str = [3 x i8] c"%c\00"
define i32 @main() {
br label %3
1: ; preds = %3
%2 = tail call i32 @putchar(i32 10)
ret i32 0
3: ; preds = %0, %3
%4 = phi i64 [ 0, %0 ], [ %10, %3 ]
%5 = tail call i64 (...) @rand()
%6 = urem i64 %5, 36
%7 = getelementptr inbounds [37 x i8], [37 x i8]* @__const.main.data, i64 0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %8)
%10 = add nuw nsw i64 %4, 1
%11 = icmp eq i64 %10, 64
br i1 %11, label %1, label %3
}