#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 */
struct tunnel {
  int dummy;
};

/* Variables and functions */
int http_request(struct tunnel *, char *, char *, char *, int /*<<< orphan*/ *);
int auth_request_vpn_allocation(struct tunnel *tunnel) {
  int ret = http_request(tunnel, "GET", "/remote/index", "", NULL);
  if (ret != 1)
    return ret;
  return http_request(tunnel, "GET", "/remote/fortisslvpn", "", NULL);
}


x86 assembly (clang, -O0):
<auth_request_vpn_allocation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    0xed6(%rip),%rdx
lea    0xece(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <http_request@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
je     1157 <auth_request_vpn_allocation+0x47>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117d <auth_request_vpn_allocation+0x6d>
mov    -0x10(%rbp),%rdi
lea    0xe9e(%rip),%rsi
lea    0xea9(%rip),%rdx
lea    0xe93(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <http_request@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<auth_request_vpn_allocation>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
lea    0xee2(%rip),%rdx
lea    0xeda(%rip),%rcx
xor    %r8d,%r8d
call   1030 <http_request@plt>
cmp    $0x1,%eax
jne    1157 <auth_request_vpn_allocation+0x47>
lea    0xec3(%rip),%rsi
lea    0xece(%rip),%rdx
lea    0xeb8(%rip),%rcx
mov    %rbx,%rdi
xor    %r8d,%r8d
pop    %rbx
jmp    1030 <http_request@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.tunnel = type { i32 }
@.str = [4 x i8] c"GET\00"
@.str.1 = [14 x i8] c"/remote/index\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [20 x i8] c"/remote/fortisslvpn\00"
define i32 @auth_request_vpn_allocation(%struct.tunnel* %0) {
%2 = alloca i32
%3 = alloca %struct.tunnel*
%4 = alloca i32
store %struct.tunnel* %0, %struct.tunnel** %3
%5 = load %struct.tunnel*, %struct.tunnel** %3
%6 = call i32 @http_request(%struct.tunnel* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32* null)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %14
11: ; preds = %1
%12 = load %struct.tunnel*, %struct.tunnel** %3
%13 = call i32 @http_request(%struct.tunnel* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32* null)
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.tunnel = type { i32 }
@.str = [4 x i8] c"GET\00"
@.str.1 = [14 x i8] c"/remote/index\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [20 x i8] c"/remote/fortisslvpn\00"
define i32 @auth_request_vpn_allocation(%struct.tunnel* %0) {
%2 = tail call i32 @http_request(%struct.tunnel* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32* null)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @http_request(%struct.tunnel* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32* null)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %2, %1 ]
ret i32 %7
}