void ft_ech_choice_select(char *(*option), unsigned char *option_e,
                          unsigned char *option_E, unsigned char *option_n) {
  if (*(*option) == 'e') {
    (*option_e) = 'e';
  } else if (*(*option) == 'E') {
    (*option_E) = 'e';
  } else if (*(*option) == 'n') {
    (*option_n) = 'n';
  }
  (*option) += 1;
  return;
}


x86 assembly (clang, -O0):
<ft_ech_choice_select>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x65,%eax
jne    1133 <ft_ech_choice_select+0x33>
mov    -0x10(%rbp),%rax
movb   $0x65,(%rax)
jmp    1176 <ft_ech_choice_select+0x76>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x45,%eax
jne    1152 <ft_ech_choice_select+0x52>
mov    -0x18(%rbp),%rax
movb   $0x65,(%rax)
jmp    1171 <ft_ech_choice_select+0x71>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x6e,%eax
jne    116c <ft_ech_choice_select+0x6c>
mov    -0x20(%rbp),%rax
movb   $0x6e,(%rax)
jmp    1171 <ft_ech_choice_select+0x71>
jmp    1176 <ft_ech_choice_select+0x76>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ech_choice_select>:
mov    (%rdi),%rax
mov    (%rax),%al
cmp    $0x45,%al
je     1119 <ft_ech_choice_select+0x19>
cmp    $0x6e,%al
je     1121 <ft_ech_choice_select+0x21>
cmp    $0x65,%al
jne    1124 <ft_ech_choice_select+0x24>
movb   $0x65,(%rsi)
addq   $0x1,(%rdi)
ret
movb   $0x65,(%rdx)
addq   $0x1,(%rdi)
ret
movb   $0x6e,(%rcx)
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @ft_ech_choice_select(i8** %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8** %0, i8*** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 101
br i1 %13, label %14, label %16
14: ; preds = %4
%15 = load i8*, i8** %6
store i8 101, i8* %15
br label %34
16: ; preds = %4
%17 = load i8**, i8*** %5
%18 = load i8*, i8** %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 69
br i1 %21, label %22, label %24
22: ; preds = %16
%23 = load i8*, i8** %7
store i8 101, i8* %23
br label %33
24: ; preds = %16
%25 = load i8**, i8*** %5
%26 = load i8*, i8** %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 110
br i1 %29, label %30, label %32
30: ; preds = %24
%31 = load i8*, i8** %8
store i8 110, i8* %31
br label %32
32: ; preds = %30, %24
br label %33
33: ; preds = %32, %22
br label %34
34: ; preds = %33, %14
%35 = load i8**, i8*** %5
%36 = load i8*, i8** %35
%37 = getelementptr inbounds i8, i8* %36, i64 1
store i8* %37, i8** %35
ret void
}

LLVM IR (-O2):
define void @ft_ech_choice_select(i8** nocapture %0, i8* nocapture writeonly %1, i8* nocapture writeonly %2, i8* nocapture writeonly %3) {
%5 = load i8*, i8** %0
%6 = load i8, i8* %5
switch i8 %6, label %10 [
i8 101, label %7
i8 69, label %8
i8 110, label %9
]
7: ; preds = %4
store i8 101, i8* %1
br label %10
8: ; preds = %4
store i8 101, i8* %2
br label %10
9: ; preds = %4
store i8 110, i8* %3
br label %10
10: ; preds = %4, %8, %9, %7
%11 = load i8*, i8** %0
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8* %12, i8** %0
ret void
}