#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*/ http_error_page_destroy();
int /*<<< orphan*/ http_error_page_init(int /*<<< orphan*/ *);
int /*<<< orphan*/ http_mime_init();
int /*<<< orphan*/ http_parse_destroy();
int /*<<< orphan*/ http_parse_init();
extern int http_init() {
  if ((0) != http_error_page_init(NULL))
    goto error_page_err;
  if ((0) != http_parse_init())
    goto parse_init_err;
  if ((0) != http_mime_init())
    goto mime_init_err;
  return (0);
mime_init_err:
  http_parse_destroy();
parse_init_err:
  http_error_page_destroy();
error_page_err:
  return (-4);
}


x86 assembly (clang, -O0):
<http_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1060 <http_error_page_init@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     1172 <http_init+0x22>
jmp    11bc <http_init+0x6c>
mov    $0x0,%al
call   1050 <http_parse_init@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     118a <http_init+0x3a>
jmp    11b5 <http_init+0x65>
mov    $0x0,%al
call   1070 <http_mime_init@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     11a2 <http_init+0x52>
jmp    11ae <http_init+0x5e>
movl   $0x0,-0x4(%rbp)
jmp    11c3 <http_init+0x73>
mov    $0x0,%al
call   1040 <http_parse_destroy@plt>
mov    $0x0,%al
call   1030 <http_error_page_destroy@plt>
movl   $0xfffffffc,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_init>:
push   %rbx
xor    %edi,%edi
call   1060 <http_error_page_init@plt>
mov    $0xfffffffc,%ebx
test   %eax,%eax
jne    118c <http_init+0x3c>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <http_parse_init@plt>
test   %eax,%eax
jne    1180 <http_init+0x30>
xor    %eax,%eax
call   1070 <http_mime_init@plt>
test   %eax,%eax
je     118c <http_init+0x3c>
xor    %eax,%eax
call   1040 <http_parse_destroy@plt>
xor    %eax,%eax
call   1030 <http_error_page_destroy@plt>
mov    $0xfffffffc,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @http_init() {
%1 = alloca i32
%2 = call i32 @http_error_page_init(i32* null)
%3 = icmp ne i32 0, %2
br i1 %3, label %4, label %5
4: ; preds = %0
br label %18
5: ; preds = %0
%6 = call i32 (...) @http_parse_init()
%7 = icmp ne i32 0, %6
br i1 %7, label %8, label %9
8: ; preds = %5
br label %16
9: ; preds = %5
%10 = call i32 (...) @http_mime_init()
%11 = icmp ne i32 0, %10
br i1 %11, label %12, label %13
12: ; preds = %9
br label %14
13: ; preds = %9
store i32 0, i32* %1
br label %19
14: ; preds = %12
%15 = call i32 (...) @http_parse_destroy()
br label %16
16: ; preds = %14, %8
%17 = call i32 (...) @http_error_page_destroy()
br label %18
18: ; preds = %16, %4
store i32 -4, i32* %1
br label %19
19: ; preds = %18, %13
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
define i32 @http_init() {
%1 = tail call i32 @http_error_page_init(i32* null)
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %13
3: ; preds = %0
%4 = tail call i32 (...) @http_parse_init()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = tail call i32 (...) @http_mime_init()
%8 = icmp eq i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %6
%10 = tail call i32 (...) @http_parse_destroy()
br label %11
11: ; preds = %3, %9
%12 = tail call i32 (...) @http_error_page_destroy()
br label %13
13: ; preds = %11, %0, %6
%14 = phi i32 [ 0, %6 ], [ -4, %0 ], [ -4, %11 ]
ret i32 %14
}