#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 parent_signal_handling();
int /*<<< orphan*/ printf(char *);
int task_queue();
int main(int argc, char *argv[]) {
  int return_value;
  return_value = parent_signal_handling();
  if (return_value == -1) {
    printf("error, parent_signal_handling\n");
  }
  return_value = task_queue();
  if (return_value == -1) {
    printf("error, task_queue\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <parent_signal_handling@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1166 <main+0x36>
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <task_queue@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1186 <main+0x56>
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <parent_signal_handling@plt>
cmp    $0xffffffff,%eax
jne    1149 <main+0x19>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <task_queue@plt>
cmp    $0xffffffff,%eax
jne    1161 <main+0x31>
lea    0xea4(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"error, parent_signal_handling\0A\00"
@.str.1 = [19 x i8] c"error, task_queue\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @parent_signal_handling()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = call i32 (...) @task_queue()
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16, %12
ret i32 0
}

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