#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*/ is_fatal(int, char *);
char *strchr(char *, char);
void nmn4_check_line(char *line) {
  char *c = line;
  int i = 0;
  while ((c = strchr(c, '|'))) {
    c++;
    i++;
  }
  is_fatal((i != 15), "navigon"
                      ": Invalid or unknown structure!");
}


x86 assembly (clang, -O0):
<nmn4_check_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x7c,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1171 <nmn4_check_line+0x51>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113b <nmn4_check_line+0x1b>
cmpl   $0xf,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe7c(%rip),%rsi
call   1040 <is_fatal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmn4_check_line>:
push   %rbx
mov    $0x7c,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1163 <nmn4_check_line+0x43>
mov    $0xf,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
mov    %rax,%rdi
mov    $0x7c,%esi
call   1030 <strchr@plt>
add    $0xffffffff,%ebx
test   %rax,%rax
jne    1140 <nmn4_check_line+0x20>
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
jmp    1168 <nmn4_check_line+0x48>
mov    $0x1,%edi
lea    0xe91(%rip),%rsi
pop    %rbx
jmp    1040 <is_fatal@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"navigon: Invalid or unknown structure!\00"
define void @nmn4_check_line(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
store i32 0, i32* %4
br label %6
6: ; preds = %10, %1
%7 = load i8*, i8** %3
%8 = call i8* @strchr(i8* %7, i8 signext 124)
store i8* %8, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
br label %6
15: ; preds = %6
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 15
%18 = zext i1 %17 to i32
%19 = call i32 @is_fatal(i32 %18, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"navigon: Invalid or unknown structure!\00"
define void @nmn4_check_line(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 124)
%3 = icmp eq i8* %2, null
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %9, %4 ], [ %2, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = add nuw nsw i32 %6, 1
%9 = tail call i8* @strchr(i8* dereferenceable(1) %7, i8 signext 124)
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4
%12 = icmp ne i32 %8, 15
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %11, %1
%15 = phi i32 [ 1, %1 ], [ %13, %11 ]
%16 = tail call i32 @is_fatal(i32 %15, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}