#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 simplehttp_request {
  int dummy;
};
struct evhttp_request {
  int dummy;
};

/* Variables and functions */
struct simplehttp_request *simplehttp_async_check(struct evhttp_request *);
int /*<<< orphan*/ simplehttp_request_finish(struct evhttp_request *,
                                             struct simplehttp_request *);
void simplehttp_async_finish(struct evhttp_request *req) {
  struct simplehttp_request *entry;
  do {
    ;
  } while (0);
  if ((entry = simplehttp_async_check(req))) {
    do {
      ;
    } while (0);
    simplehttp_request_finish(req, entry);
  }
}


x86 assembly (clang, -O0):
<simplehttp_async_finish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
jmp    1131 <simplehttp_async_finish+0x11>
mov    -0x8(%rbp),%rdi
call   1030 <simplehttp_async_check@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     115f <simplehttp_async_finish+0x3f>
jmp    114d <simplehttp_async_finish+0x2d>
jmp    1152 <simplehttp_async_finish+0x32>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <simplehttp_request_finish@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simplehttp_async_finish>:
push   %rbx
mov    %rdi,%rbx
call   1030 <simplehttp_async_check@plt>
test   %rax,%rax
je     113a <simplehttp_async_finish+0x1a>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1040 <simplehttp_request_finish@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.evhttp_request = type { i32 }
%struct.simplehttp_request = type { i32 }
define void @simplehttp_async_finish(%struct.evhttp_request* %0) {
%2 = alloca %struct.evhttp_request*
%3 = alloca %struct.simplehttp_request*
store %struct.evhttp_request* %0, %struct.evhttp_request** %2
br label %4
4: ; preds = %1
br label %5
5: ; preds = %4
%6 = load %struct.evhttp_request*, %struct.evhttp_request** %2
%7 = call %struct.simplehttp_request* @simplehttp_async_check(%struct.evhttp_request* %6)
store %struct.simplehttp_request* %7, %struct.simplehttp_request** %3
%8 = icmp ne %struct.simplehttp_request* %7, null
br i1 %8, label %9, label %15
9: ; preds = %5
br label %10
10: ; preds = %9
br label %11
11: ; preds = %10
%12 = load %struct.evhttp_request*, %struct.evhttp_request** %2
%13 = load %struct.simplehttp_request*, %struct.simplehttp_request** %3
%14 = call i32 @simplehttp_request_finish(%struct.evhttp_request* %12, %struct.simplehttp_request* %13)
br label %15
15: ; preds = %11, %5
ret void
}

LLVM IR (-O2):
%struct.evhttp_request = type { i32 }
%struct.simplehttp_request = type { i32 }
define void @simplehttp_async_finish(%struct.evhttp_request* %0) {
%2 = tail call %struct.simplehttp_request* @simplehttp_async_check(%struct.evhttp_request* %0)
%3 = icmp eq %struct.simplehttp_request* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @simplehttp_request_finish(%struct.evhttp_request* %0, %struct.simplehttp_request* %2)
br label %6
6: ; preds = %4, %1
ret void
}