#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 */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ processGETReq(int, char **);
scalar_t__ strcmp(char *, char *);
char *strtok(char *, char *);
void processRequest(int sfd, char *buff, ssize_t sz) {
  char *reqLine[3];
  char *aux;
  (void)sz;
  aux = strtok(buff, " ");
  reqLine[0] = aux;
  aux = strtok(NULL, " ");
  reqLine[1] = aux;
  aux = strtok(NULL, " ");
  reqLine[2] = aux;
  if (strcmp(reqLine[0], "GET") == 0)
    processGETReq(sfd, reqLine);
}


x86 assembly (clang, -O0):
<processRequest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe97(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe7b(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe61(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11bc <processRequest+0x8c>
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
call   1040 <processGETReq@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processRequest>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %edi,%r14d
lea    0xebe(%rip),%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1050 <strtok@plt>
mov    %rax,%rbp
mov    %rax,(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1050 <strtok@plt>
mov    %rax,0x8(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   1050 <strtok@plt>
mov    %rax,0x10(%rsp)
lea    0xe89(%rip),%rsi
mov    %rbp,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1191 <processRequest+0x61>
mov    %rsp,%rsi
mov    %r14d,%edi
call   1040 <processGETReq@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [4 x i8] c"GET\00"
define void @processRequest(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [3 x i8*]
%8 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = load i8*, i8** %5
%11 = call i8* @strtok(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %11, i8** %8
%12 = load i8*, i8** %8
%13 = getelementptr inbounds [3 x i8*], [3 x i8*]* %7, i64 0, i64 0
store i8* %12, i8** %13
%14 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %14, i8** %8
%15 = load i8*, i8** %8
%16 = getelementptr inbounds [3 x i8*], [3 x i8*]* %7, i64 0, i64 1
store i8* %15, i8** %16
%17 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %17, i8** %8
%18 = load i8*, i8** %8
%19 = getelementptr inbounds [3 x i8*], [3 x i8*]* %7, i64 0, i64 2
store i8* %18, i8** %19
%20 = getelementptr inbounds [3 x i8*], [3 x i8*]* %7, i64 0, i64 0
%21 = load i8*, i8** %20
%22 = call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %3
%25 = load i32, i32* %4
%26 = getelementptr inbounds [3 x i8*], [3 x i8*]* %7, i64 0, i64 0
%27 = call i32 @processGETReq(i32 %25, i8** %26)
br label %28
28: ; preds = %24, %3
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [4 x i8] c"GET\00"
define void @processRequest(i32 %0, i8* %1, i32 %2) {
%4 = alloca [3 x i8*]
%5 = bitcast [3 x i8*]* %4 to i8*
%6 = tail call i8* @strtok(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 0
store i8* %6, i8** %7
%8 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 1
store i8* %8, i8** %9
%10 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 2
store i8* %10, i8** %11
%12 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = call i32 @processGETReq(i32 %0, i8** %7)
br label %16
16: ; preds = %14, %3
ret void
}