#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 */
const char *GetVtype(char *Vtype, const char *req) {
  if ('V' != *req++)
    return NULL;
  if ('=' != *req++)
    return NULL;
  if ('\0' != *req)
    *Vtype = *req++;
  return req;
}


x86 assembly (clang, -O0):
<GetVtype>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%ecx
mov    $0x56,%eax
cmp    %ecx,%eax
je     1138 <GetVtype+0x38>
movq   $0x0,-0x8(%rbp)
jmp    1194 <GetVtype+0x94>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%ecx
mov    $0x3d,%eax
cmp    %ecx,%eax
je     1164 <GetVtype+0x64>
movq   $0x0,-0x8(%rbp)
jmp    1194 <GetVtype+0x94>
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     118c <GetVtype+0x8c>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetVtype>:
cmpb   $0x56,(%rsi)
jne    111f <GetVtype+0x1f>
cmpb   $0x3d,0x1(%rsi)
jne    111f <GetVtype+0x1f>
lea    0x2(%rsi),%rax
mov    (%rax),%cl
test   %cl,%cl
je     111e <GetVtype+0x1e>
add    $0x3,%rsi
mov    %cl,(%rdi)
mov    %rsi,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @GetVtype(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %5
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
%10 = icmp ne i32 86, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i8* null, i8** %3
br label %31
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %5
%15 = load i8, i8* %13
%16 = sext i8 %15 to i32
%17 = icmp ne i32 61, %16
br i1 %17, label %18, label %19
18: ; preds = %12
store i8* null, i8** %3
br label %31
19: ; preds = %12
%20 = load i8*, i8** %5
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp ne i32 0, %22
br i1 %23, label %24, label %29
24: ; preds = %19
%25 = load i8*, i8** %5
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %5
%27 = load i8, i8* %25
%28 = load i8*, i8** %4
store i8 %27, i8* %28
br label %29
29: ; preds = %24, %19
%30 = load i8*, i8** %5
store i8* %30, i8** %3
br label %31
31: ; preds = %29, %18, %11
%32 = load i8*, i8** %3
ret i8* %32
}

LLVM IR (-O2):
define i8* @GetVtype(i8* nocapture writeonly %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 86
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %1, i64 1
%7 = getelementptr inbounds i8, i8* %1, i64 2
%8 = load i8, i8* %6
%9 = icmp eq i8 %8, 61
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load i8, i8* %7
%12 = icmp eq i8 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %0
br label %15
15: ; preds = %10, %13, %5, %2
%16 = phi i8* [ null, %2 ], [ null, %5 ], [ %14, %13 ], [ %7, %10 ]
ret i8* %16
}