#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(void) {
  char s1[200] = "this is a a-e to 0-9 to a-c0-4";
  char s3[200] = "--";
  char s2[200];
  printf("s1:%s\n", s1);
  expand(s1, s2);
  printf("s2:%s\n", s2);
  printf("s3:%s\n", s3);
  expand(s3, s2);
  printf("s2:%s\n", s2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x270,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
lea    0xea0(%rip),%rsi
mov    $0xc8,%edx
call   1050 <memcpy@plt>
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1040 <memset@plt>
movb   $0x2d,-0x1a0(%rbp)
movb   $0x2d,-0x19f(%rbp)
lea    -0xd0(%rbp),%rsi
lea    0xf2f(%rip),%rdi
call   1030 <printf@plt>
lea    -0xd0(%rbp),%rdi
lea    -0x270(%rbp),%rsi
call   1060 <expand@plt>
lea    -0x270(%rbp),%rsi
lea    0xf10(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1a0(%rbp),%rsi
lea    0xf04(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0x270(%rbp),%rsi
call   1060 <expand@plt>
lea    -0x270(%rbp),%rsi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x270,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x270,%rsp
lea    0xebd(%rip),%rsi
lea    0x1a0(%rsp),%r14
mov    $0xc8,%edx
mov    %r14,%rdi
call   1040 <memcpy@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%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)
movq   $0x0,0xc0(%rsp)
movw   $0x2d2d,(%rsp)
lea    0xf0d(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
lea    0xd0(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <expand@plt>
lea    0xef2(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    %rsp,%r15
mov    %r15,%rsi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <expand@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x270,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.s1 = [200 x i8] c"this is a a-e to 0-9 to a-c0-4\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\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\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\00\00"
@.str = [7 x i8] c"s1:%s\0A\00"
@.str.1 = [7 x i8] c"s2:%s\0A\00"
@.str.2 = [7 x i8] c"s3:%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
%3 = alloca [200 x i8]
%4 = alloca [200 x i8]
store i32 0, i32* %1
%5 = bitcast [200 x i8]* %2 to i8*
%6 = bitcast [200 x i8]* %3 to i8*
%7 = bitcast i8* %6 to [200 x i8]*
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i32 0, i32 0
store i8 45, i8* %8
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i32 0, i32 1
store i8 45, i8* %9
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%14 = call i32 @expand(i8* %12, i8* %13)
%15 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%20 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%21 = call i32 @expand(i8* %19, i8* %20)
%22 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%23 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %22)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [200 x i8] c"this is a a-e to 0-9 to a-c0-4\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\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\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\00\00"
@.str = [7 x i8] c"s1:%s\0A\00"
@.str.1 = [7 x i8] c"s2:%s\0A\00"
@.str.2 = [7 x i8] c"s3:%s\0A\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = alloca [200 x i8]
%3 = alloca [200 x i8]
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
store i8 45, i8* %5
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 1
store i8 45, i8* %6
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4)
%9 = call i32 @expand(i8* %4, i8* %7)
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%12 = call i32 @expand(i8* %5, i8* %7)
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}