#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int strlen(char *);
void process_separator(char **separator_place, char *name, char *def) {
  char *separator = *separator_place;
  if (separator) {
    if (!strcmp(separator, "\\n"))
      separator = "\n";
    if (!strcmp(separator, "\\r"))
      separator = "\r";
    else if (!strcmp(separator, "\\0"))
      separator = "";
    else if (!strcmp(separator, "\\t"))
      separator = "\t";
    if (strlen(separator) > 1) {
      fprintf(stderr, "%s of more than one character is not supported\n", name);
      exit(1);
    }
  } else
    separator = def;
  *separator_place = separator;
}


x86 assembly (clang, -O0):
<process_separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1248 <process_separator+0x108>
mov    -0x20(%rbp),%rdi
lea    0xe8b(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    118e <process_separator+0x4e>
lea    0xeb4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe6a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11b7 <process_separator+0x77>
lea    0xe58(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    120e <process_separator+0xce>
mov    -0x20(%rbp),%rdi
lea    0xe46(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11e0 <process_separator+0xa0>
lea    0xe38(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    1209 <process_separator+0xc9>
mov    -0x20(%rbp),%rdi
lea    0xe20(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1204 <process_separator+0xc4>
lea    0xe0e(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    1209 <process_separator+0xc9>
jmp    120e <process_separator+0xce>
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jle    1243 <process_separator+0x103>
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xddc(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
jmp    1250 <process_separator+0x110>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_separator>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdx,%r13
mov    %rdi,%r15
mov    (%rdi),%rbx
test   %rbx,%rbx
je     11db <process_separator+0x9b>
mov    %rsi,%r14
lea    0xe9b(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
lea    0xec8(%rip),%r12
cmovne %rbx,%r12
lea    0xe82(%rip),%rsi
mov    %r12,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     11be <process_separator+0x7e>
lea    0xe74(%rip),%rsi
mov    %r12,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     11c7 <process_separator+0x87>
lea    0xe64(%rip),%rsi
mov    %r12,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
lea    0xe56(%rip),%r13
cmovne %r12,%r13
jmp    11ce <process_separator+0x8e>
lea    0xe41(%rip),%r13
jmp    11ce <process_separator+0x8e>
lea    0xe41(%rip),%r13
mov    %r13,%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
jge    11e8 <process_separator+0xa8>
mov    %r13,(%r15)
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
lea    0xe18(%rip),%rsi
mov    %r14,%rdx
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\\n\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [3 x i8] c"\\r\00"
@.str.3 = [2 x i8] c"\0D\00"
@.str.4 = [3 x i8] c"\\0\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [3 x i8] c"\\t\00"
@.str.7 = [2 x i8] c"\09\00"
@stderr = global i32 0
@.str.8 = [48 x i8] c"%s of more than one character is not supported\0A\00"
define void @process_separator(i8** %0, i8* %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %44
12: ; preds = %3
%13 = load i8*, i8** %7
%14 = call i32 @strcmp(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%15 = icmp ne i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %12
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %7
br label %17
17: ; preds = %16, %12
%18 = load i8*, i8** %7
%19 = call i32 @strcmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp ne i32 %19, 0
br i1 %20, label %22, label %21
21: ; preds = %17
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8** %7
br label %34
22: ; preds = %17
%23 = load i8*, i8** %7
%24 = call i32 @strcmp(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%25 = icmp ne i32 %24, 0
br i1 %25, label %27, label %26
26: ; preds = %22
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i8** %7
br label %33
27: ; preds = %22
%28 = load i8*, i8** %7
%29 = call i32 @strcmp(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%30 = icmp ne i32 %29, 0
br i1 %30, label %32, label %31
31: ; preds = %27
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8** %7
br label %32
32: ; preds = %31, %27
br label %33
33: ; preds = %32, %26
br label %34
34: ; preds = %33, %21
%35 = load i8*, i8** %7
%36 = call i32 @strlen(i8* %35)
%37 = icmp sgt i32 %36, 1
br i1 %37, label %38, label %43
38: ; preds = %34
%39 = load i32, i32* @stderr
%40 = load i8*, i8** %5
%41 = call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i8* %40)
%42 = call i32 @exit(i32 1)
unreachable
43: ; preds = %34
br label %46
44: ; preds = %3
%45 = load i8*, i8** %6
store i8* %45, i8** %7
br label %46
46: ; preds = %44, %43
%47 = load i8*, i8** %7
%48 = load i8**, i8*** %4
store i8* %47, i8** %48
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\\n\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [3 x i8] c"\\r\00"
@.str.3 = [2 x i8] c"\0D\00"
@.str.4 = [3 x i8] c"\\0\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [3 x i8] c"\\t\00"
@.str.7 = [2 x i8] c"\09\00"
@stderr = global i32 0
@.str.8 = [48 x i8] c"%s of more than one character is not supported\0A\00"
define void @process_separator(i8** nocapture %0, i8* %1, i8* %2) {
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %27, label %6
6: ; preds = %3
%7 = tail call i32 @strcmp(i8* %4, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %4
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
br i1 %11, label %19, label %12
12: ; preds = %6
%13 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %12
%16 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%17 = icmp eq i32 %16, 0
%18 = select i1 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* %9
br label %19
19: ; preds = %12, %6, %15
%20 = phi i8* [ %18, %15 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), %12 ]
%21 = tail call i32 @strlen(i8* %20)
%22 = icmp sgt i32 %21, 1
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i32, i32* @stderr
%25 = tail call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i8* %1)
%26 = tail call i32 @exit(i32 1)
unreachable
27: ; preds = %3, %19
%28 = phi i8* [ %20, %19 ], [ %2, %3 ]
store i8* %28, i8** %0
ret void
}