#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*/ options_read(char *, char *);
char *parse_word(char const *, char *, int);
scalar_t__ strcmp(char *, char *);
const char *option_parse(const char *line, char *option, char *value,
                         int size) {
  line = parse_word(line, option, size);
  if (strcmp(option, "set") == 0)
    line = parse_word(line, option, size);
  line = parse_word(line, value, size);
  if (strcmp(value, "=") == 0)
    line = parse_word(line, value, size);
  options_read(option, value);
  return line;
}


x86 assembly (clang, -O0):
<option_parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <parse_word@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe9a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1189 <option_parse+0x59>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <parse_word@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <parse_word@plt>
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe5c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11cb <option_parse+0x9b>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <parse_word@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <options_read@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<option_parse>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %ecx,%edx
call   1050 <parse_word@plt>
mov    %rax,%rbp
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    116f <option_parse+0x3f>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
call   1050 <parse_word@plt>
mov    %rax,%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1050 <parse_word@plt>
mov    %rax,%rbp
lea    0xe7d(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    11a5 <option_parse+0x75>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1050 <parse_word@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <options_read@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"set\00"
@.str.1 = [2 x i8] c"=\00"
define i8* @option_parse(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %8
%12 = call i8* @parse_word(i8* %9, i8* %10, i32 %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %6
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %4
%17 = load i8*, i8** %5
%18 = load i8*, i8** %6
%19 = load i32, i32* %8
%20 = call i8* @parse_word(i8* %17, i8* %18, i32 %19)
store i8* %20, i8** %5
br label %21
21: ; preds = %16, %4
%22 = load i8*, i8** %5
%23 = load i8*, i8** %7
%24 = load i32, i32* %8
%25 = call i8* @parse_word(i8* %22, i8* %23, i32 %24)
store i8* %25, i8** %5
%26 = load i8*, i8** %7
%27 = call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %34
29: ; preds = %21
%30 = load i8*, i8** %5
%31 = load i8*, i8** %7
%32 = load i32, i32* %8
%33 = call i8* @parse_word(i8* %30, i8* %31, i32 %32)
store i8* %33, i8** %5
br label %34
34: ; preds = %29, %21
%35 = load i8*, i8** %6
%36 = load i8*, i8** %7
%37 = call i32 @options_read(i8* %35, i8* %36)
%38 = load i8*, i8** %5
ret i8* %38
}

LLVM IR (-O2):
@.str = [4 x i8] c"set\00"
@.str.1 = [2 x i8] c"=\00"
define i8* @option_parse(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i8* @parse_word(i8* %0, i8* %1, i32 %3)
%6 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i8* @parse_word(i8* %5, i8* %1, i32 %3)
br label %10
10: ; preds = %8, %4
%11 = phi i8* [ %9, %8 ], [ %5, %4 ]
%12 = tail call i8* @parse_word(i8* %11, i8* %2, i32 %3)
%13 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %10
%16 = tail call i8* @parse_word(i8* %12, i8* %2, i32 %3)
br label %17
17: ; preds = %15, %10
%18 = phi i8* [ %16, %15 ], [ %12, %10 ]
%19 = tail call i32 @options_read(i8* %1, i8* %2)
ret i8* %18
}