#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 */
scalar_t__ piece_quote_comma(char *, char *, int);
scalar_t__ string_strcmp(char *, char *);
int piece_quote_comma_seek(char *quote_comma_row, char *label) {
  int p;
  char destination[1024];
  for (p = 0; piece_quote_comma(destination, quote_comma_row, p); p++) {
    if (string_strcmp(destination, label) == 0)
      return p;
  }
  return -1;
}


x86 assembly (clang, -O0):
<piece_quote_comma_seek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <piece_quote_comma@plt>
cmp    $0x0,%rax
je     118f <piece_quote_comma_seek+0x6f>
lea    -0x420(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <string_strcmp@plt>
cmp    $0x0,%rax
jne    117c <piece_quote_comma_seek+0x5c>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1196 <piece_quote_comma_seek+0x76>
jmp    1181 <piece_quote_comma_seek+0x61>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113a <piece_quote_comma_seek+0x1a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piece_quote_comma_seek>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%r14
mov    %rdi,%r12
mov    %rsp,%rdi
xor    %ebp,%ebp
mov    %r12,%rsi
xor    %edx,%edx
call   1030 <piece_quote_comma@plt>
mov    $0xffffffff,%r15d
test   %rax,%rax
je     118a <piece_quote_comma_seek+0x6a>
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <string_strcmp@plt>
test   %rax,%rax
je     1187 <piece_quote_comma_seek+0x67>
add    $0x1,%ebp
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   1030 <piece_quote_comma@plt>
test   %rax,%rax
jne    1160 <piece_quote_comma_seek+0x40>
jmp    118a <piece_quote_comma_seek+0x6a>
mov    %ebp,%r15d
mov    %r15d,%eax
add    $0x400,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @piece_quote_comma_seek(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [1024 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 0, i32* %6
br label %8
8: ; preds = %22, %2
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %4
%11 = load i32, i32* %6
%12 = call i64 @piece_quote_comma(i8* %9, i8* %10, i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %25
14: ; preds = %8
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%16 = load i8*, i8** %5
%17 = call i64 @string_strcmp(i8* %15, i8* %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %14
%20 = load i32, i32* %6
store i32 %20, i32* %3
br label %26
21: ; preds = %14
br label %22
22: ; preds = %21
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %8
25: ; preds = %8
store i32 -1, i32* %3
br label %26
26: ; preds = %25, %19
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @piece_quote_comma_seek(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i64 @piece_quote_comma(i8* %4, i8* %0, i32 0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %2, %11
%8 = phi i32 [ %12, %11 ], [ 0, %2 ]
%9 = call i64 @string_strcmp(i8* %4, i8* %1)
%10 = icmp eq i64 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = add nuw nsw i32 %8, 1
%13 = call i64 @piece_quote_comma(i8* %4, i8* %0, i32 %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %7
15: ; preds = %7, %11, %2
%16 = phi i32 [ -1, %2 ], [ -1, %11 ], [ %8, %7 ]
ret i32 %16
}