#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 */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
scalar_t__ FD_ISSET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ gettext(char *);
int /*<<< orphan*/ perror(int /*<<< orphan*/);
int send(int, char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ strcat(char *, char *);
void send_to_all(int j, int i, int sockfd, int nbytes_recvd, char *recv_buf,
                 fd_set *master, char *client) {
  strcat(client, recv_buf);
  if (FD_ISSET(j, master)) {
    if (j != sockfd && j != i) {
      if (send(j, client, nbytes_recvd + 18, 0) == -1) {
        perror(gettext("Enviar"));
      }
    }
  }
}


x86 assembly (clang, -O0):
<send_to_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1070 <strcat@plt>
mov    -0x4(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <FD_ISSET@plt>
cmp    $0x0,%rax
je     11e5 <send_to_all+0x95>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11e0 <send_to_all+0x90>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     11e0 <send_to_all+0x90>
mov    -0x4(%rbp),%edi
mov    0x10(%rbp),%rsi
mov    -0x10(%rbp),%edx
add    $0x12,%edx
xor    %ecx,%ecx
call   1050 <send@plt>
cmp    $0xffffffff,%eax
jne    11db <send_to_all+0x8b>
lea    0xe31(%rip),%rdi
call   1040 <gettext@plt>
mov    %eax,%edi
call   1060 <perror@plt>
jmp    11e0 <send_to_all+0x90>
jmp    11e5 <send_to_all+0x95>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_to_all>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%rbx
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%r13d
mov    %edi,%ebp
mov    0x40(%rsp),%r12
mov    %r12,%rdi
mov    %r8,%rsi
call   1070 <strcat@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <FD_ISSET@plt>
cmp    %r13d,%ebp
je     11aa <send_to_all+0x5a>
cmp    %r15d,%ebp
je     11aa <send_to_all+0x5a>
test   %rax,%rax
je     11aa <send_to_all+0x5a>
add    $0x12,%r14d
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r14d,%edx
xor    %ecx,%ecx
call   1050 <send@plt>
cmp    $0xffffffff,%eax
je     11b9 <send_to_all+0x69>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe40(%rip),%rdi
call   1040 <gettext@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <perror@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Enviar\00"
define void @send_to_all(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i32* %5, i8* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i8*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i32* %5, i32** %13
store i8* %6, i8** %14
%15 = load i8*, i8** %14
%16 = load i8*, i8** %12
%17 = call i32 @strcat(i8* %15, i8* %16)
%18 = load i32, i32* %8
%19 = load i32*, i32** %13
%20 = call i64 @FD_ISSET(i32 %18, i32* %19)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %42
22: ; preds = %7
%23 = load i32, i32* %8
%24 = load i32, i32* %10
%25 = icmp ne i32 %23, %24
br i1 %25, label %26, label %41
26: ; preds = %22
%27 = load i32, i32* %8
%28 = load i32, i32* %9
%29 = icmp ne i32 %27, %28
br i1 %29, label %30, label %41
30: ; preds = %26
%31 = load i32, i32* %8
%32 = load i8*, i8** %14
%33 = load i32, i32* %11
%34 = add nsw i32 %33, 18
%35 = call i32 @send(i32 %31, i8* %32, i32 %34, i32 0)
%36 = icmp eq i32 %35, -1
br i1 %36, label %37, label %40
37: ; preds = %30
%38 = call i32 @gettext(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%39 = call i32 @perror(i32 %38)
br label %40
40: ; preds = %37, %30
br label %41
41: ; preds = %40, %26, %22
br label %42
42: ; preds = %41, %7
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Enviar\00"
define void @send_to_all(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i32* %5, i8* %6) {
%8 = tail call i32 @strcat(i8* %6, i8* %4)
%9 = tail call i64 @FD_ISSET(i32 %0, i32* %5)
%10 = icmp eq i64 %9, 0
%11 = icmp eq i32 %0, %2
%12 = or i1 %11, %10
%13 = icmp eq i32 %0, %1
%14 = or i1 %13, %12
br i1 %14, label %22, label %15
15: ; preds = %7
%16 = add nsw i32 %3, 18
%17 = tail call i32 @send(i32 %0, i8* %6, i32 %16, i32 0)
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = tail call i32 @gettext(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%21 = tail call i32 @perror(i32 %20)
br label %22
22: ; preds = %19, %15, %7
ret void
}