#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 sn_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sn_send_asoc_msg(struct sn_context *, int, int,
                                    int /*<<< orphan*/);
int sn_do_sched_tests(struct sn_context *snc) {
  int stream, count;
  for (stream = 1; stream < 4; stream++)
    for (count = 0; count < 3; count++)
      sn_send_asoc_msg(snc, 1024, stream, 0);
}


x86 assembly (clang, -O0):
<sn_do_sched_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1172 <sn_do_sched_tests+0x62>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    115f <sn_do_sched_tests+0x4f>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x400,%esi
xor    %ecx,%ecx
call   1030 <sn_send_asoc_msg@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1134 <sn_do_sched_tests+0x24>
jmp    1164 <sn_do_sched_tests+0x54>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <sn_do_sched_tests+0x13>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sn_do_sched_tests>:
push   %rbx
mov    %rdi,%rbx
mov    $0x400,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <sn_send_asoc_msg@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <sn_send_asoc_msg@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <sn_send_asoc_msg@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
call   1030 <sn_send_asoc_msg@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
call   1030 <sn_send_asoc_msg@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
call   1030 <sn_send_asoc_msg@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
call   1030 <sn_send_asoc_msg@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
call   1030 <sn_send_asoc_msg@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
pop    %rbx
jmp    1030 <sn_send_asoc_msg@plt>

LLVM IR (-O0):
%struct.sn_context = type { i32 }
define i32 @sn_do_sched_tests(%struct.sn_context* %0) {
%2 = alloca i32
%3 = alloca %struct.sn_context*
%4 = alloca i32
%5 = alloca i32
store %struct.sn_context* %0, %struct.sn_context** %3
store i32 1, i32* %4
br label %6
6: ; preds = %21, %1
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %24
9: ; preds = %6
store i32 0, i32* %5
br label %10
10: ; preds = %17, %9
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %20
13: ; preds = %10
%14 = load %struct.sn_context*, %struct.sn_context** %3
%15 = load i32, i32* %4
%16 = call i32 @sn_send_asoc_msg(%struct.sn_context* %14, i32 1024, i32 %15, i32 0)
br label %17
17: ; preds = %13
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %10
20: ; preds = %10
br label %21
21: ; preds = %20
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %6
24: ; preds = %6
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
%struct.sn_context = type { i32 }
define i32 @sn_do_sched_tests(%struct.sn_context* %0) {
%2 = tail call i32 @sn_send_asoc_msg(%struct.sn_context* %0, i32 1024, i32 1, i32 0)
%3 = tail call i32 @sn_send_asoc_msg(%struct.sn_context* %0, i32 1024, i32 1, i32 0)
%4 = tail call i32 @sn_send_asoc_msg(%struct.sn_context* %0, i32 1024, i32 1, i32 0)
%5 = tail call i32 @sn_send_asoc_msg(%struct.sn_context* %0, i32 1024, i32 2, i32 0)
%6 = tail call i32 @sn_send_asoc_msg(%struct.sn_context* %0, i32 1024, i32 2, i32 0)
%7 = tail call i32 @sn_send_asoc_msg(%struct.sn_context* %0, i32 1024, i32 2, i32 0)
%8 = tail call i32 @sn_send_asoc_msg(%struct.sn_context* %0, i32 1024, i32 3, i32 0)
%9 = tail call i32 @sn_send_asoc_msg(%struct.sn_context* %0, i32 1024, i32 3, i32 0)
%10 = tail call i32 @sn_send_asoc_msg(%struct.sn_context* %0, i32 1024, i32 3, i32 0)
ret i32 undef
}