#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*/ expand(char *, char *);
int /*<<< orphan*/ printf(char *, char *, ...);
int main() {
  char foo[21] = "A-Z";
  char bar[21] = "0-9";
  char baz[21] = "A-g-N";
  char fob[21] = "2-5-9";
  char woot[21] = "-a-f0-36-9b-h-";
  char derp[21] = "a-28-t";
  char dest[61] = "";
  printf("%26s\n", "INPUT |  OUTPUT");
  printf("%27s\n", "-----------------");
  expand(foo, dest);
  printf("%16s => %s\n", foo, dest);
  expand(bar, dest);
  printf("%16s => %s\n", bar, dest);
  expand(baz, dest);
  printf("%16s => %s\n", baz, dest);
  expand(fob, dest);
  printf("%16s => %s\n", fob, dest);
  expand(woot, dest);
  printf("%16s => %s\n", woot, dest);
  expand(derp, dest);
  printf("%16s => %s\n", derp, dest);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb2(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xead(%rip),%al
mov    %al,-0xc(%rbp)
mov    0xeaf(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xeaa(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    0xea5(%rip),%al
mov    %al,-0x2c(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xea4(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xea2(%rip),%eax
mov    %eax,-0x50(%rbp)
mov    0xe9d(%rip),%al
mov    %al,-0x4c(%rbp)
mov    0xe9f(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe9a(%rip),%eax
mov    %eax,-0x70(%rbp)
mov    0xe95(%rip),%al
mov    %al,-0x6c(%rbp)
mov    0xe97(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xe91(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xe8c(%rip),%eax
mov    %eax,-0x90(%rbp)
mov    0xe84(%rip),%al
mov    %al,-0x8c(%rbp)
mov    0xe83(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0xe7d(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    0xe78(%rip),%eax
mov    %eax,-0xb0(%rbp)
mov    0xe70(%rip),%al
mov    %al,-0xac(%rbp)
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x3d,%edx
call   1040 <memset@plt>
lea    0xe51(%rip),%rdi
lea    0xe50(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe52(%rip),%rdi
lea    0xe51(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
lea    -0x100(%rbp),%rsi
call   1050 <expand@plt>
lea    -0x20(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rdi
lea    -0x100(%rbp),%rsi
call   1050 <expand@plt>
lea    -0x40(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
lea    -0x100(%rbp),%rsi
call   1050 <expand@plt>
lea    -0x60(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x80(%rbp),%rdi
lea    -0x100(%rbp),%rsi
call   1050 <expand@plt>
lea    -0x80(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xa0(%rbp),%rdi
lea    -0x100(%rbp),%rsi
call   1050 <expand@plt>
lea    -0xa0(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xc0(%rbp),%rdi
lea    -0x100(%rbp),%rsi
call   1050 <expand@plt>
lea    -0xc0(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    0xd61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movq   $0x0,0xad(%rsp)
movaps 0xed2(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movq   $0x0,0x8d(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movq   $0x0,0x6d(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movq   $0x0,0x4d(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movq   $0x2d,0x2d(%rsp)
movaps 0xef8(%rip),%xmm0
movaps %xmm0,(%rsp)
movq   $0x0,0xd(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0xed(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
lea    0xed6(%rip),%rdi
lea    0xed5(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0xed6(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xa0(%rsp),%r15
lea    0xc0(%rsp),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <expand@plt>
lea    0xebf(%rip),%r14
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x80(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <expand@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x60(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <expand@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x40(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <expand@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x20(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <expand@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <expand@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.foo = [21 x i8] c"A-Z\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.bar = [21 x i8] c"0-9\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.baz = [21 x i8] c"A-g-N\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.fob = [21 x i8] c"2-5-9\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.woot = [21 x i8] c"-a-f0-36-9b-h-\00\00\00\00\00\00\00"
@__const.main.derp = [21 x i8] c"a-28-t\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [6 x i8] c"%26s\0A\00"
@.str.1 = [16 x i8] c"INPUT | OUTPUT\00"
@.str.2 = [6 x i8] c"%27s\0A\00"
@.str.3 = [18 x i8] c"-----------------\00"
@.str.4 = [12 x i8] c"%16s => %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [21 x i8]
%3 = alloca [21 x i8]
%4 = alloca [21 x i8]
%5 = alloca [21 x i8]
%6 = alloca [21 x i8]
%7 = alloca [21 x i8]
%8 = alloca [61 x i8]
store i32 0, i32* %1
%9 = bitcast [21 x i8]* %2 to i8*
%10 = bitcast [21 x i8]* %3 to i8*
%11 = bitcast [21 x i8]* %4 to i8*
%12 = bitcast [21 x i8]* %5 to i8*
%13 = bitcast [21 x i8]* %6 to i8*
%14 = bitcast [21 x i8]* %7 to i8*
%15 = bitcast [61 x i8]* %8 to i8*
%16 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%18 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%19 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%20 = call i32 @expand(i8* %18, i8* %19)
%21 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%22 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%23 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %21, i8* %22)
%24 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 0
%25 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%26 = call i32 @expand(i8* %24, i8* %25)
%27 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 0
%28 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%29 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %27, i8* %28)
%30 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 0
%31 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%32 = call i32 @expand(i8* %30, i8* %31)
%33 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 0
%34 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%35 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %33, i8* %34)
%36 = getelementptr inbounds [21 x i8], [21 x i8]* %5, i64 0, i64 0
%37 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%38 = call i32 @expand(i8* %36, i8* %37)
%39 = getelementptr inbounds [21 x i8], [21 x i8]* %5, i64 0, i64 0
%40 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%41 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %39, i8* %40)
%42 = getelementptr inbounds [21 x i8], [21 x i8]* %6, i64 0, i64 0
%43 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%44 = call i32 @expand(i8* %42, i8* %43)
%45 = getelementptr inbounds [21 x i8], [21 x i8]* %6, i64 0, i64 0
%46 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%47 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %45, i8* %46)
%48 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%49 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%50 = call i32 @expand(i8* %48, i8* %49)
%51 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%52 = getelementptr inbounds [61 x i8], [61 x i8]* %8, i64 0, i64 0
%53 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %51, i8* %52)
ret i32 0
}

LLVM IR (-O2):
@__const.main.foo = [21 x i8] c"A-Z\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.bar = [21 x i8] c"0-9\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.baz = [21 x i8] c"A-g-N\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.fob = [21 x i8] c"2-5-9\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.woot = [21 x i8] c"-a-f0-36-9b-h-\00\00\00\00\00\00\00"
@__const.main.derp = [21 x i8] c"a-28-t\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [6 x i8] c"%26s\0A\00"
@.str.1 = [16 x i8] c"INPUT | OUTPUT\00"
@.str.2 = [6 x i8] c"%27s\0A\00"
@.str.3 = [18 x i8] c"-----------------\00"
@.str.4 = [12 x i8] c"%16s => %s\0A\00"
define i32 @main() {
%1 = alloca [21 x i8]
%2 = alloca [21 x i8]
%3 = alloca [21 x i8]
%4 = alloca [21 x i8]
%5 = alloca [21 x i8]
%6 = alloca [21 x i8]
%7 = alloca [61 x i8]
%8 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%10 = getelementptr inbounds [21 x i8], [21 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 0
%12 = getelementptr inbounds [21 x i8], [21 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [21 x i8], [21 x i8]* %6, i64 0, i64 0
%14 = getelementptr inbounds [61 x i8], [61 x i8]* %7, i64 0, i64 0
%15 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%16 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 @expand(i8* %8, i8* %14)
%18 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %8, i8* %14)
%19 = call i32 @expand(i8* %9, i8* %14)
%20 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %9, i8* %14)
%21 = call i32 @expand(i8* %10, i8* %14)
%22 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %10, i8* %14)
%23 = call i32 @expand(i8* %11, i8* %14)
%24 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %11, i8* %14)
%25 = call i32 @expand(i8* %12, i8* %14)
%26 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %12, i8* %14)
%27 = call i32 @expand(i8* %13, i8* %14)
%28 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %13, i8* %14)
ret i32 0
}