#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__ test_api_crypto_box_afternm();
scalar_t__ test_api_crypto_box_beforenm();
scalar_t__ test_api_crypto_hash();
scalar_t__ test_api_crypto_sign();
int salt_crypto_wrapper_test(void) {
  if (!(test_api_crypto_box_beforenm() == 0))
    return -1;
  if (!(test_api_crypto_box_afternm() == 0))
    return -1;
  if (!(test_api_crypto_sign() == 0))
    return -1;
  if (!(test_api_crypto_hash() == 0))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<salt_crypto_wrapper_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <test_api_crypto_box_beforenm@plt>
cmp    $0x0,%rax
je     1165 <salt_crypto_wrapper_test+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    11c3 <salt_crypto_wrapper_test+0x83>
mov    $0x0,%al
call   1030 <test_api_crypto_box_afternm@plt>
cmp    $0x0,%rax
je     1182 <salt_crypto_wrapper_test+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    11c3 <salt_crypto_wrapper_test+0x83>
mov    $0x0,%al
call   1060 <test_api_crypto_sign@plt>
cmp    $0x0,%rax
je     119f <salt_crypto_wrapper_test+0x5f>
movl   $0xffffffff,-0x4(%rbp)
jmp    11c3 <salt_crypto_wrapper_test+0x83>
mov    $0x0,%al
call   1050 <test_api_crypto_hash@plt>
cmp    $0x0,%rax
je     11bc <salt_crypto_wrapper_test+0x7c>
movl   $0xffffffff,-0x4(%rbp)
jmp    11c3 <salt_crypto_wrapper_test+0x83>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<salt_crypto_wrapper_test>:
push   %rbx
xor    %eax,%eax
call   1040 <test_api_crypto_box_beforenm@plt>
mov    $0xffffffff,%ebx
test   %rax,%rax
jne    1176 <salt_crypto_wrapper_test+0x36>
xor    %eax,%eax
call   1030 <test_api_crypto_box_afternm@plt>
test   %rax,%rax
jne    1176 <salt_crypto_wrapper_test+0x36>
xor    %eax,%eax
call   1060 <test_api_crypto_sign@plt>
test   %rax,%rax
jne    1176 <salt_crypto_wrapper_test+0x36>
xor    %eax,%eax
call   1050 <test_api_crypto_hash@plt>
neg    %rax
sbb    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @salt_crypto_wrapper_test() {
%1 = alloca i32
%2 = call i64 (...) @test_api_crypto_box_beforenm()
%3 = icmp eq i64 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
store i32 -1, i32* %1
br label %18
5: ; preds = %0
%6 = call i64 (...) @test_api_crypto_box_afternm()
%7 = icmp eq i64 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %5
store i32 -1, i32* %1
br label %18
9: ; preds = %5
%10 = call i64 (...) @test_api_crypto_sign()
%11 = icmp eq i64 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %9
store i32 -1, i32* %1
br label %18
13: ; preds = %9
%14 = call i64 (...) @test_api_crypto_hash()
%15 = icmp eq i64 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %13
store i32 -1, i32* %1
br label %18
17: ; preds = %13
store i32 0, i32* %1
br label %18
18: ; preds = %17, %16, %12, %8, %4
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
define i32 @salt_crypto_wrapper_test() {
%1 = tail call i64 (...) @test_api_crypto_box_beforenm()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %13
3: ; preds = %0
%4 = tail call i64 (...) @test_api_crypto_box_afternm()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = tail call i64 (...) @test_api_crypto_sign()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = tail call i64 (...) @test_api_crypto_hash()
%11 = icmp ne i64 %10, 0
%12 = sext i1 %11 to i32
br label %13
13: ; preds = %9, %6, %3, %0
%14 = phi i32 [ -1, %0 ], [ -1, %3 ], [ -1, %6 ], [ %12, %9 ]
ret i32 %14
}