#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__ llib_led_edit_match_word(unsigned char *, unsigned char *);
unsigned char *llib_led_edit_next_word(unsigned char *);
int llib_led_edit_is_in_group(unsigned char *group, unsigned char *s) {
  while (*group && *group != '=' && *group != ':') {
    if (llib_led_edit_match_word(group, s))
      return 1;
    else
      group = llib_led_edit_next_word(group);
  }
  return 0;
}


x86 assembly (clang, -O0):
<llib_led_edit_is_in_group>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     116a <llib_led_edit_is_in_group+0x4a>
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x3d,%ecx
mov    %al,-0x19(%rbp)
je     116a <llib_led_edit_is_in_group+0x4a>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x3a,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    117a <llib_led_edit_is_in_group+0x5a>
jmp    11af <llib_led_edit_is_in_group+0x8f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <llib_led_edit_match_word@plt>
cmp    $0x0,%rax
je     119d <llib_led_edit_is_in_group+0x7d>
movl   $0x1,-0x4(%rbp)
jmp    11b6 <llib_led_edit_is_in_group+0x96>
mov    -0x10(%rbp),%rdi
call   1040 <llib_led_edit_next_word@plt>
mov    %rax,-0x10(%rbp)
jmp    1130 <llib_led_edit_is_in_group+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llib_led_edit_is_in_group>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
movabs $0x2400000000000001,%r15
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rbx),%eax
cmp    $0x3d,%rax
ja     114f <llib_led_edit_is_in_group+0x2f>
bt     %rax,%r15
jb     116c <llib_led_edit_is_in_group+0x4c>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <llib_led_edit_match_word@plt>
test   %rax,%rax
jne    1170 <llib_led_edit_is_in_group+0x50>
mov    %rbx,%rdi
call   1040 <llib_led_edit_next_word@plt>
mov    %rax,%rbx
jmp    1140 <llib_led_edit_is_in_group+0x20>
xor    %eax,%eax
jmp    1175 <llib_led_edit_is_in_group+0x55>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @llib_led_edit_is_in_group(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
br label %6
6: ; preds = %32, %2
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %6
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = icmp ne i32 %14, 61
br i1 %15, label %16, label %21
16: ; preds = %11
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = icmp ne i32 %19, 58
br label %21
21: ; preds = %16, %11, %6
%22 = phi i1 [ false, %11 ], [ false, %6 ], [ %20, %16 ]
br i1 %22, label %23, label %33
23: ; preds = %21
%24 = load i8*, i8** %4
%25 = load i8*, i8** %5
%26 = call i64 @llib_led_edit_match_word(i8* %24, i8* %25)
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %23
store i32 1, i32* %3
br label %34
29: ; preds = %23
%30 = load i8*, i8** %4
%31 = call i8* @llib_led_edit_next_word(i8* %30)
store i8* %31, i8** %4
br label %32
32: ; preds = %29
br label %6
33: ; preds = %21
store i32 0, i32* %3
br label %34
34: ; preds = %33, %28
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
define i32 @llib_led_edit_is_in_group(i8* %0, i8* %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %10, %9 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %11
i8 61, label %11
i8 58, label %11
]
6: ; preds = %3
%7 = tail call i64 @llib_led_edit_match_word(i8* %4, i8* %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i8* @llib_led_edit_next_word(i8* %4)
br label %3
11: ; preds = %3, %3, %3, %6
%12 = phi i32 [ 1, %6 ], [ 0, %3 ], [ 0, %3 ], [ 0, %3 ]
ret i32 %12
}