#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_deleteAssociation(unsigned int);
int /*<<< orphan*/ stderr;
int SCTP_deleteAssociation(unsigned int associationID) {
  int result;
  if ((result = sctp_deleteAssociation(associationID)) != 0) {
    if (result == -1) {
      fprintf(stderr, "sctp_deleteAssociation: library not initialized:\n");
    } else if (result == 1) {
      fprintf(stderr, "sctp_deleteAssociation: assoc not ready for deletion or "
                      "lib not initialized:\n");
    } else if (result == -3) {
      fprintf(stderr, "sctp_deleteAssociation: assoc does not exists.\n");
    }
    fflush(stderr);
  }
  return result;
}


x86 assembly (clang, -O0):
<SCTP_deleteAssociation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sctp_deleteAssociation@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     11ce <SCTP_deleteAssociation+0x9e>
cmpl   $0xffffffff,-0x8(%rbp)
jne    1173 <SCTP_deleteAssociation+0x43>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    0xe97(%rip),%rsi
call   1030 <fprintf@plt>
jmp    11c0 <SCTP_deleteAssociation+0x90>
cmpl   $0x1,-0x8(%rbp)
jne    1197 <SCTP_deleteAssociation+0x67>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
call   1030 <fprintf@plt>
jmp    11bb <SCTP_deleteAssociation+0x8b>
cmpl   $0xfffffffd,-0x8(%rbp)
jne    11b6 <SCTP_deleteAssociation+0x86>
mov    0x2e38(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
jmp    11bb <SCTP_deleteAssociation+0x8b>
jmp    11c0 <SCTP_deleteAssociation+0x90>
mov    0x2e19(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SCTP_deleteAssociation>:
push   %rbx
call   1040 <sctp_deleteAssociation@plt>
mov    %eax,%ebx
add    $0x3,%eax
cmp    $0x4,%eax
ja     1175 <SCTP_deleteAssociation+0x45>
lea    0xecd(%rip),%rsi
lea    0xeb2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf36(%rip),%rsi
jmp    1167 <SCTP_deleteAssociation+0x37>
lea    0xedf(%rip),%rsi
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [50 x i8] c"sctp_deleteAssociation: library not initialized:\0A\00"
@.str.1 = [78 x i8] c"sctp_deleteAssociation: assoc not ready for deletion or lib not initialized:\0A\00"
@.str.2 = [48 x i8] c"sctp_deleteAssociation: assoc does not exists.\0A\00"
define i32 @SCTP_deleteAssociation(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @sctp_deleteAssociation(i32 %4)
store i32 %5, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %30
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 ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
br label %27
13: ; preds = %7
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.1, i64 0, i64 0))
br label %26
19: ; preds = %13
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, -3
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* @stderr
%24 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %22, %19
br label %26
26: ; preds = %25, %16
br label %27
27: ; preds = %26, %10
%28 = load i32, i32* @stderr
%29 = call i32 @fflush(i32 %28)
br label %30
30: ; preds = %27, %1
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"sctp_deleteAssociation: library not initialized:\0A\00"
@.str.1 = [78 x i8] c"sctp_deleteAssociation: assoc not ready for deletion or lib not initialized:\0A\00"
@.str.2 = [48 x i8] c"sctp_deleteAssociation: assoc does not exists.\0A\00"
define i32 @SCTP_deleteAssociation(i32 %0) {
%2 = tail call i32 @sctp_deleteAssociation(i32 %0)
switch i32 %2, label %9 [
i32 0, label %12
i32 -1, label %5
i32 1, label %3
i32 -3, label %4
]
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3
%6 = phi i8* [ getelementptr inbounds ([78 x i8], [78 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), %1 ]
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* %6)
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* @stderr
%11 = tail call i32 @fflush(i32 %10)
br label %12
12: ; preds = %1, %9
ret i32 %2
}