#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int sctp_abort(unsigned int);
int /*<<< orphan*/ stderr;
int SCTP_abort(unsigned int associationID) {
  int result;
  if ((result = sctp_abort(associationID)) != 0) {
    if (result == -1) {
      fprintf(stderr, "sctp_abort: library not initialized.\n");
    } else if (result == -3) {
      fprintf(stderr, "sctp_abort: association not found.\n");
    }
    fflush(stderr);
  }
  return result;
}


x86 assembly (clang, -O0):
<SCTP_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sctp_abort@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     11a5 <SCTP_abort+0x75>
cmpl   $0xffffffff,-0x8(%rbp)
jne    1173 <SCTP_abort+0x43>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    0xe97(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1197 <SCTP_abort+0x67>
cmpl   $0xfffffffd,-0x8(%rbp)
jne    1192 <SCTP_abort+0x62>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1197 <SCTP_abort+0x67>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SCTP_abort>:
push   %rbx
call   1030 <sctp_abort@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1172 <SCTP_abort+0x42>
cmp    $0xffffffff,%ebx
je     114f <SCTP_abort+0x1f>
cmp    $0xfffffffd,%ebx
jne    1164 <SCTP_abort+0x34>
lea    0xed9(%rip),%rsi
jmp    1156 <SCTP_abort+0x26>
lea    0xeaa(%rip),%rsi
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1040 <fprintf@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"sctp_abort: library not initialized.\0A\00"
@.str.1 = [36 x i8] c"sctp_abort: association not found.\0A\00"
define i32 @SCTP_abort(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @sctp_abort(i32 %4)
store i32 %5, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %23
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %20
13: ; preds = %7
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, -3
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %16, %13
br label %20
20: ; preds = %19, %10
%21 = load i32, i32* @stderr
%22 = call i32 @fflush(i32 %21)
br label %23
23: ; preds = %20, %1
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"sctp_abort: library not initialized.\0A\00"
@.str.1 = [36 x i8] c"sctp_abort: association not found.\0A\00"
define i32 @SCTP_abort(i32 %0) {
%2 = tail call i32 @sctp_abort(i32 %0)
switch i32 %2, label %8 [
i32 0, label %11
i32 -1, label %4
i32 -3, label %3
]
3: ; preds = %1
br label %4
4: ; preds = %1, %3
%5 = phi i8* [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), %1 ]
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* %5)
br label %8
8: ; preds = %4, %1
%9 = load i32, i32* @stderr
%10 = tail call i32 @fflush(i32 %9)
br label %11
11: ; preds = %1, %8
ret i32 %2
}