#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;
};
typedef scalar_t__ pid_t;
typedef int /*<<< orphan*/ name;

/* Variables and functions */
int /*<<< orphan*/ AF_UNIX;
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ SOCK_DGRAM;
scalar_t__ bind(int, struct sockaddr_un *, int);
scalar_t__ connect(int, struct sockaddr_un *, int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
scalar_t__ fork();
int /*<<< orphan*/ kill(scalar_t__, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(int /*<<< orphan*/, char *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ test_daemon();
int /*<<< orphan*/ test_init(int, char **);
int /*<<< orphan*/ test_msg(char *, ...);
int /*<<< orphan*/ test_waitsig();
int /*<<< orphan*/ unlink(char *);
int write(int, char *, int);
int main(int argc, char *argv[]) {
  int server, client, ret = 1, i;
  struct sockaddr_un name;
  pid_t pid = 0;
  test_init(argc, argv);
  name.sun_family = AF_UNIX;
  server = socket(AF_UNIX, SOCK_DGRAM, 0);
  if (server < 0) {
    test_msg("ERR: %s:%d: "
             "socket"
             " (errno = %d (%s))\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/test/zdtm/"
             "live/static/sockets03.c",
             40, errno, strerror(errno));
    goto out;
  }
  strcpy(name.sun_path, "/tmp/server");
  if (bind(server, &name, sizeof(name)) < 0) {
    test_msg("ERR: %s:%d: "
             "bind"
             " (errno = %d (%s))\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/test/zdtm/"
             "live/static/sockets03.c",
             46, errno, strerror(errno));
    goto out;
  }
  pid = fork();
  if (pid < 0) {
    test_msg("ERR: %s:%d: "
             "fork"
             " (errno = %d (%s))\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/test/zdtm/"
             "live/static/sockets03.c",
             52, errno, strerror(errno));
    goto out;
  }
  client = socket(AF_UNIX, SOCK_DGRAM, 0);
  if (client < 0) {
    test_msg("ERR: %s:%d: "
             "client socket"
             " (errno = %d (%s))\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/test/zdtm/"
             "live/static/sockets03.c",
             58, errno, strerror(errno));
    goto out;
  }
  if (pid == 0) {
    strcpy(name.sun_path, "/tmp/client1");
    if (bind(client, &name, sizeof(name)) < 0) {
      test_msg("ERR: %s:%d: "
               "client bind"
               " (errno = %d (%s))\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/"
               "test/zdtm/live/static/sockets03.c",
               65, errno, strerror(errno));
      exit(1);
    }
    strcpy(name.sun_path, "/tmp/server");
    if (connect(client, &name, sizeof(name)) < 0) {
      test_msg("ERR: %s:%d: "
               "connect"
               " (errno = %d (%s))\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/"
               "test/zdtm/live/static/sockets03.c",
               71, errno, strerror(errno));
      exit(1);
    }
    if (write(client, "child-send", 10) != 10) {
      test_msg("ERR: %s:%d: "
               "write"
               " (errno = %d (%s))\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/"
               "test/zdtm/live/static/sockets03.c",
               76, errno, strerror(errno));
      exit(1);
    }
    while (1)
      sleep(1000);
  }
  strcpy(name.sun_path, "/tmp/client2");
  if (bind(client, &name, sizeof(name)) < 0) {
    test_msg("ERR: %s:%d: "
             "client bind"
             " (errno = %d (%s))\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/test/zdtm/"
             "live/static/sockets03.c",
             85, errno, strerror(errno));
    goto out;
  }
  strcpy(name.sun_path, "/tmp/server");
  if (connect(client, &name, sizeof(name)) < 0) {
    test_msg("ERR: %s:%d: "
             "connect"
             " (errno = %d (%s))\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/test/zdtm/"
             "live/static/sockets03.c",
             91, errno, strerror(errno));
    goto out;
  }
  for (i = 0; i < 9; i++) {
    if (write(client, "parent-send", 11) != 11) {
      test_msg("ERR: %s:%d: "
               "write"
               " (errno = %d (%s))\n",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/"
               "test/zdtm/live/static/sockets03.c",
               102, errno, strerror(errno));
      goto out;
    }
  }
  test_daemon();
  test_waitsig();
  test_msg("PASS\n");
  ret = 0;
out:
  if (pid > 0)
    kill(pid, SIGKILL);
  unlink("/tmp/client1");
  unlink("/tmp/client2");
  unlink("/tmp/server");
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x1c(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <test_init@plt>
mov    0x2dc0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
mov    0x2da3(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1110 <socket@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1292 <main+0xa2>
mov    0x2d76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x34(%rbp),%ecx
mov    %eax,%r8d
lea    0xd86(%rip),%rdi
lea    0xda5(%rip),%rsi
mov    $0x28,%edx
mov    $0x0,%al
call   1080 <test_msg@plt>
jmp    1686 <main+0x496>
mov    -0x28(%rbp),%edi
lea    0xe23(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x14(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x8,%edx
call   10b0 <bind@plt>
cmp    $0x0,%rax
jge    12fb <main+0x10b>
mov    0x2d0d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
mov    0x2d01(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x38(%rbp),%ecx
mov    %eax,%r8d
lea    0xde8(%rip),%rdi
lea    0xd3c(%rip),%rsi
mov    $0x2e,%edx
mov    $0x0,%al
call   1080 <test_msg@plt>
jmp    1686 <main+0x496>
mov    $0x0,%al
call   1100 <fork@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jge    1350 <main+0x160>
mov    0x2cb8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    0x2cac(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x3c(%rbp),%ecx
mov    %eax,%r8d
lea    0xdb7(%rip),%rdi
lea    0xce7(%rip),%rsi
mov    $0x34,%edx
mov    $0x0,%al
call   1080 <test_msg@plt>
jmp    1686 <main+0x496>
mov    0x2c91(%rip),%rax
mov    (%rax),%edi
mov    0x2c80(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1110 <socket@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    13b5 <main+0x1c5>
mov    0x2c53(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    0x2c47(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x40(%rbp),%ecx
mov    %eax,%r8d
lea    0xd76(%rip),%rdi
lea    0xc82(%rip),%rsi
mov    $0x3a,%edx
mov    $0x0,%al
call   1080 <test_msg@plt>
jmp    1686 <main+0x496>
cmpq   $0x0,-0x30(%rbp)
jne    1511 <main+0x321>
mov    -0x28(%rbp),%edi
lea    0xd76(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x8,%edx
call   10b0 <bind@plt>
cmp    $0x0,%rax
jge    142e <main+0x23e>
mov    0x2bdf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    0x2bd3(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x44(%rbp),%ecx
mov    %eax,%r8d
lea    0xd3c(%rip),%rdi
lea    0xc0e(%rip),%rsi
mov    $0x41,%edx
mov    $0x0,%al
call   1080 <test_msg@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0x28(%rbp),%edi
lea    0xc87(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x8,%edx
call   10d0 <connect@plt>
cmp    $0x0,%rax
jge    149c <main+0x2ac>
mov    0x2b71(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
mov    0x2b65(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x48(%rbp),%ecx
mov    %eax,%r8d
lea    0xcf9(%rip),%rdi
lea    0xba0(%rip),%rsi
mov    $0x47,%edx
mov    $0x0,%al
call   1080 <test_msg@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0x18(%rbp),%edi
lea    0xcf9(%rip),%rsi
mov    $0xa,%edx
call   1060 <write@plt>
cmp    $0xa,%eax
je     14fd <main+0x30d>
mov    0x2b10(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    0x2b04(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x4c(%rbp),%ecx
mov    %eax,%r8d
lea    0xcca(%rip),%rdi
lea    0xb3f(%rip),%rsi
mov    $0x4c,%edx
mov    $0x0,%al
call   1080 <test_msg@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
jmp    1502 <main+0x312>
mov    $0x3e8,%edi
call   10f0 <sleep@plt>
jmp    1502 <main+0x312>
mov    -0x28(%rbp),%edi
lea    0xcb4(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x8,%edx
call   10b0 <bind@plt>
cmp    $0x0,%rax
jge    157a <main+0x38a>
mov    0x2a8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x50(%rbp)
mov    0x2a82(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x50(%rbp),%ecx
mov    %eax,%r8d
lea    0xbeb(%rip),%rdi
lea    0xabd(%rip),%rsi
mov    $0x55,%edx
mov    $0x0,%al
call   1080 <test_msg@plt>
jmp    1686 <main+0x496>
mov    -0x28(%rbp),%edi
lea    0xb3b(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x8,%edx
call   10d0 <connect@plt>
cmp    $0x0,%rax
jge    15e3 <main+0x3f3>
mov    0x2a25(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
mov    0x2a19(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x54(%rbp),%ecx
mov    %eax,%r8d
lea    0xbad(%rip),%rdi
lea    0xa54(%rip),%rsi
mov    $0x5b,%edx
mov    $0x0,%al
call   1080 <test_msg@plt>
jmp    1686 <main+0x496>
movl   $0x0,-0x20(%rbp)
cmpl   $0x9,-0x20(%rbp)
jge    1663 <main+0x473>
mov    -0x18(%rbp),%edi
lea    0xbde(%rip),%rsi
mov    $0xb,%edx
call   1060 <write@plt>
cmp    $0xb,%eax
je     1650 <main+0x460>
mov    0x29b8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
mov    0x29ac(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x58(%rbp),%ecx
mov    %eax,%r8d
lea    0xb72(%rip),%rdi
lea    0x9e7(%rip),%rsi
mov    $0x66,%edx
mov    $0x0,%al
call   1080 <test_msg@plt>
jmp    1686 <main+0x496>
jmp    1655 <main+0x465>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    15ea <main+0x3fa>
mov    $0x0,%al
call   1070 <test_daemon@plt>
mov    $0x0,%al
call   1090 <test_waitsig@plt>
lea    0xb70(%rip),%rdi
mov    $0x0,%al
call   1080 <test_msg@plt>
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x30(%rbp)
jle    16a3 <main+0x4b3>
mov    -0x30(%rbp),%rdi
mov    0x292c(%rip),%rax
mov    (%rax),%esi
call   10a0 <kill@plt>
lea    0xa96(%rip),%rdi
call   1030 <unlink@plt>
lea    0xb19(%rip),%rdi
call   1030 <unlink@plt>
lea    0x9fd(%rip),%rdi
call   1030 <unlink@plt>
mov    -0x1c(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
call   1050 <test_init@plt>
mov    0x2de4(%rip),%r14
mov    (%r14),%edi
mov    %edi,0xc(%rsp)
mov    0x2dce(%rip),%rbp
mov    0x0(%rbp),%esi
xor    %edx,%edx
call   1110 <socket@plt>
test   %eax,%eax
js     13f2 <main+0x202>
mov    %eax,%ebx
lea    0xe92(%rip),%rsi
call   1040 <strcpy@plt>
lea    0x8(%rsp),%rsi
mov    %ebx,%edi
mov    $0x8,%edx
call   10b0 <bind@plt>
test   %rax,%rax
js     1417 <main+0x227>
xor    %eax,%eax
call   1100 <fork@plt>
test   %rax,%rax
js     143c <main+0x24c>
mov    %rax,%rbx
mov    (%r14),%edi
mov    0x0(%rbp),%esi
xor    %edx,%edx
call   1110 <socket@plt>
test   %eax,%eax
js     149f <main+0x2af>
mov    %eax,%ebp
mov    0x8(%rsp),%edi
test   %rbx,%rbx
je     14de <main+0x2ee>
lea    0xf45(%rip),%rsi
call   1040 <strcpy@plt>
lea    0x8(%rsp),%rsi
mov    %ebp,%edi
mov    $0x8,%edx
call   10b0 <bind@plt>
test   %rax,%rax
js     1581 <main+0x391>
mov    0x8(%rsp),%edi
lea    0xe0b(%rip),%rsi
call   1040 <strcpy@plt>
lea    0x8(%rsp),%rsi
mov    %ebp,%edi
mov    $0x8,%edx
call   10d0 <connect@plt>
test   %rax,%rax
js     15a6 <main+0x3b6>
lea    0xf02(%rip),%rsi
mov    %ebp,%edi
mov    $0xb,%edx
call   1060 <write@plt>
cmp    $0xb,%eax
jne    155c <main+0x36c>
lea    0xee6(%rip),%rsi
mov    %ebp,%edi
mov    $0xb,%edx
call   1060 <write@plt>
cmp    $0xb,%eax
jne    155c <main+0x36c>
lea    0xeca(%rip),%rsi
mov    %ebp,%edi
mov    $0xb,%edx
call   1060 <write@plt>
cmp    $0xb,%eax
jne    155c <main+0x36c>
lea    0xeae(%rip),%rsi
mov    %ebp,%edi
mov    $0xb,%edx
call   1060 <write@plt>
cmp    $0xb,%eax
jne    155c <main+0x36c>
lea    0xe92(%rip),%rsi
mov    %ebp,%edi
mov    $0xb,%edx
call   1060 <write@plt>
cmp    $0xb,%eax
jne    155c <main+0x36c>
lea    0xe76(%rip),%rsi
mov    %ebp,%edi
mov    $0xb,%edx
call   1060 <write@plt>
cmp    $0xb,%eax
jne    155c <main+0x36c>
lea    0xe5a(%rip),%rsi
mov    %ebp,%edi
mov    $0xb,%edx
call   1060 <write@plt>
cmp    $0xb,%eax
jne    155c <main+0x36c>
lea    0xe3e(%rip),%rsi
mov    %ebp,%edi
mov    $0xb,%edx
call   1060 <write@plt>
cmp    $0xb,%eax
jne    155c <main+0x36c>
lea    0xe22(%rip),%rsi
mov    %ebp,%edi
mov    $0xb,%edx
call   1060 <write@plt>
cmp    $0xb,%eax
jne    155c <main+0x36c>
xor    %ebp,%ebp
xor    %eax,%eax
call   1070 <test_daemon@plt>
xor    %eax,%eax
call   1090 <test_waitsig@plt>
lea    0xe02(%rip),%rdi
xor    %eax,%eax
call   1080 <test_msg@plt>
jmp    15da <main+0x3ea>
mov    0x2bd7(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   10e0 <strerror@plt>
lea    0xbf7(%rip),%rdi
lea    0xc16(%rip),%rsi
mov    $0x28,%edx
jmp    145f <main+0x26f>
mov    0x2bb2(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   10e0 <strerror@plt>
lea    0xc9d(%rip),%rdi
lea    0xbf1(%rip),%rsi
mov    $0x2e,%edx
jmp    145f <main+0x26f>
mov    0x2b8d(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   10e0 <strerror@plt>
lea    0xc9c(%rip),%rdi
lea    0xbcc(%rip),%rsi
mov    $0x34,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1080 <test_msg@plt>
mov    $0x1,%ebp
lea    0xcc9(%rip),%rdi
call   1030 <unlink@plt>
lea    0xd4c(%rip),%rdi
call   1030 <unlink@plt>
lea    0xc30(%rip),%rdi
call   1030 <unlink@plt>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    0x2b2a(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   10e0 <strerror@plt>
lea    0xc5d(%rip),%rdi
lea    0xb69(%rip),%rsi
mov    $0x3a,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1080 <test_msg@plt>
mov    $0x1,%ebp
test   %rbx,%rbx
jne    15da <main+0x3ea>
jmp    1470 <main+0x280>
lea    0xc5b(%rip),%rsi
call   1040 <strcpy@plt>
lea    0x8(%rsp),%rsi
mov    %ebp,%edi
mov    $0x8,%edx
call   10b0 <bind@plt>
test   %rax,%rax
js     15f0 <main+0x400>
mov    0x8(%rsp),%edi
lea    0xbb0(%rip),%rsi
call   1040 <strcpy@plt>
lea    0x8(%rsp),%rsi
mov    %ebp,%edi
mov    $0x8,%edx
call   10d0 <connect@plt>
test   %rax,%rax
js     1615 <main+0x425>
lea    0xc6a(%rip),%rsi
mov    %ebp,%edi
mov    $0xa,%edx
call   1060 <write@plt>
cmp    $0xa,%eax
jne    163a <main+0x44a>
nopw   0x0(%rax,%rax,1)
mov    $0x3e8,%edi
call   10f0 <sleep@plt>
jmp    1550 <main+0x360>
mov    0x2a6d(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   10e0 <strerror@plt>
lea    0xc37(%rip),%rdi
lea    0xaac(%rip),%rsi
mov    $0x66,%edx
jmp    15c9 <main+0x3d9>
mov    0x2a48(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   10e0 <strerror@plt>
lea    0xbb5(%rip),%rdi
lea    0xa87(%rip),%rsi
mov    $0x55,%edx
jmp    15c9 <main+0x3d9>
mov    0x2a23(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   10e0 <strerror@plt>
lea    0xbbb(%rip),%rdi
lea    0xa62(%rip),%rsi
mov    $0x5b,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1080 <test_msg@plt>
mov    $0x1,%ebp
mov    0x29e7(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10a0 <kill@plt>
jmp    1470 <main+0x280>
mov    0x29d9(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   10e0 <strerror@plt>
lea    0xb46(%rip),%rdi
lea    0xa18(%rip),%rsi
mov    $0x41,%edx
jmp    165d <main+0x46d>
mov    0x29b4(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   10e0 <strerror@plt>
lea    0xb4c(%rip),%rdi
lea    0x9f3(%rip),%rsi
mov    $0x47,%edx
jmp    165d <main+0x46d>
mov    0x298f(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   10e0 <strerror@plt>
lea    0xb59(%rip),%rdi
lea    0x9ce(%rip),%rsi
mov    $0x4c,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1080 <test_msg@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_un = type { i32, i32 }
@AF_UNIX = global i32 0
@SOCK_DGRAM = global i32 0
@.str = [38 x i8] c"ERR: %s:%d: socket (errno = %d (%s))\0A\00"
@.str.1 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/test/zdtm/live/static/sockets03.c\00"
@errno = global i32 0
@.str.2 = [12 x i8] c"/tmp/server\00"
@.str.3 = [36 x i8] c"ERR: %s:%d: bind (errno = %d (%s))\0A\00"
@.str.4 = [36 x i8] c"ERR: %s:%d: fork (errno = %d (%s))\0A\00"
@.str.5 = [45 x i8] c"ERR: %s:%d: client socket (errno = %d (%s))\0A\00"
@.str.6 = [13 x i8] c"/tmp/client1\00"
@.str.7 = [43 x i8] c"ERR: %s:%d: client bind (errno = %d (%s))\0A\00"
@.str.8 = [39 x i8] c"ERR: %s:%d: connect (errno = %d (%s))\0A\00"
@.str.9 = [11 x i8] c"child-send\00"
@.str.10 = [37 x i8] c"ERR: %s:%d: write (errno = %d (%s))\0A\00"
@.str.11 = [13 x i8] c"/tmp/client2\00"
@.str.12 = [12 x i8] c"parent-send\00"
@.str.13 = [6 x i8] c"PASS\0A\00"
@SIGKILL = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.sockaddr_un
%11 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %8
store i64 0, i64* %11
%12 = load i32, i32* %4
%13 = load i8**, i8*** %5
%14 = call i32 @test_init(i32 %12, i8** %13)
%15 = load i32, i32* @AF_UNIX
%16 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %10, i32 0, i32 1
store i32 %15, i32* %16
%17 = load i32, i32* @AF_UNIX
%18 = load i32, i32* @SOCK_DGRAM
%19 = call i32 @socket(i32 %17, i32 %18, i32 0)
store i32 %19, i32* %6
%20 = load i32, i32* %6
%21 = icmp slt i32 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %2
%23 = load i32, i32* @errno
%24 = load i32, i32* @errno
%25 = call i32 @strerror(i32 %24)
%26 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 40, i32 %23, i32 %25)
br label %146
27: ; preds = %2
%28 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %10, i32 0, i32 0
%29 = load i32, i32* %28
%30 = call i32 @strcpy(i32 %29, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%31 = load i32, i32* %6
%32 = call i64 @bind(i32 %31, %struct.sockaddr_un* %10, i32 8)
%33 = icmp slt i64 %32, 0
br i1 %33, label %34, label %39
34: ; preds = %27
%35 = load i32, i32* @errno
%36 = load i32, i32* @errno
%37 = call i32 @strerror(i32 %36)
%38 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 46, i32 %35, i32 %37)
br label %146
39: ; preds = %27
%40 = call i64 (...) @fork()
store i64 %40, i64* %11
%41 = load i64, i64* %11
%42 = icmp slt i64 %41, 0
br i1 %42, label %43, label %48
43: ; preds = %39
%44 = load i32, i32* @errno
%45 = load i32, i32* @errno
%46 = call i32 @strerror(i32 %45)
%47 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 52, i32 %44, i32 %46)
br label %146
48: ; preds = %39
%49 = load i32, i32* @AF_UNIX
%50 = load i32, i32* @SOCK_DGRAM
%51 = call i32 @socket(i32 %49, i32 %50, i32 0)
store i32 %51, i32* %7
%52 = load i32, i32* %7
%53 = icmp slt i32 %52, 0
br i1 %53, label %54, label %59
54: ; preds = %48
%55 = load i32, i32* @errno
%56 = load i32, i32* @errno
%57 = call i32 @strerror(i32 %56)
%58 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 58, i32 %55, i32 %57)
br label %146
59: ; preds = %48
%60 = load i64, i64* %11
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %101
62: ; preds = %59
%63 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %10, i32 0, i32 0
%64 = load i32, i32* %63
%65 = call i32 @strcpy(i32 %64, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%66 = load i32, i32* %7
%67 = call i64 @bind(i32 %66, %struct.sockaddr_un* %10, i32 8)
%68 = icmp slt i64 %67, 0
br i1 %68, label %69, label %75
69: ; preds = %62
%70 = load i32, i32* @errno
%71 = load i32, i32* @errno
%72 = call i32 @strerror(i32 %71)
%73 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 65, i32 %70, i32 %72)
%74 = call i32 @exit(i32 1)
unreachable
75: ; preds = %62
%76 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %10, i32 0, i32 0
%77 = load i32, i32* %76
%78 = call i32 @strcpy(i32 %77, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%79 = load i32, i32* %7
%80 = call i64 @connect(i32 %79, %struct.sockaddr_un* %10, i32 8)
%81 = icmp slt i64 %80, 0
br i1 %81, label %82, label %88
82: ; preds = %75
%83 = load i32, i32* @errno
%84 = load i32, i32* @errno
%85 = call i32 @strerror(i32 %84)
%86 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 71, i32 %83, i32 %85)
%87 = call i32 @exit(i32 1)
unreachable
88: ; preds = %75
%89 = load i32, i32* %7
%90 = call i32 @write(i32 %89, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 10)
%91 = icmp ne i32 %90, 10
br i1 %91, label %92, label %98
92: ; preds = %88
%93 = load i32, i32* @errno
%94 = load i32, i32* @errno
%95 = call i32 @strerror(i32 %94)
%96 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 76, i32 %93, i32 %95)
%97 = call i32 @exit(i32 1)
unreachable
98: ; preds = %88
br label %99
99: ; preds = %98, %99
%100 = call i32 @sleep(i32 1000)
br label %99
101: ; preds = %59
%102 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %10, i32 0, i32 0
%103 = load i32, i32* %102
%104 = call i32 @strcpy(i32 %103, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%105 = load i32, i32* %7
%106 = call i64 @bind(i32 %105, %struct.sockaddr_un* %10, i32 8)
%107 = icmp slt i64 %106, 0
br i1 %107, label %108, label %113
108: ; preds = %101
%109 = load i32, i32* @errno
%110 = load i32, i32* @errno
%111 = call i32 @strerror(i32 %110)
%112 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 85, i32 %109, i32 %111)
br label %146
113: ; preds = %101
%114 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %10, i32 0, i32 0
%115 = load i32, i32* %114
%116 = call i32 @strcpy(i32 %115, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%117 = load i32, i32* %7
%118 = call i64 @connect(i32 %117, %struct.sockaddr_un* %10, i32 8)
%119 = icmp slt i64 %118, 0
br i1 %119, label %120, label %125
120: ; preds = %113
%121 = load i32, i32* @errno
%122 = load i32, i32* @errno
%123 = call i32 @strerror(i32 %122)
%124 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 91, i32 %121, i32 %123)
br label %146
125: ; preds = %113
store i32 0, i32* %9
br label %126
126: ; preds = %139, %125
%127 = load i32, i32* %9
%128 = icmp slt i32 %127, 9
br i1 %128, label %129, label %142
129: ; preds = %126
%130 = load i32, i32* %7
%131 = call i32 @write(i32 %130, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 11)
%132 = icmp ne i32 %131, 11
br i1 %132, label %133, label %138
133: ; preds = %129
%134 = load i32, i32* @errno
%135 = load i32, i32* @errno
%136 = call i32 @strerror(i32 %135)
%137 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 102, i32 %134, i32 %136)
br label %146
138: ; preds = %129
br label %139
139: ; preds = %138
%140 = load i32, i32* %9
%141 = add nsw i32 %140, 1
store i32 %141, i32* %9
br label %126
142: ; preds = %126
%143 = call i32 (...) @test_daemon()
%144 = call i32 (...) @test_waitsig()
%145 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %8
br label %146
146: ; preds = %142, %133, %120, %108, %54, %43, %34, %22
%147 = load i64, i64* %11
%148 = icmp sgt i64 %147, 0
br i1 %148, label %149, label %153
149: ; preds = %146
%150 = load i64, i64* %11
%151 = load i32, i32* @SIGKILL
%152 = call i32 @kill(i64 %150, i32 %151)
br label %153
153: ; preds = %149, %146
%154 = call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%155 = call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%156 = call i32 @unlink(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%157 = load i32, i32* %8
ret i32 %157
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32, i32 }
@AF_UNIX = global i32 0
@SOCK_DGRAM = global i32 0
@.str = [38 x i8] c"ERR: %s:%d: socket (errno = %d (%s))\0A\00"
@.str.1 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LK4D4/criu/refs/heads/master/test/zdtm/live/static/sockets03.c\00"
@errno = global i32 0
@.str.2 = [12 x i8] c"/tmp/server\00"
@.str.3 = [36 x i8] c"ERR: %s:%d: bind (errno = %d (%s))\0A\00"
@.str.4 = [36 x i8] c"ERR: %s:%d: fork (errno = %d (%s))\0A\00"
@.str.5 = [45 x i8] c"ERR: %s:%d: client socket (errno = %d (%s))\0A\00"
@.str.6 = [13 x i8] c"/tmp/client1\00"
@.str.7 = [43 x i8] c"ERR: %s:%d: client bind (errno = %d (%s))\0A\00"
@.str.8 = [39 x i8] c"ERR: %s:%d: connect (errno = %d (%s))\0A\00"
@.str.9 = [11 x i8] c"child-send\00"
@.str.10 = [37 x i8] c"ERR: %s:%d: write (errno = %d (%s))\0A\00"
@.str.11 = [13 x i8] c"/tmp/client2\00"
@.str.12 = [12 x i8] c"parent-send\00"
@.str.13 = [6 x i8] c"PASS\0A\00"
@SIGKILL = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca %struct.sockaddr_un
%4 = bitcast %struct.sockaddr_un* %3 to i8*
%5 = tail call i32 @test_init(i32 %0, i8** %1)
%6 = load i32, i32* @AF_UNIX
%7 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %3, i64 0, i32 1
store i32 %6, i32* %7
%8 = load i32, i32* @SOCK_DGRAM
%9 = tail call i32 @socket(i32 %6, i32 %8, i32 0)
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* @errno
%13 = tail call i32 @strerror(i32 %12)
%14 = tail call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 40, i32 %12, i32 %13)
br label %129
15: ; preds = %2
%16 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %3, i64 0, i32 0
%17 = tail call i32 @strcpy(i32 undef, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%18 = call i64 @bind(i32 %9, %struct.sockaddr_un* %3, i32 8)
%19 = icmp slt i64 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %15
%21 = load i32, i32* @errno
%22 = call i32 @strerror(i32 %21)
%23 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 46, i32 %21, i32 %22)
br label %129
24: ; preds = %15
%25 = call i64 (...) @fork()
%26 = icmp slt i64 %25, 0
br i1 %26, label %27, label %31
27: ; preds = %24
%28 = load i32, i32* @errno
%29 = call i32 @strerror(i32 %28)
%30 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 52, i32 %28, i32 %29)
br label %129
31: ; preds = %24
%32 = load i32, i32* @AF_UNIX
%33 = load i32, i32* @SOCK_DGRAM
%34 = call i32 @socket(i32 %32, i32 %33, i32 0)
%35 = icmp slt i32 %34, 0
br i1 %35, label %120, label %36
36: ; preds = %31
%37 = icmp eq i64 %25, 0
%38 = load i32, i32* %16
br i1 %37, label %39, label %68
39: ; preds = %36
%40 = call i32 @strcpy(i32 %38, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%41 = call i64 @bind(i32 %34, %struct.sockaddr_un* %3, i32 8)
%42 = icmp slt i64 %41, 0
br i1 %42, label %43, label %48
43: ; preds = %39
%44 = load i32, i32* @errno
%45 = call i32 @strerror(i32 %44)
%46 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 65, i32 %44, i32 %45)
%47 = call i32 @exit(i32 1)
unreachable
48: ; preds = %39
%49 = load i32, i32* %16
%50 = call i32 @strcpy(i32 %49, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%51 = call i64 @connect(i32 %34, %struct.sockaddr_un* %3, i32 8)
%52 = icmp slt i64 %51, 0
br i1 %52, label %53, label %58
53: ; preds = %48
%54 = load i32, i32* @errno
%55 = call i32 @strerror(i32 %54)
%56 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 71, i32 %54, i32 %55)
%57 = call i32 @exit(i32 1)
unreachable
58: ; preds = %48
%59 = call i32 @write(i32 %34, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 10)
%60 = icmp eq i32 %59, 10
br i1 %60, label %66, label %61
61: ; preds = %58
%62 = load i32, i32* @errno
%63 = call i32 @strerror(i32 %62)
%64 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 76, i32 %62, i32 %63)
%65 = call i32 @exit(i32 1)
unreachable
66: ; preds = %58, %66
%67 = call i32 @sleep(i32 1000)
br label %66
68: ; preds = %36
%69 = call i32 @strcpy(i32 %38, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%70 = call i64 @bind(i32 %34, %struct.sockaddr_un* %3, i32 8)
%71 = icmp slt i64 %70, 0
br i1 %71, label %72, label %76
72: ; preds = %68
%73 = load i32, i32* @errno
%74 = call i32 @strerror(i32 %73)
%75 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 85, i32 %73, i32 %74)
br label %125
76: ; preds = %68
%77 = load i32, i32* %16
%78 = call i32 @strcpy(i32 %77, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%79 = call i64 @connect(i32 %34, %struct.sockaddr_un* %3, i32 8)
%80 = icmp slt i64 %79, 0
br i1 %80, label %84, label %81
81: ; preds = %76
%82 = call i32 @write(i32 %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 11)
%83 = icmp eq i32 %82, 11
br i1 %83, label %88, label %116
84: ; preds = %76
%85 = load i32, i32* @errno
%86 = call i32 @strerror(i32 %85)
%87 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 91, i32 %85, i32 %86)
br label %125
88: ; preds = %81
%89 = call i32 @write(i32 %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 11)
%90 = icmp eq i32 %89, 11
br i1 %90, label %91, label %116
91: ; preds = %88
%92 = call i32 @write(i32 %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 11)
%93 = icmp eq i32 %92, 11
br i1 %93, label %94, label %116
94: ; preds = %91
%95 = call i32 @write(i32 %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 11)
%96 = icmp eq i32 %95, 11
br i1 %96, label %97, label %116
97: ; preds = %94
%98 = call i32 @write(i32 %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 11)
%99 = icmp eq i32 %98, 11
br i1 %99, label %100, label %116
100: ; preds = %97
%101 = call i32 @write(i32 %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 11)
%102 = icmp eq i32 %101, 11
br i1 %102, label %103, label %116
103: ; preds = %100
%104 = call i32 @write(i32 %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 11)
%105 = icmp eq i32 %104, 11
br i1 %105, label %106, label %116
106: ; preds = %103
%107 = call i32 @write(i32 %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 11)
%108 = icmp eq i32 %107, 11
br i1 %108, label %109, label %116
109: ; preds = %106
%110 = call i32 @write(i32 %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 11)
%111 = icmp eq i32 %110, 11
br i1 %111, label %112, label %116
112: ; preds = %109
%113 = call i32 (...) @test_daemon()
%114 = call i32 (...) @test_waitsig()
%115 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
br label %125
116: ; preds = %109, %106, %103, %100, %97, %94, %91, %88, %81
%117 = load i32, i32* @errno
%118 = call i32 @strerror(i32 %117)
%119 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 102, i32 %117, i32 %118)
br label %125
120: ; preds = %31
%121 = load i32, i32* @errno
%122 = call i32 @strerror(i32 %121)
%123 = call i32 (i8*, ...) @test_msg(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 58, i32 %121, i32 %122)
%124 = icmp eq i64 %25, 0
br i1 %124, label %129, label %125
125: ; preds = %116, %112, %84, %72, %120
%126 = phi i32 [ 1, %120 ], [ 1, %72 ], [ 1, %84 ], [ 0, %112 ], [ 1, %116 ]
%127 = load i32, i32* @SIGKILL
%128 = call i32 @kill(i64 %25, i32 %127)
br label %129
129: ; preds = %27, %20, %11, %125, %120
%130 = phi i32 [ %126, %125 ], [ 1, %120 ], [ 1, %11 ], [ 1, %20 ], [ 1, %27 ]
%131 = call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%132 = call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%133 = call i32 @unlink(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
ret i32 %130
}