#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*/ *strchr(char *const, char);
unsigned int pipe_info_clp_count(int const start_argc, int const argc,
                                 char *const argv[]) {
  unsigned int cnt = 0;
  for (int i = start_argc; i < argc; ++i) {
    if (argv[i][0] == '{' && strchr(argv[i], '>') != NULL) {
      ++cnt;
    }
  }
  return cnt;
}


x86 assembly (clang, -O0):
<pipe_info_clp_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    118f <pipe_info_clp_count+0x7f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x7b,%eax
jne    117c <pipe_info_clp_count+0x6c>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x3e,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     117c <pipe_info_clp_count+0x6c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1181 <pipe_info_clp_count+0x71>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112f <pipe_info_clp_count+0x1f>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipe_info_clp_count>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %ebp,%ebp
cmp    %esi,%edi
jge    1155 <pipe_info_clp_count+0x45>
mov    %esi,%r15d
movslq %edi,%rax
lea    (%rdx,%rax,8),%r14
sub    %edi,%r15d
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    1139 <pipe_info_clp_count+0x29>
add    $0x1,%rbx
cmp    %ebx,%r15d
je     1155 <pipe_info_clp_count+0x45>
mov    (%r14,%rbx,8),%rdi
cmpb   $0x7b,(%rdi)
jne    1130 <pipe_info_clp_count+0x20>
mov    $0x3e,%esi
call   1030 <strchr@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
jmp    1130 <pipe_info_clp_count+0x20>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pipe_info_clp_count(i32 %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
store i32 0, i32* %7
%9 = load i32, i32* %4
store i32 %9, i32* %8
br label %10
10: ; preds = %36, %3
%11 = load i32, i32* %8
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %39
14: ; preds = %10
%15 = load i8**, i8*** %6
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i64 0
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 123
br i1 %23, label %24, label %35
24: ; preds = %14
%25 = load i8**, i8*** %6
%26 = load i32, i32* %8
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8*, i8** %25, i64 %27
%29 = load i8*, i8** %28
%30 = call i32* @strchr(i8* %29, i8 signext 62)
%31 = icmp ne i32* %30, null
br i1 %31, label %32, label %35
32: ; preds = %24
%33 = load i32, i32* %7
%34 = add i32 %33, 1
store i32 %34, i32* %7
br label %35
35: ; preds = %32, %24, %14
br label %36
36: ; preds = %35
%37 = load i32, i32* %8
%38 = add nsw i32 %37, 1
store i32 %38, i32* %8
br label %10
39: ; preds = %10
%40 = load i32, i32* %7
ret i32 %40
}

LLVM IR (-O2):
define i32 @pipe_info_clp_count(i32 %0, i32 %1, i8** nocapture %2) {
%4 = icmp slt i32 %0, %1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = sext i32 %0 to i64
br label %9
7: ; preds = %21, %3
%8 = phi i32 [ 0, %3 ], [ %22, %21 ]
ret i32 %8
9: ; preds = %5, %21
%10 = phi i64 [ %6, %5 ], [ %23, %21 ]
%11 = phi i32 [ 0, %5 ], [ %22, %21 ]
%12 = getelementptr inbounds i8*, i8** %2, i64 %10
%13 = load i8*, i8** %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 123
br i1 %15, label %16, label %21
16: ; preds = %9
%17 = tail call i32* @strchr(i8* %13, i8 signext 62)
%18 = icmp ne i32* %17, null
%19 = zext i1 %18 to i32
%20 = add i32 %11, %19
br label %21
21: ; preds = %16, %9
%22 = phi i32 [ %11, %9 ], [ %20, %16 ]
%23 = add nsw i64 %10, 1
%24 = trunc i64 %23 to i32
%25 = icmp eq i32 %24, %1
br i1 %25, label %7, label %9
}