#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*/ bitcount(int);
int /*<<< orphan*/ csprng(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
size_t lrand(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ putchar(char);
char slash_to_tilde(size_t);
int /*<<< orphan*/ stderr;
size_t strtoull(char *, int /*<<< orphan*/ *, int);
int main(int argc, char **argv) {
  size_t min, max, howmany, length;
  howmany = 1;
  switch (argc) {
  case 1:
    min = 8;
    max = 16;
    break;
  case 2:
    min = max = strtoull(argv[1], NULL, 10);
    break;
  case 3:
    min = strtoull(argv[1], NULL, 10);
    max = strtoull(argv[2], NULL, 10);
    break;
  case 4:
    min = strtoull(argv[1], NULL, 10);
    max = strtoull(argv[2], NULL, 10);
    howmany = strtoull(argv[3], NULL, 10);
    break;
  default:
    fprintf(stderr, "Usage:\n\t"
                    "rpg-linux-filename [min-length] max-length [how-many]\n");
    exit(1);
    break;
  }
  if (min > max)
    do
      (min) ^= (max), (max) ^= (min), (min) ^= (max);
    while (0);
  while (howmany--) {
    length = lrand(csprng(bitcount(max - min)), min, max);
    while (length--)
      putchar(slash_to_tilde(lrand(csprng(bitcount(0x7d - 0x21)), 0x21, 0x7d)));
    putchar('\n');
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x28(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x3,%eax
ja     128b <main+0x10b>
mov    -0x38(%rbp),%rax
lea    0xe42(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movq   $0x8,-0x18(%rbp)
movq   $0x10,-0x20(%rbp)
jmp    12aa <main+0x12a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,-0x20(%rbp)
mov    %rax,-0x18(%rbp)
jmp    12aa <main+0x12a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,-0x20(%rbp)
jmp    12aa <main+0x12a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,-0x28(%rbp)
jmp    12aa <main+0x12a>
mov    0x2d4e(%rip),%rax
mov    (%rax),%edi
lea    0xd75(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    12e6 <main+0x166>
jmp    12bd <main+0x13d>
mov    -0x20(%rbp),%rax
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
xor    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    12e6 <main+0x166>
jmp    12eb <main+0x16b>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x28(%rbp)
cmp    $0x0,%rax
je     1390 <main+0x210>
mov    -0x20(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %eax,%edi
call   1060 <bitcount@plt>
mov    %eax,%edi
call   1040 <csprng@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%rax
mov    %eax,%esi
mov    -0x20(%rbp),%rax
mov    %eax,%edx
call   1050 <lrand@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x30(%rbp)
cmp    $0x0,%rax
je     1381 <main+0x201>
mov    $0x5c,%edi
call   1060 <bitcount@plt>
mov    %eax,%edi
call   1040 <csprng@plt>
mov    %eax,%edi
mov    $0x21,%esi
mov    $0x7d,%edx
call   1050 <lrand@plt>
mov    %rax,%rdi
call   1090 <slash_to_tilde@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1331 <main+0x1b1>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    12eb <main+0x16b>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
add    $0xffffffff,%edi
cmp    $0x3,%edi
ja     12e5 <main+0x165>
mov    %rsi,%rbx
mov    $0x10,%r14d
mov    $0x8,%ebp
lea    0xe57(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,%rbp
jmp    11ea <main+0x6a>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,%rbp
mov    0x10(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,%r14
cmp    %r14,%rbp
mov    %rbp,%r15
cmova  %r14,%r15
cmova  %rbp,%r14
mov    $0x1,%ebx
mov    %r14d,%r12d
sub    %r15d,%r12d
jmp    1223 <main+0xa3>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %rbx,%rbx
je     12da <main+0x15a>
add    $0xffffffffffffffff,%rbx
mov    %r12d,%edi
call   1060 <bitcount@plt>
mov    %eax,%edi
call   1040 <csprng@plt>
mov    %eax,%edi
mov    %r15d,%esi
mov    %r14d,%edx
call   1050 <lrand@plt>
test   %rax,%rax
je     1210 <main+0x90>
mov    %rax,%rbp
nopl   0x0(%rax,%rax,1)
mov    $0x5c,%edi
call   1060 <bitcount@plt>
mov    %eax,%edi
call   1040 <csprng@plt>
mov    %eax,%edi
mov    $0x21,%esi
mov    $0x7d,%edx
call   1050 <lrand@plt>
mov    %rax,%rdi
call   1090 <slash_to_tilde@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbp
jne    1250 <main+0xd0>
jmp    1210 <main+0x90>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,%rbp
mov    0x10(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,%r14
mov    0x18(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtoull@plt>
mov    %rax,%rbx
cmp    %r14,%rbp
mov    %rbp,%r15
cmova  %r14,%r15
cmova  %rbp,%r14
test   %rax,%rax
jne    1200 <main+0x80>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cf4(%rip),%rax
mov    (%rax),%edi
lea    0xd1b(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [63 x i8] c"Usage:\0A\09rpg-linux-filename [min-length] max-length [how-many]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 1, i64* %8
%10 = load i32, i32* %4
switch i32 %10, label %39 [
i32 1, label %11
i32 2, label %12
i32 3, label %17
i32 4, label %26
]
11: ; preds = %2
store i64 8, i64* %6
store i64 16, i64* %7
br label %43
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i64 @strtoull(i8* %15, i32* null, i32 10)
store i64 %16, i64* %7
store i64 %16, i64* %6
br label %43
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = call i64 @strtoull(i8* %20, i32* null, i32 10)
store i64 %21, i64* %6
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 2
%24 = load i8*, i8** %23
%25 = call i64 @strtoull(i8* %24, i32* null, i32 10)
store i64 %25, i64* %7
br label %43
26: ; preds = %2
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i64 @strtoull(i8* %29, i32* null, i32 10)
store i64 %30, i64* %6
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 2
%33 = load i8*, i8** %32
%34 = call i64 @strtoull(i8* %33, i32* null, i32 10)
store i64 %34, i64* %7
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 3
%37 = load i8*, i8** %36
%38 = call i64 @strtoull(i8* %37, i32* null, i32 10)
store i64 %38, i64* %8
br label %43
39: ; preds = %2
%40 = load i32, i32* @stderr
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%42 = call i32 @exit(i32 1)
unreachable
43: ; preds = %26, %17, %12, %11
%44 = load i64, i64* %6
%45 = load i64, i64* %7
%46 = icmp ugt i64 %44, %45
br i1 %46, label %47, label %59
47: ; preds = %43
br label %48
48: ; preds = %47
%49 = load i64, i64* %7
%50 = load i64, i64* %6
%51 = xor i64 %50, %49
store i64 %51, i64* %6
%52 = load i64, i64* %6
%53 = load i64, i64* %7
%54 = xor i64 %53, %52
store i64 %54, i64* %7
%55 = load i64, i64* %7
%56 = load i64, i64* %6
%57 = xor i64 %56, %55
store i64 %57, i64* %6
br label %58
58: ; preds = %48
br label %59
59: ; preds = %58, %43
br label %60
60: ; preds = %86, %59
%61 = load i64, i64* %8
%62 = add i64 %61, -1
store i64 %62, i64* %8
%63 = icmp ne i64 %61, 0
br i1 %63, label %64, label %88
64: ; preds = %60
%65 = load i64, i64* %7
%66 = load i64, i64* %6
%67 = sub i64 %65, %66
%68 = trunc i64 %67 to i32
%69 = call i32 @bitcount(i32 %68)
%70 = call i32 @csprng(i32 %69)
%71 = load i64, i64* %6
%72 = trunc i64 %71 to i32
%73 = load i64, i64* %7
%74 = trunc i64 %73 to i32
%75 = call i64 @lrand(i32 %70, i32 %72, i32 %74)
store i64 %75, i64* %9
br label %76
76: ; preds = %80, %64
%77 = load i64, i64* %9
%78 = add i64 %77, -1
store i64 %78, i64* %9
%79 = icmp ne i64 %77, 0
br i1 %79, label %80, label %86
80: ; preds = %76
%81 = call i32 @bitcount(i32 92)
%82 = call i32 @csprng(i32 %81)
%83 = call i64 @lrand(i32 %82, i32 33, i32 125)
%84 = call signext i8 @slash_to_tilde(i64 %83)
%85 = call i32 @putchar(i8 signext %84)
br label %76
86: ; preds = %76
%87 = call i32 @putchar(i8 signext 10)
br label %60
88: ; preds = %60
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [63 x i8] c"Usage:\0A\09rpg-linux-filename [min-length] max-length [how-many]\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
switch i32 %0, label %14 [
i32 1, label %18
i32 2, label %3
i32 3, label %7
i32 4, label %24
]
3: ; preds = %2
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i64 @strtoull(i8* nocapture %5, i32* null, i32 10)
br label %18
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i64 @strtoull(i8* nocapture %9, i32* null, i32 10)
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i64 @strtoull(i8* nocapture %12, i32* null, i32 10)
br label %18
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%17 = tail call i32 @exit(i32 1)
unreachable
18: ; preds = %7, %3, %2
%19 = phi i64 [ 8, %2 ], [ %6, %3 ], [ %10, %7 ]
%20 = phi i64 [ 16, %2 ], [ %6, %3 ], [ %13, %7 ]
%21 = icmp ugt i64 %19, %20
%22 = select i1 %21, i64 %20, i64 %19
%23 = select i1 %21, i64 %19, i64 %20
br label %38
24: ; preds = %2
%25 = getelementptr inbounds i8*, i8** %1, i64 1
%26 = load i8*, i8** %25
%27 = tail call i64 @strtoull(i8* nocapture %26, i32* null, i32 10)
%28 = getelementptr inbounds i8*, i8** %1, i64 2
%29 = load i8*, i8** %28
%30 = tail call i64 @strtoull(i8* nocapture %29, i32* null, i32 10)
%31 = getelementptr inbounds i8*, i8** %1, i64 3
%32 = load i8*, i8** %31
%33 = tail call i64 @strtoull(i8* nocapture %32, i32* null, i32 10)
%34 = icmp ugt i64 %27, %30
%35 = select i1 %34, i64 %30, i64 %27
%36 = select i1 %34, i64 %27, i64 %30
%37 = icmp eq i64 %33, 0
br i1 %37, label %65, label %38
38: ; preds = %18, %24
%39 = phi i64 [ %23, %18 ], [ %36, %24 ]
%40 = phi i64 [ %22, %18 ], [ %35, %24 ]
%41 = phi i64 [ 1, %18 ], [ %33, %24 ]
%42 = sub i64 %39, %40
%43 = trunc i64 %42 to i32
%44 = trunc i64 %40 to i32
%45 = trunc i64 %39 to i32
br label %46
46: ; preds = %38, %62
%47 = phi i64 [ %41, %38 ], [ %48, %62 ]
%48 = add i64 %47, -1
%49 = tail call i32 @bitcount(i32 %43)
%50 = tail call i32 @csprng(i32 %49)
%51 = tail call i64 @lrand(i32 %50, i32 %44, i32 %45)
%52 = icmp eq i64 %51, 0
br i1 %52, label %62, label %53
53: ; preds = %46, %53
%54 = phi i64 [ %55, %53 ], [ %51, %46 ]
%55 = add i64 %54, -1
%56 = tail call i32 @bitcount(i32 92)
%57 = tail call i32 @csprng(i32 %56)
%58 = tail call i64 @lrand(i32 %57, i32 33, i32 125)
%59 = tail call signext i8 @slash_to_tilde(i64 %58)
%60 = tail call i32 @putchar(i8 signext %59)
%61 = icmp eq i64 %55, 0
br i1 %61, label %62, label %53
62: ; preds = %53, %46
%63 = tail call i32 @putchar(i8 signext 10)
%64 = icmp eq i64 %48, 0
br i1 %64, label %65, label %46
65: ; preds = %62, %24
ret i32 0
}