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


x86 assembly (clang, -O0):
<test_nmea_copy_field>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
lea    -0x110(%rbp),%rdi
lea    0xe97(%rip),%rsi
call   1030 <strcpy@plt>
movb   $0x0,-0x210(%rbp)
lea    -0x110(%rbp),%rax
mov    %rax,-0x218(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x218(%rbp),%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    -0x210(%rbp),%rdi
lea    0xe87(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     11d9 <test_nmea_copy_field+0x89>
mov    0x2e21(%rip),%rax
mov    (%rax),%edi
lea    0xe6f(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147e <test_nmea_copy_field+0x32e>
mov    -0x218(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x218(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x218(%rbp),%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    -0x210(%rbp),%rdi
lea    0xe42(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1242 <test_nmea_copy_field+0xf2>
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
lea    0xe25(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147e <test_nmea_copy_field+0x32e>
mov    -0x218(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x218(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x218(%rbp),%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    -0x210(%rbp),%rdi
lea    0xdd9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     12ab <test_nmea_copy_field+0x15b>
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
lea    0xdd9(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147e <test_nmea_copy_field+0x32e>
mov    -0x218(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x218(%rbp)
mov    -0x218(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x218(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x218(%rbp),%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    -0x210(%rbp),%rdi
lea    0xd99(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1327 <test_nmea_copy_field+0x1d7>
mov    0x2cd3(%rip),%rax
mov    (%rax),%edi
lea    0xd7c(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147e <test_nmea_copy_field+0x32e>
mov    -0x218(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x218(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x218(%rbp),%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    -0x210(%rbp),%rdi
lea    0xd4f(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1390 <test_nmea_copy_field+0x240>
mov    0x2c6a(%rip),%rax
mov    (%rax),%edi
lea    0xd4d(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147e <test_nmea_copy_field+0x32e>
mov    -0x218(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x218(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x218(%rbp),%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    -0x210(%rbp),%rdi
lea    0xd20(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     13f9 <test_nmea_copy_field+0x2a9>
mov    0x2c01(%rip),%rax
mov    (%rax),%edi
lea    0xd03(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147e <test_nmea_copy_field+0x32e>
mov    -0x218(%rbp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,-0x218(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x218(%rbp),%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    -0x210(%rbp),%rdi
lea    0xbfb(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1462 <test_nmea_copy_field+0x312>
mov    0x2b98(%rip),%rax
mov    (%rax),%edi
lea    0xcb7(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    147e <test_nmea_copy_field+0x32e>
mov    0x2b77(%rip),%rax
mov    (%rax),%edi
lea    0xcb3(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nmea_copy_field>:
push   %r14
push   %rbx
sub    $0x208,%rsp
lea    0xe9f(%rip),%rsi
lea    0x100(%rsp),%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
movb   $0x0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    0xea1(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11b1 <test_nmea_copy_field+0x61>
mov    0x2e3d(%rip),%rax
mov    (%rax),%edi
lea    0xe8b(%rip),%rsi
jmp    135d <test_nmea_copy_field+0x20d>
lea    0x100(%rsp),%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    0xe79(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11fd <test_nmea_copy_field+0xad>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
lea    0xe5e(%rip),%rsi
jmp    135d <test_nmea_copy_field+0x20d>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    0xe32(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1244 <test_nmea_copy_field+0xf4>
mov    0x2daa(%rip),%rax
mov    (%rax),%edi
lea    0xe34(%rip),%rsi
jmp    135d <test_nmea_copy_field+0x20d>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    0xe1f(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1293 <test_nmea_copy_field+0x143>
mov    0x2d5b(%rip),%rax
mov    (%rax),%edi
lea    0xe04(%rip),%rsi
jmp    135d <test_nmea_copy_field+0x20d>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    0xdf7(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12da <test_nmea_copy_field+0x18a>
mov    0x2d14(%rip),%rax
mov    (%rax),%edi
lea    0xdf7(%rip),%rsi
jmp    135d <test_nmea_copy_field+0x20d>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
mov    %rax,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    0xdea(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     131e <test_nmea_copy_field+0x1ce>
mov    0x2ccd(%rip),%rax
mov    (%rax),%edi
lea    0xdcf(%rip),%rsi
jmp    135d <test_nmea_copy_field+0x20d>
mov    %rbx,%rdi
call   1060 <nmea_next_field@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0xfe,%edx
call   1070 <nmea_copy_field@plt>
lea    0xced(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    0x2c91(%rip),%rcx
mov    (%rcx),%edi
test   %rax,%rax
je     136f <test_nmea_copy_field+0x21f>
lea    0xdab(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret
lea    0xdaf(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%eax
jmp    1364 <test_nmea_copy_field+0x214>

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_copy_field() 1: Failed\0A\00"
@.str.3 = [2 x i8] c"1\00"
@.str.4 = [29 x i8] c"nmea_copy_field() 2: Failed\0A\00"
@.str.5 = [29 x i8] c"nmea_copy_field() 3: Failed\0A\00"
@.str.6 = [2 x i8] c"A\00"
@.str.7 = [29 x i8] c"nmea_copy_field() 4: Failed\0A\00"
@.str.8 = [29 x i8] c"19NWoq000Wrt<RJHEuuqiWlN061d\00"
@.str.9 = [29 x i8] c"nmea_copy_field() 5: Failed\0A\00"
@.str.10 = [2 x i8] c"0\00"
@.str.11 = [29 x i8] c"nmea_copy_field() 6: Failed\0A\00"
@.str.12 = [3 x i8] c"5F\00"
@.str.13 = [29 x i8] c"nmea_copy_field() 7: Failed\0A\00"
@.str.14 = [27 x i8] c"nmea_copy_field(): Passed\0A\00"
define i32 @test_nmea_copy_field() {
%1 = alloca i32
%2 = alloca [255 x i8]
%3 = alloca [255 x i8]
%4 = alloca i8*
%5 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%6 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
store i8 0, i8* %7
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
store i8* %8, i8** %4
%9 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%10 = load i8*, i8** %4
%11 = call i32 @nmea_copy_field(i8* %9, i8* %10, i32 254)
%12 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%13 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %0
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %95
18: ; preds = %0
%19 = load i8*, i8** %4
%20 = call i8* @nmea_next_field(i8* %19)
store i8* %20, i8** %4
%21 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%22 = load i8*, i8** %4
%23 = call i32 @nmea_copy_field(i8* %21, i8* %22, i32 254)
%24 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%25 = call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %18
%28 = load i32, i32* @stderr
%29 = call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %1
br label %95
30: ; preds = %18
%31 = load i8*, i8** %4
%32 = call i8* @nmea_next_field(i8* %31)
store i8* %32, i8** %4
%33 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%34 = load i8*, i8** %4
%35 = call i32 @nmea_copy_field(i8* %33, i8* %34, i32 254)
%36 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %30
%40 = load i32, i32* @stderr
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %1
br label %95
42: ; preds = %30
%43 = load i8*, i8** %4
%44 = call i8* @nmea_next_field(i8* %43)
store i8* %44, i8** %4
%45 = load i8*, i8** %4
%46 = call i8* @nmea_next_field(i8* %45)
store i8* %46, i8** %4
%47 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%48 = load i8*, i8** %4
%49 = call i32 @nmea_copy_field(i8* %47, i8* %48, i32 254)
%50 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%51 = call i64 @strcmp(i8* %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%52 = icmp ne i64 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %42
%54 = load i32, i32* @stderr
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %1
br label %95
56: ; preds = %42
%57 = load i8*, i8** %4
%58 = call i8* @nmea_next_field(i8* %57)
store i8* %58, i8** %4
%59 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%60 = load i8*, i8** %4
%61 = call i32 @nmea_copy_field(i8* %59, i8* %60, i32 254)
%62 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%63 = call i64 @strcmp(i8* %62, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%64 = icmp ne i64 %63, 0
br i1 %64, label %65, label %68
65: ; preds = %56
%66 = load i32, i32* @stderr
%67 = call i32 @fprintf(i32 %66, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %1
br label %95
68: ; preds = %56
%69 = load i8*, i8** %4
%70 = call i8* @nmea_next_field(i8* %69)
store i8* %70, i8** %4
%71 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%72 = load i8*, i8** %4
%73 = call i32 @nmea_copy_field(i8* %71, i8* %72, i32 254)
%74 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%75 = call i64 @strcmp(i8* %74, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%76 = icmp ne i64 %75, 0
br i1 %76, label %77, label %80
77: ; preds = %68
%78 = load i32, i32* @stderr
%79 = call i32 @fprintf(i32 %78, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %1
br label %95
80: ; preds = %68
%81 = load i8*, i8** %4
%82 = call i8* @nmea_next_field(i8* %81)
store i8* %82, i8** %4
%83 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%84 = load i8*, i8** %4
%85 = call i32 @nmea_copy_field(i8* %83, i8* %84, i32 254)
%86 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%87 = call i64 @strcmp(i8* %86, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%88 = icmp ne i64 %87, 0
br i1 %88, label %89, label %92
89: ; preds = %80
%90 = load i32, i32* @stderr
%91 = call i32 @fprintf(i32 %90, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %1
br label %95
92: ; preds = %80
%93 = load i32, i32* @stderr
%94 = call i32 @fprintf(i32 %93, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0))
store i32 1, i32* %1
br label %95
95: ; preds = %92, %89, %77, %65, %53, %39, %27, %15
%96 = load i32, i32* %1
ret i32 %96
}

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