#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 */
struct training_data {
  int dummy;
};

/* Variables and functions */
unsigned int ssn_ddrt_init(int, int, int, int /*<<< orphan*/, int, int);
unsigned int check_multi_ssn(const struct training_data *training,
                             unsigned int index) {
  unsigned int rel;
  rel = ssn_ddrt_init((0 << 8), (0 << 12), 0xff, 0, 0x80000000, 0);
  if (rel)
    return rel;
  rel = ssn_ddrt_init((0 << 8), (2 << 12), 0xff, 0, 0x80000000, 0xB49C863C);
  if (rel)
    return rel;
  return 0;
}


x86 assembly (clang, -O0):
<check_multi_ssn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
xor    %r9d,%r9d
mov    $0xff,%edx
mov    $0x80000000,%r8d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%ecx
call   1030 <ssn_ddrt_init@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1153 <check_multi_ssn+0x43>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1191 <check_multi_ssn+0x81>
xor    %ecx,%ecx
mov    $0x2000,%esi
mov    $0xff,%edx
mov    $0x80000000,%r8d
mov    $0xb49c863c,%r9d
mov    %ecx,%edi
call   1030 <ssn_ddrt_init@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     118a <check_multi_ssn+0x7a>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1191 <check_multi_ssn+0x81>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_multi_ssn>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
mov    $0xff,%edx
xor    %ecx,%ecx
mov    $0x80000000,%r8d
xor    %r9d,%r9d
call   1030 <ssn_ddrt_init@plt>
test   %eax,%eax
je     1130 <check_multi_ssn+0x20>
pop    %rcx
ret
xor    %edi,%edi
mov    $0x2000,%esi
mov    $0xff,%edx
xor    %ecx,%ecx
mov    $0x80000000,%r8d
mov    $0xb49c863c,%r9d
pop    %rax
jmp    1030 <ssn_ddrt_init@plt>

LLVM IR (-O0):
%struct.training_data = type { i32 }
define i32 @check_multi_ssn(%struct.training_data* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.training_data*
%5 = alloca i32
%6 = alloca i32
store %struct.training_data* %0, %struct.training_data** %4
store i32 %1, i32* %5
%7 = call i32 @ssn_ddrt_init(i32 0, i32 0, i32 255, i32 0, i32 -2147483648, i32 0)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* %6
store i32 %11, i32* %3
br label %19
12: ; preds = %2
%13 = call i32 @ssn_ddrt_init(i32 0, i32 8192, i32 255, i32 0, i32 -2147483648, i32 -1264810436)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i32, i32* %6
store i32 %17, i32* %3
br label %19
18: ; preds = %12
store i32 0, i32* %3
br label %19
19: ; preds = %18, %16, %10
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
%struct.training_data = type { i32 }
define i32 @check_multi_ssn(%struct.training_data* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @ssn_ddrt_init(i32 0, i32 0, i32 255, i32 0, i32 -2147483648, i32 0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @ssn_ddrt_init(i32 0, i32 8192, i32 255, i32 0, i32 -2147483648, i32 -1264810436)
br label %7
7: ; preds = %5, %2
%8 = phi i32 [ %3, %2 ], [ %6, %5 ]
ret i32 %8
}