#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__ match_char(char const **, char const *, char);
scalar_t__ match_set(char const **, char const *, int);
int /*<<< orphan*/ match_xset(char const **, char const *, int);
int match_ipvfuture(char const **str, char const *end) {
  char const *i = *str;
  if (match_char(&i, end, 'v')) {
    if (match_set(&i, end, (4))) {
      match_xset(&i, end, (4));
      if (match_char(&i, end, '.')) {
        if (match_set(&i, end, (1 | 2 | 16 | 64))) {
          match_xset(&i, end, (1 | 2 | 16 | 64));
          *str = i;
          return 1;
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<match_ipvfuture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdi
mov    $0x76,%edx
call   1050 <match_char@plt>
cmp    $0x0,%rax
je     1205 <match_ipvfuture+0xd5>
mov    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdi
mov    $0x4,%edx
call   1030 <match_set@plt>
cmp    $0x0,%rax
je     1200 <match_ipvfuture+0xd0>
mov    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdi
mov    $0x4,%edx
call   1040 <match_xset@plt>
mov    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdi
mov    $0x2e,%edx
call   1050 <match_char@plt>
cmp    $0x0,%rax
je     11fb <match_ipvfuture+0xcb>
mov    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdi
mov    $0x53,%edx
call   1030 <match_set@plt>
cmp    $0x0,%rax
je     11f6 <match_ipvfuture+0xc6>
mov    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdi
mov    $0x53,%edx
call   1040 <match_xset@plt>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    120c <match_ipvfuture+0xdc>
jmp    11fb <match_ipvfuture+0xcb>
jmp    1200 <match_ipvfuture+0xd0>
jmp    1205 <match_ipvfuture+0xd5>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_ipvfuture>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rdi),%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x76,%edx
call   1050 <match_char@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     11c6 <match_ipvfuture+0x96>
mov    %rsp,%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <match_set@plt>
test   %rax,%rax
je     11c6 <match_ipvfuture+0x96>
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1040 <match_xset@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x2e,%edx
call   1050 <match_char@plt>
test   %rax,%rax
je     11c6 <match_ipvfuture+0x96>
mov    %rsp,%rdi
mov    %rbx,%rsi
mov    $0x53,%edx
call   1030 <match_set@plt>
test   %rax,%rax
je     11c6 <match_ipvfuture+0x96>
mov    %rsp,%rdi
mov    %rbx,%rsi
mov    $0x53,%edx
call   1040 <match_xset@plt>
mov    (%rsp),%rax
mov    %rax,(%r14)
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @match_ipvfuture(i8** %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8*
store i8** %0, i8*** %4
store i8* %1, i8** %5
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %7
store i8* %8, i8** %6
%9 = load i8*, i8** %5
%10 = call i64 @match_char(i8** %6, i8* %9, i8 signext 118)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %34
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = call i64 @match_set(i8** %6, i8* %13, i32 4)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %33
16: ; preds = %12
%17 = load i8*, i8** %5
%18 = call i32 @match_xset(i8** %6, i8* %17, i32 4)
%19 = load i8*, i8** %5
%20 = call i64 @match_char(i8** %6, i8* %19, i8 signext 46)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %32
22: ; preds = %16
%23 = load i8*, i8** %5
%24 = call i64 @match_set(i8** %6, i8* %23, i32 83)
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %22
%27 = load i8*, i8** %5
%28 = call i32 @match_xset(i8** %6, i8* %27, i32 83)
%29 = load i8*, i8** %6
%30 = load i8**, i8*** %4
store i8* %29, i8** %30
store i32 1, i32* %3
br label %35
31: ; preds = %22
br label %32
32: ; preds = %31, %16
br label %33
33: ; preds = %32, %12
br label %34
34: ; preds = %33, %2
store i32 0, i32* %3
br label %35
35: ; preds = %34, %26
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
define i32 @match_ipvfuture(i8** nocapture %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = load i8*, i8** %0
store i8* %5, i8** %3
%6 = call i64 @match_char(i8** %3, i8* %1, i8 signext 118)
%7 = icmp eq i64 %6, 0
br i1 %7, label %21, label %8
8: ; preds = %2
%9 = call i64 @match_set(i8** %3, i8* %1, i32 4)
%10 = icmp eq i64 %9, 0
br i1 %10, label %21, label %11
11: ; preds = %8
%12 = call i32 @match_xset(i8** %3, i8* %1, i32 4)
%13 = call i64 @match_char(i8** %3, i8* %1, i8 signext 46)
%14 = icmp eq i64 %13, 0
br i1 %14, label %21, label %15
15: ; preds = %11
%16 = call i64 @match_set(i8** %3, i8* %1, i32 83)
%17 = icmp eq i64 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = call i32 @match_xset(i8** %3, i8* %1, i32 83)
%20 = load i8*, i8** %3
store i8* %20, i8** %0
br label %21
21: ; preds = %2, %11, %15, %8, %18
%22 = phi i32 [ 1, %18 ], [ 0, %8 ], [ 0, %15 ], [ 0, %11 ], [ 0, %2 ]
ret i32 %22
}