#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*/ IP_MULTICAST_LOOP;
int /*<<< orphan*/ test_u_char(int /*<<< orphan*/, char *, int,
                               int /*<<< orphan*/, int, char *, int, int);
void test_loop(int raw_sock, int tcp_sock, int udp_sock) {
  test_u_char(IP_MULTICAST_LOOP, "IP_MULTICAST_LOOP", 1, 0, 243, "raw_sock",
              raw_sock, 0);
  test_u_char(IP_MULTICAST_LOOP, "IP_MULTICAST_LOOP", 1, 0, 243, "tcp_sock",
              tcp_sock, 0x00000000);
  test_u_char(IP_MULTICAST_LOOP, "IP_MULTICAST_LOOP", 1, 0, 243, "udp_sock",
              udp_sock, 0);
}


x86 assembly (clang, -O0):
<test_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%eax
lea    0xecc(%rip),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0xf3,%r8d
lea    0xeca(%rip),%r9
mov    %eax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <test_u_char@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%eax
lea    0xe95(%rip),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0xf3,%r8d
lea    0xe9c(%rip),%r9
mov    %eax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <test_u_char@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%eax
lea    0xe5e(%rip),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0xf3,%r8d
lea    0xe6e(%rip),%r9
mov    %eax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <test_u_char@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_loop>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%ebx
mov    %edi,%eax
mov    0x2eca(%rip),%r12
mov    (%r12),%edi
lea    0xecf(%rip),%r15
lea    0xeda(%rip),%r9
mov    %r15,%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0xf3,%r8d
push   $0x0
push   %rax
call   1030 <test_u_char@plt>
add    $0x10,%rsp
mov    (%r12),%edi
lea    0xebc(%rip),%r9
mov    %r15,%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0xf3,%r8d
push   $0x0
push   %rbx
call   1030 <test_u_char@plt>
add    $0x10,%rsp
mov    (%r12),%edi
lea    0xe9e(%rip),%r9
mov    %r15,%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0xf3,%r8d
push   $0x0
push   %r14
call   1030 <test_u_char@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@IP_MULTICAST_LOOP = global i32 0
@.str = [18 x i8] c"IP_MULTICAST_LOOP\00"
@.str.1 = [9 x i8] c"raw_sock\00"
@.str.2 = [9 x i8] c"tcp_sock\00"
@.str.3 = [9 x i8] c"udp_sock\00"
define void @test_loop(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @IP_MULTICAST_LOOP
%8 = load i32, i32* %4
%9 = call i32 @test_u_char(i32 %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 243, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 0)
%10 = load i32, i32* @IP_MULTICAST_LOOP
%11 = load i32, i32* %5
%12 = call i32 @test_u_char(i32 %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 243, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 0)
%13 = load i32, i32* @IP_MULTICAST_LOOP
%14 = load i32, i32* %6
%15 = call i32 @test_u_char(i32 %13, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 243, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %14, i32 0)
ret void
}

LLVM IR (-O2):
@IP_MULTICAST_LOOP = global i32 0
@.str = [18 x i8] c"IP_MULTICAST_LOOP\00"
@.str.1 = [9 x i8] c"raw_sock\00"
@.str.2 = [9 x i8] c"tcp_sock\00"
@.str.3 = [9 x i8] c"udp_sock\00"
define void @test_loop(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @IP_MULTICAST_LOOP
%5 = tail call i32 @test_u_char(i32 %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 243, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 0)
%6 = load i32, i32* @IP_MULTICAST_LOOP
%7 = tail call i32 @test_u_char(i32 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 243, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %1, i32 0)
%8 = load i32, i32* @IP_MULTICAST_LOOP
%9 = tail call i32 @test_u_char(i32 %8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 243, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %2, i32 0)
ret void
}