#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*/ chr_arg(char *, char const *, char const *);
scalar_t__ strcmp(char const *, char *);
void sep_arg(char *separator, const char *option, const char *value) {
  if ((0 == strcmp(value, "auto")))
    *separator = '\0';
  else if ((0 == strcmp(value, "none")))
    *separator = '\n';
  else
    chr_arg(separator, option, value);
}


x86 assembly (clang, -O0):
<sep_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    115e <sep_arg+0x3e>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    119e <sep_arg+0x7e>
mov    -0x18(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1188 <sep_arg+0x68>
mov    -0x8(%rbp),%rax
movb   $0xa,(%rax)
jmp    1199 <sep_arg+0x79>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <chr_arg@plt>
jmp    119e <sep_arg+0x7e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sep_arg>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0xecb(%rip),%rsi
mov    %rdx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1169 <sep_arg+0x49>
lea    0xebc(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     116f <sep_arg+0x4f>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <chr_arg@plt>
movb   $0x0,(%r14)
jmp    1173 <sep_arg+0x53>
movb   $0xa,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"auto\00"
@.str.1 = [5 x i8] c"none\00"
define void @sep_arg(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 0, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i8*, i8** %4
store i8 0, i8* %11
br label %24
12: ; preds = %3
%13 = load i8*, i8** %6
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i64 0, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i8*, i8** %4
store i8 10, i8* %17
br label %23
18: ; preds = %12
%19 = load i8*, i8** %4
%20 = load i8*, i8** %5
%21 = load i8*, i8** %6
%22 = call i32 @chr_arg(i8* %19, i8* %20, i8* %21)
br label %23
23: ; preds = %18, %16
br label %24
24: ; preds = %23, %10
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"auto\00"
@.str.1 = [5 x i8] c"none\00"
define void @sep_arg(i8* %0, i8* %1, i8* %2) {
%4 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3
store i8 0, i8* %0
br label %13
7: ; preds = %3
%8 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
store i8 10, i8* %0
br label %13
11: ; preds = %7
%12 = tail call i32 @chr_arg(i8* %0, i8* %1, i8* %2)
br label %13
13: ; preds = %10, %11, %6
ret void
}