#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*/ gxprt(char *, char *);
void process_v_cont_request(char *bufp) {
  char *savbufp = bufp;
  bufp = bufp + 5;
  if (*bufp == '\0' || *bufp != ';')
    goto errout;
  bufp++;
  if (*bufp == 'S' || *bufp == 'C')
    goto errout;
  return;
errout:
  savbufp[0] = '\0';
  gxprt("WARN: Bad v pkt: %s\n", savbufp);
  return;
}


x86 assembly (clang, -O0):
<process_v_cont_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1150 <process_v_cont_request+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
je     1155 <process_v_cont_request+0x45>
jmp    118b <process_v_cont_request+0x7b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x53,%eax
je     1181 <process_v_cont_request+0x71>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x43,%eax
jne    1186 <process_v_cont_request+0x76>
jmp    118b <process_v_cont_request+0x7b>
jmp    11a2 <process_v_cont_request+0x92>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rsi
lea    0xe63(%rip),%rdi
call   1030 <gxprt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_v_cont_request>:
mov    %rdi,%rsi
cmpb   $0x3b,0x5(%rdi)
jne    1122 <process_v_cont_request+0x12>
mov    0x6(%rsi),%al
or     $0x10,%al
cmp    $0x53,%al
jne    1131 <process_v_cont_request+0x21>
movb   $0x0,(%rsi)
lea    0xed4(%rip),%rdi
jmp    1030 <gxprt@plt>
ret

LLVM IR (-O0):
@.str = [21 x i8] c"WARN: Bad v pkt: %s\0A\00"
define void @process_v_cont_request(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 5
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 59
br i1 %15, label %16, label %17
16: ; preds = %11, %1
br label %31
17: ; preds = %11
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %2
%20 = load i8*, i8** %2
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 83
br i1 %23, label %29, label %24
24: ; preds = %17
%25 = load i8*, i8** %2
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 67
br i1 %28, label %29, label %30
29: ; preds = %24, %17
br label %31
30: ; preds = %24
br label %36
31: ; preds = %29, %16
%32 = load i8*, i8** %3
%33 = getelementptr inbounds i8, i8* %32, i64 0
store i8 0, i8* %33
%34 = load i8*, i8** %3
%35 = call i32 @gxprt(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %34)
br label %36
36: ; preds = %31, %30
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"WARN: Bad v pkt: %s\0A\00"
define void @process_v_cont_request(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 5
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 59
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 6
%7 = load i8, i8* %6
switch i8 %7, label %10 [
i8 83, label %8
i8 67, label %8
]
8: ; preds = %1, %5, %5
store i8 0, i8* %0
%9 = tail call i32 @gxprt(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %10
10: ; preds = %5, %8
ret void
}