#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*/ handle_v_cont(char *, char *, int *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strncmp(char *, char *, int);
void handle_v_requests(char *own_buf, char *status, int *signal) {
  if (strncmp(own_buf, "vCont;", 6) == 0) {
    handle_v_cont(own_buf, status, signal);
    return;
  }
  if (strncmp(own_buf, "vCont?", 6) == 0) {
    strcpy(own_buf, "vCont;c;C;s;S");
    return;
  }
  own_buf[0] = 0;
  return;
}


x86 assembly (clang, -O0):
<handle_v_requests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb1(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1179 <handle_v_requests+0x49>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <handle_v_cont@plt>
jmp    11b4 <handle_v_requests+0x84>
mov    -0x8(%rbp),%rdi
lea    0xe83(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11ad <handle_v_requests+0x7d>
mov    -0x8(%rbp),%rdi
lea    0xe6b(%rip),%rsi
call   1040 <strcpy@plt>
jmp    11b4 <handle_v_requests+0x84>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_v_requests>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xebb(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1176 <handle_v_requests+0x46>
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1189 <handle_v_requests+0x59>
movb   $0x0,(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <handle_v_cont@plt>
lea    0xe7e(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <strcpy@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"vCont;\00"
@.str.1 = [7 x i8] c"vCont?\00"
@.str.2 = [14 x i8] c"vCont;c;C;s;S\00"
define void @handle_v_requests(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i32*, i32** %6
%14 = call i32 @handle_v_cont(i8* %11, i8* %12, i32* %13)
br label %25
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i8*, i8** %4
%21 = call i32 @strcpy(i8* %20, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %25
22: ; preds = %15
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 0
store i8 0, i8* %24
br label %25
25: ; preds = %22, %19, %10
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"vCont;\00"
@.str.1 = [7 x i8] c"vCont?\00"
@.str.2 = [14 x i8] c"vCont;c;C;s;S\00"
define void @handle_v_requests(i8* %0, i8* %1, i32* %2) {
%4 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @handle_v_cont(i8* %0, i8* %1, i32* %2)
br label %14
8: ; preds = %3
%9 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %14
13: ; preds = %8
store i8 0, i8* %0
br label %14
14: ; preds = %13, %11, %6
ret void
}