#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*/ close(int);
int send_http_response_body(int, int, char *, int, int, char *);
int /*<<< orphan*/ send_http_response_header(int, int, char *, int, int,
                                             char *);
int process_http_get_request(int soc, int version, char *file, int size,
                             int isdir, char *dirhtml) {
  send_http_response_header(soc, version, file, size, isdir, dirhtml);
  int result =
      send_http_response_body(soc, version, file, size, isdir, dirhtml);
  return result;
  close(soc);
}


x86 assembly (clang, -O0):
<process_http_get_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x20(%rbp),%r9
call   1030 <send_http_response_header@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x20(%rbp),%r9
call   1040 <send_http_response_body@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_http_get_request>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %rdx,%r13
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <send_http_response_header@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <send_http_response_body@plt>

LLVM IR (-O0):
define i32 @process_http_get_request(i32 %0, i32 %1, i8* %2, i32 %3, i32 %4, i8* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i8* %5, i8** %12
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = load i8*, i8** %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i8*, i8** %12
%20 = call i32 @send_http_response_header(i32 %14, i32 %15, i8* %16, i32 %17, i32 %18, i8* %19)
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = load i8*, i8** %9
%24 = load i32, i32* %10
%25 = load i32, i32* %11
%26 = load i8*, i8** %12
%27 = call i32 @send_http_response_body(i32 %21, i32 %22, i8* %23, i32 %24, i32 %25, i8* %26)
store i32 %27, i32* %13
%28 = load i32, i32* %13
ret i32 %28
}

LLVM IR (-O2):
define i32 @process_http_get_request(i32 %0, i32 %1, i8* %2, i32 %3, i32 %4, i8* %5) {
%7 = tail call i32 @send_http_response_header(i32 %0, i32 %1, i8* %2, i32 %3, i32 %4, i8* %5)
%8 = tail call i32 @send_http_response_body(i32 %0, i32 %1, i8* %2, i32 %3, i32 %4, i8* %5)
ret i32 %8
}