#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*/ atoi(char *);
int /*<<< orphan*/ init_hashtable(int /*<<< orphan*/);
int /*<<< orphan*/ reinit_threads(int /*<<< orphan*/);
char *strstr(char *, char *);
void parse_option(char *input) {
  char *buf_ptr = NULL;
  if ((buf_ptr = strstr(input, "Hash value"))) {
    init_hashtable(atoi(buf_ptr + 11));
  }
  if ((buf_ptr = strstr(input, "Threads value"))) {
    reinit_threads(atoi(buf_ptr + 14));
  }
}


x86 assembly (clang, -O0):
<parse_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea1(%rip),%rsi
call   1060 <strstr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1186 <parse_option+0x46>
mov    -0x10(%rbp),%rdi
add    $0xb,%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <init_hashtable@plt>
mov    -0x8(%rbp),%rdi
lea    0xe7a(%rip),%rsi
call   1060 <strstr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     11b8 <parse_option+0x78>
mov    -0x10(%rbp),%rdi
add    $0xe,%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1030 <reinit_threads@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_option>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rsi
call   1060 <strstr@plt>
test   %rax,%rax
je     1168 <parse_option+0x28>
add    $0xb,%rax
mov    %rax,%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <init_hashtable@plt>
lea    0xe9c(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strstr@plt>
test   %rax,%rax
je     1190 <parse_option+0x50>
add    $0xe,%rax
mov    %rax,%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
pop    %rbx
jmp    1030 <reinit_threads@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Hash value\00"
@.str.1 = [14 x i8] c"Threads value\00"
define void @parse_option(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = call i8* @strstr(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 11
%10 = call i32 @atoi(i8* %9)
%11 = call i32 @init_hashtable(i32 %10)
br label %12
12: ; preds = %7, %1
%13 = load i8*, i8** %2
%14 = call i8* @strstr(i8* %13, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
store i8* %14, i8** %3
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 14
%19 = call i32 @atoi(i8* %18)
%20 = call i32 @reinit_threads(i32 %19)
br label %21
21: ; preds = %16, %12
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Hash value\00"
@.str.1 = [14 x i8] c"Threads value\00"
define void @parse_option(i8* %0) {
%2 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 11
%6 = tail call i32 @atoi(i8* %5)
%7 = tail call i32 @init_hashtable(i32 %6)
br label %8
8: ; preds = %4, %1
%9 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = getelementptr inbounds i8, i8* %9, i64 14
%13 = tail call i32 @atoi(i8* %12)
%14 = tail call i32 @reinit_threads(i32 %13)
br label %15
15: ; preds = %11, %8
ret void
}