#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 lineFile {
  int dummy;
};

/* Variables and functions */
scalar_t__ lineFileNextReal(struct lineFile *, char **);
int /*<<< orphan*/ lineFileReuse(struct lineFile *);
scalar_t__ startsWith(char *, char *);
int /*<<< orphan*/ verbose(int, char *, char *);
void lineFileRemoveInitialCustomTrackLines(struct lineFile *lf) {
  char *line;
  while (lineFileNextReal(lf, &line)) {
    if (!(startsWith("browser", line) || startsWith("track", line))) {
      verbose(2, "found line not browser or track: %s\n", line);
      lineFileReuse(lf);
      break;
    }
    verbose(2, "skipping %s\n", line);
  }
}


x86 assembly (clang, -O0):
<lineFileRemoveInitialCustomTrackLines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <lineFileNextReal@plt>
cmp    $0x0,%rax
je     11d4 <lineFileRemoveInitialCustomTrackLines+0x94>
mov    -0x10(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1030 <startsWith@plt>
cmp    $0x0,%rax
jne    11ba <lineFileRemoveInitialCustomTrackLines+0x7a>
mov    -0x10(%rbp),%rsi
lea    0xe80(%rip),%rdi
call   1030 <startsWith@plt>
cmp    $0x0,%rax
jne    11ba <lineFileRemoveInitialCustomTrackLines+0x7a>
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
lea    0xe67(%rip),%rsi
call   1060 <verbose@plt>
mov    -0x8(%rbp),%rdi
call   1040 <lineFileReuse@plt>
jmp    11d4 <lineFileRemoveInitialCustomTrackLines+0x94>
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
lea    0xe69(%rip),%rsi
call   1060 <verbose@plt>
jmp    114c <lineFileRemoveInitialCustomTrackLines+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lineFileRemoveInitialCustomTrackLines>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1050 <lineFileNextReal@plt>
test   %rax,%rax
je     11e4 <lineFileRemoveInitialCustomTrackLines+0xa4>
lea    0xe96(%rip),%r14
lea    0xe97(%rip),%r15
lea    0xebb(%rip),%r12
lea    0x8(%rsp),%r13
jmp    11a2 <lineFileRemoveInitialCustomTrackLines+0x62>
nop
mov    0x8(%rsp),%rdx
mov    $0x2,%edi
mov    %r12,%rsi
call   1060 <verbose@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <lineFileNextReal@plt>
test   %rax,%rax
je     11e4 <lineFileRemoveInitialCustomTrackLines+0xa4>
mov    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1030 <startsWith@plt>
test   %rax,%rax
jne    1180 <lineFileRemoveInitialCustomTrackLines+0x40>
mov    0x8(%rsp),%rsi
mov    %r15,%rdi
call   1030 <startsWith@plt>
test   %rax,%rax
jne    1180 <lineFileRemoveInitialCustomTrackLines+0x40>
mov    0x8(%rsp),%rdx
lea    0xe3c(%rip),%rsi
mov    $0x2,%edi
call   1060 <verbose@plt>
mov    %rbx,%rdi
call   1040 <lineFileReuse@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.lineFile = type { i32 }
@.str = [8 x i8] c"browser\00"
@.str.1 = [6 x i8] c"track\00"
@.str.2 = [37 x i8] c"found line not browser or track: %s\0A\00"
@.str.3 = [13 x i8] c"skipping %s\0A\00"
define void @lineFileRemoveInitialCustomTrackLines(%struct.lineFile* %0) {
%2 = alloca %struct.lineFile*
%3 = alloca i8*
store %struct.lineFile* %0, %struct.lineFile** %2
br label %4
4: ; preds = %21, %1
%5 = load %struct.lineFile*, %struct.lineFile** %2
%6 = call i64 @lineFileNextReal(%struct.lineFile* %5, i8** %3)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %24
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = call i64 @startsWith(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %21, label %12
12: ; preds = %8
%13 = load i8*, i8** %3
%14 = call i64 @startsWith(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %21, label %16
16: ; preds = %12
%17 = load i8*, i8** %3
%18 = call i32 @verbose(i32 2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %17)
%19 = load %struct.lineFile*, %struct.lineFile** %2
%20 = call i32 @lineFileReuse(%struct.lineFile* %19)
br label %24
21: ; preds = %12, %8
%22 = load i8*, i8** %3
%23 = call i32 @verbose(i32 2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %22)
br label %4
24: ; preds = %16, %4
ret void
}

LLVM IR (-O2):
%struct.lineFile = type { i32 }
@.str = [8 x i8] c"browser\00"
@.str.1 = [6 x i8] c"track\00"
@.str.2 = [37 x i8] c"found line not browser or track: %s\0A\00"
@.str.3 = [13 x i8] c"skipping %s\0A\00"
define void @lineFileRemoveInitialCustomTrackLines(%struct.lineFile* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @lineFileNextReal(%struct.lineFile* %0, i8** %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %23, label %6
6: ; preds = %1, %18
%7 = load i8*, i8** %2
%8 = call i64 @startsWith(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i8*, i8** %2
%12 = call i64 @startsWith(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8*, i8** %2
%16 = call i32 @verbose(i32 2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = call i32 @lineFileReuse(%struct.lineFile* %0)
br label %23
18: ; preds = %10, %6
%19 = load i8*, i8** %2
%20 = call i32 @verbose(i32 2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %19)
%21 = call i64 @lineFileNextReal(%struct.lineFile* %0, i8** %2)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %6
23: ; preds = %18, %1, %14
ret void
}