#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 */
scalar_t__ net_work_module_inside_loop_init();
scalar_t__ net_work_module_inside_mutex_init();
scalar_t__ net_work_module_inside_ring_init();
int /*<<< orphan*/ printf(char *);
int net_work_module_init(void) {
  int ret = 0;
  if (net_work_module_inside_ring_init() ||
      net_work_module_inside_mutex_init() ||
      net_work_module_inside_loop_init()) {
    printf("net_work_module_init error .\n");
    ret = -1;
  }
  return ret;
}


x86 assembly (clang, -O0):
<net_work_module_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <net_work_module_inside_ring_init@plt>
cmp    $0x0,%rax
jne    1182 <net_work_module_init+0x42>
mov    $0x0,%al
call   1060 <net_work_module_inside_mutex_init@plt>
cmp    $0x0,%rax
jne    1182 <net_work_module_init+0x42>
mov    $0x0,%al
call   1050 <net_work_module_inside_loop_init@plt>
cmp    $0x0,%rax
je     1195 <net_work_module_init+0x55>
lea    0xe77(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_work_module_init>:
push   %rbx
xor    %eax,%eax
call   1030 <net_work_module_inside_ring_init@plt>
test   %rax,%rax
jne    1167 <net_work_module_init+0x27>
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <net_work_module_inside_mutex_init@plt>
test   %rax,%rax
jne    1167 <net_work_module_init+0x27>
xor    %eax,%eax
call   1050 <net_work_module_inside_loop_init@plt>
test   %rax,%rax
je     1178 <net_work_module_init+0x38>
lea    0xe92(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"net_work_module_init error .\0A\00"
define i32 @net_work_module_init() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @net_work_module_inside_ring_init()
%3 = icmp ne i64 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %0
%5 = call i64 (...) @net_work_module_inside_mutex_init()
%6 = icmp ne i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = call i64 (...) @net_work_module_inside_loop_init()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7, %4, %0
%11 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@str = [29 x i8] c"net_work_module_init error .\00"
define i32 @net_work_module_init() {
%1 = tail call i64 (...) @net_work_module_inside_ring_init()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = tail call i64 (...) @net_work_module_inside_mutex_init()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i64 (...) @net_work_module_inside_loop_init()
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6, %3, %0
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ -1, %9 ], [ 0, %6 ]
ret i32 %12
}