#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 */
typedef int wchar_t;

/* Variables and functions */
int /*<<< orphan*/ do_nothing(int *);
int /*<<< orphan*/ wcscat(int *, ...);
int main(void) {
  int i;
  wchar_t narrow = 97;
  wchar_t single = 0xbeef;
  wchar_t simple[] = L"facile";
  wchar_t difficile[] = {0xdead, 0xbeef, 0xfeed, 0xface};
  wchar_t mixed[] = {L'f', 0xdead, L'a', L'c', 0xfeed, 0xface};
  wchar_t *cent = L"\242";
  wchar_t repeat[128];
  wchar_t *repeat_p = repeat;
  repeat[0] = 0;
  wcscat(repeat, L"A");
  for (i = 0; i < 21; ++i)
    wcscat(repeat, cent);
  wcscat(repeat, L"B");
  do_nothing(&narrow);
  do_nothing(&single);
  do_nothing(simple);
  do_nothing(difficile);
  do_nothing(mixed);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x280,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x61,-0xc(%rbp)
movl   $0xbeef,-0x10(%rbp)
mov    0xeb9(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb6(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb1(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xeaf(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xea9(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xea6(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xea3(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xea0(%rip),%rax
mov    %rax,-0x68(%rbp)
lea    -0x270(%rbp),%rax
mov    %rax,-0x278(%rbp)
movl   $0x0,-0x270(%rbp)
lea    -0x270(%rbp),%rdi
lea    0xe7e(%rip),%rsi
mov    $0x0,%al
call   1030 <wcscat@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x15,-0x8(%rbp)
jge    120a <main+0xea>
lea    -0x270(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    $0x0,%al
call   1030 <wcscat@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e0 <main+0xc0>
lea    -0x270(%rbp),%rdi
lea    0xe40(%rip),%rsi
mov    $0x0,%al
call   1030 <wcscat@plt>
lea    -0xc(%rbp),%rdi
call   1040 <do_nothing@plt>
lea    -0x10(%rbp),%rdi
call   1040 <do_nothing@plt>
lea    -0x30(%rbp),%rdi
call   1040 <do_nothing@plt>
lea    -0x40(%rbp),%rdi
call   1040 <do_nothing@plt>
lea    -0x60(%rbp),%rdi
call   1040 <do_nothing@plt>
mov    -0x4(%rbp),%eax
add    $0x280,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x268,%rsp
movl   $0x61,0xc(%rsp)
movl   $0xbeef,0x8(%rsp)
movups 0xecb(%rip),%xmm0
movups %xmm0,0x4c(%rsp)
movaps 0xeb3(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xec7(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    0xedb(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xebf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x60(%rsp)
lea    0xecb(%rip),%rsi
lea    0x60(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <wcscat@plt>
lea    0xead(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wcscat@plt>
lea    0xda5(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <wcscat@plt>
lea    0xc(%rsp),%rdi
call   1040 <do_nothing@plt>
lea    0x8(%rsp),%rdi
call   1040 <do_nothing@plt>
lea    0x40(%rsp),%rdi
call   1040 <do_nothing@plt>
lea    0x30(%rsp),%rdi
call   1040 <do_nothing@plt>
lea    0x10(%rsp),%rdi
call   1040 <do_nothing@plt>
xor    %eax,%eax
add    $0x268,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.simple = [7 x i32] [i32 102, i32 97, i32 99, i32 105, i32 108, i32 101, i32 0]
@__const.main.difficile = [4 x i32] [i32 57005, i32 48879, i32 65261, i32 64206]
@__const.main.mixed = [6 x i32] [i32 102, i32 57005, i32 97, i32 99, i32 65261, i32 64206]
@.str = [2 x i32] [i32 162, i32 0]
@.str.1 = [2 x i32] [i32 65, i32 0]
@.str.2 = [2 x i32] [i32 66, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [7 x i32]
%6 = alloca [4 x i32]
%7 = alloca [6 x i32]
%8 = alloca i32*
%9 = alloca [128 x i32]
%10 = alloca i32*
store i32 0, i32* %1
store i32 97, i32* %3
store i32 48879, i32* %4
%11 = bitcast [7 x i32]* %5 to i8*
%12 = bitcast [4 x i32]* %6 to i8*
%13 = bitcast [6 x i32]* %7 to i8*
store i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0), i32** %8
%14 = getelementptr inbounds [128 x i32], [128 x i32]* %9, i64 0, i64 0
store i32* %14, i32** %10
%15 = getelementptr inbounds [128 x i32], [128 x i32]* %9, i64 0, i64 0
store i32 0, i32* %15
%16 = getelementptr inbounds [128 x i32], [128 x i32]* %9, i64 0, i64 0
%17 = call i32 (i32*, ...) @wcscat(i32* %16, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %18
18: ; preds = %25, %0
%19 = load i32, i32* %2
%20 = icmp slt i32 %19, 21
br i1 %20, label %21, label %28
21: ; preds = %18
%22 = getelementptr inbounds [128 x i32], [128 x i32]* %9, i64 0, i64 0
%23 = load i32*, i32** %8
%24 = call i32 (i32*, ...) @wcscat(i32* %22, i32* %23)
br label %25
25: ; preds = %21
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %18
28: ; preds = %18
%29 = getelementptr inbounds [128 x i32], [128 x i32]* %9, i64 0, i64 0
%30 = call i32 (i32*, ...) @wcscat(i32* %29, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str.2, i64 0, i64 0))
%31 = call i32 @do_nothing(i32* %3)
%32 = call i32 @do_nothing(i32* %4)
%33 = getelementptr inbounds [7 x i32], [7 x i32]* %5, i64 0, i64 0
%34 = call i32 @do_nothing(i32* %33)
%35 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%36 = call i32 @do_nothing(i32* %35)
%37 = getelementptr inbounds [6 x i32], [6 x i32]* %7, i64 0, i64 0
%38 = call i32 @do_nothing(i32* %37)
%39 = load i32, i32* %1
ret i32 %39
}

LLVM IR (-O2):
@__const.main.simple = [7 x i32] [i32 102, i32 97, i32 99, i32 105, i32 108, i32 101, i32 0]
@__const.main.difficile = [4 x i32] [i32 57005, i32 48879, i32 65261, i32 64206]
@__const.main.mixed = [6 x i32] [i32 102, i32 57005, i32 97, i32 99, i32 65261, i32 64206]
@.str = [2 x i32] [i32 162, i32 0]
@.str.1 = [2 x i32] [i32 65, i32 0]
@.str.2 = [2 x i32] [i32 66, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [7 x i32]
%4 = alloca [4 x i32]
%5 = alloca [6 x i32]
%6 = alloca [128 x i32]
%7 = bitcast i32* %1 to i8*
store i32 97, i32* %1
%8 = bitcast i32* %2 to i8*
store i32 48879, i32* %2
%9 = bitcast [7 x i32]* %3 to i8*
%10 = bitcast [4 x i32]* %4 to i8*
%11 = bitcast [6 x i32]* %5 to i8*
%12 = bitcast [128 x i32]* %6 to i8*
%13 = getelementptr inbounds [128 x i32], [128 x i32]* %6, i64 0, i64 0
store i32 0, i32* %13
%14 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str.1, i64 0, i64 0))
%15 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%16 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%17 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%18 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%19 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%20 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%21 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%22 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%23 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%24 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%25 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%26 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%27 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%28 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%29 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%30 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%31 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%32 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%33 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%34 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%35 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str, i64 0, i64 0))
%36 = call i32 (i32*, ...) @wcscat(i32* %13, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.str.2, i64 0, i64 0))
%37 = call i32 @do_nothing(i32* %1)
%38 = call i32 @do_nothing(i32* %2)
%39 = getelementptr inbounds [7 x i32], [7 x i32]* %3, i64 0, i64 0
%40 = call i32 @do_nothing(i32* %39)
%41 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
%42 = call i32 @do_nothing(i32* %41)
%43 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 0
%44 = call i32 @do_nothing(i32* %43)
ret i32 0
}