#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 buildopt {
  int dummy;
};
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int BUFSIZ;
int /*<<< orphan*/ cli_buildopt_cflags(struct buildopt *, char *);
int /*<<< orphan*/ cli_buildopt_ldflags(struct buildopt *, char *);
struct buildopt *cli_buildopt_new(char *);
int /*<<< orphan*/ cli_fatal(char *, char const *, ...);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ *fopen(char const *, char *);
char *kore_read_line(int /*<<< orphan*/ *, char *, int);
char *kore_text_trim(char *, scalar_t__);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcasecmp(char *, char *);
char *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
scalar_t__ strlen(char *);
void cli_buildopt_parse(const char *path) {
  FILE *fp;
  struct buildopt *bopt;
  char buf[BUFSIZ], *p, *t;
  if ((fp = fopen(path, "r")) == NULL)
    cli_fatal("cli_buildopt_parse: fopen(%s): %s", path, strerror(errno));
  bopt = NULL;
  while ((p = kore_read_line(fp, buf, sizeof(buf))) != NULL) {
    if (strlen(p) == 0)
      continue;
    if (bopt != NULL && !strcmp(p, "}")) {
      bopt = NULL;
      continue;
    }
    if (bopt == NULL) {
      if ((t = strchr(p, '=')) != NULL)
        goto parse_option;
      if ((t = strchr(p, ' ')) == NULL)
        cli_fatal("unexpected '%s'", p);
      *(t)++ = '\0';
      if (strcmp(t, "{"))
        cli_fatal("expected '{', got '%s'", t);
      bopt = cli_buildopt_new(p);
      continue;
    }
    if ((t = strchr(p, '=')) == NULL) {
      printf("bad buildopt line: '%s'\n", p);
      continue;
    }
  parse_option:
    *(t)++ = '\0';
    p = kore_text_trim(p, strlen(p));
    t = kore_text_trim(t, strlen(t));
    if (!strcasecmp(p, "cflags")) {
      cli_buildopt_cflags(bopt, t);
    } else if (!strcasecmp(p, "ldflags")) {
      cli_buildopt_ldflags(bopt, t);
    } else {
      printf("ignoring unknown option %s\n", p);
    }
  }
}


x86 assembly (clang, -O0):
<cli_buildopt_parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2dfd(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x48(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xde9(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1254 <cli_buildopt_parse+0x84>
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x50(%rbp),%rsi
mov    %eax,%edx
lea    0xdb5(%rip),%rdi
mov    $0x0,%al
call   10c0 <cli_fatal@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    %eax,%edx
call   10d0 <kore_read_line@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
je     146b <cli_buildopt_parse+0x29b>
mov    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
jne    1295 <cli_buildopt_parse+0xc5>
jmp    125c <cli_buildopt_parse+0x8c>
cmpq   $0x0,-0x18(%rbp)
je     12c7 <cli_buildopt_parse+0xf7>
mov    -0x30(%rbp),%rdi
lea    0xd79(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    12c7 <cli_buildopt_parse+0xf7>
movq   $0x0,-0x18(%rbp)
jmp    125c <cli_buildopt_parse+0x8c>
cmpq   $0x0,-0x18(%rbp)
jne    1371 <cli_buildopt_parse+0x1a1>
mov    -0x30(%rbp),%rdi
mov    $0x3d,%esi
call   1050 <strchr@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
je     12f3 <cli_buildopt_parse+0x123>
jmp    13a7 <cli_buildopt_parse+0x1d7>
mov    -0x30(%rbp),%rdi
mov    $0x20,%esi
call   1050 <strchr@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    1321 <cli_buildopt_parse+0x151>
mov    -0x30(%rbp),%rsi
lea    0xd0c(%rip),%rdi
mov    $0x0,%al
call   10c0 <cli_fatal@plt>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x38(%rbp)
movb   $0x0,(%rax)
mov    -0x38(%rbp),%rdi
lea    0xcf8(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
je     135f <cli_buildopt_parse+0x18f>
mov    -0x38(%rbp),%rsi
lea    0xce0(%rip),%rdi
mov    $0x0,%al
call   10c0 <cli_fatal@plt>
mov    -0x30(%rbp),%rdi
call   1090 <cli_buildopt_new@plt>
mov    %rax,-0x18(%rbp)
jmp    125c <cli_buildopt_parse+0x8c>
mov    -0x30(%rbp),%rdi
mov    $0x3d,%esi
call   1050 <strchr@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    13a2 <cli_buildopt_parse+0x1d2>
mov    -0x30(%rbp),%rsi
lea    0xcb7(%rip),%rdi
call   1060 <printf@plt>
jmp    125c <cli_buildopt_parse+0x8c>
jmp    13a7 <cli_buildopt_parse+0x1d7>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x38(%rbp)
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x60(%rbp),%rdi
mov    %rax,%rsi
call   10b0 <kore_text_trim@plt>
mov    %rax,-0x30(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x58(%rbp),%rdi
mov    %rax,%rsi
call   10b0 <kore_text_trim@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xc62(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1426 <cli_buildopt_parse+0x256>
mov    -0x18(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1070 <cli_buildopt_cflags@plt>
jmp    1466 <cli_buildopt_parse+0x296>
mov    -0x30(%rbp),%rdi
lea    0xc3e(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1451 <cli_buildopt_parse+0x281>
mov    -0x18(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1080 <cli_buildopt_ldflags@plt>
jmp    1461 <cli_buildopt_parse+0x291>
mov    -0x30(%rbp),%rsi
lea    0xc1b(%rip),%rdi
call   1060 <printf@plt>
jmp    1466 <cli_buildopt_parse+0x296>
jmp    125c <cli_buildopt_parse+0x8c>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cli_buildopt_parse>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%r12
mov    0x2df5(%rip),%rax
mov    (%rax),%r14d
mov    %rsp,%r13
mov    %r14,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
lea    0xdf7(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1237 <cli_buildopt_parse+0x67>
mov    0x2dbb(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
lea    0xdd7(%rip),%rdi
mov    %r12,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   10c0 <cli_fatal@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r14d,%edx
call   10d0 <kore_read_line@plt>
test   %rax,%rax
je     13f5 <cli_buildopt_parse+0x225>
mov    %rax,%r12
xor    %eax,%eax
mov    %rax,-0x38(%rbp)
mov    %r13,-0x40(%rbp)
mov    %rbx,-0x30(%rbp)
jmp    128f <cli_buildopt_parse+0xbf>
mov    -0x38(%rbp),%rdi
mov    %r15,%rsi
call   1070 <cli_buildopt_cflags@plt>
mov    -0x40(%rbp),%r13
mov    -0x30(%rbp),%rbx
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r14d,%edx
call   10d0 <kore_read_line@plt>
mov    %rax,%r12
test   %rax,%rax
je     13f5 <cli_buildopt_parse+0x225>
cmpb   $0x0,(%r12)
je     1275 <cli_buildopt_parse+0xa5>
cmpq   $0x0,-0x38(%rbp)
je     12e0 <cli_buildopt_parse+0x110>
mov    %r12,%rdi
lea    0xd7d(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     137c <cli_buildopt_parse+0x1ac>
mov    %r12,%rdi
mov    $0x3d,%esi
call   1050 <strchr@plt>
mov    %rax,%r15
test   %rax,%rax
jne    12f9 <cli_buildopt_parse+0x129>
lea    0xd7e(%rip),%rdi
mov    %r12,%rsi
call   1060 <printf@plt>
jmp    1271 <cli_buildopt_parse+0xa1>
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    $0x3d,%esi
call   1050 <strchr@plt>
mov    %rax,%r15
test   %rax,%rax
je     1387 <cli_buildopt_parse+0x1b7>
movb   $0x0,(%r15)
add    $0x1,%r15
mov    %r12,%rdi
call   1040 <strlen@plt>
mov    %r12,%rdi
mov    %rax,%rsi
call   10b0 <kore_text_trim@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    %r15,%rdi
mov    %rax,%rsi
call   10b0 <kore_text_trim@plt>
mov    %rax,%r15
mov    %rbx,%rdi
lea    0xd31(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1261 <cli_buildopt_parse+0x91>
mov    %rbx,%rdi
lea    0xd21(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     136b <cli_buildopt_parse+0x19b>
lea    0xd19(%rip),%rdi
mov    %rbx,%rsi
call   1060 <printf@plt>
jmp    126d <cli_buildopt_parse+0x9d>
mov    -0x38(%rbp),%rdi
mov    %r15,%rsi
call   1080 <cli_buildopt_ldflags@plt>
jmp    126d <cli_buildopt_parse+0x9d>
xor    %eax,%eax
mov    %rax,-0x38(%rbp)
jmp    1275 <cli_buildopt_parse+0xa5>
mov    %r12,%rdi
mov    $0x20,%esi
call   1050 <strchr@plt>
mov    %rax,%r15
test   %rax,%rax
jne    13ad <cli_buildopt_parse+0x1dd>
lea    0xc83(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   10c0 <cli_fatal@plt>
mov    %r15,%rax
add    $0x1,%r15
movb   $0x0,(%rax)
mov    %r15,%rdi
lea    0xc75(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
mov    -0x30(%rbp),%rbx
je     13e0 <cli_buildopt_parse+0x210>
lea    0xc62(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10c0 <cli_fatal@plt>
mov    %r12,%rdi
call   1090 <cli_buildopt_new@plt>
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%r13
jmp    1275 <cli_buildopt_parse+0xa5>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.buildopt = type { i32 }
@BUFSIZ = global i32 0
@.str = [2 x i8] c"r\00"
@.str.1 = [34 x i8] c"cli_buildopt_parse: fopen(%s): %s\00"
@errno = global i32 0
@.str.2 = [2 x i8] c"}\00"
@.str.3 = [16 x i8] c"unexpected '%s'\00"
@.str.4 = [2 x i8] c"{\00"
@.str.5 = [23 x i8] c"expected '{', got '%s'\00"
@.str.6 = [25 x i8] c"bad buildopt line: '%s'\0A\00"
@.str.7 = [7 x i8] c"cflags\00"
@.str.8 = [8 x i8] c"ldflags\00"
@.str.9 = [28 x i8] c"ignoring unknown option %s\0A\00"
define void @cli_buildopt_parse(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca %struct.buildopt*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %2
%9 = load i32, i32* @BUFSIZ
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %5
%12 = alloca i8, i64 %10
store i64 %10, i64* %6
%13 = load i8*, i8** %2
%14 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %14, i32** %3
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %21
16: ; preds = %1
%17 = load i8*, i8** %2
%18 = load i32, i32* @errno
%19 = call i32 @strerror(i32 %18)
%20 = call i32 (i8*, i8*, ...) @cli_fatal(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %17, i32 %19)
br label %21
21: ; preds = %16, %1
store %struct.buildopt* null, %struct.buildopt** %4
br label %22
22: ; preds = %105, %71, %64, %39, %31, %21
%23 = load i32*, i32** %3
%24 = trunc i64 %10 to i32
%25 = call i8* @kore_read_line(i32* %23, i8* %12, i32 %24)
store i8* %25, i8** %7
%26 = icmp ne i8* %25, null
br i1 %26, label %27, label %106
27: ; preds = %22
%28 = load i8*, i8** %7
%29 = call i64 @strlen(i8* %28)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %27
br label %22
32: ; preds = %27
%33 = load %struct.buildopt*, %struct.buildopt** %4
%34 = icmp ne %struct.buildopt* %33, null
br i1 %34, label %35, label %40
35: ; preds = %32
%36 = load i8*, i8** %7
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%38 = icmp ne i64 %37, 0
br i1 %38, label %40, label %39
39: ; preds = %35
store %struct.buildopt* null, %struct.buildopt** %4
br label %22
40: ; preds = %35, %32
%41 = load %struct.buildopt*, %struct.buildopt** %4
%42 = icmp eq %struct.buildopt* %41, null
br i1 %42, label %43, label %67
43: ; preds = %40
%44 = load i8*, i8** %7
%45 = call i8* @strchr(i8* %44, i8 signext 61)
store i8* %45, i8** %8
%46 = icmp ne i8* %45, null
br i1 %46, label %47, label %48
47: ; preds = %43
br label %75
48: ; preds = %43
%49 = load i8*, i8** %7
%50 = call i8* @strchr(i8* %49, i8 signext 32)
store i8* %50, i8** %8
%51 = icmp eq i8* %50, null
br i1 %51, label %52, label %55
52: ; preds = %48
%53 = load i8*, i8** %7
%54 = call i32 (i8*, i8*, ...) @cli_fatal(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %53)
br label %55
55: ; preds = %52, %48
%56 = load i8*, i8** %8
%57 = getelementptr inbounds i8, i8* %56, i32 1
store i8* %57, i8** %8
store i8 0, i8* %56
%58 = load i8*, i8** %8
%59 = call i64 @strcmp(i8* %58, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%60 = icmp ne i64 %59, 0
br i1 %60, label %61, label %64
61: ; preds = %55
%62 = load i8*, i8** %8
%63 = call i32 (i8*, i8*, ...) @cli_fatal(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %62)
br label %64
64: ; preds = %61, %55
%65 = load i8*, i8** %7
%66 = call %struct.buildopt* @cli_buildopt_new(i8* %65)
store %struct.buildopt* %66, %struct.buildopt** %4
br label %22
67: ; preds = %40
%68 = load i8*, i8** %7
%69 = call i8* @strchr(i8* %68, i8 signext 61)
store i8* %69, i8** %8
%70 = icmp eq i8* %69, null
br i1 %70, label %71, label %74
71: ; preds = %67
%72 = load i8*, i8** %7
%73 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %72)
br label %22
74: ; preds = %67
br label %75
75: ; preds = %74, %47
%76 = load i8*, i8** %8
%77 = getelementptr inbounds i8, i8* %76, i32 1
store i8* %77, i8** %8
store i8 0, i8* %76
%78 = load i8*, i8** %7
%79 = load i8*, i8** %7
%80 = call i64 @strlen(i8* %79)
%81 = call i8* @kore_text_trim(i8* %78, i64 %80)
store i8* %81, i8** %7
%82 = load i8*, i8** %8
%83 = load i8*, i8** %8
%84 = call i64 @strlen(i8* %83)
%85 = call i8* @kore_text_trim(i8* %82, i64 %84)
store i8* %85, i8** %8
%86 = load i8*, i8** %7
%87 = call i32 @strcasecmp(i8* %86, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%88 = icmp ne i32 %87, 0
br i1 %88, label %93, label %89
89: ; preds = %75
%90 = load %struct.buildopt*, %struct.buildopt** %4
%91 = load i8*, i8** %8
%92 = call i32 @cli_buildopt_cflags(%struct.buildopt* %90, i8* %91)
br label %105
93: ; preds = %75
%94 = load i8*, i8** %7
%95 = call i32 @strcasecmp(i8* %94, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%96 = icmp ne i32 %95, 0
br i1 %96, label %101, label %97
97: ; preds = %93
%98 = load %struct.buildopt*, %struct.buildopt** %4
%99 = load i8*, i8** %8
%100 = call i32 @cli_buildopt_ldflags(%struct.buildopt* %98, i8* %99)
br label %104
101: ; preds = %93
%102 = load i8*, i8** %7
%103 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i8* %102)
br label %104
104: ; preds = %101, %97
br label %105
105: ; preds = %104, %89
br label %22
106: ; preds = %22
%107 = load i8*, i8** %5
ret void
}

LLVM IR (-O2):
%struct.buildopt = type { i32 }
@BUFSIZ = global i32 0
@.str = [2 x i8] c"r\00"
@.str.1 = [34 x i8] c"cli_buildopt_parse: fopen(%s): %s\00"
@errno = global i32 0
@.str.2 = [2 x i8] c"}\00"
@.str.3 = [16 x i8] c"unexpected '%s'\00"
@.str.4 = [2 x i8] c"{\00"
@.str.5 = [23 x i8] c"expected '{', got '%s'\00"
@.str.6 = [25 x i8] c"bad buildopt line: '%s'\0A\00"
@.str.7 = [7 x i8] c"cflags\00"
@.str.8 = [8 x i8] c"ldflags\00"
@.str.9 = [28 x i8] c"ignoring unknown option %s\0A\00"
define void @cli_buildopt_parse(i8* %0) {
%2 = load i32, i32* @BUFSIZ
%3 = zext i32 %2 to i64
%4 = alloca i8, i64 %3
%5 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @errno
%9 = tail call i32 @strerror(i32 %8)
%10 = tail call i32 (i8*, i8*, ...) @cli_fatal(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 %9)
br label %11
11: ; preds = %7, %1
%12 = call i8* @kore_read_line(i32* %5, i8* %4, i32 %2)
%13 = icmp eq i8* %12, null
br i1 %13, label %72, label %14
14: ; preds = %11, %42
%15 = phi i8* [ %44, %42 ], [ %12, %11 ]
%16 = phi %struct.buildopt* [ %43, %42 ], [ null, %11 ]
%17 = icmp eq %struct.buildopt* %16, null
br label %18
18: ; preds = %14, %51
%19 = phi i8* [ %15, %14 ], [ %52, %51 ]
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 0
br i1 %21, label %51, label %22
22: ; preds = %18
br i1 %17, label %26, label %23
23: ; preds = %22
%24 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %42, label %46
26: ; preds = %22
%27 = call i8* @strchr(i8* %19, i8 signext 61)
%28 = icmp eq i8* %27, null
br i1 %28, label %29, label %54
29: ; preds = %26
%30 = call i8* @strchr(i8* %19, i8 signext 32)
%31 = icmp eq i8* %30, null
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 (i8*, i8*, ...) @cli_fatal(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %19)
br label %34
34: ; preds = %32, %29
%35 = getelementptr inbounds i8, i8* %30, i64 1
store i8 0, i8* %30
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %34
%39 = call i32 (i8*, i8*, ...) @cli_fatal(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %35)
br label %40
40: ; preds = %38, %34
%41 = call %struct.buildopt* @cli_buildopt_new(i8* %19)
br label %42
42: ; preds = %23, %40
%43 = phi %struct.buildopt* [ %41, %40 ], [ null, %23 ]
%44 = call i8* @kore_read_line(i32* %5, i8* %4, i32 %2)
%45 = icmp eq i8* %44, null
br i1 %45, label %72, label %14
46: ; preds = %23
%47 = call i8* @strchr(i8* %19, i8 signext 61)
%48 = icmp eq i8* %47, null
br i1 %48, label %49, label %54
49: ; preds = %46
%50 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %19)
br label %51
51: ; preds = %63, %70, %68, %49, %18
%52 = call i8* @kore_read_line(i32* %5, i8* %4, i32 %2)
%53 = icmp eq i8* %52, null
br i1 %53, label %72, label %18
54: ; preds = %46, %26
%55 = phi i8* [ %27, %26 ], [ %47, %46 ]
%56 = getelementptr inbounds i8, i8* %55, i64 1
store i8 0, i8* %55
%57 = call i64 @strlen(i8* %19)
%58 = call i8* @kore_text_trim(i8* %19, i64 %57)
%59 = call i64 @strlen(i8* %56)
%60 = call i8* @kore_text_trim(i8* %56, i64 %59)
%61 = call i32 @strcasecmp(i8* %58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %54
%64 = call i32 @cli_buildopt_cflags(%struct.buildopt* %16, i8* %60)
br label %51
65: ; preds = %54
%66 = call i32 @strcasecmp(i8* %58, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 @cli_buildopt_ldflags(%struct.buildopt* %16, i8* %60)
br label %51
70: ; preds = %65
%71 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i8* %58)
br label %51
72: ; preds = %42, %51, %11
ret void
}