#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 */
char **handle_switch_ftabstop(char *, char **);
int /*<<< orphan*/ strncmp(char *, char *, int);
char **handle_switch_f(char *arg, char **next) {
  arg++;
  if (!strncmp(arg, "tabstop=", 8))
    return handle_switch_ftabstop(arg + 8, next);
  if (!strncmp(arg, "no-", 3)) {
    arg += 3;
  }
  return next;
}


x86 assembly (clang, -O0):
<handle_switch_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1174 <handle_switch_f+0x54>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
mov    -0x18(%rbp),%rsi
call   1040 <handle_switch_ftabstop@plt>
mov    %rax,-0x8(%rbp)
jmp    11a6 <handle_switch_f+0x86>
mov    -0x10(%rbp),%rdi
lea    0xe8a(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    119e <handle_switch_f+0x7e>
mov    -0x10(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_switch_f>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x1(%rdi),%r15
lea    0xeca(%rip),%rsi
mov    %r15,%rdi
mov    $0x8,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1164 <handle_switch_f+0x44>
lea    0xebb(%rip),%rsi
mov    %r15,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret
add    $0x9,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <handle_switch_ftabstop@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"tabstop=\00"
@.str.1 = [4 x i8] c"no-\00"
define i8** @handle_switch_f(i8* %0, i8** %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = tail call i32 @strncmp(i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %0, i64 9
%8 = tail call i8** @handle_switch_ftabstop(i8* %7, i8** %1)
br label %11
9: ; preds = %2
%10 = tail call i32 @strncmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
br label %11
11: ; preds = %9, %6
%12 = phi i8** [ %1, %9 ], [ %8, %6 ]
ret i8** %12
}