#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 sockaddr_un {
  int /*<<< orphan*/ sun_path;
  int /*<<< orphan*/ sun_family;
};
struct sockaddr {
  int dummy;
};
typedef void *pid_t;
typedef int /*<<< orphan*/ addr_transport;

/* Variables and functions */
int /*<<< orphan*/ AF_UNIX;
int /*<<< orphan*/ F_OK;
int /*<<< orphan*/ SOCK_STREAM;
int access(char *, int /*<<< orphan*/);
void *atoi(char *);
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ close(int);
int connect(int, struct sockaddr *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
void *getpid();
int /*<<< orphan*/ memset(struct sockaddr_un *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *, ...);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(int /*<<< orphan*/, char *);
int strlen(char *);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) {
  pid_t osdpd_pid;
  int osdpd_addr;
  char *osdpd_comando, *osdpd_port;
  unsigned char osdpd_packet[30];
  int osdpd_packet_lenth;
  char buffer[512];
  struct sockaddr_un addr_transport;
  int sock, index;
  int bind_socket;
  int verbosity = 0;
  osdpd_pid = getpid();
  osdpd_addr = 00;
  for (int i = 0; i < argc; ++i) {
    if (strcmp(argv[i], "-P") == 0) {
      osdpd_packet_lenth = strlen(argv[i + 1]);
      index = 0;
      for (int o = 0; o < osdpd_packet_lenth; ++o) {
        if ((int)argv[i + 1][o] == 58)
          continue;
        osdpd_packet[index] = argv[i + 1][o];
        index = index + 1;
      }
    }
    if (strcmp(argv[i], "-pid") == 0)
      osdpd_pid = atoi(argv[i + 1]);
    if (strcmp(argv[i], "-port") == 0)
      osdpd_port = argv[i + 1];
    if (strcmp(argv[i], "-a") == 0)
      osdpd_addr = atoi(argv[i + 1]);
    if (strcmp(argv[i], "-c") == 0)
      osdpd_comando = argv[i + 1];
    if (strcmp(argv[i], "-v") == 0)
      verbosity = 1;
  }
  sprintf(buffer, "{\"puerto\":\"%s\", \"address\":\"%d\", \"comando\":\"%s\",",
          osdpd_port, osdpd_addr, osdpd_comando);
  sprintf(buffer, "%s\"estructura\":{", buffer);
  if (strcmp(osdpd_comando, "69") == 0) {
    sprintf(buffer, "%s\"readerNumber\":\"%c%c\",", buffer, osdpd_packet[0],
            osdpd_packet[1]);
    sprintf(buffer, "%s\"ledNumber\":\"%c%c\",", buffer, osdpd_packet[2],
            osdpd_packet[3]);
    sprintf(buffer, "%s\"ccTemp\":\"%c%c\",", buffer, osdpd_packet[4],
            osdpd_packet[5]);
    sprintf(buffer, "%s\"onTimeTemp\":\"%c%c\",", buffer, osdpd_packet[6],
            osdpd_packet[7]);
    sprintf(buffer, "%s\"offTimeTemp\":\"%c%c\",", buffer, osdpd_packet[8],
            osdpd_packet[9]);
    sprintf(buffer, "%s\"onColorTemp\":\"%c%c\",", buffer, osdpd_packet[10],
            osdpd_packet[11]);
    sprintf(buffer, "%s\"offColorTemp\":\"%c%c\",", buffer, osdpd_packet[12],
            osdpd_packet[13]);
    sprintf(buffer, "%s\"timerLSBTemp\":\"%c%c\",", buffer, osdpd_packet[14],
            osdpd_packet[15]);
    sprintf(buffer, "%s\"timerMSBTemp\":\"%c%c\",", buffer, osdpd_packet[16],
            osdpd_packet[17]);
    sprintf(buffer, "%s\"ccPerm\":\"%c%c\",", buffer, osdpd_packet[18],
            osdpd_packet[19]);
    sprintf(buffer, "%s\"onTimePerm\":\"%c%c\",", buffer, osdpd_packet[20],
            osdpd_packet[21]);
    sprintf(buffer, "%s\"offTimePerm\":\"%c%c\",", buffer, osdpd_packet[22],
            osdpd_packet[23]);
    sprintf(buffer, "%s\"onColorPerm\":\"%c%c\",", buffer, osdpd_packet[24],
            osdpd_packet[25]);
    sprintf(buffer, "%s\"offColorPerm\":\"%c%c\"", buffer, osdpd_packet[26],
            osdpd_packet[27]);
  }
  if (strcmp(osdpd_comando, "68") == 0) {
    sprintf(buffer, "%s\"outputNumber\":\"%c%c\",", buffer, osdpd_packet[0],
            osdpd_packet[1]);
    sprintf(buffer, "%s\"controlCode\":\"%c%c\",", buffer, osdpd_packet[2],
            osdpd_packet[3]);
    sprintf(buffer, "%s\"timerLSB\":\"%c%c\",", buffer, osdpd_packet[4],
            osdpd_packet[5]);
    sprintf(buffer, "%s\"timerMSB\":\"%c%c\"", buffer, osdpd_packet[6],
            osdpd_packet[7]);
  }
  sprintf(buffer, "%s}}", buffer);
  if (verbosity)
    fprintf(stderr, "Buffer : %s\n", buffer);
  if (access("/opt/osdpd/osdpd-in.sock", F_OK) != -1) {
    if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
      perror("socket error");
    } else {
      memset(&addr_transport, 0, sizeof(addr_transport));
      addr_transport.sun_family = AF_UNIX;
      strcpy(addr_transport.sun_path, "/opt/osdpd/osdpd-in.sock");
      bind_socket = bind(sock, (struct sockaddr *)&addr_transport,
                         sizeof(addr_transport));
      if (connect(sock, (struct sockaddr *)&addr_transport,
                  sizeof(addr_transport)) == -1) {
      } else {
        write(sock, buffer, (int)strlen(buffer));
      }
    }
    close(sock);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x290,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x278(%rbp)
mov    $0x0,%al
call   1050 <getpid@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x27c(%rbp)
mov    -0x27c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1465 <main+0x275>
mov    -0x10(%rbp),%rax
movslq -0x27c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdac(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1320 <main+0x130>
mov    -0x10(%rbp),%rax
mov    -0x27c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x54(%rbp)
movl   $0x0,-0x270(%rbp)
movl   $0x0,-0x280(%rbp)
mov    -0x280(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    131b <main+0x12b>
mov    -0x10(%rbp),%rax
mov    -0x27c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x280(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3a,%eax
jne    12cf <main+0xdf>
jmp    1307 <main+0x117>
mov    -0x10(%rbp),%rax
mov    -0x27c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x280(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0x270(%rbp),%rax
mov    %cl,-0x50(%rbp,%rax,1)
mov    -0x270(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x270(%rbp)
mov    -0x280(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x280(%rbp)
jmp    1293 <main+0xa3>
jmp    1320 <main+0x130>
mov    -0x10(%rbp),%rax
movslq -0x27c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xccd(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1362 <main+0x172>
mov    -0x10(%rbp),%rax
mov    -0x27c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   10e0 <atoi@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x27c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xc90(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    139f <main+0x1af>
mov    -0x10(%rbp),%rax
mov    -0x27c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x27c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xc59(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13e0 <main+0x1f0>
mov    -0x10(%rbp),%rax
mov    -0x27c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   10e0 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x27c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xc1b(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    141d <main+0x22d>
mov    -0x10(%rbp),%rax
mov    -0x27c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x27c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xbe1(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    144c <main+0x25c>
movl   $0x1,-0x278(%rbp)
jmp    1451 <main+0x261>
mov    -0x27c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x27c(%rbp)
jmp    122f <main+0x3f>
lea    -0x260(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
lea    0xb99(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
lea    0xbad(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xbac(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    16c1 <main+0x4d1>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x50(%rbp),%ecx
movzbl -0x4f(%rbp),%r8d
lea    0xb82(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x4e(%rbp),%ecx
movzbl -0x4d(%rbp),%r8d
lea    0xb76(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x4c(%rbp),%ecx
movzbl -0x4b(%rbp),%r8d
lea    0xb67(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x4a(%rbp),%ecx
movzbl -0x49(%rbp),%r8d
lea    0xb55(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x48(%rbp),%ecx
movzbl -0x47(%rbp),%r8d
lea    0xb47(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x46(%rbp),%ecx
movzbl -0x45(%rbp),%r8d
lea    0xb3a(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x44(%rbp),%ecx
movzbl -0x43(%rbp),%r8d
lea    0xb2d(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x42(%rbp),%ecx
movzbl -0x41(%rbp),%r8d
lea    0xb21(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x40(%rbp),%ecx
movzbl -0x3f(%rbp),%r8d
lea    0xb15(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x3e(%rbp),%ecx
movzbl -0x3d(%rbp),%r8d
lea    0xb09(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x3c(%rbp),%ecx
movzbl -0x3b(%rbp),%r8d
lea    0xaf7(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x3a(%rbp),%ecx
movzbl -0x39(%rbp),%r8d
lea    0xae9(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x38(%rbp),%ecx
movzbl -0x37(%rbp),%r8d
lea    0xadc(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x36(%rbp),%ecx
movzbl -0x35(%rbp),%r8d
lea    0xacf(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xad5(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    176f <main+0x57f>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x50(%rbp),%ecx
movzbl -0x4f(%rbp),%r8d
lea    0xaab(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x4e(%rbp),%ecx
movzbl -0x4d(%rbp),%r8d
lea    0xa9f(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x4c(%rbp),%ecx
movzbl -0x4b(%rbp),%r8d
lea    0xa92(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
movzbl -0x4a(%rbp),%ecx
movzbl -0x49(%rbp),%r8d
lea    0xa82(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
lea    -0x260(%rbp),%rdx
lea    0xa7a(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
cmpl   $0x0,-0x278(%rbp)
je     17b4 <main+0x5c4>
mov    0x2839(%rip),%rax
mov    (%rax),%edi
lea    -0x260(%rbp),%rdx
lea    0xa54(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2805(%rip),%rax
mov    (%rax),%esi
lea    0xa4c(%rip),%rdi
call   10c0 <access@plt>
cmp    $0xffffffff,%eax
je     18cb <main+0x6db>
mov    0x280f(%rip),%rax
mov    (%rax),%edi
mov    0x27ee(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1110 <socket@plt>
mov    %eax,-0x26c(%rbp)
cmp    $0xffffffff,%eax
jne    180b <main+0x61b>
lea    0xa28(%rip),%rdi
call   10d0 <perror@plt>
jmp    18c0 <main+0x6d0>
lea    -0x268(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1070 <memset@plt>
mov    0x27c3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x264(%rbp)
mov    -0x268(%rbp),%edi
lea    0x9d6(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x26c(%rbp),%edi
lea    -0x268(%rbp),%rsi
mov    $0x8,%edx
call   10b0 <bind@plt>
mov    %eax,-0x274(%rbp)
mov    -0x26c(%rbp),%edi
lea    -0x268(%rbp),%rsi
mov    $0x8,%edx
call   1100 <connect@plt>
cmp    $0xffffffff,%eax
jne    1881 <main+0x691>
jmp    18bb <main+0x6cb>
mov    -0x26c(%rbp),%eax
mov    %eax,-0x28c(%rbp)
lea    -0x260(%rbp),%rax
mov    %rax,-0x288(%rbp)
lea    -0x260(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x28c(%rbp),%edi
mov    -0x288(%rbp),%rsi
mov    %eax,%edx
call   1040 <write@plt>
jmp    18c0 <main+0x6d0>
mov    -0x26c(%rbp),%edi
call   1080 <close@plt>
xor    %eax,%eax
add    $0x290,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x248,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %r14d,%r14d
xor    %eax,%eax
call   1050 <getpid@plt>
mov    %ebp,%r13d
lea    0xdfa(%rip),%r15
xor    %r12d,%r12d
xor    %eax,%eax
mov    %rax,0x20(%rsp)
jmp    1254 <main+0x64>
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx,%r14,8),%rdi
mov    %r15,%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
mov    $0x1,%eax
cmove  %eax,%r12d
mov    %rbp,%r14
cmp    %r13,%rbp
je     1370 <main+0x180>
mov    (%rbx,%r14,8),%rdi
lea    0xda1(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     12f0 <main+0x100>
mov    (%rbx,%r14,8),%rdi
lea    0xd8b(%rip),%rsi
call   1090 <strcmp@plt>
mov    (%rbx,%r14,8),%rdi
lea    0xd80(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
jne    129c <main+0xac>
mov    0x8(%rbx,%r14,8),%rax
mov    %rax,0x30(%rsp)
mov    (%rbx,%r14,8),%rdi
lea    0xd67(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
jne    12c0 <main+0xd0>
mov    0x8(%rbx,%r14,8),%rdi
call   10e0 <atoi@plt>
mov    %rax,0x20(%rsp)
mov    (%rbx,%r14,8),%rdi
lea    0xd46(%rip),%rsi
call   1090 <strcmp@plt>
lea    0x1(%r14),%rbp
test   %rax,%rax
jne    1230 <main+0x40>
mov    (%rbx,%rbp,8),%rax
mov    %rax,0x38(%rsp)
jmp    1230 <main+0x40>
nopl   0x0(%rax,%rax,1)
mov    0x8(%rbx,%r14,8),%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    126d <main+0x7d>
mov    0x8(%rbx,%r14,8),%rcx
mov    %eax,%ebp
cmp    $0x1,%eax
jne    1332 <main+0x142>
xor    %eax,%eax
xor    %esi,%esi
test   $0x1,%bpl
je     126d <main+0x7d>
mov    (%rcx,%rax,1),%al
cmp    $0x3a,%al
je     126d <main+0x7d>
movslq %esi,%rcx
mov    %al,(%rsp,%rcx,1)
jmp    126d <main+0x7d>
mov    %ebp,%edi
and    $0xfffffffe,%edi
xor    %eax,%eax
xor    %esi,%esi
jmp    1349 <main+0x159>
nopl   (%rax)
add    $0x2,%rax
cmp    %rax,%rdi
je     1312 <main+0x122>
movzbl (%rcx,%rax,1),%edx
cmp    $0x3a,%dl
je     135b <main+0x16b>
movslq %esi,%rsi
mov    %dl,(%rsp,%rsi,1)
add    $0x1,%esi
movzbl 0x1(%rcx,%rax,1),%edx
cmp    $0x3a,%dl
je     1340 <main+0x150>
movslq %esi,%rsi
mov    %dl,(%rsp,%rsi,1)
add    $0x1,%esi
jmp    1340 <main+0x150>
lea    0xca0(%rip),%rsi
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    0x30(%rsp),%rdx
mov    0x20(%rsp),%rcx
mov    0x38(%rsp),%rbp
mov    %rbp,%r8
xor    %eax,%eax
call   10f0 <sprintf@plt>
lea    0xca8(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
lea    0xca5(%rip),%rsi
mov    %rbp,%rdi
call   1090 <strcmp@plt>
test   %rax,%rax
jne    157a <main+0x38a>
movzbl (%rsp),%ecx
movzbl 0x1(%rsp),%r8d
lea    0xc86(%rip),%rsi
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x2(%rsp),%ecx
movzbl 0x3(%rsp),%r8d
lea    0xc7b(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x4(%rsp),%ecx
movzbl 0x5(%rsp),%r8d
lea    0xc72(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x6(%rsp),%ecx
movzbl 0x7(%rsp),%r8d
lea    0xc66(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x8(%rsp),%ecx
movzbl 0x9(%rsp),%r8d
lea    0xc5e(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0xa(%rsp),%ecx
movzbl 0xb(%rsp),%r8d
lea    0xc57(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0xc(%rsp),%ecx
movzbl 0xd(%rsp),%r8d
lea    0xc50(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0xe(%rsp),%ecx
movzbl 0xf(%rsp),%r8d
lea    0xc4a(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x10(%rsp),%ecx
movzbl 0x11(%rsp),%r8d
lea    0xc44(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x12(%rsp),%ecx
movzbl 0x13(%rsp),%r8d
lea    0xc3e(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x14(%rsp),%ecx
movzbl 0x15(%rsp),%r8d
lea    0xc32(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x16(%rsp),%ecx
movzbl 0x17(%rsp),%r8d
lea    0xc2a(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x18(%rsp),%ecx
movzbl 0x19(%rsp),%r8d
lea    0xc23(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x1a(%rsp),%ecx
movzbl 0x1b(%rsp),%r8d
lea    0xc1c(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
lea    0xc20(%rip),%rsi
mov    %rbp,%rdi
call   1090 <strcmp@plt>
test   %rax,%rax
jne    1612 <main+0x422>
movzbl (%rsp),%ecx
movzbl 0x1(%rsp),%r8d
lea    0xc01(%rip),%rsi
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x2(%rsp),%ecx
movzbl 0x3(%rsp),%r8d
lea    0xbf6(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x4(%rsp),%ecx
movzbl 0x5(%rsp),%r8d
lea    0xbef(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movzbl 0x6(%rsp),%ecx
movzbl 0x7(%rsp),%r8d
lea    0xbe5(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
lea    0xbe5(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    %rdi,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
test   %r12d,%r12d
je     1647 <main+0x457>
mov    0x29a4(%rip),%rax
mov    (%rax),%edi
lea    0xbc6(%rip),%rsi
lea    0x40(%rsp),%rdx
call   10a0 <fprintf@plt>
mov    0x2972(%rip),%rax
mov    (%rax),%esi
lea    0xbb9(%rip),%rdi
call   10c0 <access@plt>
cmp    $0xffffffff,%eax
je     16f8 <main+0x508>
mov    0x297c(%rip),%r14
mov    (%r14),%edi
mov    0x295a(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1110 <socket@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     170c <main+0x51c>
lea    0x28(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1070 <memset@plt>
mov    (%r14),%eax
mov    %eax,0x2c(%rsp)
mov    0x28(%rsp),%edi
lea    0xb60(%rip),%rsi
call   1030 <strcpy@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    $0x8,%edx
call   10b0 <bind@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    $0x8,%edx
call   1100 <connect@plt>
cmp    $0xffffffff,%eax
je     16f1 <main+0x501>
lea    0x40(%rsp),%rbp
mov    %rbp,%rdi
call   1060 <strlen@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1040 <write@plt>
mov    %ebx,%edi
call   1080 <close@plt>
xor    %eax,%eax
add    $0x248,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xb16(%rip),%rdi
call   10d0 <perror@plt>
jmp    16f1 <main+0x501>

LLVM IR (-O0):
%struct.sockaddr_un = type { i32, i32 }
%struct.sockaddr = type { i32 }
@.str = [3 x i8] c"-P\00"
@.str.1 = [5 x i8] c"-pid\00"
@.str.2 = [6 x i8] c"-port\00"
@.str.3 = [3 x i8] c"-a\00"
@.str.4 = [3 x i8] c"-c\00"
@.str.5 = [3 x i8] c"-v\00"
@.str.6 = [48 x i8] c"{\22puerto\22:\22%s\22, \22address\22:\22%d\22, \22comando\22:\22%s\22,\00"
@.str.7 = [17 x i8] c"%s\22estructura\22:{\00"
@.str.8 = [3 x i8] c"69\00"
@.str.9 = [25 x i8] c"%s\22readerNumber\22:\22%c%c\22,\00"
@.str.10 = [22 x i8] c"%s\22ledNumber\22:\22%c%c\22,\00"
@.str.11 = [19 x i8] c"%s\22ccTemp\22:\22%c%c\22,\00"
@.str.12 = [23 x i8] c"%s\22onTimeTemp\22:\22%c%c\22,\00"
@.str.13 = [24 x i8] c"%s\22offTimeTemp\22:\22%c%c\22,\00"
@.str.14 = [24 x i8] c"%s\22onColorTemp\22:\22%c%c\22,\00"
@.str.15 = [25 x i8] c"%s\22offColorTemp\22:\22%c%c\22,\00"
@.str.16 = [25 x i8] c"%s\22timerLSBTemp\22:\22%c%c\22,\00"
@.str.17 = [25 x i8] c"%s\22timerMSBTemp\22:\22%c%c\22,\00"
@.str.18 = [19 x i8] c"%s\22ccPerm\22:\22%c%c\22,\00"
@.str.19 = [23 x i8] c"%s\22onTimePerm\22:\22%c%c\22,\00"
@.str.20 = [24 x i8] c"%s\22offTimePerm\22:\22%c%c\22,\00"
@.str.21 = [24 x i8] c"%s\22onColorPerm\22:\22%c%c\22,\00"
@.str.22 = [24 x i8] c"%s\22offColorPerm\22:\22%c%c\22\00"
@.str.23 = [3 x i8] c"68\00"
@.str.24 = [25 x i8] c"%s\22outputNumber\22:\22%c%c\22,\00"
@.str.25 = [24 x i8] c"%s\22controlCode\22:\22%c%c\22,\00"
@.str.26 = [21 x i8] c"%s\22timerLSB\22:\22%c%c\22,\00"
@.str.27 = [20 x i8] c"%s\22timerMSB\22:\22%c%c\22\00"
@.str.28 = [5 x i8] c"%s}}\00"
@stderr = global i32 0
@.str.29 = [13 x i8] c"Buffer : %s\0A\00"
@.str.30 = [25 x i8] c"/opt/osdpd/osdpd-in.sock\00"
@F_OK = global i32 0
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str.31 = [13 x i8] c"socket error\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca [30 x i8]
%11 = alloca i32
%12 = alloca [512 x i8]
%13 = alloca %struct.sockaddr_un
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %17
%20 = call i8* (...) @getpid()
store i8* %20, i8** %6
store i32 0, i32* %7
store i32 0, i32* %18
br label %21
21: ; preds = %152, %2
%22 = load i32, i32* %18
%23 = load i32, i32* %4
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %155
25: ; preds = %21
%26 = load i8**, i8*** %5
%27 = load i32, i32* %18
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8*, i8** %26, i64 %28
%30 = load i8*, i8** %29
%31 = call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %79
33: ; preds = %25
%34 = load i8**, i8*** %5
%35 = load i32, i32* %18
%36 = add nsw i32 %35, 1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %34, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @strlen(i8* %39)
store i32 %40, i32* %11
store i32 0, i32* %15
store i32 0, i32* %19
br label %41
41: ; preds = %75, %33
%42 = load i32, i32* %19
%43 = load i32, i32* %11
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %78
45: ; preds = %41
%46 = load i8**, i8*** %5
%47 = load i32, i32* %18
%48 = add nsw i32 %47, 1
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8*, i8** %46, i64 %49
%51 = load i8*, i8** %50
%52 = load i32, i32* %19
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %51, i64 %53
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, 58
br i1 %57, label %58, label %59
58: ; preds = %45
br label %75
59: ; preds = %45
%60 = load i8**, i8*** %5
%61 = load i32, i32* %18
%62 = add nsw i32 %61, 1
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i8*, i8** %60, i64 %63
%65 = load i8*, i8** %64
%66 = load i32, i32* %19
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8, i8* %65, i64 %67
%69 = load i8, i8* %68
%70 = load i32, i32* %15
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 %71
store i8 %69, i8* %72
%73 = load i32, i32* %15
%74 = add nsw i32 %73, 1
store i32 %74, i32* %15
br label %75
75: ; preds = %59, %58
%76 = load i32, i32* %19
%77 = add nsw i32 %76, 1
store i32 %77, i32* %19
br label %41
78: ; preds = %41
br label %79
79: ; preds = %78, %25
%80 = load i8**, i8*** %5
%81 = load i32, i32* %18
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i8*, i8** %80, i64 %82
%84 = load i8*, i8** %83
%85 = call i64 @strcmp(i8* %84, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%86 = icmp eq i64 %85, 0
br i1 %86, label %87, label %95
87: ; preds = %79
%88 = load i8**, i8*** %5
%89 = load i32, i32* %18
%90 = add nsw i32 %89, 1
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i8*, i8** %88, i64 %91
%93 = load i8*, i8** %92
%94 = call i8* @atoi(i8* %93)
store i8* %94, i8** %6
br label %95
95: ; preds = %87, %79
%96 = load i8**, i8*** %5
%97 = load i32, i32* %18
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i8*, i8** %96, i64 %98
%100 = load i8*, i8** %99
%101 = call i64 @strcmp(i8* %100, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %110
103: ; preds = %95
%104 = load i8**, i8*** %5
%105 = load i32, i32* %18
%106 = add nsw i32 %105, 1
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8*, i8** %104, i64 %107
%109 = load i8*, i8** %108
store i8* %109, i8** %9
br label %110
110: ; preds = %103, %95
%111 = load i8**, i8*** %5
%112 = load i32, i32* %18
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i8*, i8** %111, i64 %113
%115 = load i8*, i8** %114
%116 = call i64 @strcmp(i8* %115, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%117 = icmp eq i64 %116, 0
br i1 %117, label %118, label %127
118: ; preds = %110
%119 = load i8**, i8*** %5
%120 = load i32, i32* %18
%121 = add nsw i32 %120, 1
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i8*, i8** %119, i64 %122
%124 = load i8*, i8** %123
%125 = call i8* @atoi(i8* %124)
%126 = ptrtoint i8* %125 to i32
store i32 %126, i32* %7
br label %127
127: ; preds = %118, %110
%128 = load i8**, i8*** %5
%129 = load i32, i32* %18
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i8*, i8** %128, i64 %130
%132 = load i8*, i8** %131
%133 = call i64 @strcmp(i8* %132, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%134 = icmp eq i64 %133, 0
br i1 %134, label %135, label %142
135: ; preds = %127
%136 = load i8**, i8*** %5
%137 = load i32, i32* %18
%138 = add nsw i32 %137, 1
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds i8*, i8** %136, i64 %139
%141 = load i8*, i8** %140
store i8* %141, i8** %8
br label %142
142: ; preds = %135, %127
%143 = load i8**, i8*** %5
%144 = load i32, i32* %18
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds i8*, i8** %143, i64 %145
%147 = load i8*, i8** %146
%148 = call i64 @strcmp(i8* %147, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%149 = icmp eq i64 %148, 0
br i1 %149, label %150, label %151
150: ; preds = %142
store i32 1, i32* %17
br label %151
151: ; preds = %150, %142
br label %152
152: ; preds = %151
%153 = load i32, i32* %18
%154 = add nsw i32 %153, 1
store i32 %154, i32* %18
br label %21
155: ; preds = %21
%156 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%157 = load i8*, i8** %9
%158 = load i32, i32* %7
%159 = load i8*, i8** %8
%160 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %156, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), i8* %157, i32 %158, i8* %159)
%161 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%162 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%163 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %161, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* %162)
%164 = load i8*, i8** %8
%165 = call i64 @strcmp(i8* %164, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%166 = icmp eq i64 %165, 0
br i1 %166, label %167, label %294
167: ; preds = %155
%168 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%169 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%170 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 0
%171 = load i8, i8* %170
%172 = zext i8 %171 to i32
%173 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 1
%174 = load i8, i8* %173
%175 = zext i8 %174 to i32
%176 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %168, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* %169, i32 %172, i32 %175)
%177 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%178 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%179 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 2
%180 = load i8, i8* %179
%181 = zext i8 %180 to i32
%182 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 3
%183 = load i8, i8* %182
%184 = zext i8 %183 to i32
%185 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %177, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i8* %178, i32 %181, i32 %184)
%186 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%187 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%188 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 4
%189 = load i8, i8* %188
%190 = zext i8 %189 to i32
%191 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 5
%192 = load i8, i8* %191
%193 = zext i8 %192 to i32
%194 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %186, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i8* %187, i32 %190, i32 %193)
%195 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%196 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%197 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 6
%198 = load i8, i8* %197
%199 = zext i8 %198 to i32
%200 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 7
%201 = load i8, i8* %200
%202 = zext i8 %201 to i32
%203 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %195, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i8* %196, i32 %199, i32 %202)
%204 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%205 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%206 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 8
%207 = load i8, i8* %206
%208 = zext i8 %207 to i32
%209 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 9
%210 = load i8, i8* %209
%211 = zext i8 %210 to i32
%212 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %204, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i8* %205, i32 %208, i32 %211)
%213 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%214 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%215 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 10
%216 = load i8, i8* %215
%217 = zext i8 %216 to i32
%218 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 11
%219 = load i8, i8* %218
%220 = zext i8 %219 to i32
%221 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %213, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0), i8* %214, i32 %217, i32 %220)
%222 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%223 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%224 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 12
%225 = load i8, i8* %224
%226 = zext i8 %225 to i32
%227 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 13
%228 = load i8, i8* %227
%229 = zext i8 %228 to i32
%230 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %222, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0), i8* %223, i32 %226, i32 %229)
%231 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%232 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%233 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 14
%234 = load i8, i8* %233
%235 = zext i8 %234 to i32
%236 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 15
%237 = load i8, i8* %236
%238 = zext i8 %237 to i32
%239 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %231, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0), i8* %232, i32 %235, i32 %238)
%240 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%241 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%242 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 16
%243 = load i8, i8* %242
%244 = zext i8 %243 to i32
%245 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 17
%246 = load i8, i8* %245
%247 = zext i8 %246 to i32
%248 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %240, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.17, i64 0, i64 0), i8* %241, i32 %244, i32 %247)
%249 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%250 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%251 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 18
%252 = load i8, i8* %251
%253 = zext i8 %252 to i32
%254 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 19
%255 = load i8, i8* %254
%256 = zext i8 %255 to i32
%257 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %249, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8* %250, i32 %253, i32 %256)
%258 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%259 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%260 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 20
%261 = load i8, i8* %260
%262 = zext i8 %261 to i32
%263 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 21
%264 = load i8, i8* %263
%265 = zext i8 %264 to i32
%266 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %258, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i8* %259, i32 %262, i32 %265)
%267 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%268 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%269 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 22
%270 = load i8, i8* %269
%271 = zext i8 %270 to i32
%272 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 23
%273 = load i8, i8* %272
%274 = zext i8 %273 to i32
%275 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %267, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.20, i64 0, i64 0), i8* %268, i32 %271, i32 %274)
%276 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%277 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%278 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 24
%279 = load i8, i8* %278
%280 = zext i8 %279 to i32
%281 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 25
%282 = load i8, i8* %281
%283 = zext i8 %282 to i32
%284 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %276, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.21, i64 0, i64 0), i8* %277, i32 %280, i32 %283)
%285 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%286 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%287 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 26
%288 = load i8, i8* %287
%289 = zext i8 %288 to i32
%290 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 27
%291 = load i8, i8* %290
%292 = zext i8 %291 to i32
%293 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %285, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i8* %286, i32 %289, i32 %292)
br label %294
294: ; preds = %167, %155
%295 = load i8*, i8** %8
%296 = call i64 @strcmp(i8* %295, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0))
%297 = icmp eq i64 %296, 0
br i1 %297, label %298, label %335
298: ; preds = %294
%299 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%300 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%301 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 0
%302 = load i8, i8* %301
%303 = zext i8 %302 to i32
%304 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 1
%305 = load i8, i8* %304
%306 = zext i8 %305 to i32
%307 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %299, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.24, i64 0, i64 0), i8* %300, i32 %303, i32 %306)
%308 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%309 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%310 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 2
%311 = load i8, i8* %310
%312 = zext i8 %311 to i32
%313 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 3
%314 = load i8, i8* %313
%315 = zext i8 %314 to i32
%316 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %308, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.25, i64 0, i64 0), i8* %309, i32 %312, i32 %315)
%317 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%318 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%319 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 4
%320 = load i8, i8* %319
%321 = zext i8 %320 to i32
%322 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 5
%323 = load i8, i8* %322
%324 = zext i8 %323 to i32
%325 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %317, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.26, i64 0, i64 0), i8* %318, i32 %321, i32 %324)
%326 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%327 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%328 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 6
%329 = load i8, i8* %328
%330 = zext i8 %329 to i32
%331 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 7
%332 = load i8, i8* %331
%333 = zext i8 %332 to i32
%334 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %326, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.27, i64 0, i64 0), i8* %327, i32 %330, i32 %333)
br label %335
335: ; preds = %298, %294
%336 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%337 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%338 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %336, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.28, i64 0, i64 0), i8* %337)
%339 = load i32, i32* %17
%340 = icmp ne i32 %339, 0
br i1 %340, label %341, label %345
341: ; preds = %335
%342 = load i32, i32* @stderr
%343 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%344 = call i32 @fprintf(i32 %342, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.29, i64 0, i64 0), i8* %343)
br label %345
345: ; preds = %341, %335
%346 = load i32, i32* @F_OK
%347 = call i32 @access(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.30, i64 0, i64 0), i32 %346)
%348 = icmp ne i32 %347, -1
br i1 %348, label %349, label %381
349: ; preds = %345
%350 = load i32, i32* @AF_UNIX
%351 = load i32, i32* @SOCK_STREAM
%352 = call i32 @socket(i32 %350, i32 %351, i32 0)
store i32 %352, i32* %14
%353 = icmp eq i32 %352, -1
br i1 %353, label %354, label %356
354: ; preds = %349
%355 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.31, i64 0, i64 0))
br label %378
356: ; preds = %349
%357 = call i32 @memset(%struct.sockaddr_un* %13, i32 0, i32 8)
%358 = load i32, i32* @AF_UNIX
%359 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %13, i32 0, i32 1
store i32 %358, i32* %359
%360 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %13, i32 0, i32 0
%361 = load i32, i32* %360
%362 = call i32 @strcpy(i32 %361, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.30, i64 0, i64 0))
%363 = load i32, i32* %14
%364 = bitcast %struct.sockaddr_un* %13 to %struct.sockaddr*
%365 = call i32 @bind(i32 %363, %struct.sockaddr* %364, i32 8)
store i32 %365, i32* %16
%366 = load i32, i32* %14
%367 = bitcast %struct.sockaddr_un* %13 to %struct.sockaddr*
%368 = call i32 @connect(i32 %366, %struct.sockaddr* %367, i32 8)
%369 = icmp eq i32 %368, -1
br i1 %369, label %370, label %371
370: ; preds = %356
br label %377
371: ; preds = %356
%372 = load i32, i32* %14
%373 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%374 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%375 = call i32 @strlen(i8* %374)
%376 = call i32 @write(i32 %372, i8* %373, i32 %375)
br label %377
377: ; preds = %371, %370
br label %378
378: ; preds = %377, %354
%379 = load i32, i32* %14
%380 = call i32 @close(i32 %379)
br label %381
381: ; preds = %378, %345
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32, i32 }
%struct.sockaddr = type { i32 }
@.str = [3 x i8] c"-P\00"
@.str.1 = [5 x i8] c"-pid\00"
@.str.2 = [6 x i8] c"-port\00"
@.str.3 = [3 x i8] c"-a\00"
@.str.4 = [3 x i8] c"-c\00"
@.str.5 = [3 x i8] c"-v\00"
@.str.6 = [48 x i8] c"{\22puerto\22:\22%s\22, \22address\22:\22%d\22, \22comando\22:\22%s\22,\00"
@.str.7 = [17 x i8] c"%s\22estructura\22:{\00"
@.str.8 = [3 x i8] c"69\00"
@.str.9 = [25 x i8] c"%s\22readerNumber\22:\22%c%c\22,\00"
@.str.10 = [22 x i8] c"%s\22ledNumber\22:\22%c%c\22,\00"
@.str.11 = [19 x i8] c"%s\22ccTemp\22:\22%c%c\22,\00"
@.str.12 = [23 x i8] c"%s\22onTimeTemp\22:\22%c%c\22,\00"
@.str.13 = [24 x i8] c"%s\22offTimeTemp\22:\22%c%c\22,\00"
@.str.14 = [24 x i8] c"%s\22onColorTemp\22:\22%c%c\22,\00"
@.str.15 = [25 x i8] c"%s\22offColorTemp\22:\22%c%c\22,\00"
@.str.16 = [25 x i8] c"%s\22timerLSBTemp\22:\22%c%c\22,\00"
@.str.17 = [25 x i8] c"%s\22timerMSBTemp\22:\22%c%c\22,\00"
@.str.18 = [19 x i8] c"%s\22ccPerm\22:\22%c%c\22,\00"
@.str.19 = [23 x i8] c"%s\22onTimePerm\22:\22%c%c\22,\00"
@.str.20 = [24 x i8] c"%s\22offTimePerm\22:\22%c%c\22,\00"
@.str.21 = [24 x i8] c"%s\22onColorPerm\22:\22%c%c\22,\00"
@.str.22 = [24 x i8] c"%s\22offColorPerm\22:\22%c%c\22\00"
@.str.23 = [3 x i8] c"68\00"
@.str.24 = [25 x i8] c"%s\22outputNumber\22:\22%c%c\22,\00"
@.str.25 = [24 x i8] c"%s\22controlCode\22:\22%c%c\22,\00"
@.str.26 = [21 x i8] c"%s\22timerLSB\22:\22%c%c\22,\00"
@.str.27 = [20 x i8] c"%s\22timerMSB\22:\22%c%c\22\00"
@.str.28 = [5 x i8] c"%s}}\00"
@stderr = global i32 0
@.str.29 = [13 x i8] c"Buffer : %s\0A\00"
@.str.30 = [25 x i8] c"/opt/osdpd/osdpd-in.sock\00"
@F_OK = global i32 0
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str.31 = [13 x i8] c"socket error\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [30 x i8]
%4 = alloca [512 x i8]
%5 = alloca %struct.sockaddr_un
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%8 = bitcast %struct.sockaddr_un* %5 to i8*
%9 = tail call i8* (...) @getpid()
%10 = icmp sgt i32 %0, 0
%11 = zext i32 %0 to i64
br label %17
12: ; preds = %108
%13 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), i8* %88, i32 %100, i8* %109)
%14 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* %7)
%15 = call i64 @strcmp(i8* %109, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %115, label %213
17: ; preds = %2, %108
%18 = phi i64 [ 0, %2 ], [ %104, %108 ]
%19 = phi i32 [ 0, %2 ], [ %113, %108 ]
%20 = phi i32 [ 0, %2 ], [ %100, %108 ]
%21 = phi i8* [ undef, %2 ], [ %88, %108 ]
%22 = phi i8* [ undef, %2 ], [ %109, %108 ]
%23 = getelementptr inbounds i8*, i8** %1, i64 %18
%24 = load i8*, i8** %23
%25 = tail call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %77
27: ; preds = %17
%28 = add nuw nsw i64 %18, 1
%29 = getelementptr inbounds i8*, i8** %1, i64 %28
%30 = load i8*, i8** %29
%31 = tail call i32 @strlen(i8* %30)
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %77
33: ; preds = %27
%34 = load i8*, i8** %29
%35 = zext i32 %31 to i64
%36 = and i64 %35, 1
%37 = icmp eq i32 %31, 1
br i1 %37, label %66, label %38
38: ; preds = %33
%39 = and i64 %35, 4294967294
br label %40
40: ; preds = %61, %38
%41 = phi i64 [ 0, %38 ], [ %63, %61 ]
%42 = phi i32 [ 0, %38 ], [ %62, %61 ]
%43 = phi i64 [ 0, %38 ], [ %64, %61 ]
%44 = getelementptr inbounds i8, i8* %34, i64 %41
%45 = load i8, i8* %44
%46 = icmp eq i8 %45, 58
br i1 %46, label %51, label %47
47: ; preds = %40
%48 = sext i32 %42 to i64
%49 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %48
store i8 %45, i8* %49
%50 = add nsw i32 %42, 1
br label %51
51: ; preds = %40, %47
%52 = phi i32 [ %42, %40 ], [ %50, %47 ]
%53 = or i64 %41, 1
%54 = getelementptr inbounds i8, i8* %34, i64 %53
%55 = load i8, i8* %54
%56 = icmp eq i8 %55, 58
br i1 %56, label %61, label %57
57: ; preds = %51
%58 = sext i32 %52 to i64
%59 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %58
store i8 %55, i8* %59
%60 = add nsw i32 %52, 1
br label %61
61: ; preds = %57, %51
%62 = phi i32 [ %52, %51 ], [ %60, %57 ]
%63 = add nuw nsw i64 %41, 2
%64 = add i64 %43, 2
%65 = icmp eq i64 %64, %39
br i1 %65, label %66, label %40
66: ; preds = %61, %33
%67 = phi i64 [ 0, %33 ], [ %63, %61 ]
%68 = phi i32 [ 0, %33 ], [ %62, %61 ]
%69 = icmp eq i64 %36, 0
br i1 %69, label %77, label %70
70: ; preds = %66
%71 = getelementptr inbounds i8, i8* %34, i64 %67
%72 = load i8, i8* %71
%73 = icmp eq i8 %72, 58
br i1 %73, label %77, label %74
74: ; preds = %70
%75 = sext i32 %68 to i64
%76 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %75
store i8 %72, i8* %76
br label %77
77: ; preds = %66, %74, %70, %27, %17
%78 = load i8*, i8** %23
%79 = tail call i64 @strcmp(i8* %78, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%80 = load i8*, i8** %23
%81 = tail call i64 @strcmp(i8* %80, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%82 = icmp eq i64 %81, 0
br i1 %82, label %83, label %87
83: ; preds = %77
%84 = add nuw nsw i64 %18, 1
%85 = getelementptr inbounds i8*, i8** %1, i64 %84
%86 = load i8*, i8** %85
br label %87
87: ; preds = %83, %77
%88 = phi i8* [ %86, %83 ], [ %21, %77 ]
%89 = load i8*, i8** %23
%90 = tail call i64 @strcmp(i8* %89, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%91 = icmp eq i64 %90, 0
br i1 %91, label %92, label %99
92: ; preds = %87
%93 = add nuw nsw i64 %18, 1
%94 = getelementptr inbounds i8*, i8** %1, i64 %93
%95 = load i8*, i8** %94
%96 = tail call i8* @atoi(i8* %95)
%97 = ptrtoint i8* %96 to i64
%98 = trunc i64 %97 to i32
br label %99
99: ; preds = %92, %87
%100 = phi i32 [ %98, %92 ], [ %20, %87 ]
%101 = load i8*, i8** %23
%102 = tail call i64 @strcmp(i8* %101, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%103 = icmp eq i64 %102, 0
%104 = add nuw nsw i64 %18, 1
br i1 %103, label %105, label %108
105: ; preds = %99
%106 = getelementptr inbounds i8*, i8** %1, i64 %104
%107 = load i8*, i8** %106
br label %108
108: ; preds = %99, %105
%109 = phi i8* [ %107, %105 ], [ %22, %99 ]
%110 = load i8*, i8** %23
%111 = tail call i64 @strcmp(i8* %110, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%112 = icmp eq i64 %111, 0
%113 = select i1 %112, i32 1, i32 %19
%114 = icmp eq i64 %104, %11
br i1 %114, label %12, label %17
115: ; preds = %12
%116 = load i8, i8* %6
%117 = zext i8 %116 to i32
%118 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 1
%119 = load i8, i8* %118
%120 = zext i8 %119 to i32
%121 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* %7, i32 %117, i32 %120)
%122 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 2
%123 = load i8, i8* %122
%124 = zext i8 %123 to i32
%125 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 3
%126 = load i8, i8* %125
%127 = zext i8 %126 to i32
%128 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i8* %7, i32 %124, i32 %127)
%129 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 4
%130 = load i8, i8* %129
%131 = zext i8 %130 to i32
%132 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 5
%133 = load i8, i8* %132
%134 = zext i8 %133 to i32
%135 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i8* %7, i32 %131, i32 %134)
%136 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 6
%137 = load i8, i8* %136
%138 = zext i8 %137 to i32
%139 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 7
%140 = load i8, i8* %139
%141 = zext i8 %140 to i32
%142 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i8* %7, i32 %138, i32 %141)
%143 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 8
%144 = load i8, i8* %143
%145 = zext i8 %144 to i32
%146 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 9
%147 = load i8, i8* %146
%148 = zext i8 %147 to i32
%149 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i8* %7, i32 %145, i32 %148)
%150 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 10
%151 = load i8, i8* %150
%152 = zext i8 %151 to i32
%153 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 11
%154 = load i8, i8* %153
%155 = zext i8 %154 to i32
%156 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0), i8* %7, i32 %152, i32 %155)
%157 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 12
%158 = load i8, i8* %157
%159 = zext i8 %158 to i32
%160 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 13
%161 = load i8, i8* %160
%162 = zext i8 %161 to i32
%163 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0), i8* %7, i32 %159, i32 %162)
%164 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 14
%165 = load i8, i8* %164
%166 = zext i8 %165 to i32
%167 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 15
%168 = load i8, i8* %167
%169 = zext i8 %168 to i32
%170 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0), i8* %7, i32 %166, i32 %169)
%171 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 16
%172 = load i8, i8* %171
%173 = zext i8 %172 to i32
%174 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 17
%175 = load i8, i8* %174
%176 = zext i8 %175 to i32
%177 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.17, i64 0, i64 0), i8* %7, i32 %173, i32 %176)
%178 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 18
%179 = load i8, i8* %178
%180 = zext i8 %179 to i32
%181 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 19
%182 = load i8, i8* %181
%183 = zext i8 %182 to i32
%184 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8* %7, i32 %180, i32 %183)
%185 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 20
%186 = load i8, i8* %185
%187 = zext i8 %186 to i32
%188 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 21
%189 = load i8, i8* %188
%190 = zext i8 %189 to i32
%191 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i8* %7, i32 %187, i32 %190)
%192 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 22
%193 = load i8, i8* %192
%194 = zext i8 %193 to i32
%195 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 23
%196 = load i8, i8* %195
%197 = zext i8 %196 to i32
%198 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.20, i64 0, i64 0), i8* %7, i32 %194, i32 %197)
%199 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 24
%200 = load i8, i8* %199
%201 = zext i8 %200 to i32
%202 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 25
%203 = load i8, i8* %202
%204 = zext i8 %203 to i32
%205 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.21, i64 0, i64 0), i8* %7, i32 %201, i32 %204)
%206 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 26
%207 = load i8, i8* %206
%208 = zext i8 %207 to i32
%209 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 27
%210 = load i8, i8* %209
%211 = zext i8 %210 to i32
%212 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i8* %7, i32 %208, i32 %211)
br label %213
213: ; preds = %115, %12
%214 = call i64 @strcmp(i8* %109, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0))
%215 = icmp eq i64 %214, 0
br i1 %215, label %216, label %244
216: ; preds = %213
%217 = load i8, i8* %6
%218 = zext i8 %217 to i32
%219 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 1
%220 = load i8, i8* %219
%221 = zext i8 %220 to i32
%222 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.24, i64 0, i64 0), i8* %7, i32 %218, i32 %221)
%223 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 2
%224 = load i8, i8* %223
%225 = zext i8 %224 to i32
%226 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 3
%227 = load i8, i8* %226
%228 = zext i8 %227 to i32
%229 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.25, i64 0, i64 0), i8* %7, i32 %225, i32 %228)
%230 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 4
%231 = load i8, i8* %230
%232 = zext i8 %231 to i32
%233 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 5
%234 = load i8, i8* %233
%235 = zext i8 %234 to i32
%236 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.26, i64 0, i64 0), i8* %7, i32 %232, i32 %235)
%237 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 6
%238 = load i8, i8* %237
%239 = zext i8 %238 to i32
%240 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 7
%241 = load i8, i8* %240
%242 = zext i8 %241 to i32
%243 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.27, i64 0, i64 0), i8* %7, i32 %239, i32 %242)
br label %244
244: ; preds = %216, %213
%245 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.28, i64 0, i64 0), i8* %7)
%246 = icmp eq i32 %113, 0
br i1 %246, label %250, label %247
247: ; preds = %244
%248 = load i32, i32* @stderr
%249 = call i32 @fprintf(i32 %248, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.29, i64 0, i64 0), i8* %7)
br label %250
250: ; preds = %247, %244
%251 = load i32, i32* @F_OK
%252 = call i32 @access(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.30, i64 0, i64 0), i32 %251)
%253 = icmp eq i32 %252, -1
br i1 %253, label %277, label %254
254: ; preds = %250
%255 = load i32, i32* @AF_UNIX
%256 = load i32, i32* @SOCK_STREAM
%257 = call i32 @socket(i32 %255, i32 %256, i32 0)
%258 = icmp eq i32 %257, -1
br i1 %258, label %259, label %261
259: ; preds = %254
%260 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.31, i64 0, i64 0))
br label %275
261: ; preds = %254
%262 = call i32 @memset(%struct.sockaddr_un* %5, i32 0, i32 8)
%263 = load i32, i32* @AF_UNIX
%264 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %5, i64 0, i32 1
store i32 %263, i32* %264
%265 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %5, i64 0, i32 0
%266 = load i32, i32* %265
%267 = call i32 @strcpy(i32 %266, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.30, i64 0, i64 0))
%268 = bitcast %struct.sockaddr_un* %5 to %struct.sockaddr*
%269 = call i32 @bind(i32 %257, %struct.sockaddr* %268, i32 8)
%270 = call i32 @connect(i32 %257, %struct.sockaddr* %268, i32 8)
%271 = icmp eq i32 %270, -1
br i1 %271, label %275, label %272
272: ; preds = %261
%273 = call i32 @strlen(i8* %7)
%274 = call i32 @write(i32 %257, i8* %7, i32 %273)
br label %275
275: ; preds = %272, %261, %259
%276 = call i32 @close(i32 %257)
br label %277
277: ; preds = %275, %250
ret i32 0
}