#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 */
struct option_value {
  int dummy;
};
typedef int ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ add_option(struct option_value **, char *, char *);
int /*<<< orphan*/ create_new_action(struct option_value *);
int /*<<< orphan*/ create_new_condition(struct option_value *);
int /*<<< orphan*/ die(char *, ...);
int /*<<< orphan*/ *fopen(char *, char *);
int getline(char **, size_t *, int /*<<< orphan*/ *);
scalar_t__ is_blank_line(char *);
scalar_t__ is_end_section(char *);
char *malloc(int);
char *parse_section_name(char *);
int /*<<< orphan*/ sa_log(int /*<<< orphan*/, char *, char *);
char *strchr(char *, char);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strtok(char *, char *);
char *trim(int /*<<< orphan*/);
void parse_config_file(char *file_name) {
  FILE *file;
  char *line;
  ssize_t read;
  size_t len;
  int line_num = 0;
  char *current_section = NULL;
  struct option_value *options = NULL;
  char *sep;
  char *name, *value;
  sa_log(0, "Parsing file %s\n", file_name);
  if ((file = fopen(file_name, "r")) == NULL) {
    die("Error opening configuration file %s\n", file_name);
  }
  line = malloc(2048);
  if (!(line)) {
    die("Allocation problem at %s:%d",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/bengal/sysalarm/refs/heads/master/src/"
        "parse.c",
        279);
  };
  while ((read = getline(&line, &len, file)) != -1) {
    line_num++;
    if (is_blank_line(line))
      continue;
    if (current_section == NULL) {
      current_section = parse_section_name(line);
      if (current_section == NULL)
        die("Expected start of section at line %d", line_num);
      continue;
    }
    if (is_end_section(line)) {
      if (!strcmp(current_section, "condition")) {
        create_new_condition(options);
      } else if (!strcmp(current_section, "action")) {
        create_new_action(options);
      } else {
        die("Unknown section name %s at line %d", current_section, line_num);
      }
      options = NULL;
      current_section = NULL;
      continue;
    }
    sep = strchr(line, '=');
    if (sep == NULL) {
      die("Syntax error at line %d\n", line_num);
    }
    name = trim(strtok(line, "="));
    value = trim(strtok(NULL, ""));
    add_option(&options, name, value);
  }
}


x86 assembly (clang, -O0):
<parse_config_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x2c(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
lea    0xde0(%rip),%rsi
call   1080 <sa_log@plt>
mov    -0x8(%rbp),%rdi
lea    0xde1(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1255 <parse_config_file+0x65>
mov    -0x8(%rbp),%rsi
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   10d0 <die@plt>
mov    $0x800,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1288 <parse_config_file+0x98>
lea    0xdc3(%rip),%rdi
lea    0xdd8(%rip),%rsi
mov    $0x117,%edx
mov    $0x0,%al
call   10d0 <die@plt>
jmp    128d <parse_config_file+0x9d>
mov    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1110 <getline@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
je     140e <parse_config_file+0x21e>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rdi
call   1070 <is_blank_line@plt>
cmp    $0x0,%rax
je     12cb <parse_config_file+0xdb>
jmp    128d <parse_config_file+0x9d>
cmpq   $0x0,-0x38(%rbp)
jne    1304 <parse_config_file+0x114>
mov    -0x18(%rbp),%rdi
call   1060 <parse_section_name@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    12ff <parse_config_file+0x10f>
mov    -0x2c(%rbp),%esi
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   10d0 <die@plt>
jmp    128d <parse_config_file+0x9d>
mov    -0x18(%rbp),%rdi
call   1030 <is_end_section@plt>
cmp    $0x0,%rax
je     1394 <parse_config_file+0x1a4>
mov    -0x38(%rbp),%rdi
lea    0xddf(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    133e <parse_config_file+0x14e>
mov    -0x40(%rbp),%rdi
call   10f0 <create_new_condition@plt>
jmp    137f <parse_config_file+0x18f>
mov    -0x38(%rbp),%rdi
lea    0xdc2(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1365 <parse_config_file+0x175>
mov    -0x40(%rbp),%rdi
call   1100 <create_new_action@plt>
jmp    137a <parse_config_file+0x18a>
mov    -0x38(%rbp),%rsi
mov    -0x2c(%rbp),%edx
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   10d0 <die@plt>
jmp    137f <parse_config_file+0x18f>
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x38(%rbp)
jmp    128d <parse_config_file+0x9d>
mov    -0x18(%rbp),%rdi
mov    $0x3d,%esi
call   1040 <strchr@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    13c2 <parse_config_file+0x1d2>
mov    -0x2c(%rbp),%esi
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   10d0 <die@plt>
mov    -0x18(%rbp),%rdi
lea    0xd81(%rip),%rsi
call   10e0 <strtok@plt>
mov    %eax,%edi
call   1050 <trim@plt>
mov    %rax,-0x50(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xd65(%rip),%rsi
call   10e0 <strtok@plt>
mov    %eax,%edi
call   1050 <trim@plt>
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
lea    -0x40(%rbp),%rdi
call   10b0 <add_option@plt>
jmp    128d <parse_config_file+0x9d>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_config_file>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbp
movq   $0x0,0x10(%rsp)
lea    0xdef(%rip),%rsi
xor    %edi,%edi
mov    %rbp,%rdx
call   1080 <sa_log@plt>
lea    0xdef(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <fopen@plt>
mov    %rax,%r15
test   %rax,%rax
jne    1243 <parse_config_file+0x53>
lea    0xdda(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10d0 <die@plt>
mov    $0x800,%edi
call   10a0 <malloc@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
jne    1271 <parse_config_file+0x81>
lea    0xdda(%rip),%rdi
lea    0xdef(%rip),%rsi
mov    $0x117,%edx
xor    %eax,%eax
call   10d0 <die@plt>
lea    0x8(%rsp),%rdi
lea    0x20(%rsp),%rsi
mov    %r15,%rdx
call   1110 <getline@plt>
cmp    $0xffffffff,%eax
je     1414 <parse_config_file+0x224>
lea    0x8(%rsp),%r12
lea    0x20(%rsp),%rbx
xor    %ebp,%ebp
xor    %r14d,%r14d
mov    %r15,0x18(%rsp)
add    $0x1,%ebp
jmp    1313 <parse_config_file+0x123>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r13,%rdi
lea    0xe94(%rip),%rsi
call   10e0 <strtok@plt>
mov    %eax,%edi
call   1050 <trim@plt>
mov    %rax,%rbx
xor    %edi,%edi
lea    0xe7b(%rip),%rsi
call   10e0 <strtok@plt>
mov    %eax,%edi
call   1050 <trim@plt>
lea    0x10(%rsp),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   10b0 <add_option@plt>
mov    %r14,%rbx
mov    %r15,%r14
mov    0x18(%rsp),%r15
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1110 <getline@plt>
add    $0x1,%ebp
cmp    $0xffffffff,%eax
je     1414 <parse_config_file+0x224>
mov    0x8(%rsp),%rdi
call   1070 <is_blank_line@plt>
test   %rax,%rax
jne    12f9 <parse_config_file+0x109>
mov    0x8(%rsp),%rdi
test   %r14,%r14
je     1380 <parse_config_file+0x190>
call   1030 <is_end_section@plt>
test   %rax,%rax
jne    13a0 <parse_config_file+0x1b0>
mov    %r14,%r15
mov    %rbx,%r14
mov    0x8(%rsp),%r13
mov    %r13,%rdi
mov    $0x3d,%esi
call   1040 <strchr@plt>
test   %rax,%rax
jne    12b0 <parse_config_file+0xc0>
lea    0xdd7(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   10d0 <die@plt>
mov    0x8(%rsp),%r13
jmp    12b0 <parse_config_file+0xc0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1060 <parse_section_name@plt>
mov    %rax,%r14
test   %rax,%rax
jne    13fd <parse_config_file+0x20d>
lea    0xd48(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   10d0 <die@plt>
jmp    13fa <parse_config_file+0x20a>
nop
mov    %r14,%rdi
lea    0xd57(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
je     13db <parse_config_file+0x1eb>
mov    %r14,%rdi
lea    0xd4e(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
je     13e7 <parse_config_file+0x1f7>
lea    0xd45(%rip),%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   10d0 <die@plt>
jmp    13f1 <parse_config_file+0x201>
mov    0x10(%rsp),%rdi
call   10f0 <create_new_condition@plt>
jmp    13f1 <parse_config_file+0x201>
mov    0x10(%rsp),%rdi
call   1100 <create_new_action@plt>
movq   $0x0,0x10(%rsp)
xor    %r14d,%r14d
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1110 <getline@plt>
cmp    $0xffffffff,%eax
jne    12a0 <parse_config_file+0xb0>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.option_value = type { i32 }
@.str = [17 x i8] c"Parsing file %s\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [37 x i8] c"Error opening configuration file %s\0A\00"
@.str.3 = [28 x i8] c"Allocation problem at %s:%d\00"
@.str.4 = [136 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bengal/sysalarm/refs/heads/master/src/parse.c\00"
@.str.5 = [37 x i8] c"Expected start of section at line %d\00"
@.str.6 = [10 x i8] c"condition\00"
@.str.7 = [7 x i8] c"action\00"
@.str.8 = [35 x i8] c"Unknown section name %s at line %d\00"
@.str.9 = [25 x i8] c"Syntax error at line %d\0A\00"
@.str.10 = [2 x i8] c"=\00"
@.str.11 = [1 x i8] zeroinitializer
define void @parse_config_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
%7 = alloca i32
%8 = alloca i8*
%9 = alloca %struct.option_value*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %2
store i32 0, i32* %7
store i8* null, i8** %8
store %struct.option_value* null, %struct.option_value** %9
%13 = load i8*, i8** %2
%14 = call i32 @sa_log(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = load i8*, i8** %2
%16 = call i32* @fopen(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %16, i32** %3
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %21
18: ; preds = %1
%19 = load i8*, i8** %2
%20 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %18, %1
%22 = call i8* @malloc(i32 2048)
store i8* %22, i8** %4
%23 = load i8*, i8** %4
%24 = icmp ne i8* %23, null
br i1 %24, label %27, label %25
25: ; preds = %21
%26 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.4, i64 0, i64 0), i32 279)
br label %27
27: ; preds = %25, %21
br label %28
28: ; preds = %83, %74, %50, %38, %27
%29 = load i32*, i32** %3
%30 = call i32 @getline(i8** %4, i64* %6, i32* %29)
store i32 %30, i32* %5
%31 = icmp ne i32 %30, -1
br i1 %31, label %32, label %92
32: ; preds = %28
%33 = load i32, i32* %7
%34 = add nsw i32 %33, 1
store i32 %34, i32* %7
%35 = load i8*, i8** %4
%36 = call i64 @is_blank_line(i8* %35)
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %39
38: ; preds = %32
br label %28
39: ; preds = %32
%40 = load i8*, i8** %8
%41 = icmp eq i8* %40, null
br i1 %41, label %42, label %51
42: ; preds = %39
%43 = load i8*, i8** %4
%44 = call i8* @parse_section_name(i8* %43)
store i8* %44, i8** %8
%45 = load i8*, i8** %8
%46 = icmp eq i8* %45, null
br i1 %46, label %47, label %50
47: ; preds = %42
%48 = load i32, i32* %7
%49 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i32 %48)
br label %50
50: ; preds = %47, %42
br label %28
51: ; preds = %39
%52 = load i8*, i8** %4
%53 = call i64 @is_end_section(i8* %52)
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %75
55: ; preds = %51
%56 = load i8*, i8** %8
%57 = call i32 @strcmp(i8* %56, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%58 = icmp ne i32 %57, 0
br i1 %58, label %62, label %59
59: ; preds = %55
%60 = load %struct.option_value*, %struct.option_value** %9
%61 = call i32 @create_new_condition(%struct.option_value* %60)
br label %74
62: ; preds = %55
%63 = load i8*, i8** %8
%64 = call i32 @strcmp(i8* %63, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%65 = icmp ne i32 %64, 0
br i1 %65, label %69, label %66
66: ; preds = %62
%67 = load %struct.option_value*, %struct.option_value** %9
%68 = call i32 @create_new_action(%struct.option_value* %67)
br label %73
69: ; preds = %62
%70 = load i8*, i8** %8
%71 = load i32, i32* %7
%72 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i8* %70, i32 %71)
br label %73
73: ; preds = %69, %66
br label %74
74: ; preds = %73, %59
store %struct.option_value* null, %struct.option_value** %9
store i8* null, i8** %8
br label %28
75: ; preds = %51
%76 = load i8*, i8** %4
%77 = call i8* @strchr(i8* %76, i8 signext 61)
store i8* %77, i8** %10
%78 = load i8*, i8** %10
%79 = icmp eq i8* %78, null
br i1 %79, label %80, label %83
80: ; preds = %75
%81 = load i32, i32* %7
%82 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 %81)
br label %83
83: ; preds = %80, %75
%84 = load i8*, i8** %4
%85 = call i32 @strtok(i8* %84, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%86 = call i8* @trim(i32 %85)
store i8* %86, i8** %11
%87 = call i32 @strtok(i8* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.11, i64 0, i64 0))
%88 = call i8* @trim(i32 %87)
store i8* %88, i8** %12
%89 = load i8*, i8** %11
%90 = load i8*, i8** %12
%91 = call i32 @add_option(%struct.option_value** %9, i8* %89, i8* %90)
br label %28
92: ; preds = %28
ret void
}

LLVM IR (-O2):
%struct.option_value = type { i32 }
@.str = [17 x i8] c"Parsing file %s\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [37 x i8] c"Error opening configuration file %s\0A\00"
@.str.3 = [28 x i8] c"Allocation problem at %s:%d\00"
@.str.4 = [136 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bengal/sysalarm/refs/heads/master/src/parse.c\00"
@.str.5 = [37 x i8] c"Expected start of section at line %d\00"
@.str.6 = [10 x i8] c"condition\00"
@.str.7 = [7 x i8] c"action\00"
@.str.8 = [35 x i8] c"Unknown section name %s at line %d\00"
@.str.9 = [25 x i8] c"Syntax error at line %d\0A\00"
@.str.10 = [2 x i8] c"=\00"
@.str.11 = [1 x i8] zeroinitializer
define void @parse_config_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca %struct.option_value*
%5 = bitcast i8** %2 to i8*
%6 = bitcast i64* %3 to i8*
%7 = bitcast %struct.option_value** %4 to i8*
store %struct.option_value* null, %struct.option_value** %4
%8 = tail call i32 @sa_log(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %13
13: ; preds = %11, %1
%14 = tail call dereferenceable_or_null(2048) i8* @malloc(i32 2048)
store i8* %14, i8** %2
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.4, i64 0, i64 0), i32 279)
br label %18
18: ; preds = %16, %13
%19 = call i32 @getline(i8** %2, i64* %3, i32* %9)
%20 = icmp eq i32 %19, -1
br i1 %20, label %77, label %21
21: ; preds = %18, %38
%22 = phi i32 [ %27, %38 ], [ 0, %18 ]
%23 = phi i8* [ %39, %38 ], [ null, %18 ]
%24 = icmp eq i8* %23, null
br label %25
25: ; preds = %21, %74
%26 = phi i32 [ %22, %21 ], [ %27, %74 ]
%27 = add nsw i32 %26, 1
%28 = load i8*, i8** %2
%29 = call i64 @is_blank_line(i8* %28)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %74
31: ; preds = %25
%32 = load i8*, i8** %2
br i1 %24, label %33, label %42
33: ; preds = %31
%34 = call i8* @parse_section_name(i8* %32)
%35 = icmp eq i8* %34, null
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i32 %27)
br label %38
38: ; preds = %33, %36, %59
%39 = phi i8* [ null, %59 ], [ null, %36 ], [ %34, %33 ]
%40 = call i32 @getline(i8** %2, i64* %3, i32* %9)
%41 = icmp eq i32 %40, -1
br i1 %41, label %77, label %21
42: ; preds = %31
%43 = call i64 @is_end_section(i8* %32)
%44 = icmp eq i64 %43, 0
br i1 %44, label %60, label %45
45: ; preds = %42
%46 = call i32 @strcmp(i8* %23, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %45
%49 = load %struct.option_value*, %struct.option_value** %4
%50 = call i32 @create_new_condition(%struct.option_value* %49)
br label %59
51: ; preds = %45
%52 = call i32 @strcmp(i8* %23, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %57
54: ; preds = %51
%55 = load %struct.option_value*, %struct.option_value** %4
%56 = call i32 @create_new_action(%struct.option_value* %55)
br label %59
57: ; preds = %51
%58 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i8* %23, i32 %27)
br label %59
59: ; preds = %54, %57, %48
store %struct.option_value* null, %struct.option_value** %4
br label %38
60: ; preds = %42
%61 = load i8*, i8** %2
%62 = call i8* @strchr(i8* dereferenceable(1) %61, i8 signext 61)
%63 = icmp eq i8* %62, null
br i1 %63, label %64, label %67
64: ; preds = %60
%65 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 %27)
%66 = load i8*, i8** %2
br label %67
67: ; preds = %64, %60
%68 = phi i8* [ %66, %64 ], [ %61, %60 ]
%69 = call i32 @strtok(i8* %68, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%70 = call i8* @trim(i32 %69)
%71 = call i32 @strtok(i8* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.11, i64 0, i64 0))
%72 = call i8* @trim(i32 %71)
%73 = call i32 @add_option(%struct.option_value** %4, i8* %70, i8* %72)
br label %74
74: ; preds = %67, %25
%75 = call i32 @getline(i8** %2, i64* %3, i32* %9)
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %25
77: ; preds = %38, %74, %18
ret void
}