#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 /*<<< orphan*/ argv;

/* Variables and functions */
char *calloc(int, int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ transfer(char *, char *);
int main(int argc, char *argv[]) {
  char *str1 = calloc((argc - 1), sizeof(argv) / 2);
  char *str2 = calloc((argc - 1), sizeof(argv) / 2);
  int token = 0;
  for (int i = 1; i < argc; i++) {
    if (strcmp(argv[i], "\\") == 0) {
      token = 1;
      continue;
    }
    if (token) {
      strcat(str2, argv[i]);
      strcat(str2, " ");
    } else {
      strcat(str1, argv[i]);
      strcat(str1, " ");
    }
  }
  puts(str1);
  transfer(str1, str2);
  free(str1);
  free(str2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1252 <main+0xf2>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe35(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11e6 <main+0x86>
movl   $0x1,-0x24(%rbp)
jmp    1244 <main+0xe4>
cmpl   $0x0,-0x24(%rbp)
je     121a <main+0xba>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1070 <strcat@plt>
mov    -0x20(%rbp),%rdi
lea    0xdf2(%rip),%rsi
call   1070 <strcat@plt>
jmp    123f <main+0xdf>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1070 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xdc8(%rip),%rsi
call   1070 <strcat@plt>
jmp    1244 <main+0xe4>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11ac <main+0x4c>
mov    -0x18(%rbp),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1080 <transfer@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%r12d
lea    -0x1(%r12),%ebp
mov    %ebp,%edi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,%r14
mov    %ebp,%edi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,(%rsp)
cmp    $0x2,%r12d
jl     1204 <main+0xa4>
mov    %r12d,%r13d
xor    %ebp,%ebp
mov    $0x1,%r12d
jmp    11e8 <main+0x88>
nopl   0x0(%rax,%rax,1)
xor    %r15d,%r15d
test   %ebp,%ebp
setne  %r15b
mov    (%rbx,%r12,8),%rsi
mov    (%rsp),%rbp
cmove  %r14,%rbp
mov    %rbp,%rdi
call   1070 <strcat@plt>
mov    %rbp,%rdi
lea    0xe2b(%rip),%rsi
call   1070 <strcat@plt>
mov    %r15d,%ebp
add    $0x1,%r12
cmp    %r12,%r13
je     1204 <main+0xa4>
mov    (%rbx,%r12,8),%rdi
lea    0xe0d(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    11b0 <main+0x50>
mov    $0x1,%ebp
jmp    11df <main+0x7f>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
mov    (%rsp),%rbx
mov    %rbx,%rsi
call   1080 <transfer@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\\\00"
@.str.1 = [2 x i8] c" \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
%12 = call i8* @calloc(i32 %11, i32 4)
store i8* %12, i8** %6
%13 = load i32, i32* %4
%14 = sub nsw i32 %13, 1
%15 = call i8* @calloc(i32 %14, i32 4)
store i8* %15, i8** %7
store i32 0, i32* %8
store i32 1, i32* %9
br label %16
16: ; preds = %53, %2
%17 = load i32, i32* %9
%18 = load i32, i32* %4
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %56
20: ; preds = %16
%21 = load i8**, i8*** %5
%22 = load i32, i32* %9
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8*, i8** %21, i64 %23
%25 = load i8*, i8** %24
%26 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %20
store i32 1, i32* %8
br label %53
29: ; preds = %20
%30 = load i32, i32* %8
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %42
32: ; preds = %29
%33 = load i8*, i8** %7
%34 = load i8**, i8*** %5
%35 = load i32, i32* %9
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8*, i8** %34, i64 %36
%38 = load i8*, i8** %37
%39 = call i32 @strcat(i8* %33, i8* %38)
%40 = load i8*, i8** %7
%41 = call i32 @strcat(i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %52
42: ; preds = %29
%43 = load i8*, i8** %6
%44 = load i8**, i8*** %5
%45 = load i32, i32* %9
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %44, i64 %46
%48 = load i8*, i8** %47
%49 = call i32 @strcat(i8* %43, i8* %48)
%50 = load i8*, i8** %6
%51 = call i32 @strcat(i8* %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %52
52: ; preds = %42, %32
br label %53
53: ; preds = %52, %28
%54 = load i32, i32* %9
%55 = add nsw i32 %54, 1
store i32 %55, i32* %9
br label %16
56: ; preds = %16
%57 = load i8*, i8** %6
%58 = call i32 @puts(i8* %57)
%59 = load i8*, i8** %6
%60 = load i8*, i8** %7
%61 = call i32 @transfer(i8* %59, i8* %60)
%62 = load i8*, i8** %6
%63 = call i32 @free(i8* %62)
%64 = load i8*, i8** %7
%65 = call i32 @free(i8* %64)
%66 = load i32, i32* %3
ret i32 %66
}

LLVM IR (-O2):
@.str = [2 x i8] c"\\\00"
@.str.1 = [2 x i8] c" \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i8* @calloc(i32 %3, i32 4)
%5 = tail call i8* @calloc(i32 %3, i32 4)
%6 = icmp sgt i32 %0, 1
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = zext i32 %0 to i64
br label %14
9: ; preds = %29, %2
%10 = tail call i32 @puts(i8* dereferenceable(1) %4)
%11 = tail call i32 @transfer(i8* %4, i8* %5)
%12 = tail call i32 @free(i8* %4)
%13 = tail call i32 @free(i8* %5)
ret i32 0
14: ; preds = %7, %29
%15 = phi i64 [ 1, %7 ], [ %31, %29 ]
%16 = phi i32 [ 0, %7 ], [ %30, %29 ]
%17 = getelementptr inbounds i8*, i8** %1, i64 %15
%18 = load i8*, i8** %17
%19 = tail call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %29, label %21
21: ; preds = %14
%22 = icmp eq i32 %16, 0
%23 = load i8*, i8** %17
%24 = select i1 %22, i8* %4, i8* %5
%25 = xor i1 %22, true
%26 = zext i1 %25 to i32
%27 = tail call i32 @strcat(i8* %24, i8* %23)
%28 = tail call i32 @strcat(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %29
29: ; preds = %21, %14
%30 = phi i32 [ 1, %14 ], [ %26, %21 ]
%31 = add nuw nsw i64 %15, 1
%32 = icmp eq i64 %31, %8
br i1 %32, label %9, label %14
}