#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*/ set_hash(char *);
int /*<<< orphan*/ set_max_time(char *);
int /*<<< orphan*/ set_min_time(char *);
int /*<<< orphan*/ set_ownbook(int);
int /*<<< orphan*/ set_ownbookfile(char *);
int /*<<< orphan*/ set_personality_name(char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strip(char *);
int strlen(char *);
char *strstr(char *, char *);
void set_option(char *line) {
  char name[64];
  char value[64];
  char *find_value;
  strip(line);
  if (strlen(line) > 64)
    return;
  strcpy(name, line + 15);
  find_value = strstr(line, " value ");
  if (find_value) {
    strcpy(value, find_value + 7);
    name[strlen(line + 15) - strlen(value) - 7] = '\0';
  } else {
    value[0] = '\0';
  }
  if (strcmp(name, "Personality") == 0) {
    set_personality_name(value);
  } else if (strcmp(name, "Min Time") == 0) {
    set_min_time(value);
  } else if (strcmp(name, "Max Time") == 0) {
    set_max_time(value);
  } else if (strcmp(name, "Hash") == 0) {
    set_hash(value);
  } else if (strcmp(name, "OwnBook") == 0) {
    set_ownbook(strcmp(value, "true") == 0);
  } else if (strcmp(name, "OwnBookFile") == 0) {
    set_ownbookfile(value);
  }
}


x86 assembly (clang, -O0):
<set_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strip@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x40,%eax
jle    11df <set_option+0x2f>
jmp    1399 <set_option+0x1e9>
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0xf,%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
lea    0xe05(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,-0x98(%rbp)
cmpq   $0x0,-0x98(%rbp)
je     1264 <set_option+0xb4>
lea    -0x90(%rbp),%rdi
mov    -0x98(%rbp),%rsi
add    $0x7,%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
add    $0xf,%rdi
call   1040 <strlen@plt>
mov    %eax,-0x9c(%rbp)
lea    -0x90(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x9c(%rbp),%eax
sub    %ecx,%eax
sub    $0x7,%eax
cltq
movb   $0x0,-0x50(%rbp,%rax,1)
jmp    126b <set_option+0xbb>
movb   $0x0,-0x90(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xd92(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1296 <set_option+0xe6>
lea    -0x90(%rbp),%rdi
call   10b0 <set_personality_name@plt>
jmp    1399 <set_option+0x1e9>
lea    -0x50(%rbp),%rdi
lea    0xd73(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    12c1 <set_option+0x111>
lea    -0x90(%rbp),%rdi
call   1070 <set_min_time@plt>
jmp    1394 <set_option+0x1e4>
lea    -0x50(%rbp),%rdi
lea    0xd51(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    12ec <set_option+0x13c>
lea    -0x90(%rbp),%rdi
call   1060 <set_max_time@plt>
jmp    138f <set_option+0x1df>
lea    -0x50(%rbp),%rdi
lea    0xd2f(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1317 <set_option+0x167>
lea    -0x90(%rbp),%rdi
call   10c0 <set_hash@plt>
jmp    138a <set_option+0x1da>
lea    -0x50(%rbp),%rdi
lea    0xd09(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    135a <set_option+0x1aa>
lea    -0x90(%rbp),%rdi
lea    0xcf4(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1090 <set_ownbook@plt>
jmp    1385 <set_option+0x1d5>
lea    -0x50(%rbp),%rdi
lea    0xcd3(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1380 <set_option+0x1d0>
lea    -0x90(%rbp),%rdi
call   10a0 <set_ownbookfile@plt>
jmp    1385 <set_option+0x1d5>
jmp    138a <set_option+0x1da>
jmp    138f <set_option+0x1df>
jmp    1394 <set_option+0x1e4>
jmp    1399 <set_option+0x1e9>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_option>:
push   %rbp
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rbx
call   1050 <strip@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0x40,%eax
jg     1303 <set_option+0x153>
lea    0xf(%rbx),%r14
lea    0x40(%rsp),%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
lea    0xe14(%rip),%rsi
mov    %rbx,%rdi
call   10d0 <strstr@plt>
test   %rax,%rax
je     122c <set_option+0x7c>
add    $0x7,%rax
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <strlen@plt>
sub    %eax,%ebp
add    $0xfffffff9,%ebp
movslq %ebp,%rax
movb   $0x0,0x40(%rsp,%rax,1)
jmp    1230 <set_option+0x80>
movb   $0x0,(%rsp)
lea    0xdd1(%rip),%rsi
lea    0x40(%rsp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     12be <set_option+0x10e>
lea    0xdc7(%rip),%rsi
lea    0x40(%rsp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     12c8 <set_option+0x118>
lea    0xdba(%rip),%rsi
lea    0x40(%rsp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     12d2 <set_option+0x122>
lea    0xdad(%rip),%rsi
lea    0x40(%rsp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     12dc <set_option+0x12c>
lea    0xd9c(%rip),%rsi
lea    0x40(%rsp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     12e6 <set_option+0x136>
lea    0xd93(%rip),%rsi
lea    0x40(%rsp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    1303 <set_option+0x153>
mov    %rsp,%rdi
call   10a0 <set_ownbookfile@plt>
jmp    1303 <set_option+0x153>
mov    %rsp,%rdi
call   10b0 <set_personality_name@plt>
jmp    1303 <set_option+0x153>
mov    %rsp,%rdi
call   1070 <set_min_time@plt>
jmp    1303 <set_option+0x153>
mov    %rsp,%rdi
call   1060 <set_max_time@plt>
jmp    1303 <set_option+0x153>
mov    %rsp,%rdi
call   10c0 <set_hash@plt>
jmp    1303 <set_option+0x153>
lea    0xd46(%rip),%rsi
mov    %rsp,%rdi
call   1080 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1090 <set_ownbook@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c" value \00"
@.str.1 = [12 x i8] c"Personality\00"
@.str.2 = [9 x i8] c"Min Time\00"
@.str.3 = [9 x i8] c"Max Time\00"
@.str.4 = [5 x i8] c"Hash\00"
@.str.5 = [8 x i8] c"OwnBook\00"
@.str.6 = [5 x i8] c"true\00"
@.str.7 = [12 x i8] c"OwnBookFile\00"
define void @set_option(i8* %0) {
%2 = alloca i8*
%3 = alloca [64 x i8]
%4 = alloca [64 x i8]
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strip(i8* %6)
%8 = load i8*, i8** %2
%9 = call i32 @strlen(i8* %8)
%10 = icmp sgt i32 %9, 64
br i1 %10, label %11, label %12
11: ; preds = %1
br label %87
12: ; preds = %1
%13 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 15
%16 = call i32 @strcpy(i8* %13, i8* %15)
%17 = load i8*, i8** %2
%18 = call i8* @strstr(i8* %17, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i8* %18, i8** %5
%19 = load i8*, i8** %5
%20 = icmp ne i8* %19, null
br i1 %20, label %21, label %35
21: ; preds = %12
%22 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i64 7
%25 = call i32 @strcpy(i8* %22, i8* %24)
%26 = load i8*, i8** %2
%27 = getelementptr inbounds i8, i8* %26, i64 15
%28 = call i32 @strlen(i8* %27)
%29 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%30 = call i32 @strlen(i8* %29)
%31 = sub nsw i32 %28, %30
%32 = sub nsw i32 %31, 7
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %33
store i8 0, i8* %34
br label %37
35: ; preds = %12
%36 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
store i8 0, i8* %36
br label %37
37: ; preds = %35, %21
%38 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %37
%42 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%43 = call i32 @set_personality_name(i8* %42)
br label %87
44: ; preds = %37
%45 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%46 = call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %44
%49 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%50 = call i32 @set_min_time(i8* %49)
br label %86
51: ; preds = %44
%52 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%53 = call i64 @strcmp(i8* %52, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %58
55: ; preds = %51
%56 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%57 = call i32 @set_max_time(i8* %56)
br label %85
58: ; preds = %51
%59 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%60 = call i64 @strcmp(i8* %59, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %65
62: ; preds = %58
%63 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%64 = call i32 @set_hash(i8* %63)
br label %84
65: ; preds = %58
%66 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%67 = call i64 @strcmp(i8* %66, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %75
69: ; preds = %65
%70 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%71 = call i64 @strcmp(i8* %70, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%72 = icmp eq i64 %71, 0
%73 = zext i1 %72 to i32
%74 = call i32 @set_ownbook(i32 %73)
br label %83
75: ; preds = %65
%76 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%77 = call i64 @strcmp(i8* %76, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%78 = icmp eq i64 %77, 0
br i1 %78, label %79, label %82
79: ; preds = %75
%80 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%81 = call i32 @set_ownbookfile(i8* %80)
br label %82
82: ; preds = %79, %75
br label %83
83: ; preds = %82, %69
br label %84
84: ; preds = %83, %62
br label %85
85: ; preds = %84, %55
br label %86
86: ; preds = %85, %48
br label %87
87: ; preds = %11, %86, %41
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c" value \00"
@.str.1 = [12 x i8] c"Personality\00"
@.str.2 = [9 x i8] c"Min Time\00"
@.str.3 = [9 x i8] c"Max Time\00"
@.str.4 = [5 x i8] c"Hash\00"
@.str.5 = [8 x i8] c"OwnBook\00"
@.str.6 = [5 x i8] c"true\00"
@.str.7 = [12 x i8] c"OwnBookFile\00"
define void @set_option(i8* %0) {
%2 = alloca [64 x i8]
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%6 = tail call i32 @strip(i8* %0)
%7 = tail call i32 @strlen(i8* %0)
%8 = icmp sgt i32 %7, 64
br i1 %8, label %57, label %9
9: ; preds = %1
%10 = getelementptr inbounds i8, i8* %0, i64 15
%11 = call i32 @strcpy(i8* %4, i8* %10)
%12 = call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i8* %12, null
br i1 %13, label %23, label %14
14: ; preds = %9
%15 = getelementptr inbounds i8, i8* %12, i64 7
%16 = call i32 @strcpy(i8* %5, i8* %15)
%17 = call i32 @strlen(i8* %10)
%18 = call i32 @strlen(i8* %5)
%19 = add i32 %17, -7
%20 = sub i32 %19, %18
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 %21
store i8 0, i8* %22
br label %24
23: ; preds = %9
store i8 0, i8* %5
br label %24
24: ; preds = %23, %14
%25 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @set_personality_name(i8* %5)
br label %57
29: ; preds = %24
%30 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 @set_min_time(i8* %5)
br label %57
34: ; preds = %29
%35 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 @set_max_time(i8* %5)
br label %57
39: ; preds = %34
%40 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 @set_hash(i8* %5)
br label %57
44: ; preds = %39
%45 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %52
47: ; preds = %44
%48 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
%50 = zext i1 %49 to i32
%51 = call i32 @set_ownbook(i32 %50)
br label %57
52: ; preds = %44
%53 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = call i32 @set_ownbookfile(i8* %5)
br label %57
57: ; preds = %27, %37, %47, %55, %52, %42, %32, %1
ret void
}