#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__ atmelavr_shutdown();
scalar_t__ cccsp_shutdown();
scalar_t__ kroccifccsp_shutdown();
scalar_t__ krocetc_shutdown();
scalar_t__ krocllvm_shutdown();
int target_shutdown(void) {
  if (atmelavr_shutdown()) {
    return 1;
  }
  if (cccsp_shutdown()) {
    return 1;
  }
  if (krocllvm_shutdown()) {
    return 1;
  }
  if (kroccifccsp_shutdown()) {
    return 1;
  }
  if (krocetc_shutdown()) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<target_shutdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <atmelavr_shutdown@plt>
cmp    $0x0,%rax
je     1175 <target_shutdown+0x25>
movl   $0x1,-0x4(%rbp)
jmp    11f0 <target_shutdown+0xa0>
mov    $0x0,%al
call   1060 <cccsp_shutdown@plt>
cmp    $0x0,%rax
je     1192 <target_shutdown+0x42>
movl   $0x1,-0x4(%rbp)
jmp    11f0 <target_shutdown+0xa0>
mov    $0x0,%al
call   1070 <krocllvm_shutdown@plt>
cmp    $0x0,%rax
je     11af <target_shutdown+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    11f0 <target_shutdown+0xa0>
mov    $0x0,%al
call   1030 <kroccifccsp_shutdown@plt>
cmp    $0x0,%rax
je     11cc <target_shutdown+0x7c>
movl   $0x1,-0x4(%rbp)
jmp    11f0 <target_shutdown+0xa0>
mov    $0x0,%al
call   1050 <krocetc_shutdown@plt>
cmp    $0x0,%rax
je     11e9 <target_shutdown+0x99>
movl   $0x1,-0x4(%rbp)
jmp    11f0 <target_shutdown+0xa0>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_shutdown>:
push   %rbx
xor    %eax,%eax
call   1040 <atmelavr_shutdown@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    1195 <target_shutdown+0x45>
xor    %eax,%eax
call   1060 <cccsp_shutdown@plt>
test   %rax,%rax
jne    1195 <target_shutdown+0x45>
xor    %eax,%eax
call   1070 <krocllvm_shutdown@plt>
test   %rax,%rax
jne    1195 <target_shutdown+0x45>
xor    %eax,%eax
call   1030 <kroccifccsp_shutdown@plt>
test   %rax,%rax
jne    1195 <target_shutdown+0x45>
xor    %eax,%eax
call   1050 <krocetc_shutdown@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @target_shutdown() {
%1 = alloca i32
%2 = call i64 (...) @atmelavr_shutdown()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %22
5: ; preds = %0
%6 = call i64 (...) @cccsp_shutdown()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 1, i32* %1
br label %22
9: ; preds = %5
%10 = call i64 (...) @krocllvm_shutdown()
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %1
br label %22
13: ; preds = %9
%14 = call i64 (...) @kroccifccsp_shutdown()
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %1
br label %22
17: ; preds = %13
%18 = call i64 (...) @krocetc_shutdown()
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 1, i32* %1
br label %22
21: ; preds = %17
store i32 0, i32* %1
br label %22
22: ; preds = %21, %20, %16, %12, %8, %4
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
define i32 @target_shutdown() {
%1 = tail call i64 (...) @atmelavr_shutdown()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %16
3: ; preds = %0
%4 = tail call i64 (...) @cccsp_shutdown()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = tail call i64 (...) @krocllvm_shutdown()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = tail call i64 (...) @kroccifccsp_shutdown()
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = tail call i64 (...) @krocetc_shutdown()
%14 = icmp ne i64 %13, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %12, %9, %6, %3, %0
%17 = phi i32 [ 1, %0 ], [ 1, %3 ], [ 1, %6 ], [ 1, %9 ], [ %15, %12 ]
ret i32 %17
}