#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 gethostname(char *, int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
int writen(int, char *, size_t);
int smtp_send_reply(int sockfd, size_t code, const char *msg, size_t msg_len) {
  int ret;
  size_t slen;
  char domain[256], rply_line[512];
  size_t pos = 0;
  switch (code) {
  case 1:
    if (NULL == msg) {
      strcpy(rply_line, "220 ");
      pos = 4;
      memset(domain, 0, sizeof domain);
      if (-1 == gethostname(domain, sizeof domain))
        return -5;
      strncpy(rply_line + pos, domain, (512 - 7));
      pos += ((256) < (strlen(domain)) ? (256) : (strlen(domain)));
      strcpy(rply_line + pos, " Service ready\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "220 ");
    break;
  case 2:
    if (NULL == msg) {
      strcpy(rply_line, "221 closing connection, bye\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "221 ");
    break;
  case 3:
    if (NULL == msg) {
      strcpy(rply_line, "250 OK\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "250 ");
    break;
  case 4:
    if (NULL == msg)
      return -3;
    else
      strcpy(rply_line, "250-");
    break;
  case 5:
    if (NULL == msg) {
      strcpy(rply_line, "251 User not local; "
                        "will forward to next hop\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "251 ");
    break;
  case 6:
    if (NULL == msg) {
      strcpy(rply_line, "252 cannot VRFY user, but will "
                        "accept message and attempt delivery\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "252 ");
    break;
  case 7:
    if (NULL == msg) {
      strcpy(rply_line, "354 Start mail input; "
                        "end with <CRLF>.<CRLF>\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "354 ");
    break;
  case 8:
    if (NULL == msg) {
      strcpy(rply_line, "450 Requested mail action not taken: "
                        "mailbox unavailable\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "450 ");
    break;
  case 9:
    if (NULL == msg) {
      strcpy(rply_line, "451 Requested action aborted: "
                        "local error in processing\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "451 ");
    break;
  case 10:
    if (NULL == msg) {
      strcpy(rply_line, "452 requested action not taken: "
                        "insufficient system storage\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "452 ");
    break;
  case 11:
    if (NULL == msg) {
      strcpy(rply_line, "455 Server unable to accommodate "
                        "parameters\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "455  ");
    break;
  case 12:
    if (NULL == msg) {
      strcpy(rply_line, "500 Syntax error, command unrecognized\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "500 ");
    break;
  case 13:
    if (NULL == msg) {
      strcpy(rply_line, "502 Command not implemented\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "502 ");
    break;
  case 14:
    if (NULL == msg) {
      strcpy(rply_line, "503 Bad sequence of commands\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "503 ");
    break;
  case 15:
    if (NULL == msg) {
      strcpy(rply_line, "504 Command parameter not implemented\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "504 ");
    break;
  case 16:
    if (NULL == msg) {
      strcpy(rply_line, "550 Requested action not taken: "
                        "mailbox unavailable\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "550 ");
    break;
  case 17:
    if (NULL == msg) {
      strcpy(rply_line, "551 User not local; "
                        "please try next hop\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "551 ");
    break;
  case 18:
    if (NULL == msg) {
      strcpy(rply_line, "552 Requested mail action aborted: "
                        "exceeded storage allocation\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "552 ");
    break;
  case 19:
    if (NULL == msg) {
      strcpy(rply_line, "553 Requested action not taken: "
                        "mailbox name not allowed\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
      return 0;
    } else
      strcpy(rply_line, "553 ");
    break;
  case 20:
    if (NULL == msg) {
      strcpy(rply_line, "554 Transaction failed\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "554 ");
    break;
  case 21:
    if (NULL == msg) {
      strcpy(rply_line, "555 MAIL FROM/RCPT TO parameters not "
                        "recognized or not implemented\r\n");
      ret = writen(sockfd, rply_line, slen = strlen(rply_line));
    } else
      strcpy(rply_line, "555 ");
    break;
  default:
    return -3;
  }
  if (NULL != msg) {
    pos = 4;
    if (msg_len > (512 - 7))
      return -3;
    strncpy(rply_line + pos, msg,
            ((msg_len) < ((512 - 7)) ? (msg_len) : ((512 - 7))));
    pos += (((512 - 7)) < (msg_len) ? ((512 - 7)) : (msg_len));
    strcpy(rply_line + pos, "\r\n");
    ret = writen(sockfd, rply_line, slen = strlen(rply_line));
  }
  if (ret < 0 || (size_t)ret != slen)
    return -4;
  else
    return 0;
}


x86 assembly (clang, -O0):
<smtp_send_reply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4c0,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x338(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x340(%rbp)
sub    $0x14,%rax
ja     1c5e <smtp_send_reply+0xafe>
mov    -0x340(%rbp),%rax
lea    0xe54(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    12ee <smtp_send_reply+0x18e>
lea    -0x330(%rbp),%rdi
lea    0xe85(%rip),%rsi
call   1040 <strcpy@plt>
movq   $0x4,-0x338(%rbp)
lea    -0x130(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
lea    -0x130(%rbp),%rdi
mov    $0x100,%esi
call   1080 <gethostname@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    121e <smtp_send_reply+0xbe>
movl   $0xfffffffb,-0x4(%rbp)
jmp    1dc8 <smtp_send_reply+0xc68>
lea    -0x330(%rbp),%rdi
add    -0x338(%rbp),%rdi
lea    -0x130(%rbp),%rsi
mov    $0x1f9,%edx
call   1030 <strncpy@plt>
lea    -0x130(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    $0x100,%eax
cmp    %ecx,%eax
jge    1268 <smtp_send_reply+0x108>
mov    $0x100,%eax
mov    %eax,-0x344(%rbp)
jmp    127a <smtp_send_reply+0x11a>
lea    -0x130(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x344(%rbp)
mov    -0x344(%rbp),%eax
cltq
add    -0x338(%rbp),%rax
mov    %rax,-0x338(%rbp)
lea    -0x330(%rbp),%rdi
add    -0x338(%rbp),%rdi
lea    0xdb4(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x354(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x350(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x354(%rbp),%edi
mov    -0x350(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    1301 <smtp_send_reply+0x1a1>
lea    -0x330(%rbp),%rdi
lea    0xd58(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1369 <smtp_send_reply+0x209>
lea    -0x330(%rbp),%rdi
lea    0xd4a(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x364(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x360(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x364(%rbp),%edi
mov    -0x360(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    137c <smtp_send_reply+0x21c>
lea    -0x330(%rbp),%rdi
lea    0xd11(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    13e4 <smtp_send_reply+0x284>
lea    -0x330(%rbp),%rdi
lea    0xcf2(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x374(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x370(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x374(%rbp),%edi
mov    -0x370(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    13f7 <smtp_send_reply+0x297>
lea    -0x330(%rbp),%rdi
lea    0xca4(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1414 <smtp_send_reply+0x2b4>
movl   $0xfffffffd,-0x4(%rbp)
jmp    1dc8 <smtp_send_reply+0xc68>
lea    -0x330(%rbp),%rdi
lea    0xc79(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    148f <smtp_send_reply+0x32f>
lea    -0x330(%rbp),%rdi
lea    0xc5a(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x384(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x380(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x384(%rbp),%edi
mov    -0x380(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    14a2 <smtp_send_reply+0x342>
lea    -0x330(%rbp),%rdi
lea    0xc32(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    150a <smtp_send_reply+0x3aa>
lea    -0x330(%rbp),%rdi
lea    0xc13(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x394(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x390(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x394(%rbp),%edi
mov    -0x390(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    151d <smtp_send_reply+0x3bd>
lea    -0x330(%rbp),%rdi
lea    0xc01(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1585 <smtp_send_reply+0x425>
lea    -0x330(%rbp),%rdi
lea    0xbe2(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x3a4(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x3a0(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x3a4(%rbp),%edi
mov    -0x3a0(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    1598 <smtp_send_reply+0x438>
lea    -0x330(%rbp),%rdi
lea    0xbba(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1600 <smtp_send_reply+0x4a0>
lea    -0x330(%rbp),%rdi
lea    0xb9b(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x3b4(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x3b0(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x3b4(%rbp),%edi
mov    -0x3b0(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    1613 <smtp_send_reply+0x4b3>
lea    -0x330(%rbp),%rdi
lea    0xb7f(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    167b <smtp_send_reply+0x51b>
lea    -0x330(%rbp),%rdi
lea    0xb60(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x3c4(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x3c0(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x3c4(%rbp),%edi
mov    -0x3c0(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    168e <smtp_send_reply+0x52e>
lea    -0x330(%rbp),%rdi
lea    0xb43(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    16f6 <smtp_send_reply+0x596>
lea    -0x330(%rbp),%rdi
lea    0xb24(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x3d4(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x3d0(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x3d4(%rbp),%edi
mov    -0x3d0(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    1709 <smtp_send_reply+0x5a9>
lea    -0x330(%rbp),%rdi
lea    0xb0b(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1771 <smtp_send_reply+0x611>
lea    -0x330(%rbp),%rdi
lea    0xaec(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x3e4(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x3e0(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x3e4(%rbp),%edi
mov    -0x3e0(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    1784 <smtp_send_reply+0x624>
lea    -0x330(%rbp),%rdi
lea    0xac3(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    17ec <smtp_send_reply+0x68c>
lea    -0x330(%rbp),%rdi
lea    0xaa5(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x3f4(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x3f0(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x3f4(%rbp),%edi
mov    -0x3f0(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    17ff <smtp_send_reply+0x69f>
lea    -0x330(%rbp),%rdi
lea    0xa77(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1867 <smtp_send_reply+0x707>
lea    -0x330(%rbp),%rdi
lea    0xa58(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x404(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x400(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x404(%rbp),%edi
mov    -0x400(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    187a <smtp_send_reply+0x71a>
lea    -0x330(%rbp),%rdi
lea    0xa1f(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    18e2 <smtp_send_reply+0x782>
lea    -0x330(%rbp),%rdi
lea    0xa00(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x414(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x410(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x414(%rbp),%edi
mov    -0x410(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    18f5 <smtp_send_reply+0x795>
lea    -0x330(%rbp),%rdi
lea    0x9c8(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    195d <smtp_send_reply+0x7fd>
lea    -0x330(%rbp),%rdi
lea    0x9a9(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x424(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x420(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x424(%rbp),%edi
mov    -0x420(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    1970 <smtp_send_reply+0x810>
lea    -0x330(%rbp),%rdi
lea    0x97a(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    19d8 <smtp_send_reply+0x878>
lea    -0x330(%rbp),%rdi
lea    0x95b(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x434(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x430(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x434(%rbp),%edi
mov    -0x430(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    19eb <smtp_send_reply+0x88b>
lea    -0x330(%rbp),%rdi
lea    0x93a(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1a53 <smtp_send_reply+0x8f3>
lea    -0x330(%rbp),%rdi
lea    0x91b(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x444(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x440(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x444(%rbp),%edi
mov    -0x440(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    1a66 <smtp_send_reply+0x906>
lea    -0x330(%rbp),%rdi
lea    0x8ee(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1ace <smtp_send_reply+0x96e>
lea    -0x330(%rbp),%rdi
lea    0x8cf(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x454(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x450(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x454(%rbp),%edi
mov    -0x450(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    1ae1 <smtp_send_reply+0x981>
lea    -0x330(%rbp),%rdi
lea    0x8b9(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1b50 <smtp_send_reply+0x9f0>
lea    -0x330(%rbp),%rdi
lea    0x89a(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x464(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x460(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x464(%rbp),%edi
mov    -0x460(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x4(%rbp)
jmp    1dc8 <smtp_send_reply+0xc68>
lea    -0x330(%rbp),%rdi
lea    0x877(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1bcb <smtp_send_reply+0xa6b>
lea    -0x330(%rbp),%rdi
lea    0x858(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x474(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x470(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x474(%rbp),%edi
mov    -0x470(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    1bde <smtp_send_reply+0xa7e>
lea    -0x330(%rbp),%rdi
lea    0x81a(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1c46 <smtp_send_reply+0xae6>
lea    -0x330(%rbp),%rdi
lea    0x7fb(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x484(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x480(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x484(%rbp),%edi
mov    -0x480(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
jmp    1c59 <smtp_send_reply+0xaf9>
lea    -0x330(%rbp),%rdi
lea    0x7e9(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1c6a <smtp_send_reply+0xb0a>
movl   $0xfffffffd,-0x4(%rbp)
jmp    1dc8 <smtp_send_reply+0xc68>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
je     1d9d <smtp_send_reply+0xc3d>
movq   $0x4,-0x338(%rbp)
cmpq   $0x1f9,-0x20(%rbp)
jbe    1c9b <smtp_send_reply+0xb3b>
movl   $0xfffffffd,-0x4(%rbp)
jmp    1dc8 <smtp_send_reply+0xc68>
lea    -0x330(%rbp),%rax
add    -0x338(%rbp),%rax
mov    %rax,-0x498(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x490(%rbp)
cmpq   $0x1f9,-0x20(%rbp)
jae    1cd9 <smtp_send_reply+0xb79>
mov    -0x20(%rbp),%rax
mov    %rax,-0x4a0(%rbp)
jmp    1cea <smtp_send_reply+0xb8a>
mov    $0x1f9,%eax
mov    %rax,-0x4a0(%rbp)
jmp    1cea <smtp_send_reply+0xb8a>
mov    -0x490(%rbp),%rsi
mov    -0x498(%rbp),%rdi
mov    -0x4a0(%rbp),%rdx
call   1030 <strncpy@plt>
mov    $0x1f9,%eax
cmp    -0x20(%rbp),%rax
jae    1d24 <smtp_send_reply+0xbc4>
mov    $0x1f9,%eax
mov    %rax,-0x4a8(%rbp)
jmp    1d2f <smtp_send_reply+0xbcf>
mov    -0x20(%rbp),%rax
mov    %rax,-0x4a8(%rbp)
mov    -0x4a8(%rbp),%rax
add    -0x338(%rbp),%rax
mov    %rax,-0x338(%rbp)
lea    -0x330(%rbp),%rdi
add    -0x338(%rbp),%rdi
lea    0x3f1(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4b4(%rbp)
lea    -0x330(%rbp),%rax
mov    %rax,-0x4b0(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x4b4(%rbp),%edi
mov    -0x4b0(%rbp),%rsi
movslq %eax,%rdx
mov    %rdx,-0x30(%rbp)
call   1070 <writen@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     1db5 <smtp_send_reply+0xc55>
movslq -0x24(%rbp),%rax
cmp    -0x30(%rbp),%rax
je     1dc1 <smtp_send_reply+0xc61>
movl   $0xfffffffc,-0x4(%rbp)
jmp    1dc8 <smtp_send_reply+0xc68>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smtp_send_reply>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x308,%rsp
mov    $0xfffffffd,%ebp
add    $0xffffffffffffffff,%rsi
cmp    $0x14,%rsi
ja     142c <smtp_send_reply+0x2cc>
mov    %rcx,%r15
mov    %rdx,%rbx
mov    %edi,%r14d
lea    0xe70(%rip),%rax
movslq (%rax,%rsi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xeb4(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcpy@plt>
test   %rbx,%rbx
jne    13c2 <smtp_send_reply+0x262>
lea    0x200(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
mov    %rbx,%rdi
mov    $0x100,%esi
call   1080 <gethostname@plt>
cmp    $0xffffffff,%eax
je     156d <smtp_send_reply+0x40d>
lea    0x4(%rsp),%rdi
lea    0x200(%rsp),%rbx
mov    $0x1f9,%edx
mov    %rbx,%rsi
call   1030 <strncpy@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    $0x104,%ecx
cmp    $0x100,%eax
jg     1220 <smtp_send_reply+0xc0>
lea    0x200(%rsp),%rdi
call   1050 <strlen@plt>
movslq %eax,%rcx
add    $0x4,%rcx
lea    (%rsp,%rcx,1),%rdi
lea    0xe2e(%rip),%rsi
jmp    13f3 <smtp_send_reply+0x293>
test   %rbx,%rbx
je     143c <smtp_send_reply+0x2dc>
lea    0xe48(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     1448 <smtp_send_reply+0x2e8>
lea    0xe41(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     142c <smtp_send_reply+0x2cc>
lea    0xe31(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     1454 <smtp_send_reply+0x2f4>
lea    0xe50(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     1460 <smtp_send_reply+0x300>
lea    0xe85(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     146c <smtp_send_reply+0x30c>
lea    0xea4(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     147b <smtp_send_reply+0x31b>
lea    0xecf(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     148a <smtp_send_reply+0x32a>
lea    0xef9(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     1499 <smtp_send_reply+0x339>
lea    0xf27(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     14a8 <smtp_send_reply+0x348>
lea    0xf45(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     14b7 <smtp_send_reply+0x357>
lea    0xf5f(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     14c6 <smtp_send_reply+0x366>
lea    0xf6d(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     14d5 <smtp_send_reply+0x375>
lea    0xf7c(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     14e4 <smtp_send_reply+0x384>
lea    0xf97(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     14f3 <smtp_send_reply+0x393>
lea    0xfc0(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     1502 <smtp_send_reply+0x3a2>
lea    0xfdd(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     1511 <smtp_send_reply+0x3b1>
lea    0x1011(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     1520 <smtp_send_reply+0x3c0>
lea    0x103f(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     154f <smtp_send_reply+0x3ef>
lea    0x104b(%rip),%rsi
jmp    13ba <smtp_send_reply+0x25a>
test   %rbx,%rbx
je     155e <smtp_send_reply+0x3fe>
lea    0x1083(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcpy@plt>
cmp    $0x1f9,%r15
ja     142c <smtp_send_reply+0x2cc>
lea    0x4(%rsp),%rdi
mov    $0x1f9,%edx
cmovb  %r15,%rdx
mov    %rbx,%rsi
call   1030 <strncpy@plt>
mov    %rsp,%rax
lea    (%r15,%rax,1),%rdi
add    $0x4,%rdi
lea    0xd57(%rip),%rsi
call   1040 <strcpy@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
movslq %eax,%rbp
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1070 <writen@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
test   %eax,%eax
lea    -0x4(,%rcx,4),%eax
mov    $0xfffffffc,%ebp
cmovns %eax,%ebp
mov    %ebp,%eax
add    $0x308,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc27(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xc3e(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xc45(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xc6d(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xcab(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xcd0(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xd01(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xd31(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xd65(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xd8a(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xda9(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xdbd(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xdd2(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xdf0(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xe1c(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xe3c(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xe73(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
movslq %eax,%rdx
mov    %r14d,%edi
mov    %rbx,%rsi
call   1070 <writen@plt>
xor    %ebp,%ebp
jmp    142c <smtp_send_reply+0x2cc>
lea    0xe84(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
lea    0xe93(%rip),%rsi
mov    %rsp,%rdi
jmp    13f3 <smtp_send_reply+0x293>
mov    $0xfffffffb,%ebp
jmp    142c <smtp_send_reply+0x2cc>

LLVM IR (-O0):
@.str = [5 x i8] c"220 \00"
@.str.1 = [17 x i8] c" Service ready\0D\0A\00"
@.str.2 = [30 x i8] c"221 closing connection, bye\0D\0A\00"
@.str.3 = [5 x i8] c"221 \00"
@.str.4 = [9 x i8] c"250 OK\0D\0A\00"
@.str.5 = [5 x i8] c"250 \00"
@.str.6 = [5 x i8] c"250-\00"
@.str.7 = [47 x i8] c"251 User not local; will forward to next hop\0D\0A\00"
@.str.8 = [5 x i8] c"251 \00"
@.str.9 = [69 x i8] c"252 cannot VRFY user, but will accept message and attempt delivery\0D\0A\00"
@.str.10 = [5 x i8] c"252 \00"
@.str.11 = [47 x i8] c"354 Start mail input; end with <CRLF>.<CRLF>\0D\0A\00"
@.str.12 = [5 x i8] c"354 \00"
@.str.13 = [59 x i8] c"450 Requested mail action not taken: mailbox unavailable\0D\0A\00"
@.str.14 = [5 x i8] c"450 \00"
@.str.15 = [58 x i8] c"451 Requested action aborted: local error in processing\0D\0A\00"
@.str.16 = [5 x i8] c"451 \00"
@.str.17 = [62 x i8] c"452 requested action not taken: insufficient system storage\0D\0A\00"
@.str.18 = [5 x i8] c"452 \00"
@.str.19 = [46 x i8] c"455 Server unable to accommodate parameters\0D\0A\00"
@.str.20 = [6 x i8] c"455 \00"
@.str.21 = [41 x i8] c"500 Syntax error, command unrecognized\0D\0A\00"
@.str.22 = [5 x i8] c"500 \00"
@.str.23 = [30 x i8] c"502 Command not implemented\0D\0A\00"
@.str.24 = [5 x i8] c"502 \00"
@.str.25 = [31 x i8] c"503 Bad sequence of commands\0D\0A\00"
@.str.26 = [5 x i8] c"503 \00"
@.str.27 = [40 x i8] c"504 Command parameter not implemented\0D\0A\00"
@.str.28 = [5 x i8] c"504 \00"
@.str.29 = [54 x i8] c"550 Requested action not taken: mailbox unavailable\0D\0A\00"
@.str.30 = [5 x i8] c"550 \00"
@.str.31 = [42 x i8] c"551 User not local; please try next hop\0D\0A\00"
@.str.32 = [5 x i8] c"551 \00"
@.str.33 = [65 x i8] c"552 Requested mail action aborted: exceeded storage allocation\0D\0A\00"
@.str.34 = [5 x i8] c"552 \00"
@.str.35 = [59 x i8] c"553 Requested action not taken: mailbox name not allowed\0D\0A\00"
@.str.36 = [5 x i8] c"553 \00"
@.str.37 = [25 x i8] c"554 Transaction failed\0D\0A\00"
@.str.38 = [5 x i8] c"554 \00"
@.str.39 = [69 x i8] c"555 MAIL FROM/RCPT TO parameters not recognized or not implemented\0D\0A\00"
@.str.40 = [5 x i8] c"555 \00"
@.str.41 = [3 x i8] c"\0D\0A\00"
define i32 @smtp_send_reply(i32 %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca i64
%12 = alloca [256 x i8]
%13 = alloca [512 x i8]
%14 = alloca i64
store i32 %0, i32* %6
store i64 %1, i64* %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i64 0, i64* %14
%15 = load i64, i64* %7
switch i64 %15, label %372 [
i64 1, label %16
i64 2, label %60
i64 3, label %76
i64 4, label %92
i64 5, label %100
i64 6, label %116
i64 7, label %132
i64 8, label %148
i64 9, label %164
i64 10, label %180
i64 11, label %196
i64 12, label %212
i64 13, label %228
i64 14, label %244
i64 15, label %260
i64 16, label %276
i64 17, label %292
i64 18, label %308
i64 19, label %324
i64 20, label %340
i64 21, label %356
]
16: ; preds = %4
%17 = load i8*, i8** %8
%18 = icmp eq i8* null, %17
br i1 %18, label %19, label %56
19: ; preds = %16
%20 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%21 = call i32 @strcpy(i8* %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i64 4, i64* %14
%22 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%23 = call i32 @memset(i8* %22, i32 0, i32 256)
%24 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%25 = call i32 @gethostname(i8* %24, i32 256)
%26 = icmp eq i32 -1, %25
br i1 %26, label %27, label %28
27: ; preds = %19
store i32 -5, i32* %5
br label %422
28: ; preds = %19
%29 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%30 = load i64, i64* %14
%31 = getelementptr inbounds i8, i8* %29, i64 %30
%32 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%33 = call i32 @strncpy(i8* %31, i8* %32, i64 505)
%34 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%35 = call i32 @strlen(i8* %34)
%36 = icmp slt i32 256, %35
br i1 %36, label %37, label %38
37: ; preds = %28
br label %41
38: ; preds = %28
%39 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%40 = call i32 @strlen(i8* %39)
br label %41
41: ; preds = %38, %37
%42 = phi i32 [ 256, %37 ], [ %40, %38 ]
%43 = sext i32 %42 to i64
%44 = load i64, i64* %14
%45 = add i64 %44, %43
store i64 %45, i64* %14
%46 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%47 = load i64, i64* %14
%48 = getelementptr inbounds i8, i8* %46, i64 %47
%49 = call i32 @strcpy(i8* %48, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%50 = load i32, i32* %6
%51 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%52 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%53 = call i32 @strlen(i8* %52)
%54 = sext i32 %53 to i64
store i64 %54, i64* %11
%55 = call i32 @writen(i32 %50, i8* %51, i64 %54)
store i32 %55, i32* %10
br label %59
56: ; preds = %16
%57 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%58 = call i32 @strcpy(i8* %57, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %59
59: ; preds = %56, %41
br label %373
60: ; preds = %4
%61 = load i8*, i8** %8
%62 = icmp eq i8* null, %61
br i1 %62, label %63, label %72
63: ; preds = %60
%64 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%65 = call i32 @strcpy(i8* %64, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%66 = load i32, i32* %6
%67 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%68 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%69 = call i32 @strlen(i8* %68)
%70 = sext i32 %69 to i64
store i64 %70, i64* %11
%71 = call i32 @writen(i32 %66, i8* %67, i64 %70)
store i32 %71, i32* %10
br label %75
72: ; preds = %60
%73 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%74 = call i32 @strcpy(i8* %73, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %75
75: ; preds = %72, %63
br label %373
76: ; preds = %4
%77 = load i8*, i8** %8
%78 = icmp eq i8* null, %77
br i1 %78, label %79, label %88
79: ; preds = %76
%80 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%81 = call i32 @strcpy(i8* %80, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%82 = load i32, i32* %6
%83 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%84 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%85 = call i32 @strlen(i8* %84)
%86 = sext i32 %85 to i64
store i64 %86, i64* %11
%87 = call i32 @writen(i32 %82, i8* %83, i64 %86)
store i32 %87, i32* %10
br label %91
88: ; preds = %76
%89 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%90 = call i32 @strcpy(i8* %89, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %91
91: ; preds = %88, %79
br label %373
92: ; preds = %4
%93 = load i8*, i8** %8
%94 = icmp eq i8* null, %93
br i1 %94, label %95, label %96
95: ; preds = %92
store i32 -3, i32* %5
br label %422
96: ; preds = %92
%97 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%98 = call i32 @strcpy(i8* %97, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %99
99: ; preds = %96
br label %373
100: ; preds = %4
%101 = load i8*, i8** %8
%102 = icmp eq i8* null, %101
br i1 %102, label %103, label %112
103: ; preds = %100
%104 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%105 = call i32 @strcpy(i8* %104, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%106 = load i32, i32* %6
%107 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%108 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%109 = call i32 @strlen(i8* %108)
%110 = sext i32 %109 to i64
store i64 %110, i64* %11
%111 = call i32 @writen(i32 %106, i8* %107, i64 %110)
store i32 %111, i32* %10
br label %115
112: ; preds = %100
%113 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%114 = call i32 @strcpy(i8* %113, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %115
115: ; preds = %112, %103
br label %373
116: ; preds = %4
%117 = load i8*, i8** %8
%118 = icmp eq i8* null, %117
br i1 %118, label %119, label %128
119: ; preds = %116
%120 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%121 = call i32 @strcpy(i8* %120, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.9, i64 0, i64 0))
%122 = load i32, i32* %6
%123 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%124 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%125 = call i32 @strlen(i8* %124)
%126 = sext i32 %125 to i64
store i64 %126, i64* %11
%127 = call i32 @writen(i32 %122, i8* %123, i64 %126)
store i32 %127, i32* %10
br label %131
128: ; preds = %116
%129 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%130 = call i32 @strcpy(i8* %129, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %131
131: ; preds = %128, %119
br label %373
132: ; preds = %4
%133 = load i8*, i8** %8
%134 = icmp eq i8* null, %133
br i1 %134, label %135, label %144
135: ; preds = %132
%136 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%137 = call i32 @strcpy(i8* %136, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.11, i64 0, i64 0))
%138 = load i32, i32* %6
%139 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%140 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%141 = call i32 @strlen(i8* %140)
%142 = sext i32 %141 to i64
store i64 %142, i64* %11
%143 = call i32 @writen(i32 %138, i8* %139, i64 %142)
store i32 %143, i32* %10
br label %147
144: ; preds = %132
%145 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%146 = call i32 @strcpy(i8* %145, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
br label %147
147: ; preds = %144, %135
br label %373
148: ; preds = %4
%149 = load i8*, i8** %8
%150 = icmp eq i8* null, %149
br i1 %150, label %151, label %160
151: ; preds = %148
%152 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%153 = call i32 @strcpy(i8* %152, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.13, i64 0, i64 0))
%154 = load i32, i32* %6
%155 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%156 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%157 = call i32 @strlen(i8* %156)
%158 = sext i32 %157 to i64
store i64 %158, i64* %11
%159 = call i32 @writen(i32 %154, i8* %155, i64 %158)
store i32 %159, i32* %10
br label %163
160: ; preds = %148
%161 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%162 = call i32 @strcpy(i8* %161, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
br label %163
163: ; preds = %160, %151
br label %373
164: ; preds = %4
%165 = load i8*, i8** %8
%166 = icmp eq i8* null, %165
br i1 %166, label %167, label %176
167: ; preds = %164
%168 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%169 = call i32 @strcpy(i8* %168, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.15, i64 0, i64 0))
%170 = load i32, i32* %6
%171 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%172 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%173 = call i32 @strlen(i8* %172)
%174 = sext i32 %173 to i64
store i64 %174, i64* %11
%175 = call i32 @writen(i32 %170, i8* %171, i64 %174)
store i32 %175, i32* %10
br label %179
176: ; preds = %164
%177 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%178 = call i32 @strcpy(i8* %177, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
br label %179
179: ; preds = %176, %167
br label %373
180: ; preds = %4
%181 = load i8*, i8** %8
%182 = icmp eq i8* null, %181
br i1 %182, label %183, label %192
183: ; preds = %180
%184 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%185 = call i32 @strcpy(i8* %184, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.17, i64 0, i64 0))
%186 = load i32, i32* %6
%187 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%188 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%189 = call i32 @strlen(i8* %188)
%190 = sext i32 %189 to i64
store i64 %190, i64* %11
%191 = call i32 @writen(i32 %186, i8* %187, i64 %190)
store i32 %191, i32* %10
br label %195
192: ; preds = %180
%193 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%194 = call i32 @strcpy(i8* %193, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
br label %195
195: ; preds = %192, %183
br label %373
196: ; preds = %4
%197 = load i8*, i8** %8
%198 = icmp eq i8* null, %197
br i1 %198, label %199, label %208
199: ; preds = %196
%200 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%201 = call i32 @strcpy(i8* %200, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.19, i64 0, i64 0))
%202 = load i32, i32* %6
%203 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%204 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%205 = call i32 @strlen(i8* %204)
%206 = sext i32 %205 to i64
store i64 %206, i64* %11
%207 = call i32 @writen(i32 %202, i8* %203, i64 %206)
store i32 %207, i32* %10
br label %211
208: ; preds = %196
%209 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%210 = call i32 @strcpy(i8* %209, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
br label %211
211: ; preds = %208, %199
br label %373
212: ; preds = %4
%213 = load i8*, i8** %8
%214 = icmp eq i8* null, %213
br i1 %214, label %215, label %224
215: ; preds = %212
%216 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%217 = call i32 @strcpy(i8* %216, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.21, i64 0, i64 0))
%218 = load i32, i32* %6
%219 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%220 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%221 = call i32 @strlen(i8* %220)
%222 = sext i32 %221 to i64
store i64 %222, i64* %11
%223 = call i32 @writen(i32 %218, i8* %219, i64 %222)
store i32 %223, i32* %10
br label %227
224: ; preds = %212
%225 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%226 = call i32 @strcpy(i8* %225, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0))
br label %227
227: ; preds = %224, %215
br label %373
228: ; preds = %4
%229 = load i8*, i8** %8
%230 = icmp eq i8* null, %229
br i1 %230, label %231, label %240
231: ; preds = %228
%232 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%233 = call i32 @strcpy(i8* %232, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.23, i64 0, i64 0))
%234 = load i32, i32* %6
%235 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%236 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%237 = call i32 @strlen(i8* %236)
%238 = sext i32 %237 to i64
store i64 %238, i64* %11
%239 = call i32 @writen(i32 %234, i8* %235, i64 %238)
store i32 %239, i32* %10
br label %243
240: ; preds = %228
%241 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%242 = call i32 @strcpy(i8* %241, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0))
br label %243
243: ; preds = %240, %231
br label %373
244: ; preds = %4
%245 = load i8*, i8** %8
%246 = icmp eq i8* null, %245
br i1 %246, label %247, label %256
247: ; preds = %244
%248 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%249 = call i32 @strcpy(i8* %248, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.25, i64 0, i64 0))
%250 = load i32, i32* %6
%251 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%252 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%253 = call i32 @strlen(i8* %252)
%254 = sext i32 %253 to i64
store i64 %254, i64* %11
%255 = call i32 @writen(i32 %250, i8* %251, i64 %254)
store i32 %255, i32* %10
br label %259
256: ; preds = %244
%257 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%258 = call i32 @strcpy(i8* %257, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i64 0, i64 0))
br label %259
259: ; preds = %256, %247
br label %373
260: ; preds = %4
%261 = load i8*, i8** %8
%262 = icmp eq i8* null, %261
br i1 %262, label %263, label %272
263: ; preds = %260
%264 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%265 = call i32 @strcpy(i8* %264, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.27, i64 0, i64 0))
%266 = load i32, i32* %6
%267 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%268 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%269 = call i32 @strlen(i8* %268)
%270 = sext i32 %269 to i64
store i64 %270, i64* %11
%271 = call i32 @writen(i32 %266, i8* %267, i64 %270)
store i32 %271, i32* %10
br label %275
272: ; preds = %260
%273 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%274 = call i32 @strcpy(i8* %273, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.28, i64 0, i64 0))
br label %275
275: ; preds = %272, %263
br label %373
276: ; preds = %4
%277 = load i8*, i8** %8
%278 = icmp eq i8* null, %277
br i1 %278, label %279, label %288
279: ; preds = %276
%280 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%281 = call i32 @strcpy(i8* %280, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.29, i64 0, i64 0))
%282 = load i32, i32* %6
%283 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%284 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%285 = call i32 @strlen(i8* %284)
%286 = sext i32 %285 to i64
store i64 %286, i64* %11
%287 = call i32 @writen(i32 %282, i8* %283, i64 %286)
store i32 %287, i32* %10
br label %291
288: ; preds = %276
%289 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%290 = call i32 @strcpy(i8* %289, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.30, i64 0, i64 0))
br label %291
291: ; preds = %288, %279
br label %373
292: ; preds = %4
%293 = load i8*, i8** %8
%294 = icmp eq i8* null, %293
br i1 %294, label %295, label %304
295: ; preds = %292
%296 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%297 = call i32 @strcpy(i8* %296, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.31, i64 0, i64 0))
%298 = load i32, i32* %6
%299 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%300 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%301 = call i32 @strlen(i8* %300)
%302 = sext i32 %301 to i64
store i64 %302, i64* %11
%303 = call i32 @writen(i32 %298, i8* %299, i64 %302)
store i32 %303, i32* %10
br label %307
304: ; preds = %292
%305 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%306 = call i32 @strcpy(i8* %305, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.32, i64 0, i64 0))
br label %307
307: ; preds = %304, %295
br label %373
308: ; preds = %4
%309 = load i8*, i8** %8
%310 = icmp eq i8* null, %309
br i1 %310, label %311, label %320
311: ; preds = %308
%312 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%313 = call i32 @strcpy(i8* %312, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.33, i64 0, i64 0))
%314 = load i32, i32* %6
%315 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%316 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%317 = call i32 @strlen(i8* %316)
%318 = sext i32 %317 to i64
store i64 %318, i64* %11
%319 = call i32 @writen(i32 %314, i8* %315, i64 %318)
store i32 %319, i32* %10
br label %323
320: ; preds = %308
%321 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%322 = call i32 @strcpy(i8* %321, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.34, i64 0, i64 0))
br label %323
323: ; preds = %320, %311
br label %373
324: ; preds = %4
%325 = load i8*, i8** %8
%326 = icmp eq i8* null, %325
br i1 %326, label %327, label %336
327: ; preds = %324
%328 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%329 = call i32 @strcpy(i8* %328, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.35, i64 0, i64 0))
%330 = load i32, i32* %6
%331 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%332 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%333 = call i32 @strlen(i8* %332)
%334 = sext i32 %333 to i64
store i64 %334, i64* %11
%335 = call i32 @writen(i32 %330, i8* %331, i64 %334)
store i32 %335, i32* %10
store i32 0, i32* %5
br label %422
336: ; preds = %324
%337 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%338 = call i32 @strcpy(i8* %337, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.36, i64 0, i64 0))
br label %339
339: ; preds = %336
br label %373
340: ; preds = %4
%341 = load i8*, i8** %8
%342 = icmp eq i8* null, %341
br i1 %342, label %343, label %352
343: ; preds = %340
%344 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%345 = call i32 @strcpy(i8* %344, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.37, i64 0, i64 0))
%346 = load i32, i32* %6
%347 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%348 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%349 = call i32 @strlen(i8* %348)
%350 = sext i32 %349 to i64
store i64 %350, i64* %11
%351 = call i32 @writen(i32 %346, i8* %347, i64 %350)
store i32 %351, i32* %10
br label %355
352: ; preds = %340
%353 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%354 = call i32 @strcpy(i8* %353, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.38, i64 0, i64 0))
br label %355
355: ; preds = %352, %343
br label %373
356: ; preds = %4
%357 = load i8*, i8** %8
%358 = icmp eq i8* null, %357
br i1 %358, label %359, label %368
359: ; preds = %356
%360 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%361 = call i32 @strcpy(i8* %360, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.39, i64 0, i64 0))
%362 = load i32, i32* %6
%363 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%364 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%365 = call i32 @strlen(i8* %364)
%366 = sext i32 %365 to i64
store i64 %366, i64* %11
%367 = call i32 @writen(i32 %362, i8* %363, i64 %366)
store i32 %367, i32* %10
br label %371
368: ; preds = %356
%369 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%370 = call i32 @strcpy(i8* %369, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.40, i64 0, i64 0))
br label %371
371: ; preds = %368, %359
br label %373
372: ; preds = %4
store i32 -3, i32* %5
br label %422
373: ; preds = %371, %355, %339, %323, %307, %291, %275, %259, %243, %227, %211, %195, %179, %163, %147, %131, %115, %99, %91, %75, %59
%374 = load i8*, i8** %8
%375 = icmp ne i8* null, %374
br i1 %375, label %376, label %412
376: ; preds = %373
store i64 4, i64* %14
%377 = load i64, i64* %9
%378 = icmp ugt i64 %377, 505
br i1 %378, label %379, label %380
379: ; preds = %376
store i32 -3, i32* %5
br label %422
380: ; preds = %376
%381 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%382 = load i64, i64* %14
%383 = getelementptr inbounds i8, i8* %381, i64 %382
%384 = load i8*, i8** %8
%385 = load i64, i64* %9
%386 = icmp ult i64 %385, 505
br i1 %386, label %387, label %389
387: ; preds = %380
%388 = load i64, i64* %9
br label %390
389: ; preds = %380
br label %390
390: ; preds = %389, %387
%391 = phi i64 [ %388, %387 ], [ 505, %389 ]
%392 = call i32 @strncpy(i8* %383, i8* %384, i64 %391)
%393 = load i64, i64* %9
%394 = icmp ult i64 505, %393
br i1 %394, label %395, label %396
395: ; preds = %390
br label %398
396: ; preds = %390
%397 = load i64, i64* %9
br label %398
398: ; preds = %396, %395
%399 = phi i64 [ 505, %395 ], [ %397, %396 ]
%400 = load i64, i64* %14
%401 = add i64 %400, %399
store i64 %401, i64* %14
%402 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%403 = load i64, i64* %14
%404 = getelementptr inbounds i8, i8* %402, i64 %403
%405 = call i32 @strcpy(i8* %404, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.41, i64 0, i64 0))
%406 = load i32, i32* %6
%407 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%408 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%409 = call i32 @strlen(i8* %408)
%410 = sext i32 %409 to i64
store i64 %410, i64* %11
%411 = call i32 @writen(i32 %406, i8* %407, i64 %410)
store i32 %411, i32* %10
br label %412
412: ; preds = %398, %373
%413 = load i32, i32* %10
%414 = icmp slt i32 %413, 0
br i1 %414, label %420, label %415
415: ; preds = %412
%416 = load i32, i32* %10
%417 = sext i32 %416 to i64
%418 = load i64, i64* %11
%419 = icmp ne i64 %417, %418
br i1 %419, label %420, label %421
420: ; preds = %415, %412
store i32 -4, i32* %5
br label %422
421: ; preds = %415
store i32 0, i32* %5
br label %422
422: ; preds = %421, %420, %379, %372, %327, %95, %27
%423 = load i32, i32* %5
ret i32 %423
}

LLVM IR (-O2):
@.str = [5 x i8] c"220 \00"
@.str.1 = [17 x i8] c" Service ready\0D\0A\00"
@.str.2 = [30 x i8] c"221 closing connection, bye\0D\0A\00"
@.str.3 = [5 x i8] c"221 \00"
@.str.4 = [9 x i8] c"250 OK\0D\0A\00"
@.str.5 = [5 x i8] c"250 \00"
@.str.6 = [5 x i8] c"250-\00"
@.str.7 = [47 x i8] c"251 User not local; will forward to next hop\0D\0A\00"
@.str.8 = [5 x i8] c"251 \00"
@.str.9 = [69 x i8] c"252 cannot VRFY user, but will accept message and attempt delivery\0D\0A\00"
@.str.10 = [5 x i8] c"252 \00"
@.str.11 = [47 x i8] c"354 Start mail input; end with <CRLF>.<CRLF>\0D\0A\00"
@.str.12 = [5 x i8] c"354 \00"
@.str.13 = [59 x i8] c"450 Requested mail action not taken: mailbox unavailable\0D\0A\00"
@.str.14 = [5 x i8] c"450 \00"
@.str.15 = [58 x i8] c"451 Requested action aborted: local error in processing\0D\0A\00"
@.str.16 = [5 x i8] c"451 \00"
@.str.17 = [62 x i8] c"452 requested action not taken: insufficient system storage\0D\0A\00"
@.str.18 = [5 x i8] c"452 \00"
@.str.19 = [46 x i8] c"455 Server unable to accommodate parameters\0D\0A\00"
@.str.20 = [6 x i8] c"455 \00"
@.str.21 = [41 x i8] c"500 Syntax error, command unrecognized\0D\0A\00"
@.str.22 = [5 x i8] c"500 \00"
@.str.23 = [30 x i8] c"502 Command not implemented\0D\0A\00"
@.str.24 = [5 x i8] c"502 \00"
@.str.25 = [31 x i8] c"503 Bad sequence of commands\0D\0A\00"
@.str.26 = [5 x i8] c"503 \00"
@.str.27 = [40 x i8] c"504 Command parameter not implemented\0D\0A\00"
@.str.28 = [5 x i8] c"504 \00"
@.str.29 = [54 x i8] c"550 Requested action not taken: mailbox unavailable\0D\0A\00"
@.str.30 = [5 x i8] c"550 \00"
@.str.31 = [42 x i8] c"551 User not local; please try next hop\0D\0A\00"
@.str.32 = [5 x i8] c"551 \00"
@.str.33 = [65 x i8] c"552 Requested mail action aborted: exceeded storage allocation\0D\0A\00"
@.str.34 = [5 x i8] c"552 \00"
@.str.35 = [59 x i8] c"553 Requested action not taken: mailbox name not allowed\0D\0A\00"
@.str.36 = [5 x i8] c"553 \00"
@.str.37 = [25 x i8] c"554 Transaction failed\0D\0A\00"
@.str.38 = [5 x i8] c"554 \00"
@.str.39 = [69 x i8] c"555 MAIL FROM/RCPT TO parameters not recognized or not implemented\0D\0A\00"
@.str.40 = [5 x i8] c"555 \00"
@.str.41 = [3 x i8] c"\0D\0A\00"
define i32 @smtp_send_reply(i32 %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca [256 x i8]
%6 = alloca [512 x i8]
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
switch i64 %1, label %131 [
i64 1, label %9
i64 2, label %29
i64 3, label %33
i64 4, label %37
i64 5, label %39
i64 6, label %43
i64 7, label %47
i64 8, label %51
i64 9, label %55
i64 10, label %59
i64 11, label %63
i64 12, label %67
i64 13, label %71
i64 14, label %75
i64 15, label %79
i64 16, label %83
i64 17, label %87
i64 18, label %91
i64 19, label %95
i64 20, label %102
i64 21, label %106
]
9: ; preds = %4
%10 = icmp eq i8* %2, null
%11 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br i1 %10, label %12, label %113
12: ; preds = %9
%13 = call i32 @memset(i8* %7, i32 0, i32 256)
%14 = call i32 @gethostname(i8* %7, i32 256)
%15 = icmp eq i32 %14, -1
br i1 %15, label %131, label %16
16: ; preds = %12
%17 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 4
%18 = call i32 @strncpy(i8* %17, i8* %7, i64 505)
%19 = call i32 @strlen(i8* %7)
%20 = icmp sgt i32 %19, 256
br i1 %20, label %25, label %21
21: ; preds = %16
%22 = call i32 @strlen(i8* %7)
%23 = sext i32 %22 to i64
%24 = add nsw i64 %23, 4
br label %25
25: ; preds = %16, %21
%26 = phi i64 [ %24, %21 ], [ 260, %16 ]
%27 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 %26
%28 = call i32 @strcpy(i8* %27, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %123
29: ; preds = %4
%30 = icmp eq i8* %2, null
br i1 %30, label %31, label %110
31: ; preds = %29
%32 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %123
33: ; preds = %4
%34 = icmp eq i8* %2, null
br i1 %34, label %35, label %110
35: ; preds = %33
%36 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
br label %123
37: ; preds = %4
%38 = icmp eq i8* %2, null
br i1 %38, label %131, label %110
39: ; preds = %4
%40 = icmp eq i8* %2, null
br i1 %40, label %41, label %110
41: ; preds = %39
%42 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
br label %123
43: ; preds = %4
%44 = icmp eq i8* %2, null
br i1 %44, label %45, label %110
45: ; preds = %43
%46 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.9, i64 0, i64 0))
br label %123
47: ; preds = %4
%48 = icmp eq i8* %2, null
br i1 %48, label %49, label %110
49: ; preds = %47
%50 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.11, i64 0, i64 0))
br label %123
51: ; preds = %4
%52 = icmp eq i8* %2, null
br i1 %52, label %53, label %110
53: ; preds = %51
%54 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.13, i64 0, i64 0))
br label %123
55: ; preds = %4
%56 = icmp eq i8* %2, null
br i1 %56, label %57, label %110
57: ; preds = %55
%58 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.15, i64 0, i64 0))
br label %123
59: ; preds = %4
%60 = icmp eq i8* %2, null
br i1 %60, label %61, label %110
61: ; preds = %59
%62 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.17, i64 0, i64 0))
br label %123
63: ; preds = %4
%64 = icmp eq i8* %2, null
br i1 %64, label %65, label %110
65: ; preds = %63
%66 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.19, i64 0, i64 0))
br label %123
67: ; preds = %4
%68 = icmp eq i8* %2, null
br i1 %68, label %69, label %110
69: ; preds = %67
%70 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.21, i64 0, i64 0))
br label %123
71: ; preds = %4
%72 = icmp eq i8* %2, null
br i1 %72, label %73, label %110
73: ; preds = %71
%74 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.23, i64 0, i64 0))
br label %123
75: ; preds = %4
%76 = icmp eq i8* %2, null
br i1 %76, label %77, label %110
77: ; preds = %75
%78 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.25, i64 0, i64 0))
br label %123
79: ; preds = %4
%80 = icmp eq i8* %2, null
br i1 %80, label %81, label %110
81: ; preds = %79
%82 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.27, i64 0, i64 0))
br label %123
83: ; preds = %4
%84 = icmp eq i8* %2, null
br i1 %84, label %85, label %110
85: ; preds = %83
%86 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.29, i64 0, i64 0))
br label %123
87: ; preds = %4
%88 = icmp eq i8* %2, null
br i1 %88, label %89, label %110
89: ; preds = %87
%90 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.31, i64 0, i64 0))
br label %123
91: ; preds = %4
%92 = icmp eq i8* %2, null
br i1 %92, label %93, label %110
93: ; preds = %91
%94 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.33, i64 0, i64 0))
br label %123
95: ; preds = %4
%96 = icmp eq i8* %2, null
br i1 %96, label %97, label %110
97: ; preds = %95
%98 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.35, i64 0, i64 0))
%99 = call i32 @strlen(i8* %8)
%100 = sext i32 %99 to i64
%101 = call i32 @writen(i32 %0, i8* %8, i64 %100)
br label %131
102: ; preds = %4
%103 = icmp eq i8* %2, null
br i1 %103, label %104, label %110
104: ; preds = %102
%105 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.37, i64 0, i64 0))
br label %123
106: ; preds = %4
%107 = icmp eq i8* %2, null
br i1 %107, label %108, label %110
108: ; preds = %106
%109 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.39, i64 0, i64 0))
br label %123
110: ; preds = %106, %102, %95, %91, %87, %83, %79, %75, %71, %67, %63, %59, %55, %51, %47, %43, %39, %37, %33, %29
%111 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %29 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), %33 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), %37 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), %39 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), %43 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), %47 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), %51 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), %55 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), %59 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0), %63 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0), %67 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), %71 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i64 0, i64 0), %75 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.28, i64 0, i64 0), %79 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.30, i64 0, i64 0), %83 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.32, i64 0, i64 0), %87 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.34, i64 0, i64 0), %91 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.36, i64 0, i64 0), %95 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.38, i64 0, i64 0), %102 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.40, i64 0, i64 0), %106 ]
%112 = call i32 @strcpy(i8* %8, i8* %111)
br label %113
113: ; preds = %110, %9
%114 = icmp ugt i64 %3, 505
br i1 %114, label %131, label %115
115: ; preds = %113
%116 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 4
%117 = icmp ult i64 %3, 505
%118 = select i1 %117, i64 %3, i64 505
%119 = call i32 @strncpy(i8* %116, i8* %2, i64 %118)
%120 = add nuw nsw i64 %3, 4
%121 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 %120
%122 = call i32 @strcpy(i8* %121, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.41, i64 0, i64 0))
br label %123
123: ; preds = %25, %31, %35, %41, %45, %49, %53, %57, %61, %65, %69, %73, %77, %81, %85, %89, %93, %104, %108, %115
%124 = call i32 @strlen(i8* %8)
%125 = sext i32 %124 to i64
%126 = call i32 @writen(i32 %0, i8* %8, i64 %125)
%127 = icmp sgt i32 %126, -1
%128 = icmp eq i32 %124, %126
%129 = and i1 %127, %128
%130 = select i1 %129, i32 0, i32 -4
br label %131
131: ; preds = %123, %113, %4, %37, %12, %97
%132 = phi i32 [ 0, %97 ], [ -5, %12 ], [ -3, %37 ], [ -3, %4 ], [ -3, %113 ], [ %130, %123 ]
ret i32 %132
}