#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int EDEADLK;
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int pthread_rwlock_destroy(int /*<<< orphan*/ *);
int pthread_rwlock_init(int /*<<< orphan*/ *, int /*<<< orphan*/);
int pthread_rwlock_rdlock(int /*<<< orphan*/ *);
int pthread_rwlock_unlock(int /*<<< orphan*/ *);
int pthread_rwlock_wrlock(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  pthread_rwlock_t lock_1, lock_2;
  (void)({
    int _result = (pthread_rwlock_init(&lock_1, 0));
    fprintf(stderr, "  %s:%d %s = %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/master/t/"
            "pthread_rwlock_test.c",
            22, "pthread_rwlock_init(&lock_1, 0)", _result);
    if (!(_result == 0)) {
      fprintf(stderr, "    FAILED: expected %s %s\n",
              "pthread_rwlock_init(&lock_1, 0)", "== 0");
      abort();
    }
    _result;
  });
  (void)({
    int _result = (pthread_rwlock_init(&lock_2, 0));
    fprintf(stderr, "  %s:%d %s = %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/master/t/"
            "pthread_rwlock_test.c",
            23, "pthread_rwlock_init(&lock_2, 0)", _result);
    if (!(_result == 0)) {
      fprintf(stderr, "    FAILED: expected %s %s\n",
              "pthread_rwlock_init(&lock_2, 0)", "== 0");
      abort();
    }
    _result;
  });
  {
    (void)({
      int _result = (pthread_rwlock_rdlock(&lock_1));
      fprintf(stderr, "  %s:%d %s = %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/master/t/"
              "pthread_rwlock_test.c",
              26, "pthread_rwlock_rdlock(&lock_1)", _result);
      if (!(_result == 0)) {
        fprintf(stderr, "    FAILED: expected %s %s\n",
                "pthread_rwlock_rdlock(&lock_1)", "== 0");
        abort();
      }
      _result;
    });
    {
      (void)({
        int _result = (pthread_rwlock_rdlock(&lock_1));
        fprintf(stderr, "  %s:%d %s = %d\n",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/"
                "master/t/pthread_rwlock_test.c",
                30, "pthread_rwlock_rdlock(&lock_1)", _result);
        if (!(_result == 0)) {
          fprintf(stderr, "    FAILED: expected %s %s\n",
                  "pthread_rwlock_rdlock(&lock_1)", "== 0");
          abort();
        }
        _result;
      });
      (void)({
        int _result = (pthread_rwlock_unlock(&lock_1));
        fprintf(stderr, "  %s:%d %s = %d\n",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/"
                "master/t/pthread_rwlock_test.c",
                32, "pthread_rwlock_unlock(&lock_1)", _result);
        if (!(_result == 0)) {
          fprintf(stderr, "    FAILED: expected %s %s\n",
                  "pthread_rwlock_unlock(&lock_1)", "== 0");
          abort();
        }
        _result;
      });
    }
    (void)({
      int _result = (pthread_rwlock_unlock(&lock_1));
      fprintf(stderr, "  %s:%d %s = %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/master/t/"
              "pthread_rwlock_test.c",
              35, "pthread_rwlock_unlock(&lock_1)", _result);
      if (!(_result == 0)) {
        fprintf(stderr, "    FAILED: expected %s %s\n",
                "pthread_rwlock_unlock(&lock_1)", "== 0");
        abort();
      }
      _result;
    });
  }
  {
    (void)({
      int _result = (pthread_rwlock_wrlock(&lock_1));
      fprintf(stderr, "  %s:%d %s = %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/master/t/"
              "pthread_rwlock_test.c",
              39, "pthread_rwlock_wrlock(&lock_1)", _result);
      if (!(_result == 0)) {
        fprintf(stderr, "    FAILED: expected %s %s\n",
                "pthread_rwlock_wrlock(&lock_1)", "== 0");
        abort();
      }
      _result;
    });
    {
      (void)({
        int _result = (pthread_rwlock_wrlock(&lock_1));
        fprintf(stderr, "  %s:%d %s = %d\n",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/"
                "master/t/pthread_rwlock_test.c",
                43, "pthread_rwlock_wrlock(&lock_1)", _result);
        if (!(_result == EDEADLK)) {
          fprintf(stderr, "    FAILED: expected %s %s\n",
                  "pthread_rwlock_wrlock(&lock_1)", "== EDEADLK");
          abort();
        }
        _result;
      });
    }
    (void)({
      int _result = (pthread_rwlock_unlock(&lock_1));
      fprintf(stderr, "  %s:%d %s = %d\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/master/t/"
              "pthread_rwlock_test.c",
              48, "pthread_rwlock_unlock(&lock_1)", _result);
      if (!(_result == 0)) {
        fprintf(stderr, "    FAILED: expected %s %s\n",
                "pthread_rwlock_unlock(&lock_1)", "== 0");
        abort();
      }
      _result;
    });
  }
  (void)({
    int _result = (pthread_rwlock_destroy(&lock_1));
    fprintf(stderr, "  %s:%d %s = %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/master/t/"
            "pthread_rwlock_test.c",
            51, "pthread_rwlock_destroy(&lock_1)", _result);
    if (!(_result == 0)) {
      fprintf(stderr, "    FAILED: expected %s %s\n",
              "pthread_rwlock_destroy(&lock_1)", "== 0");
      abort();
    }
    _result;
  });
  (void)({
    int _result = (pthread_rwlock_destroy(&lock_2));
    fprintf(stderr, "  %s:%d %s = %d\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/master/t/"
            "pthread_rwlock_test.c",
            52, "pthread_rwlock_destroy(&lock_2)", _result);
    if (!(_result == 0)) {
      fprintf(stderr, "    FAILED: expected %s %s\n",
              "pthread_rwlock_destroy(&lock_2)", "== 0");
      abort();
    }
    _result;
  });
  fprintf(stderr, "\n%s OK\n", argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
xor    %esi,%esi
call   1080 <pthread_rwlock_init@plt>
mov    %eax,-0x1c(%rbp)
mov    0x2e3d(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%r9d
lea    0xe58(%rip),%rsi
lea    0xe62(%rip),%rdx
mov    $0x16,%ecx
lea    0xee9(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x0,-0x1c(%rbp)
je     11f8 <main+0x88>
mov    0x2e05(%rip),%rax
mov    (%rax),%edi
lea    0xee8(%rip),%rsi
lea    0xec1(%rip),%rdx
lea    0xef6(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1080 <pthread_rwlock_init@plt>
mov    %eax,-0x24(%rbp)
mov    0x2dc5(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%r9d
lea    0xde0(%rip),%rsi
lea    0xdea(%rip),%rdx
mov    $0x17,%ecx
lea    0xeb2(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x0,-0x24(%rbp)
je     1270 <main+0x100>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
lea    0xe70(%rip),%rsi
lea    0xe8a(%rip),%rdx
lea    0xe7e(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
lea    -0x14(%rbp),%rdi
call   1060 <pthread_rwlock_rdlock@plt>
mov    %eax,-0x2c(%rbp)
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
mov    -0x2c(%rbp),%r9d
lea    0xd6a(%rip),%rsi
lea    0xd74(%rip),%rdx
mov    $0x1a,%ecx
lea    0xe5c(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x0,-0x2c(%rbp)
je     12e6 <main+0x176>
mov    0x2d17(%rip),%rax
mov    (%rax),%edi
lea    0xdfa(%rip),%rsi
lea    0xe34(%rip),%rdx
lea    0xe08(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
lea    -0x14(%rbp),%rdi
call   1060 <pthread_rwlock_rdlock@plt>
mov    %eax,-0x34(%rbp)
mov    0x2cd9(%rip),%rax
mov    (%rax),%edi
mov    -0x34(%rbp),%r9d
lea    0xcf4(%rip),%rsi
lea    0xcfe(%rip),%rdx
mov    $0x1e,%ecx
lea    0xde6(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x0,-0x34(%rbp)
je     135c <main+0x1ec>
mov    0x2ca1(%rip),%rax
mov    (%rax),%edi
lea    0xd84(%rip),%rsi
lea    0xdbe(%rip),%rdx
lea    0xd92(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x34(%rbp),%eax
mov    %eax,-0x38(%rbp)
lea    -0x14(%rbp),%rdi
call   1090 <pthread_rwlock_unlock@plt>
mov    %eax,-0x3c(%rbp)
mov    0x2c63(%rip),%rax
mov    (%rax),%edi
mov    -0x3c(%rbp),%r9d
lea    0xc7e(%rip),%rsi
lea    0xc88(%rip),%rdx
mov    $0x20,%ecx
lea    0xd8f(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x0,-0x3c(%rbp)
je     13d2 <main+0x262>
mov    0x2c2b(%rip),%rax
mov    (%rax),%edi
lea    0xd0e(%rip),%rsi
lea    0xd67(%rip),%rdx
lea    0xd1c(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
lea    -0x14(%rbp),%rdi
call   1090 <pthread_rwlock_unlock@plt>
mov    %eax,-0x44(%rbp)
mov    0x2bed(%rip),%rax
mov    (%rax),%edi
mov    -0x44(%rbp),%r9d
lea    0xc08(%rip),%rsi
lea    0xc12(%rip),%rdx
mov    $0x23,%ecx
lea    0xd19(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x0,-0x44(%rbp)
je     1448 <main+0x2d8>
mov    0x2bb5(%rip),%rax
mov    (%rax),%edi
lea    0xc98(%rip),%rsi
lea    0xcf1(%rip),%rdx
lea    0xca6(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x48(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <pthread_rwlock_wrlock@plt>
mov    %eax,-0x4c(%rbp)
mov    0x2b77(%rip),%rax
mov    (%rax),%edi
mov    -0x4c(%rbp),%r9d
lea    0xb92(%rip),%rsi
lea    0xb9c(%rip),%rdx
mov    $0x27,%ecx
lea    0xcc2(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x0,-0x4c(%rbp)
je     14be <main+0x34e>
mov    0x2b3f(%rip),%rax
mov    (%rax),%edi
lea    0xc22(%rip),%rsi
lea    0xc9a(%rip),%rdx
lea    0xc30(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x50(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <pthread_rwlock_wrlock@plt>
mov    %eax,-0x54(%rbp)
mov    0x2b01(%rip),%rax
mov    (%rax),%edi
mov    -0x54(%rbp),%r9d
lea    0xb1c(%rip),%rsi
lea    0xb26(%rip),%rdx
mov    $0x2b,%ecx
lea    0xc4c(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x54(%rbp),%eax
mov    0x2ae0(%rip),%rcx
cmp    (%rcx),%eax
je     153c <main+0x3cc>
mov    0x2ac1(%rip),%rax
mov    (%rax),%edi
lea    0xba4(%rip),%rsi
lea    0xc1c(%rip),%rdx
lea    0xc34(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x54(%rbp),%eax
mov    %eax,-0x58(%rbp)
lea    -0x14(%rbp),%rdi
call   1090 <pthread_rwlock_unlock@plt>
mov    %eax,-0x5c(%rbp)
mov    0x2a83(%rip),%rax
mov    (%rax),%edi
mov    -0x5c(%rbp),%r9d
lea    0xa9e(%rip),%rsi
lea    0xaa8(%rip),%rdx
mov    $0x30,%ecx
lea    0xbaf(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x0,-0x5c(%rbp)
je     15b2 <main+0x442>
mov    0x2a4b(%rip),%rax
mov    (%rax),%edi
lea    0xb2e(%rip),%rsi
lea    0xb87(%rip),%rdx
lea    0xb3c(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x60(%rbp)
lea    -0x14(%rbp),%rdi
call   1050 <pthread_rwlock_destroy@plt>
mov    %eax,-0x64(%rbp)
mov    0x2a0d(%rip),%rax
mov    (%rax),%edi
mov    -0x64(%rbp),%r9d
lea    0xa28(%rip),%rsi
lea    0xa32(%rip),%rdx
mov    $0x33,%ecx
lea    0xb82(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x0,-0x64(%rbp)
je     1628 <main+0x4b8>
mov    0x29d5(%rip),%rax
mov    (%rax),%edi
lea    0xab8(%rip),%rsi
lea    0xb5a(%rip),%rdx
lea    0xac6(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x64(%rbp),%eax
mov    %eax,-0x68(%rbp)
lea    -0x18(%rbp),%rdi
call   1050 <pthread_rwlock_destroy@plt>
mov    %eax,-0x6c(%rbp)
mov    0x2997(%rip),%rax
mov    (%rax),%edi
mov    -0x6c(%rbp),%r9d
lea    0x9b2(%rip),%rsi
lea    0x9bc(%rip),%rdx
mov    $0x34,%ecx
lea    0xb2c(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x0,-0x6c(%rbp)
je     169e <main+0x52e>
mov    0x295f(%rip),%rax
mov    (%rax),%edi
lea    0xa42(%rip),%rsi
lea    0xb04(%rip),%rdx
lea    0xa50(%rip),%rcx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x6c(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    0x292d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xaf2(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1080 <pthread_rwlock_init@plt>
mov    %eax,%ebp
mov    0x2e48(%rip),%rbx
mov    (%rbx),%edi
lea    0xe67(%rip),%rsi
lea    0xe71(%rip),%rdx
lea    0xefd(%rip),%r8
mov    $0x16,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %ebp,%ebp
jne    1450 <main+0x2e0>
lea    0xc(%rsp),%rdi
xor    %esi,%esi
call   1080 <pthread_rwlock_init@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
lea    0xe2b(%rip),%rsi
lea    0xe35(%rip),%rdx
lea    0xf02(%rip),%r8
mov    $0x17,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %ebp,%ebp
jne    1462 <main+0x2f2>
lea    0x8(%rsp),%rdi
call   1060 <pthread_rwlock_rdlock@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
lea    0xdf1(%rip),%rsi
lea    0xdfb(%rip),%rdx
lea    0xee8(%rip),%r8
mov    $0x1a,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %ebp,%ebp
jne    143e <main+0x2ce>
lea    0x8(%rsp),%rdi
call   1060 <pthread_rwlock_rdlock@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
lea    0xdb7(%rip),%rsi
lea    0xdc1(%rip),%rdx
lea    0xeae(%rip),%r8
mov    $0x1e,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %ebp,%ebp
jne    143e <main+0x2ce>
lea    0x8(%rsp),%rdi
call   1090 <pthread_rwlock_unlock@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
lea    0xd7d(%rip),%rsi
lea    0xd87(%rip),%rdx
lea    0xe93(%rip),%r8
mov    $0x20,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %ebp,%ebp
jne    1429 <main+0x2b9>
lea    0x8(%rsp),%rdi
call   1090 <pthread_rwlock_unlock@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
lea    0xd43(%rip),%rsi
lea    0xd4d(%rip),%rdx
lea    0xe59(%rip),%r8
mov    $0x23,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %ebp,%ebp
jne    1429 <main+0x2b9>
lea    0x8(%rsp),%rdi
call   1040 <pthread_rwlock_wrlock@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
lea    0xd09(%rip),%rsi
lea    0xd13(%rip),%rdx
lea    0xe3e(%rip),%r8
mov    $0x27,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %ebp,%ebp
jne    1474 <main+0x304>
lea    0x8(%rsp),%rdi
call   1040 <pthread_rwlock_wrlock@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
lea    0xccf(%rip),%rsi
lea    0xcd9(%rip),%rdx
lea    0xe04(%rip),%r8
mov    $0x2b,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2c93(%rip),%rax
cmp    (%rax),%ebp
jne    1486 <main+0x316>
lea    0x8(%rsp),%rdi
call   1090 <pthread_rwlock_unlock@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
lea    0xc8e(%rip),%rsi
lea    0xc98(%rip),%rdx
lea    0xda4(%rip),%r8
mov    $0x30,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %ebp,%ebp
jne    1429 <main+0x2b9>
lea    0x8(%rsp),%rdi
call   1050 <pthread_rwlock_destroy@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
lea    0xc54(%rip),%rsi
lea    0xc5e(%rip),%rdx
lea    0xdb3(%rip),%r8
mov    $0x33,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %ebp,%ebp
jne    149f <main+0x32f>
lea    0xc(%rsp),%rdi
call   1050 <pthread_rwlock_destroy@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
lea    0xc1a(%rip),%rsi
lea    0xc24(%rip),%rdx
lea    0xd99(%rip),%r8
mov    $0x34,%ecx
mov    %eax,%r9d
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%rbx),%edi
test   %ebp,%ebp
jne    14b1 <main+0x341>
mov    (%r14),%rdx
lea    0xd96(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    (%rbx),%edi
lea    0xc92(%rip),%rsi
lea    0xceb(%rip),%rdx
jmp    14bf <main+0x34f>
mov    (%rbx),%edi
lea    0xc7d(%rip),%rsi
lea    0xcb7(%rip),%rdx
jmp    14bf <main+0x34f>
mov    (%rbx),%edi
lea    0xc6b(%rip),%rsi
lea    0xc44(%rip),%rdx
jmp    14bf <main+0x34f>
mov    (%rbx),%edi
lea    0xc59(%rip),%rsi
lea    0xc73(%rip),%rdx
jmp    14bf <main+0x34f>
mov    (%rbx),%edi
lea    0xc47(%rip),%rsi
lea    0xcbf(%rip),%rdx
jmp    14bf <main+0x34f>
mov    (%rbx),%edi
lea    0xc35(%rip),%rsi
lea    0xcad(%rip),%rdx
lea    0xcc5(%rip),%rcx
jmp    14c6 <main+0x356>
mov    (%rbx),%edi
lea    0xc1c(%rip),%rsi
lea    0xcbe(%rip),%rdx
jmp    14bf <main+0x34f>
lea    0xc0c(%rip),%rsi
lea    0xcce(%rip),%rdx
lea    0xc1a(%rip),%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c" %s:%d %s = %d\0A\00"
@.str.1 = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/master/t/pthread_rwlock_test.c\00"
@.str.2 = [32 x i8] c"pthread_rwlock_init(&lock_1, 0)\00"
@.str.3 = [28 x i8] c" FAILED: expected %s %s\0A\00"
@.str.4 = [5 x i8] c"== 0\00"
@.str.5 = [32 x i8] c"pthread_rwlock_init(&lock_2, 0)\00"
@.str.6 = [31 x i8] c"pthread_rwlock_rdlock(&lock_1)\00"
@.str.7 = [31 x i8] c"pthread_rwlock_unlock(&lock_1)\00"
@.str.8 = [31 x i8] c"pthread_rwlock_wrlock(&lock_1)\00"
@EDEADLK = global i32 0
@.str.9 = [11 x i8] c"== EDEADLK\00"
@.str.10 = [32 x i8] c"pthread_rwlock_destroy(&lock_1)\00"
@.str.11 = [32 x i8] c"pthread_rwlock_destroy(&lock_2)\00"
@.str.12 = [8 x i8] c"\0A%s OK\0A\00"
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 i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%30 = call i32 @pthread_rwlock_init(i32* %6, i32 0)
store i32 %30, i32* %8
%31 = load i32, i32* @stderr
%32 = load i32, i32* %8
%33 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 22, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %32)
%34 = load i32, i32* %8
%35 = icmp eq i32 %34, 0
br i1 %35, label %40, label %36
36: ; preds = %2
%37 = load i32, i32* @stderr
%38 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%39 = call i32 (...) @abort()
unreachable
40: ; preds = %2
%41 = load i32, i32* %8
store i32 %41, i32* %9
%42 = load i32, i32* %9
%43 = call i32 @pthread_rwlock_init(i32* %7, i32 0)
store i32 %43, i32* %10
%44 = load i32, i32* @stderr
%45 = load i32, i32* %10
%46 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 23, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i32 %45)
%47 = load i32, i32* %10
%48 = icmp eq i32 %47, 0
br i1 %48, label %53, label %49
49: ; preds = %40
%50 = load i32, i32* @stderr
%51 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%52 = call i32 (...) @abort()
unreachable
53: ; preds = %40
%54 = load i32, i32* %10
store i32 %54, i32* %11
%55 = load i32, i32* %11
%56 = call i32 @pthread_rwlock_rdlock(i32* %6)
store i32 %56, i32* %12
%57 = load i32, i32* @stderr
%58 = load i32, i32* %12
%59 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %58)
%60 = load i32, i32* %12
%61 = icmp eq i32 %60, 0
br i1 %61, label %66, label %62
62: ; preds = %53
%63 = load i32, i32* @stderr
%64 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%65 = call i32 (...) @abort()
unreachable
66: ; preds = %53
%67 = load i32, i32* %12
store i32 %67, i32* %13
%68 = load i32, i32* %13
%69 = call i32 @pthread_rwlock_rdlock(i32* %6)
store i32 %69, i32* %14
%70 = load i32, i32* @stderr
%71 = load i32, i32* %14
%72 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 30, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %71)
%73 = load i32, i32* %14
%74 = icmp eq i32 %73, 0
br i1 %74, label %79, label %75
75: ; preds = %66
%76 = load i32, i32* @stderr
%77 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%78 = call i32 (...) @abort()
unreachable
79: ; preds = %66
%80 = load i32, i32* %14
store i32 %80, i32* %15
%81 = load i32, i32* %15
%82 = call i32 @pthread_rwlock_unlock(i32* %6)
store i32 %82, i32* %16
%83 = load i32, i32* @stderr
%84 = load i32, i32* %16
%85 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 %84)
%86 = load i32, i32* %16
%87 = icmp eq i32 %86, 0
br i1 %87, label %92, label %88
88: ; preds = %79
%89 = load i32, i32* @stderr
%90 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%91 = call i32 (...) @abort()
unreachable
92: ; preds = %79
%93 = load i32, i32* %16
store i32 %93, i32* %17
%94 = load i32, i32* %17
%95 = call i32 @pthread_rwlock_unlock(i32* %6)
store i32 %95, i32* %18
%96 = load i32, i32* @stderr
%97 = load i32, i32* %18
%98 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 35, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 %97)
%99 = load i32, i32* %18
%100 = icmp eq i32 %99, 0
br i1 %100, label %105, label %101
101: ; preds = %92
%102 = load i32, i32* @stderr
%103 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %102, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%104 = call i32 (...) @abort()
unreachable
105: ; preds = %92
%106 = load i32, i32* %18
store i32 %106, i32* %19
%107 = load i32, i32* %19
%108 = call i32 @pthread_rwlock_wrlock(i32* %6)
store i32 %108, i32* %20
%109 = load i32, i32* @stderr
%110 = load i32, i32* %20
%111 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 39, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 %110)
%112 = load i32, i32* %20
%113 = icmp eq i32 %112, 0
br i1 %113, label %118, label %114
114: ; preds = %105
%115 = load i32, i32* @stderr
%116 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %115, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%117 = call i32 (...) @abort()
unreachable
118: ; preds = %105
%119 = load i32, i32* %20
store i32 %119, i32* %21
%120 = load i32, i32* %21
%121 = call i32 @pthread_rwlock_wrlock(i32* %6)
store i32 %121, i32* %22
%122 = load i32, i32* @stderr
%123 = load i32, i32* %22
%124 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 43, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 %123)
%125 = load i32, i32* %22
%126 = load i32, i32* @EDEADLK
%127 = icmp eq i32 %125, %126
br i1 %127, label %132, label %128
128: ; preds = %118
%129 = load i32, i32* @stderr
%130 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %129, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%131 = call i32 (...) @abort()
unreachable
132: ; preds = %118
%133 = load i32, i32* %22
store i32 %133, i32* %23
%134 = load i32, i32* %23
%135 = call i32 @pthread_rwlock_unlock(i32* %6)
store i32 %135, i32* %24
%136 = load i32, i32* @stderr
%137 = load i32, i32* %24
%138 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %136, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 48, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 %137)
%139 = load i32, i32* %24
%140 = icmp eq i32 %139, 0
br i1 %140, label %145, label %141
141: ; preds = %132
%142 = load i32, i32* @stderr
%143 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %142, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%144 = call i32 (...) @abort()
unreachable
145: ; preds = %132
%146 = load i32, i32* %24
store i32 %146, i32* %25
%147 = load i32, i32* %25
%148 = call i32 @pthread_rwlock_destroy(i32* %6)
store i32 %148, i32* %26
%149 = load i32, i32* @stderr
%150 = load i32, i32* %26
%151 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %149, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 51, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %150)
%152 = load i32, i32* %26
%153 = icmp eq i32 %152, 0
br i1 %153, label %158, label %154
154: ; preds = %145
%155 = load i32, i32* @stderr
%156 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %155, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%157 = call i32 (...) @abort()
unreachable
158: ; preds = %145
%159 = load i32, i32* %26
store i32 %159, i32* %27
%160 = load i32, i32* %27
%161 = call i32 @pthread_rwlock_destroy(i32* %7)
store i32 %161, i32* %28
%162 = load i32, i32* @stderr
%163 = load i32, i32* %28
%164 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %162, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 52, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i32 %163)
%165 = load i32, i32* %28
%166 = icmp eq i32 %165, 0
br i1 %166, label %171, label %167
167: ; preds = %158
%168 = load i32, i32* @stderr
%169 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %168, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%170 = call i32 (...) @abort()
unreachable
171: ; preds = %158
%172 = load i32, i32* %28
store i32 %172, i32* %29
%173 = load i32, i32* %29
%174 = load i32, i32* @stderr
%175 = load i8**, i8*** %5
%176 = getelementptr inbounds i8*, i8** %175, i64 0
%177 = load i8*, i8** %176
%178 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %174, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8* %177)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c" %s:%d %s = %d\0A\00"
@.str.1 = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kstephens/smal/refs/heads/master/t/pthread_rwlock_test.c\00"
@.str.2 = [32 x i8] c"pthread_rwlock_init(&lock_1, 0)\00"
@.str.3 = [28 x i8] c" FAILED: expected %s %s\0A\00"
@.str.4 = [5 x i8] c"== 0\00"
@.str.5 = [32 x i8] c"pthread_rwlock_init(&lock_2, 0)\00"
@.str.6 = [31 x i8] c"pthread_rwlock_rdlock(&lock_1)\00"
@.str.7 = [31 x i8] c"pthread_rwlock_unlock(&lock_1)\00"
@.str.8 = [31 x i8] c"pthread_rwlock_wrlock(&lock_1)\00"
@EDEADLK = global i32 0
@.str.9 = [11 x i8] c"== EDEADLK\00"
@.str.10 = [32 x i8] c"pthread_rwlock_destroy(&lock_1)\00"
@.str.11 = [32 x i8] c"pthread_rwlock_destroy(&lock_2)\00"
@.str.12 = [8 x i8] c"\0A%s OK\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @pthread_rwlock_init(i32* %3, i32 0)
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 22, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%10 = icmp eq i32 %7, 0
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %2
%16 = call i32 @pthread_rwlock_init(i32* %4, i32 0)
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 23, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i32 %16)
%19 = icmp eq i32 %16, 0
br i1 %19, label %24, label %20
20: ; preds = %15
%21 = load i32, i32* @stderr
%22 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%23 = call i32 (...) @abort()
unreachable
24: ; preds = %15
%25 = call i32 @pthread_rwlock_rdlock(i32* %3)
%26 = load i32, i32* @stderr
%27 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %25)
%28 = icmp eq i32 %25, 0
br i1 %28, label %33, label %29
29: ; preds = %24
%30 = load i32, i32* @stderr
%31 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%32 = call i32 (...) @abort()
unreachable
33: ; preds = %24
%34 = call i32 @pthread_rwlock_rdlock(i32* %3)
%35 = load i32, i32* @stderr
%36 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 30, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %34)
%37 = icmp eq i32 %34, 0
br i1 %37, label %42, label %38
38: ; preds = %33
%39 = load i32, i32* @stderr
%40 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%41 = call i32 (...) @abort()
unreachable
42: ; preds = %33
%43 = call i32 @pthread_rwlock_unlock(i32* %3)
%44 = load i32, i32* @stderr
%45 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 %43)
%46 = icmp eq i32 %43, 0
br i1 %46, label %51, label %47
47: ; preds = %42
%48 = load i32, i32* @stderr
%49 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%50 = call i32 (...) @abort()
unreachable
51: ; preds = %42
%52 = call i32 @pthread_rwlock_unlock(i32* %3)
%53 = load i32, i32* @stderr
%54 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 35, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 %52)
%55 = icmp eq i32 %52, 0
br i1 %55, label %60, label %56
56: ; preds = %51
%57 = load i32, i32* @stderr
%58 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%59 = call i32 (...) @abort()
unreachable
60: ; preds = %51
%61 = call i32 @pthread_rwlock_wrlock(i32* %3)
%62 = load i32, i32* @stderr
%63 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 39, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 %61)
%64 = icmp eq i32 %61, 0
br i1 %64, label %69, label %65
65: ; preds = %60
%66 = load i32, i32* @stderr
%67 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%68 = call i32 (...) @abort()
unreachable
69: ; preds = %60
%70 = call i32 @pthread_rwlock_wrlock(i32* %3)
%71 = load i32, i32* @stderr
%72 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 43, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 %70)
%73 = load i32, i32* @EDEADLK
%74 = icmp eq i32 %70, %73
br i1 %74, label %79, label %75
75: ; preds = %69
%76 = load i32, i32* @stderr
%77 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%78 = call i32 (...) @abort()
unreachable
79: ; preds = %69
%80 = call i32 @pthread_rwlock_unlock(i32* %3)
%81 = load i32, i32* @stderr
%82 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %81, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 48, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 %80)
%83 = icmp eq i32 %80, 0
br i1 %83, label %88, label %84
84: ; preds = %79
%85 = load i32, i32* @stderr
%86 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%87 = call i32 (...) @abort()
unreachable
88: ; preds = %79
%89 = call i32 @pthread_rwlock_destroy(i32* %3)
%90 = load i32, i32* @stderr
%91 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 51, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %89)
%92 = icmp eq i32 %89, 0
br i1 %92, label %97, label %93
93: ; preds = %88
%94 = load i32, i32* @stderr
%95 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%96 = call i32 (...) @abort()
unreachable
97: ; preds = %88
%98 = call i32 @pthread_rwlock_destroy(i32* %4)
%99 = load i32, i32* @stderr
%100 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %99, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0), i32 52, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i32 %98)
%101 = icmp eq i32 %98, 0
%102 = load i32, i32* @stderr
br i1 %101, label %106, label %103
103: ; preds = %97
%104 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %102, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%105 = call i32 (...) @abort()
unreachable
106: ; preds = %97
%107 = load i8*, i8** %1
%108 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %102, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8* %107)
ret i32 0
}