#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 smtp_sendCommand(long, char *, unsigned long);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int smtp_nameRecipients(long int sock, char **rcptList, unsigned long timeout) {
  char buf[513];
  int err;
  int i;
  for (i = 0; rcptList[i]; ++i) {
    sprintf(buf, "RCPT TO: <%s>\r\n", rcptList[i]);
    err = smtp_sendCommand(sock, buf, timeout);
    if ((err != 250) && (err != 251))
      return err;
  }
  return 0;
}


x86 assembly (clang, -O0):
<smtp_nameRecipients>:
push   %rbp
mov    %rsp,%rbp
sub    $0x240,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x238(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x238(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     11da <smtp_nameRecipients+0xba>
lea    -0x230(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x238(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe8c(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x230(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <smtp_sendCommand@plt>
mov    %eax,-0x234(%rbp)
cmpl   $0xfa,-0x234(%rbp)
je     11c1 <smtp_nameRecipients+0xa1>
cmpl   $0xfb,-0x234(%rbp)
je     11c1 <smtp_nameRecipients+0xa1>
mov    -0x234(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11e1 <smtp_nameRecipients+0xc1>
jmp    11c6 <smtp_nameRecipients+0xa6>
mov    -0x238(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x238(%rbp)
jmp    1141 <smtp_nameRecipients+0x21>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x240,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smtp_nameRecipients>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x208,%rsp
mov    %rdx,%r15
mov    (%rsi),%rdx
xor    %r14d,%r14d
test   %rdx,%rdx
je     1198 <smtp_nameRecipients+0x78>
mov    %rsi,%rbp
mov    %rdi,%r13
add    $0x8,%rbp
lea    0xeb0(%rip),%r12
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <sprintf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <smtp_sendCommand@plt>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
cmp    $0xfa,%ecx
jne    1195 <smtp_nameRecipients+0x75>
mov    0x0(%rbp),%rdx
add    $0x8,%rbp
test   %rdx,%rdx
jne    1160 <smtp_nameRecipients+0x40>
jmp    1198 <smtp_nameRecipients+0x78>
mov    %eax,%r14d
mov    %r14d,%eax
add    $0x208,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"RCPT TO: <%s>\0D\0A\00"
define i32 @smtp_nameRecipients(i64 %0, i8** %1, i64 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i8**
%7 = alloca i64
%8 = alloca [513 x i8]
%9 = alloca i32
%10 = alloca i32
store i64 %0, i64* %5
store i8** %1, i8*** %6
store i64 %2, i64* %7
store i32 0, i32* %10
br label %11
11: ; preds = %38, %3
%12 = load i8**, i8*** %6
%13 = load i32, i32* %10
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %41
18: ; preds = %11
%19 = getelementptr inbounds [513 x i8], [513 x i8]* %8, i64 0, i64 0
%20 = load i8**, i8*** %6
%21 = load i32, i32* %10
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = call i32 @sprintf(i8* %19, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %24)
%26 = load i64, i64* %5
%27 = getelementptr inbounds [513 x i8], [513 x i8]* %8, i64 0, i64 0
%28 = load i64, i64* %7
%29 = call i32 @smtp_sendCommand(i64 %26, i8* %27, i64 %28)
store i32 %29, i32* %9
%30 = load i32, i32* %9
%31 = icmp ne i32 %30, 250
br i1 %31, label %32, label %37
32: ; preds = %18
%33 = load i32, i32* %9
%34 = icmp ne i32 %33, 251
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = load i32, i32* %9
store i32 %36, i32* %4
br label %42
37: ; preds = %32, %18
br label %38
38: ; preds = %37
%39 = load i32, i32* %10
%40 = add nsw i32 %39, 1
store i32 %40, i32* %10
br label %11
41: ; preds = %11
store i32 0, i32* %4
br label %42
42: ; preds = %41, %35
%43 = load i32, i32* %4
ret i32 %43
}

LLVM IR (-O2):
@.str = [16 x i8] c"RCPT TO: <%s>\0D\0A\00"
define i32 @smtp_nameRecipients(i64 %0, i8** nocapture %1, i64 %2) {
%4 = alloca [513 x i8]
%5 = getelementptr inbounds [513 x i8], [513 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %1
%7 = icmp eq i8* %6, null
br i1 %7, label %20, label %12
8: ; preds = %12
%9 = getelementptr inbounds i8*, i8** %1, i64 %19
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %20, label %12
12: ; preds = %3, %8
%13 = phi i64 [ %19, %8 ], [ 0, %3 ]
%14 = phi i8* [ %10, %8 ], [ %6, %3 ]
%15 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = call i32 @smtp_sendCommand(i64 %0, i8* %5, i64 %2)
%17 = and i32 %16, -2
%18 = icmp eq i32 %17, 250
%19 = add nuw i64 %13, 1
br i1 %18, label %8, label %20
20: ; preds = %12, %8, %3
%21 = phi i32 [ 0, %3 ], [ 0, %8 ], [ %16, %12 ]
ret i32 %21
}