#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*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int register_pool_1();
int register_pool_2();
int register_pool_3();
int /*<<< orphan*/ stderr;
int register_pools() {
  if (-1 == register_pool_1())
    do {
      fprintf(stderr, "Failed registring pool 1");
      fflush(stderr);
      exit(-1);
    } while (0);
  if (-1 == register_pool_2())
    do {
      fprintf(stderr, "Failed registring pool 2");
      fflush(stderr);
      exit(-1);
    } while (0);
  if (-1 == register_pool_3())
    do {
      fprintf(stderr, "Failed registring pool 3");
      fflush(stderr);
      exit(-1);
    } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<register_pools>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <register_pool_1@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    11ac <register_pools+0x4c>
jmp    117f <register_pools+0x1f>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
lea    0xe71(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    $0x0,%al
call   1030 <register_pool_2@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    11f4 <register_pools+0x94>
jmp    11c7 <register_pools+0x67>
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
lea    0xe42(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2dfd(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    $0x0,%al
call   1070 <register_pool_3@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    123c <register_pools+0xdc>
jmp    120f <register_pools+0xaf>
mov    0x2dca(%rip),%rax
mov    (%rax),%edi
lea    0xe13(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2db5(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<register_pools>:
push   %rbx
xor    %eax,%eax
call   1060 <register_pool_1@plt>
cmp    $0xffffffff,%eax
je     1189 <register_pools+0x29>
xor    %eax,%eax
call   1030 <register_pool_2@plt>
cmp    $0xffffffff,%eax
je     119b <register_pools+0x3b>
xor    %eax,%eax
call   1070 <register_pool_3@plt>
cmp    $0xffffffff,%eax
je     11ad <register_pools+0x4d>
xor    %eax,%eax
pop    %rbx
ret
mov    0x2e50(%rip),%rbx
mov    (%rbx),%edi
lea    0xe67(%rip),%rsi
jmp    11bd <register_pools+0x5d>
mov    0x2e3e(%rip),%rbx
mov    (%rbx),%edi
lea    0xe6e(%rip),%rsi
jmp    11bd <register_pools+0x5d>
mov    0x2e2c(%rip),%rbx
mov    (%rbx),%edi
lea    0xe75(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"Failed registring pool 1\00"
@.str.1 = [25 x i8] c"Failed registring pool 2\00"
@.str.2 = [25 x i8] c"Failed registring pool 3\00"
define i32 @register_pools() {
%1 = call i32 (...) @register_pool_1()
%2 = icmp eq i32 -1, %1
br i1 %2, label %3, label %11
3: ; preds = %0
br label %4
4: ; preds = %3
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 @fflush(i32 %7)
%9 = call i32 @exit(i32 -1)
unreachable
10: ; No predecessors!
br label %11
11: ; preds = %10, %0
%12 = call i32 (...) @register_pool_2()
%13 = icmp eq i32 -1, %12
br i1 %13, label %14, label %22
14: ; preds = %11
br label %15
15: ; preds = %14
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = call i32 @fflush(i32 %18)
%20 = call i32 @exit(i32 -1)
unreachable
21: ; No predecessors!
br label %22
22: ; preds = %21, %11
%23 = call i32 (...) @register_pool_3()
%24 = icmp eq i32 -1, %23
br i1 %24, label %25, label %33
25: ; preds = %22
br label %26
26: ; preds = %25
%27 = load i32, i32* @stderr
%28 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%29 = load i32, i32* @stderr
%30 = call i32 @fflush(i32 %29)
%31 = call i32 @exit(i32 -1)
unreachable
32: ; No predecessors!
br label %33
33: ; preds = %32, %22
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"Failed registring pool 1\00"
@.str.1 = [25 x i8] c"Failed registring pool 2\00"
@.str.2 = [25 x i8] c"Failed registring pool 3\00"
define i32 @register_pools() {
%1 = tail call i32 (...) @register_pool_1()
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 @fflush(i32 %6)
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %0
%10 = tail call i32 (...) @register_pool_2()
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = tail call i32 @fflush(i32 %15)
%17 = tail call i32 @exit(i32 -1)
unreachable
18: ; preds = %9
%19 = tail call i32 (...) @register_pool_3()
%20 = icmp eq i32 %19, -1
br i1 %20, label %21, label %27
21: ; preds = %18
%22 = load i32, i32* @stderr
%23 = tail call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%24 = load i32, i32* @stderr
%25 = tail call i32 @fflush(i32 %24)
%26 = tail call i32 @exit(i32 -1)
unreachable
27: ; preds = %18
ret i32 0
}