#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*/ fprintf(int /*<<< orphan*/, char *);
char *nmea_next_field(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strncmp(char *, char *, int);
int test_nmea_next_field(void) {
  char buf[255];
  char *p;
  strcpy(buf, "!AIVDM,1,1,,A,19NWoq000Wrt<RJHEuuqiWlN061d,0*5F");
  p = buf;
  if (strncmp(p, "!AIVDM", 6) != 0) {
    fprintf(stderr, "nmea_next_field() 1: Failed\n");
    return 0;
  }
  p = nmea_next_field(p);
  if (strncmp(p, "1,", 2) != 0) {
    fprintf(stderr, "nmea_next_field() 2: Failed\n");
    return 0;
  }
  p = nmea_next_field(p);
  if (strncmp(p, "1,", 2) != 0) {
    fprintf(stderr, "nmea_next_field() 3: Failed\n");
    return 0;
  }
  p = nmea_next_field(p);
  if (strncmp(p, ",", 1) != 0) {
    fprintf(stderr, "nmea_next_field() 4: Failed\n");
    return 0;
  }
  p = nmea_next_field(p);
  if (strncmp(p, "A,", 2) != 0) {
    fprintf(stderr, "nmea_next_field() 5: Failed\n");
    return 0;
  }
  p = nmea_next_field(p);
  if (strncmp(p, "19NWoq000Wrt<RJHEuuqiWlN061d", 27) != 0) {
    fprintf(stderr, "nmea_next_field() 6: Failed\n");
    return 0;
  }
  p = nmea_next_field(p);
  if (strncmp(p, "0*", 2) != 0) {
    fprintf(stderr, "nmea_next_field() 7: Failed\n");
    return 0;
  }
  p = nmea_next_field(p);
  if (strncmp(p, "5F", 2) != 0) {
    fprintf(stderr, "nmea_next_field() 8: Failed\n");
    return 0;
  }
  fprintf(stderr, "nmea_next_field(): Passed\n");
  return 1;
}


x86 assembly (clang, -O0):
<test_nmea_next_field>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
lea    -0x110(%rbp),%rdi
lea    0xea7(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x110(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     11af <test_nmea_next_field+0x6f>
mov    0x2e4b(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1425 <test_nmea_next_field+0x2e5>
mov    -0x118(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rdi
lea    0xe84(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1205 <test_nmea_next_field+0xc5>
mov    0x2df5(%rip),%rax
mov    (%rax),%edi
lea    0xe63(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1425 <test_nmea_next_field+0x2e5>
mov    -0x118(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rdi
lea    0xe2e(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     125b <test_nmea_next_field+0x11b>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
lea    0xe2a(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1425 <test_nmea_next_field+0x2e5>
mov    -0x118(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rdi
lea    0xdd9(%rip),%rsi
mov    $0x1,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     12b1 <test_nmea_next_field+0x171>
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
lea    0xdf1(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1425 <test_nmea_next_field+0x2e5>
mov    -0x118(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rdi
lea    0xddc(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1307 <test_nmea_next_field+0x1c7>
mov    0x2cf3(%rip),%rax
mov    (%rax),%edi
lea    0xdbb(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1425 <test_nmea_next_field+0x2e5>
mov    -0x118(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rdi
lea    0xda6(%rip),%rsi
mov    $0x1b,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     135d <test_nmea_next_field+0x21d>
mov    0x2c9d(%rip),%rax
mov    (%rax),%edi
lea    0xd9f(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1425 <test_nmea_next_field+0x2e5>
mov    -0x118(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rdi
lea    0xd8a(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     13b3 <test_nmea_next_field+0x273>
mov    0x2c47(%rip),%rax
mov    (%rax),%edi
lea    0xd69(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1425 <test_nmea_next_field+0x2e5>
mov    -0x118(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rdi
lea    0xc59(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1409 <test_nmea_next_field+0x2c9>
mov    0x2bf1(%rip),%rax
mov    (%rax),%edi
lea    0xd30(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1425 <test_nmea_next_field+0x2e5>
mov    0x2bd0(%rip),%rax
mov    (%rax),%edi
lea    0xd2c(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nmea_next_field>:
push   %rbx
sub    $0x100,%rsp
lea    0xeb1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1188 <test_nmea_next_field+0x48>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
jmp    1309 <test_nmea_next_field+0x1c9>
mov    %rsp,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
lea    0xeba(%rip),%rsi
mov    %rax,%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11c1 <test_nmea_next_field+0x81>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
lea    0xe9b(%rip),%rsi
jmp    1309 <test_nmea_next_field+0x1c9>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
lea    0xe81(%rip),%rsi
mov    %rax,%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11fa <test_nmea_next_field+0xba>
mov    0x2df4(%rip),%rax
mov    (%rax),%edi
lea    0xe7f(%rip),%rsi
jmp    1309 <test_nmea_next_field+0x1c9>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
lea    0xe49(%rip),%rsi
mov    %rax,%rdi
mov    $0x1,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1233 <test_nmea_next_field+0xf3>
mov    0x2dbb(%rip),%rax
mov    (%rax),%edi
lea    0xe63(%rip),%rsi
jmp    1309 <test_nmea_next_field+0x1c9>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
lea    0xe69(%rip),%rsi
mov    %rax,%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     126c <test_nmea_next_field+0x12c>
mov    0x2d82(%rip),%rax
mov    (%rax),%edi
lea    0xe4a(%rip),%rsi
jmp    1309 <test_nmea_next_field+0x1c9>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
lea    0xe50(%rip),%rsi
mov    %rax,%rdi
mov    $0x1b,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12a2 <test_nmea_next_field+0x162>
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
lea    0xe4b(%rip),%rsi
jmp    1309 <test_nmea_next_field+0x1c9>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
lea    0xe54(%rip),%rsi
mov    %rax,%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12d8 <test_nmea_next_field+0x198>
mov    0x2d13(%rip),%rax
mov    (%rax),%edi
lea    0xe35(%rip),%rsi
jmp    1309 <test_nmea_next_field+0x1c9>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
lea    0xd46(%rip),%rsi
mov    %rax,%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
mov    0x2ce5(%rip),%rcx
mov    (%rcx),%edi
test   %rax,%rax
je     1319 <test_nmea_next_field+0x1d9>
lea    0xe1f(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret
lea    0xe25(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%eax
jmp    1310 <test_nmea_next_field+0x1d0>

LLVM IR (-O0):
@.str = [48 x i8] c"!AIVDM,1,1,,A,19NWoq000Wrt<RJHEuuqiWlN061d,0*5F\00"
@.str.1 = [7 x i8] c"!AIVDM\00"
@stderr = global i32 0
@.str.2 = [29 x i8] c"nmea_next_field() 1: Failed\0A\00"
@.str.3 = [3 x i8] c"1,\00"
@.str.4 = [29 x i8] c"nmea_next_field() 2: Failed\0A\00"
@.str.5 = [29 x i8] c"nmea_next_field() 3: Failed\0A\00"
@.str.6 = [2 x i8] c",\00"
@.str.7 = [29 x i8] c"nmea_next_field() 4: Failed\0A\00"
@.str.8 = [3 x i8] c"A,\00"
@.str.9 = [29 x i8] c"nmea_next_field() 5: Failed\0A\00"
@.str.10 = [29 x i8] c"19NWoq000Wrt<RJHEuuqiWlN061d\00"
@.str.11 = [29 x i8] c"nmea_next_field() 6: Failed\0A\00"
@.str.12 = [3 x i8] c"0*\00"
@.str.13 = [29 x i8] c"nmea_next_field() 7: Failed\0A\00"
@.str.14 = [3 x i8] c"5F\00"
@.str.15 = [29 x i8] c"nmea_next_field() 8: Failed\0A\00"
@.str.16 = [27 x i8] c"nmea_next_field(): Passed\0A\00"
define i32 @test_nmea_next_field() {
%1 = alloca i32
%2 = alloca [255 x i8]
%3 = alloca i8*
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %79
13: ; preds = %0
%14 = load i8*, i8** %3
%15 = call i8* @nmea_next_field(i8* %14)
store i8* %15, i8** %3
%16 = load i8*, i8** %3
%17 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %13
%20 = load i32, i32* @stderr
%21 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %1
br label %79
22: ; preds = %13
%23 = load i8*, i8** %3
%24 = call i8* @nmea_next_field(i8* %23)
store i8* %24, i8** %3
%25 = load i8*, i8** %3
%26 = call i64 @strncmp(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %22
%29 = load i32, i32* @stderr
%30 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %1
br label %79
31: ; preds = %22
%32 = load i8*, i8** %3
%33 = call i8* @nmea_next_field(i8* %32)
store i8* %33, i8** %3
%34 = load i8*, i8** %3
%35 = call i64 @strncmp(i8* %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32 1)
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %31
%38 = load i32, i32* @stderr
%39 = call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %1
br label %79
40: ; preds = %31
%41 = load i8*, i8** %3
%42 = call i8* @nmea_next_field(i8* %41)
store i8* %42, i8** %3
%43 = load i8*, i8** %3
%44 = call i64 @strncmp(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 2)
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %40
%47 = load i32, i32* @stderr
%48 = call i32 @fprintf(i32 %47, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %1
br label %79
49: ; preds = %40
%50 = load i8*, i8** %3
%51 = call i8* @nmea_next_field(i8* %50)
store i8* %51, i8** %3
%52 = load i8*, i8** %3
%53 = call i64 @strncmp(i8* %52, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0), i32 27)
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %58
55: ; preds = %49
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %1
br label %79
58: ; preds = %49
%59 = load i8*, i8** %3
%60 = call i8* @nmea_next_field(i8* %59)
store i8* %60, i8** %3
%61 = load i8*, i8** %3
%62 = call i64 @strncmp(i8* %61, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32 2)
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %58
%65 = load i32, i32* @stderr
%66 = call i32 @fprintf(i32 %65, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %1
br label %79
67: ; preds = %58
%68 = load i8*, i8** %3
%69 = call i8* @nmea_next_field(i8* %68)
store i8* %69, i8** %3
%70 = load i8*, i8** %3
%71 = call i64 @strncmp(i8* %70, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i32 2)
%72 = icmp ne i64 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %67
%74 = load i32, i32* @stderr
%75 = call i32 @fprintf(i32 %74, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0))
store i32 0, i32* %1
br label %79
76: ; preds = %67
%77 = load i32, i32* @stderr
%78 = call i32 @fprintf(i32 %77, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.16, i64 0, i64 0))
store i32 1, i32* %1
br label %79
79: ; preds = %76, %73, %64, %55, %46, %37, %28, %19, %10
%80 = load i32, i32* %1
ret i32 %80
}

LLVM IR (-O2):
@.str = [48 x i8] c"!AIVDM,1,1,,A,19NWoq000Wrt<RJHEuuqiWlN061d,0*5F\00"
@.str.1 = [7 x i8] c"!AIVDM\00"
@stderr = global i32 0
@.str.2 = [29 x i8] c"nmea_next_field() 1: Failed\0A\00"
@.str.3 = [3 x i8] c"1,\00"
@.str.4 = [29 x i8] c"nmea_next_field() 2: Failed\0A\00"
@.str.5 = [29 x i8] c"nmea_next_field() 3: Failed\0A\00"
@.str.6 = [2 x i8] c",\00"
@.str.7 = [29 x i8] c"nmea_next_field() 4: Failed\0A\00"
@.str.8 = [3 x i8] c"A,\00"
@.str.9 = [29 x i8] c"nmea_next_field() 5: Failed\0A\00"
@.str.10 = [29 x i8] c"19NWoq000Wrt<RJHEuuqiWlN061d\00"
@.str.11 = [29 x i8] c"nmea_next_field() 6: Failed\0A\00"
@.str.12 = [3 x i8] c"0*\00"
@.str.13 = [29 x i8] c"nmea_next_field() 7: Failed\0A\00"
@.str.14 = [3 x i8] c"5F\00"
@.str.15 = [29 x i8] c"nmea_next_field() 8: Failed\0A\00"
@.str.16 = [27 x i8] c"nmea_next_field(): Passed\0A\00"
define i32 @test_nmea_next_field() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%4 = call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %60
9: ; preds = %0
%10 = call i8* @nmea_next_field(i8* %2)
%11 = call i64 @strncmp(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
%12 = icmp eq i64 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %9
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
br label %60
16: ; preds = %9
%17 = call i8* @nmea_next_field(i8* %10)
%18 = call i64 @strncmp(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
%19 = icmp eq i64 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %16
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
br label %60
23: ; preds = %16
%24 = call i8* @nmea_next_field(i8* %17)
%25 = call i64 @strncmp(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32 1)
%26 = icmp eq i64 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %23
%28 = load i32, i32* @stderr
%29 = call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
br label %60
30: ; preds = %23
%31 = call i8* @nmea_next_field(i8* %24)
%32 = call i64 @strncmp(i8* %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 2)
%33 = icmp eq i64 %32, 0
br i1 %33, label %37, label %34
34: ; preds = %30
%35 = load i32, i32* @stderr
%36 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
br label %60
37: ; preds = %30
%38 = call i8* @nmea_next_field(i8* %31)
%39 = call i64 @strncmp(i8* %38, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0), i32 27)
%40 = icmp eq i64 %39, 0
br i1 %40, label %44, label %41
41: ; preds = %37
%42 = load i32, i32* @stderr
%43 = call i32 @fprintf(i32 %42, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
br label %60
44: ; preds = %37
%45 = call i8* @nmea_next_field(i8* %38)
%46 = call i64 @strncmp(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32 2)
%47 = icmp eq i64 %46, 0
br i1 %47, label %51, label %48
48: ; preds = %44
%49 = load i32, i32* @stderr
%50 = call i32 @fprintf(i32 %49, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0))
br label %60
51: ; preds = %44
%52 = call i8* @nmea_next_field(i8* %45)
%53 = call i64 @strncmp(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i32 2)
%54 = icmp eq i64 %53, 0
%55 = load i32, i32* @stderr
br i1 %54, label %58, label %56
56: ; preds = %51
%57 = call i32 @fprintf(i32 %55, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0))
br label %60
58: ; preds = %51
%59 = call i32 @fprintf(i32 %55, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.16, i64 0, i64 0))
br label %60
60: ; preds = %58, %56, %48, %41, %34, %27, %20, %13, %6
%61 = phi i32 [ 0, %6 ], [ 0, %13 ], [ 0, %20 ], [ 0, %27 ], [ 0, %34 ], [ 0, %41 ], [ 0, %48 ], [ 0, %56 ], [ 1, %58 ]
ret i32 %61
}