#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_mutexattr_t;
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int EDEADLK;
int EPERM;
int PTHREAD_MUTEX_ERRORCHECK;
int /*<<< orphan*/ PTHREAD_MUTEX_INITIALIZER;
int PTHREAD_MUTEX_NORMAL;
int PTHREAD_MUTEX_RECURSIVE;
int /*<<< orphan*/ panic(char *, char *, int, ...);
int /*<<< orphan*/ printf(char *);
int pthread_mutex_destroy(int /*<<< orphan*/ *);
int pthread_mutex_init(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int pthread_mutex_lock(int /*<<< orphan*/ *);
int pthread_mutex_trylock(int /*<<< orphan*/ *);
int pthread_mutex_unlock(int /*<<< orphan*/ *);
int pthread_mutexattr_gettype(int /*<<< orphan*/ *, int *);
int pthread_mutexattr_init(int /*<<< orphan*/ *);
int pthread_mutexattr_settype(int /*<<< orphan*/ *, int);
int main(void) {
  pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
  pthread_mutexattr_t attr;
  int attr_type;
  do {
    int ret = (pthread_mutexattr_init(&attr));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            62, ret, (0), "pthread_mutexattr_init( &attr )");
    }
  } while (0);
  do {
    int ret = (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            64, ret, (0),
            "pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_NORMAL )");
    }
  } while (0);
  do {
    int ret = (pthread_mutexattr_gettype(&attr, &attr_type));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            65, ret, (0), "pthread_mutexattr_gettype( &attr, &attr_type )");
    }
  } while (0);
  do {
    if (!(attr_type == PTHREAD_MUTEX_NORMAL))
      panic("%s:%d: assertion failure: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            66, "attr_type == PTHREAD_MUTEX_NORMAL");
  } while (0);
  do {
    int ret = (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            68, ret, (0),
            "pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_ERRORCHECK )");
    }
  } while (0);
  do {
    int ret = (pthread_mutexattr_gettype(&attr, &attr_type));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            69, ret, (0), "pthread_mutexattr_gettype( &attr, &attr_type )");
    }
  } while (0);
  do {
    if (!(attr_type == PTHREAD_MUTEX_ERRORCHECK))
      panic("%s:%d: assertion failure: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            70, "attr_type == PTHREAD_MUTEX_ERRORCHECK");
  } while (0);
  do {
    int ret = (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            72, ret, (0),
            "pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE )");
    }
  } while (0);
  do {
    int ret = (pthread_mutexattr_gettype(&attr, &attr_type));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            73, ret, (0), "pthread_mutexattr_gettype( &attr, &attr_type )");
    }
  } while (0);
  do {
    if (!(attr_type == PTHREAD_MUTEX_RECURSIVE))
      panic("%s:%d: assertion failure: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            74, "attr_type == PTHREAD_MUTEX_RECURSIVE");
  } while (0);
  do {
    int ret = (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            77, ret, (0),
            "pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_NORMAL )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_init(&lock, &attr));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            78, ret, (0), "pthread_mutex_init( &lock, &attr )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_lock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            79, ret, (0), "pthread_mutex_lock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_unlock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            80, ret, (0), "pthread_mutex_unlock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_destroy(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            81, ret, (0), "pthread_mutex_destroy( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            84, ret, (0),
            "pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_ERRORCHECK )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_init(&lock, &attr));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            85, ret, (0), "pthread_mutex_init( &lock, &attr )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_lock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            86, ret, (0), "pthread_mutex_lock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_lock(&lock));
    if (ret != (EDEADLK)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            87, ret, (EDEADLK), "pthread_mutex_lock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_unlock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            88, ret, (0), "pthread_mutex_unlock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_trylock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            89, ret, (0), "pthread_mutex_trylock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_trylock(&lock));
    if (ret != (EDEADLK)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            90, ret, (EDEADLK), "pthread_mutex_trylock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_unlock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            91, ret, (0), "pthread_mutex_unlock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_unlock(&lock));
    if (ret != (EPERM)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            92, ret, (EPERM), "pthread_mutex_unlock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_destroy(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            93, ret, (0), "pthread_mutex_destroy( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            96, ret, (0),
            "pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_init(&lock, &attr));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            97, ret, (0), "pthread_mutex_init( &lock, &attr )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_lock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            98, ret, (0), "pthread_mutex_lock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_lock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            99, ret, (0), "pthread_mutex_lock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_unlock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            100, ret, (0), "pthread_mutex_unlock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_unlock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            101, ret, (0), "pthread_mutex_unlock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_trylock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            102, ret, (0), "pthread_mutex_trylock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_unlock(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            103, ret, (0), "pthread_mutex_unlock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_unlock(&lock));
    if (ret != (EPERM)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            104, ret, (EPERM), "pthread_mutex_unlock( &lock )");
    }
  } while (0);
  do {
    int ret = (pthread_mutex_destroy(&lock));
    if (ret != (0)) {
      panic("%s:%d: call returned %d instead of %d: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/"
            "refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/"
            "test_mutex.c",
            105, ret, (0), "pthread_mutex_destroy( &lock )");
    }
  } while (0);
  printf("ok\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e0f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   10a0 <pthread_mutexattr_init@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     11fb <main+0x5b>
mov    -0x14(%rbp),%ecx
lea    0xe22(%rip),%rdi
lea    0xe46(%rip),%rsi
mov    $0x3e,%edx
xor    %r8d,%r8d
lea    0xf03(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1200 <main+0x60>
jmp    1205 <main+0x65>
mov    0x2dd4(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     124b <main+0xab>
mov    -0x18(%rbp),%ecx
lea    0xdd2(%rip),%rdi
lea    0xdf6(%rip),%rsi
mov    $0x40,%edx
xor    %r8d,%r8d
lea    0xed3(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1250 <main+0xb0>
jmp    1255 <main+0xb5>
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <pthread_mutexattr_gettype@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1296 <main+0xf6>
mov    -0x1c(%rbp),%ecx
lea    0xd87(%rip),%rdi
lea    0xdab(%rip),%rsi
mov    $0x41,%edx
xor    %r8d,%r8d
lea    0xec1(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    129b <main+0xfb>
jmp    12a0 <main+0x100>
mov    -0x10(%rbp),%eax
mov    0x2d36(%rip),%rcx
cmp    (%rcx),%eax
je     12d3 <main+0x133>
lea    0xec6(%rip),%rdi
lea    0xd6b(%rip),%rsi
mov    $0x42,%edx
lea    0xed1(%rip),%rcx
mov    $0x0,%al
call   1070 <panic@plt>
jmp    12d8 <main+0x138>
jmp    12dd <main+0x13d>
mov    0x2cd4(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     1323 <main+0x183>
mov    -0x20(%rbp),%ecx
lea    0xcfa(%rip),%rdi
lea    0xd1e(%rip),%rsi
mov    $0x44,%edx
xor    %r8d,%r8d
lea    0xea3(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1328 <main+0x188>
jmp    132d <main+0x18d>
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <pthread_mutexattr_gettype@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     136e <main+0x1ce>
mov    -0x24(%rbp),%ecx
lea    0xcaf(%rip),%rdi
lea    0xcd3(%rip),%rsi
mov    $0x45,%edx
xor    %r8d,%r8d
lea    0xde9(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1373 <main+0x1d3>
jmp    1378 <main+0x1d8>
mov    -0x10(%rbp),%eax
mov    0x2c36(%rip),%rcx
cmp    (%rcx),%eax
je     13ab <main+0x20b>
lea    0xdee(%rip),%rdi
lea    0xc93(%rip),%rsi
mov    $0x46,%edx
lea    0xe58(%rip),%rcx
mov    $0x0,%al
call   1070 <panic@plt>
jmp    13b0 <main+0x210>
jmp    13b5 <main+0x215>
mov    0x2c3c(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     13fb <main+0x25b>
mov    -0x28(%rbp),%ecx
lea    0xc22(%rip),%rdi
lea    0xc46(%rip),%rsi
mov    $0x48,%edx
xor    %r8d,%r8d
lea    0xe2e(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1400 <main+0x260>
jmp    1405 <main+0x265>
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <pthread_mutexattr_gettype@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1446 <main+0x2a6>
mov    -0x2c(%rbp),%ecx
lea    0xbd7(%rip),%rdi
lea    0xbfb(%rip),%rsi
mov    $0x49,%edx
xor    %r8d,%r8d
lea    0xd11(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    144b <main+0x2ab>
jmp    1450 <main+0x2b0>
mov    -0x10(%rbp),%eax
mov    0x2b9e(%rip),%rcx
cmp    (%rcx),%eax
je     1483 <main+0x2e3>
lea    0xd16(%rip),%rdi
lea    0xbbb(%rip),%rsi
mov    $0x4a,%edx
lea    0xde2(%rip),%rcx
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1488 <main+0x2e8>
jmp    148d <main+0x2ed>
mov    0x2b4c(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x30(%rbp)
je     14d3 <main+0x333>
mov    -0x30(%rbp),%ecx
lea    0xb4a(%rip),%rdi
lea    0xb6e(%rip),%rsi
mov    $0x4d,%edx
xor    %r8d,%r8d
lea    0xc4b(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    14d8 <main+0x338>
jmp    14dd <main+0x33d>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   10b0 <pthread_mutex_init@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     151e <main+0x37e>
mov    -0x34(%rbp),%ecx
lea    0xaff(%rip),%rdi
lea    0xb23(%rip),%rsi
mov    $0x4e,%edx
xor    %r8d,%r8d
lea    0xd6c(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1523 <main+0x383>
jmp    1528 <main+0x388>
lea    -0x8(%rbp),%rdi
call   10c0 <pthread_mutex_lock@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
je     1565 <main+0x3c5>
mov    -0x38(%rbp),%ecx
lea    0xab8(%rip),%rdi
lea    0xadc(%rip),%rsi
mov    $0x4f,%edx
xor    %r8d,%r8d
lea    0xd48(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    156a <main+0x3ca>
jmp    156f <main+0x3cf>
lea    -0x8(%rbp),%rdi
call   1090 <pthread_mutex_unlock@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
je     15ac <main+0x40c>
mov    -0x3c(%rbp),%ecx
lea    0xa71(%rip),%rdi
lea    0xa95(%rip),%rsi
mov    $0x50,%edx
xor    %r8d,%r8d
lea    0xd1d(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    15b1 <main+0x411>
jmp    15b6 <main+0x416>
lea    -0x8(%rbp),%rdi
call   1050 <pthread_mutex_destroy@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
je     15f3 <main+0x453>
mov    -0x40(%rbp),%ecx
lea    0xa2a(%rip),%rdi
lea    0xa4e(%rip),%rsi
mov    $0x51,%edx
xor    %r8d,%r8d
lea    0xcf4(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    15f8 <main+0x458>
jmp    15fd <main+0x45d>
mov    0x29b4(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
je     1643 <main+0x4a3>
mov    -0x44(%rbp),%ecx
lea    0x9da(%rip),%rdi
lea    0x9fe(%rip),%rsi
mov    $0x54,%edx
xor    %r8d,%r8d
lea    0xb83(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1648 <main+0x4a8>
jmp    164d <main+0x4ad>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   10b0 <pthread_mutex_init@plt>
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
je     168e <main+0x4ee>
mov    -0x48(%rbp),%ecx
lea    0x98f(%rip),%rdi
lea    0x9b3(%rip),%rsi
mov    $0x55,%edx
xor    %r8d,%r8d
lea    0xbfc(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1693 <main+0x4f3>
jmp    1698 <main+0x4f8>
lea    -0x8(%rbp),%rdi
call   10c0 <pthread_mutex_lock@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     16d5 <main+0x535>
mov    -0x4c(%rbp),%ecx
lea    0x948(%rip),%rdi
lea    0x96c(%rip),%rsi
mov    $0x56,%edx
xor    %r8d,%r8d
lea    0xbd8(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    16da <main+0x53a>
jmp    16df <main+0x53f>
lea    -0x8(%rbp),%rdi
call   10c0 <pthread_mutex_lock@plt>
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    0x28e3(%rip),%rcx
cmp    (%rcx),%eax
je     172b <main+0x58b>
mov    -0x50(%rbp),%ecx
mov    0x28d1(%rip),%rax
mov    (%rax),%r8d
lea    0x8ef(%rip),%rdi
lea    0x913(%rip),%rsi
mov    $0x57,%edx
lea    0xb82(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1730 <main+0x590>
jmp    1735 <main+0x595>
lea    -0x8(%rbp),%rdi
call   1090 <pthread_mutex_unlock@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
je     1772 <main+0x5d2>
mov    -0x54(%rbp),%ecx
lea    0x8ab(%rip),%rdi
lea    0x8cf(%rip),%rsi
mov    $0x58,%edx
xor    %r8d,%r8d
lea    0xb57(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1777 <main+0x5d7>
jmp    177c <main+0x5dc>
lea    -0x8(%rbp),%rdi
call   1080 <pthread_mutex_trylock@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x0,-0x58(%rbp)
je     17b9 <main+0x619>
mov    -0x58(%rbp),%ecx
lea    0x864(%rip),%rdi
lea    0x888(%rip),%rsi
mov    $0x59,%edx
xor    %r8d,%r8d
lea    0xb4d(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    17be <main+0x61e>
jmp    17c3 <main+0x623>
lea    -0x8(%rbp),%rdi
call   1080 <pthread_mutex_trylock@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    0x27ff(%rip),%rcx
cmp    (%rcx),%eax
je     180f <main+0x66f>
mov    -0x5c(%rbp),%ecx
mov    0x27ed(%rip),%rax
mov    (%rax),%r8d
lea    0x80b(%rip),%rdi
lea    0x82f(%rip),%rsi
mov    $0x5a,%edx
lea    0xaf7(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1814 <main+0x674>
jmp    1819 <main+0x679>
lea    -0x8(%rbp),%rdi
call   1090 <pthread_mutex_unlock@plt>
mov    %eax,-0x60(%rbp)
cmpl   $0x0,-0x60(%rbp)
je     1856 <main+0x6b6>
mov    -0x60(%rbp),%ecx
lea    0x7c7(%rip),%rdi
lea    0x7eb(%rip),%rsi
mov    $0x5b,%edx
xor    %r8d,%r8d
lea    0xa73(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    185b <main+0x6bb>
jmp    1860 <main+0x6c0>
lea    -0x8(%rbp),%rdi
call   1090 <pthread_mutex_unlock@plt>
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    0x273a(%rip),%rcx
cmp    (%rcx),%eax
je     18ac <main+0x70c>
mov    -0x64(%rbp),%ecx
mov    0x2728(%rip),%rax
mov    (%rax),%r8d
lea    0x76e(%rip),%rdi
lea    0x792(%rip),%rsi
mov    $0x5c,%edx
lea    0xa1d(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    18b1 <main+0x711>
jmp    18b6 <main+0x716>
lea    -0x8(%rbp),%rdi
call   1050 <pthread_mutex_destroy@plt>
mov    %eax,-0x68(%rbp)
cmpl   $0x0,-0x68(%rbp)
je     18f3 <main+0x753>
mov    -0x68(%rbp),%ecx
lea    0x72a(%rip),%rdi
lea    0x74e(%rip),%rsi
mov    $0x5d,%edx
xor    %r8d,%r8d
lea    0x9f4(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    18f8 <main+0x758>
jmp    18fd <main+0x75d>
mov    0x26f4(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
mov    %eax,-0x6c(%rbp)
cmpl   $0x0,-0x6c(%rbp)
je     1943 <main+0x7a3>
mov    -0x6c(%rbp),%ecx
lea    0x6da(%rip),%rdi
lea    0x6fe(%rip),%rsi
mov    $0x60,%edx
xor    %r8d,%r8d
lea    0x8e6(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1948 <main+0x7a8>
jmp    194d <main+0x7ad>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   10b0 <pthread_mutex_init@plt>
mov    %eax,-0x70(%rbp)
cmpl   $0x0,-0x70(%rbp)
je     198e <main+0x7ee>
mov    -0x70(%rbp),%ecx
lea    0x68f(%rip),%rdi
lea    0x6b3(%rip),%rsi
mov    $0x61,%edx
xor    %r8d,%r8d
lea    0x8fc(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1993 <main+0x7f3>
jmp    1998 <main+0x7f8>
lea    -0x8(%rbp),%rdi
call   10c0 <pthread_mutex_lock@plt>
mov    %eax,-0x74(%rbp)
cmpl   $0x0,-0x74(%rbp)
je     19d5 <main+0x835>
mov    -0x74(%rbp),%ecx
lea    0x648(%rip),%rdi
lea    0x66c(%rip),%rsi
mov    $0x62,%edx
xor    %r8d,%r8d
lea    0x8d8(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    19da <main+0x83a>
jmp    19df <main+0x83f>
lea    -0x8(%rbp),%rdi
call   10c0 <pthread_mutex_lock@plt>
mov    %eax,-0x78(%rbp)
cmpl   $0x0,-0x78(%rbp)
je     1a1c <main+0x87c>
mov    -0x78(%rbp),%ecx
lea    0x601(%rip),%rdi
lea    0x625(%rip),%rsi
mov    $0x63,%edx
xor    %r8d,%r8d
lea    0x891(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1a21 <main+0x881>
jmp    1a26 <main+0x886>
lea    -0x8(%rbp),%rdi
call   1090 <pthread_mutex_unlock@plt>
mov    %eax,-0x7c(%rbp)
cmpl   $0x0,-0x7c(%rbp)
je     1a63 <main+0x8c3>
mov    -0x7c(%rbp),%ecx
lea    0x5ba(%rip),%rdi
lea    0x5de(%rip),%rsi
mov    $0x64,%edx
xor    %r8d,%r8d
lea    0x866(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1a68 <main+0x8c8>
jmp    1a6d <main+0x8cd>
lea    -0x8(%rbp),%rdi
call   1090 <pthread_mutex_unlock@plt>
mov    %eax,-0x80(%rbp)
cmpl   $0x0,-0x80(%rbp)
je     1aaa <main+0x90a>
mov    -0x80(%rbp),%ecx
lea    0x573(%rip),%rdi
lea    0x597(%rip),%rsi
mov    $0x65,%edx
xor    %r8d,%r8d
lea    0x81f(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1aaf <main+0x90f>
jmp    1ab4 <main+0x914>
lea    -0x8(%rbp),%rdi
call   1080 <pthread_mutex_trylock@plt>
mov    %eax,-0x84(%rbp)
cmpl   $0x0,-0x84(%rbp)
je     1afa <main+0x95a>
mov    -0x84(%rbp),%ecx
lea    0x523(%rip),%rdi
lea    0x547(%rip),%rsi
mov    $0x66,%edx
xor    %r8d,%r8d
lea    0x80c(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1aff <main+0x95f>
jmp    1b04 <main+0x964>
lea    -0x8(%rbp),%rdi
call   1090 <pthread_mutex_unlock@plt>
mov    %eax,-0x88(%rbp)
cmpl   $0x0,-0x88(%rbp)
je     1b4a <main+0x9aa>
mov    -0x88(%rbp),%ecx
lea    0x4d3(%rip),%rdi
lea    0x4f7(%rip),%rsi
mov    $0x67,%edx
xor    %r8d,%r8d
lea    0x77f(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1b4f <main+0x9af>
jmp    1b54 <main+0x9b4>
lea    -0x8(%rbp),%rdi
call   1090 <pthread_mutex_unlock@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
mov    0x2440(%rip),%rcx
cmp    (%rcx),%eax
je     1ba9 <main+0xa09>
mov    -0x8c(%rbp),%ecx
mov    0x242b(%rip),%rax
mov    (%rax),%r8d
lea    0x471(%rip),%rdi
lea    0x495(%rip),%rsi
mov    $0x68,%edx
lea    0x720(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1bae <main+0xa0e>
jmp    1bb3 <main+0xa13>
lea    -0x8(%rbp),%rdi
call   1050 <pthread_mutex_destroy@plt>
mov    %eax,-0x90(%rbp)
cmpl   $0x0,-0x90(%rbp)
je     1bf9 <main+0xa59>
mov    -0x90(%rbp),%ecx
lea    0x424(%rip),%rdi
lea    0x448(%rip),%rsi
mov    $0x69,%edx
xor    %r8d,%r8d
lea    0x6ee(%rip),%r9
mov    $0x0,%al
call   1070 <panic@plt>
jmp    1bfe <main+0xa5e>
lea    0x719(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2e18(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
lea    0x8(%rsp),%rdi
call   10a0 <pthread_mutexattr_init@plt>
test   %eax,%eax
je     11ea <main+0x4a>
lea    0xe35(%rip),%rdi
lea    0xe59(%rip),%rsi
lea    0xf1e(%rip),%r9
mov    $0x3e,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
mov    0x2def(%rip),%rbx
mov    (%rbx),%esi
lea    0x8(%rsp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
test   %eax,%eax
je     1227 <main+0x87>
lea    0xdf8(%rip),%rdi
lea    0xe1c(%rip),%rsi
lea    0xf01(%rip),%r9
mov    $0x40,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x8(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1030 <pthread_mutexattr_gettype@plt>
test   %eax,%eax
je     1260 <main+0xc0>
lea    0xdbf(%rip),%rdi
lea    0xde3(%rip),%rsi
lea    0xf01(%rip),%r9
mov    $0x41,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
mov    0xc(%rsp),%eax
cmp    (%rbx),%eax
je     1289 <main+0xe9>
lea    0xf10(%rip),%rdi
lea    0xdb5(%rip),%rsi
lea    0xf20(%rip),%rcx
mov    $0x42,%edx
xor    %eax,%eax
call   1070 <panic@plt>
mov    0x2d28(%rip),%r15
mov    (%r15),%esi
lea    0x8(%rsp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
test   %eax,%eax
je     12c7 <main+0x127>
lea    0xd58(%rip),%rdi
lea    0xd7c(%rip),%rsi
lea    0xf09(%rip),%r9
mov    $0x44,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x8(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1030 <pthread_mutexattr_gettype@plt>
test   %eax,%eax
je     1300 <main+0x160>
lea    0xd1f(%rip),%rdi
lea    0xd43(%rip),%rsi
lea    0xe61(%rip),%r9
mov    $0x45,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
mov    0xc(%rsp),%eax
cmp    (%r15),%eax
je     132a <main+0x18a>
lea    0xe6f(%rip),%rdi
lea    0xd14(%rip),%rsi
lea    0xede(%rip),%rcx
mov    $0x46,%edx
xor    %eax,%eax
call   1070 <panic@plt>
mov    0x2cc7(%rip),%r14
mov    (%r14),%esi
lea    0x8(%rsp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
test   %eax,%eax
je     1368 <main+0x1c8>
lea    0xcb7(%rip),%rdi
lea    0xcdb(%rip),%rsi
lea    0xecb(%rip),%r9
mov    $0x48,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x8(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1030 <pthread_mutexattr_gettype@plt>
test   %eax,%eax
je     13a1 <main+0x201>
lea    0xc7e(%rip),%rdi
lea    0xca2(%rip),%rsi
lea    0xdc0(%rip),%r9
mov    $0x49,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
mov    0xc(%rsp),%eax
cmp    (%r14),%eax
je     13cb <main+0x22b>
lea    0xdce(%rip),%rdi
lea    0xc73(%rip),%rsi
lea    0xe9f(%rip),%rcx
mov    $0x4a,%edx
xor    %eax,%eax
call   1070 <panic@plt>
mov    (%rbx),%esi
lea    0x8(%rsp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
test   %eax,%eax
je     1401 <main+0x261>
lea    0xc1e(%rip),%rdi
lea    0xc42(%rip),%rsi
lea    0xd27(%rip),%r9
mov    $0x4d,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   10b0 <pthread_mutex_init@plt>
test   %eax,%eax
je     143a <main+0x29a>
lea    0xbe5(%rip),%rdi
lea    0xc09(%rip),%rsi
lea    0xe5a(%rip),%r9
mov    $0x4e,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   10c0 <pthread_mutex_lock@plt>
test   %eax,%eax
je     146e <main+0x2ce>
lea    0xbb1(%rip),%rdi
lea    0xbd5(%rip),%rsi
lea    0xe49(%rip),%r9
mov    $0x4f,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1090 <pthread_mutex_unlock@plt>
test   %eax,%eax
je     14a2 <main+0x302>
lea    0xb7d(%rip),%rdi
lea    0xba1(%rip),%rsi
lea    0xe31(%rip),%r9
mov    $0x50,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1050 <pthread_mutex_destroy@plt>
test   %eax,%eax
je     14d6 <main+0x336>
lea    0xb49(%rip),%rdi
lea    0xb6d(%rip),%rsi
lea    0xe1b(%rip),%r9
mov    $0x51,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
mov    (%r15),%esi
lea    0x8(%rsp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
test   %eax,%eax
je     150d <main+0x36d>
lea    0xb12(%rip),%rdi
lea    0xb36(%rip),%rsi
lea    0xcc3(%rip),%r9
mov    $0x54,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   10b0 <pthread_mutex_init@plt>
test   %eax,%eax
je     1546 <main+0x3a6>
lea    0xad9(%rip),%rdi
lea    0xafd(%rip),%rsi
lea    0xd4e(%rip),%r9
mov    $0x55,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   10c0 <pthread_mutex_lock@plt>
test   %eax,%eax
je     157a <main+0x3da>
lea    0xaa5(%rip),%rdi
lea    0xac9(%rip),%rsi
lea    0xd3d(%rip),%r9
mov    $0x56,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   10c0 <pthread_mutex_lock@plt>
mov    0x2a4d(%rip),%rbx
mov    (%rbx),%r8d
cmp    %r8d,%eax
je     15b6 <main+0x416>
lea    0xa66(%rip),%rdi
lea    0xa8a(%rip),%rsi
lea    0xcfe(%rip),%r9
mov    $0x57,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1090 <pthread_mutex_unlock@plt>
test   %eax,%eax
je     15ea <main+0x44a>
lea    0xa35(%rip),%rdi
lea    0xa59(%rip),%rsi
lea    0xce9(%rip),%r9
mov    $0x58,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1080 <pthread_mutex_trylock@plt>
test   %eax,%eax
je     161e <main+0x47e>
lea    0xa01(%rip),%rdi
lea    0xa25(%rip),%rsi
lea    0xcf2(%rip),%r9
mov    $0x59,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1080 <pthread_mutex_trylock@plt>
mov    (%rbx),%r8d
cmp    %r8d,%eax
je     1653 <main+0x4b3>
lea    0x9c9(%rip),%rdi
lea    0x9ed(%rip),%rsi
lea    0xcba(%rip),%r9
mov    $0x5a,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1090 <pthread_mutex_unlock@plt>
test   %eax,%eax
je     1687 <main+0x4e7>
lea    0x998(%rip),%rdi
lea    0x9bc(%rip),%rsi
lea    0xc4c(%rip),%r9
mov    $0x5b,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1090 <pthread_mutex_unlock@plt>
mov    0x2918(%rip),%rbx
mov    (%rbx),%r8d
cmp    %r8d,%eax
je     16c3 <main+0x523>
lea    0x959(%rip),%rdi
lea    0x97d(%rip),%rsi
lea    0xc0d(%rip),%r9
mov    $0x5c,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1050 <pthread_mutex_destroy@plt>
test   %eax,%eax
je     16f7 <main+0x557>
lea    0x928(%rip),%rdi
lea    0x94c(%rip),%rsi
lea    0xbfa(%rip),%r9
mov    $0x5d,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
mov    (%r14),%esi
lea    0x8(%rsp),%rdi
call   1060 <pthread_mutexattr_settype@plt>
test   %eax,%eax
je     172e <main+0x58e>
lea    0x8f1(%rip),%rdi
lea    0x915(%rip),%rsi
lea    0xb05(%rip),%r9
mov    $0x60,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   10b0 <pthread_mutex_init@plt>
test   %eax,%eax
je     1767 <main+0x5c7>
lea    0x8b8(%rip),%rdi
lea    0x8dc(%rip),%rsi
lea    0xb2d(%rip),%r9
mov    $0x61,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   10c0 <pthread_mutex_lock@plt>
test   %eax,%eax
je     179b <main+0x5fb>
lea    0x884(%rip),%rdi
lea    0x8a8(%rip),%rsi
lea    0xb1c(%rip),%r9
mov    $0x62,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   10c0 <pthread_mutex_lock@plt>
test   %eax,%eax
je     17cf <main+0x62f>
lea    0x850(%rip),%rdi
lea    0x874(%rip),%rsi
lea    0xae8(%rip),%r9
mov    $0x63,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1090 <pthread_mutex_unlock@plt>
test   %eax,%eax
je     1803 <main+0x663>
lea    0x81c(%rip),%rdi
lea    0x840(%rip),%rsi
lea    0xad0(%rip),%r9
mov    $0x64,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1090 <pthread_mutex_unlock@plt>
test   %eax,%eax
je     1837 <main+0x697>
lea    0x7e8(%rip),%rdi
lea    0x80c(%rip),%rsi
lea    0xa9c(%rip),%r9
mov    $0x65,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1080 <pthread_mutex_trylock@plt>
test   %eax,%eax
je     186b <main+0x6cb>
lea    0x7b4(%rip),%rdi
lea    0x7d8(%rip),%rsi
lea    0xaa5(%rip),%r9
mov    $0x66,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1090 <pthread_mutex_unlock@plt>
test   %eax,%eax
je     189f <main+0x6ff>
lea    0x780(%rip),%rdi
lea    0x7a4(%rip),%rsi
lea    0xa34(%rip),%r9
mov    $0x67,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1090 <pthread_mutex_unlock@plt>
mov    (%rbx),%r8d
cmp    %r8d,%eax
je     18d4 <main+0x734>
lea    0x748(%rip),%rdi
lea    0x76c(%rip),%rsi
lea    0x9fc(%rip),%r9
mov    $0x68,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1070 <panic@plt>
lea    0x4(%rsp),%rdi
call   1050 <pthread_mutex_destroy@plt>
test   %eax,%eax
je     1908 <main+0x768>
lea    0x717(%rip),%rdi
lea    0x73b(%rip),%rsi
lea    0x9e9(%rip),%r9
mov    $0x69,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <panic@plt>
lea    0xa0f(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@PTHREAD_MUTEX_INITIALIZER = global i32 0
@.str = [43 x i8] c"%s:%d: call returned %d instead of %d: %s\0A\00"
@.str.1 = [204 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/test_mutex.c\00"
@.str.2 = [32 x i8] c"pthread_mutexattr_init( &attr )\00"
@PTHREAD_MUTEX_NORMAL = global i32 0
@.str.3 = [57 x i8] c"pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_NORMAL )\00"
@.str.4 = [47 x i8] c"pthread_mutexattr_gettype( &attr, &attr_type )\00"
@.str.5 = [30 x i8] c"%s:%d: assertion failure: %s\0A\00"
@.str.6 = [34 x i8] c"attr_type == PTHREAD_MUTEX_NORMAL\00"
@PTHREAD_MUTEX_ERRORCHECK = global i32 0
@.str.7 = [61 x i8] c"pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_ERRORCHECK )\00"
@.str.8 = [38 x i8] c"attr_type == PTHREAD_MUTEX_ERRORCHECK\00"
@PTHREAD_MUTEX_RECURSIVE = global i32 0
@.str.9 = [60 x i8] c"pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE )\00"
@.str.10 = [37 x i8] c"attr_type == PTHREAD_MUTEX_RECURSIVE\00"
@.str.11 = [35 x i8] c"pthread_mutex_init( &lock, &attr )\00"
@.str.12 = [28 x i8] c"pthread_mutex_lock( &lock )\00"
@.str.13 = [30 x i8] c"pthread_mutex_unlock( &lock )\00"
@.str.14 = [31 x i8] c"pthread_mutex_destroy( &lock )\00"
@EDEADLK = global i32 0
@.str.15 = [31 x i8] c"pthread_mutex_trylock( &lock )\00"
@EPERM = global i32 0
@.str.16 = [4 x i8] c"ok\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%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
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
store i32 0, i32* %1
%37 = load i32, i32* @PTHREAD_MUTEX_INITIALIZER
store i32 %37, i32* %2
br label %38
38: ; preds = %0
%39 = call i32 @pthread_mutexattr_init(i32* %3)
store i32 %39, i32* %5
%40 = load i32, i32* %5
%41 = icmp ne i32 %40, 0
br i1 %41, label %42, label %45
42: ; preds = %38
%43 = load i32, i32* %5
%44 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 62, i32 %43, i32 0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
br label %45
45: ; preds = %42, %38
br label %46
46: ; preds = %45
br label %47
47: ; preds = %46
%48 = load i32, i32* @PTHREAD_MUTEX_NORMAL
%49 = call i32 @pthread_mutexattr_settype(i32* %3, i32 %48)
store i32 %49, i32* %6
%50 = load i32, i32* %6
%51 = icmp ne i32 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %47
%53 = load i32, i32* %6
%54 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 64, i32 %53, i32 0, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
br label %55
55: ; preds = %52, %47
br label %56
56: ; preds = %55
br label %57
57: ; preds = %56
%58 = call i32 @pthread_mutexattr_gettype(i32* %3, i32* %4)
store i32 %58, i32* %7
%59 = load i32, i32* %7
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %64
61: ; preds = %57
%62 = load i32, i32* %7
%63 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 65, i32 %62, i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
br label %64
64: ; preds = %61, %57
br label %65
65: ; preds = %64
br label %66
66: ; preds = %65
%67 = load i32, i32* %4
%68 = load i32, i32* @PTHREAD_MUTEX_NORMAL
%69 = icmp eq i32 %67, %68
br i1 %69, label %72, label %70
70: ; preds = %66
%71 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 66, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
br label %72
72: ; preds = %70, %66
br label %73
73: ; preds = %72
br label %74
74: ; preds = %73
%75 = load i32, i32* @PTHREAD_MUTEX_ERRORCHECK
%76 = call i32 @pthread_mutexattr_settype(i32* %3, i32 %75)
store i32 %76, i32* %8
%77 = load i32, i32* %8
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %82
79: ; preds = %74
%80 = load i32, i32* %8
%81 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 68, i32 %80, i32 0, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0))
br label %82
82: ; preds = %79, %74
br label %83
83: ; preds = %82
br label %84
84: ; preds = %83
%85 = call i32 @pthread_mutexattr_gettype(i32* %3, i32* %4)
store i32 %85, i32* %9
%86 = load i32, i32* %9
%87 = icmp ne i32 %86, 0
br i1 %87, label %88, label %91
88: ; preds = %84
%89 = load i32, i32* %9
%90 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 69, i32 %89, i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
br label %91
91: ; preds = %88, %84
br label %92
92: ; preds = %91
br label %93
93: ; preds = %92
%94 = load i32, i32* %4
%95 = load i32, i32* @PTHREAD_MUTEX_ERRORCHECK
%96 = icmp eq i32 %94, %95
br i1 %96, label %99, label %97
97: ; preds = %93
%98 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 70, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
br label %99
99: ; preds = %97, %93
br label %100
100: ; preds = %99
br label %101
101: ; preds = %100
%102 = load i32, i32* @PTHREAD_MUTEX_RECURSIVE
%103 = call i32 @pthread_mutexattr_settype(i32* %3, i32 %102)
store i32 %103, i32* %10
%104 = load i32, i32* %10
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %109
106: ; preds = %101
%107 = load i32, i32* %10
%108 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 72, i32 %107, i32 0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
br label %109
109: ; preds = %106, %101
br label %110
110: ; preds = %109
br label %111
111: ; preds = %110
%112 = call i32 @pthread_mutexattr_gettype(i32* %3, i32* %4)
store i32 %112, i32* %11
%113 = load i32, i32* %11
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %118
115: ; preds = %111
%116 = load i32, i32* %11
%117 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 73, i32 %116, i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
br label %118
118: ; preds = %115, %111
br label %119
119: ; preds = %118
br label %120
120: ; preds = %119
%121 = load i32, i32* %4
%122 = load i32, i32* @PTHREAD_MUTEX_RECURSIVE
%123 = icmp eq i32 %121, %122
br i1 %123, label %126, label %124
124: ; preds = %120
%125 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 74, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
br label %126
126: ; preds = %124, %120
br label %127
127: ; preds = %126
br label %128
128: ; preds = %127
%129 = load i32, i32* @PTHREAD_MUTEX_NORMAL
%130 = call i32 @pthread_mutexattr_settype(i32* %3, i32 %129)
store i32 %130, i32* %12
%131 = load i32, i32* %12
%132 = icmp ne i32 %131, 0
br i1 %132, label %133, label %136
133: ; preds = %128
%134 = load i32, i32* %12
%135 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 77, i32 %134, i32 0, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
br label %136
136: ; preds = %133, %128
br label %137
137: ; preds = %136
br label %138
138: ; preds = %137
%139 = call i32 @pthread_mutex_init(i32* %2, i32* %3)
store i32 %139, i32* %13
%140 = load i32, i32* %13
%141 = icmp ne i32 %140, 0
br i1 %141, label %142, label %145
142: ; preds = %138
%143 = load i32, i32* %13
%144 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 78, i32 %143, i32 0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
br label %145
145: ; preds = %142, %138
br label %146
146: ; preds = %145
br label %147
147: ; preds = %146
%148 = call i32 @pthread_mutex_lock(i32* %2)
store i32 %148, i32* %14
%149 = load i32, i32* %14
%150 = icmp ne i32 %149, 0
br i1 %150, label %151, label %154
151: ; preds = %147
%152 = load i32, i32* %14
%153 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 79, i32 %152, i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %154
154: ; preds = %151, %147
br label %155
155: ; preds = %154
br label %156
156: ; preds = %155
%157 = call i32 @pthread_mutex_unlock(i32* %2)
store i32 %157, i32* %15
%158 = load i32, i32* %15
%159 = icmp ne i32 %158, 0
br i1 %159, label %160, label %163
160: ; preds = %156
%161 = load i32, i32* %15
%162 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 80, i32 %161, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %163
163: ; preds = %160, %156
br label %164
164: ; preds = %163
br label %165
165: ; preds = %164
%166 = call i32 @pthread_mutex_destroy(i32* %2)
store i32 %166, i32* %16
%167 = load i32, i32* %16
%168 = icmp ne i32 %167, 0
br i1 %168, label %169, label %172
169: ; preds = %165
%170 = load i32, i32* %16
%171 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 81, i32 %170, i32 0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0))
br label %172
172: ; preds = %169, %165
br label %173
173: ; preds = %172
br label %174
174: ; preds = %173
%175 = load i32, i32* @PTHREAD_MUTEX_ERRORCHECK
%176 = call i32 @pthread_mutexattr_settype(i32* %3, i32 %175)
store i32 %176, i32* %17
%177 = load i32, i32* %17
%178 = icmp ne i32 %177, 0
br i1 %178, label %179, label %182
179: ; preds = %174
%180 = load i32, i32* %17
%181 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 84, i32 %180, i32 0, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0))
br label %182
182: ; preds = %179, %174
br label %183
183: ; preds = %182
br label %184
184: ; preds = %183
%185 = call i32 @pthread_mutex_init(i32* %2, i32* %3)
store i32 %185, i32* %18
%186 = load i32, i32* %18
%187 = icmp ne i32 %186, 0
br i1 %187, label %188, label %191
188: ; preds = %184
%189 = load i32, i32* %18
%190 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 85, i32 %189, i32 0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
br label %191
191: ; preds = %188, %184
br label %192
192: ; preds = %191
br label %193
193: ; preds = %192
%194 = call i32 @pthread_mutex_lock(i32* %2)
store i32 %194, i32* %19
%195 = load i32, i32* %19
%196 = icmp ne i32 %195, 0
br i1 %196, label %197, label %200
197: ; preds = %193
%198 = load i32, i32* %19
%199 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 86, i32 %198, i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %200
200: ; preds = %197, %193
br label %201
201: ; preds = %200
br label %202
202: ; preds = %201
%203 = call i32 @pthread_mutex_lock(i32* %2)
store i32 %203, i32* %20
%204 = load i32, i32* %20
%205 = load i32, i32* @EDEADLK
%206 = icmp ne i32 %204, %205
br i1 %206, label %207, label %211
207: ; preds = %202
%208 = load i32, i32* %20
%209 = load i32, i32* @EDEADLK
%210 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 87, i32 %208, i32 %209, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %211
211: ; preds = %207, %202
br label %212
212: ; preds = %211
br label %213
213: ; preds = %212
%214 = call i32 @pthread_mutex_unlock(i32* %2)
store i32 %214, i32* %21
%215 = load i32, i32* %21
%216 = icmp ne i32 %215, 0
br i1 %216, label %217, label %220
217: ; preds = %213
%218 = load i32, i32* %21
%219 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 88, i32 %218, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %220
220: ; preds = %217, %213
br label %221
221: ; preds = %220
br label %222
222: ; preds = %221
%223 = call i32 @pthread_mutex_trylock(i32* %2)
store i32 %223, i32* %22
%224 = load i32, i32* %22
%225 = icmp ne i32 %224, 0
br i1 %225, label %226, label %229
226: ; preds = %222
%227 = load i32, i32* %22
%228 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 89, i32 %227, i32 0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0))
br label %229
229: ; preds = %226, %222
br label %230
230: ; preds = %229
br label %231
231: ; preds = %230
%232 = call i32 @pthread_mutex_trylock(i32* %2)
store i32 %232, i32* %23
%233 = load i32, i32* %23
%234 = load i32, i32* @EDEADLK
%235 = icmp ne i32 %233, %234
br i1 %235, label %236, label %240
236: ; preds = %231
%237 = load i32, i32* %23
%238 = load i32, i32* @EDEADLK
%239 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 90, i32 %237, i32 %238, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0))
br label %240
240: ; preds = %236, %231
br label %241
241: ; preds = %240
br label %242
242: ; preds = %241
%243 = call i32 @pthread_mutex_unlock(i32* %2)
store i32 %243, i32* %24
%244 = load i32, i32* %24
%245 = icmp ne i32 %244, 0
br i1 %245, label %246, label %249
246: ; preds = %242
%247 = load i32, i32* %24
%248 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 91, i32 %247, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %249
249: ; preds = %246, %242
br label %250
250: ; preds = %249
br label %251
251: ; preds = %250
%252 = call i32 @pthread_mutex_unlock(i32* %2)
store i32 %252, i32* %25
%253 = load i32, i32* %25
%254 = load i32, i32* @EPERM
%255 = icmp ne i32 %253, %254
br i1 %255, label %256, label %260
256: ; preds = %251
%257 = load i32, i32* %25
%258 = load i32, i32* @EPERM
%259 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 92, i32 %257, i32 %258, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %260
260: ; preds = %256, %251
br label %261
261: ; preds = %260
br label %262
262: ; preds = %261
%263 = call i32 @pthread_mutex_destroy(i32* %2)
store i32 %263, i32* %26
%264 = load i32, i32* %26
%265 = icmp ne i32 %264, 0
br i1 %265, label %266, label %269
266: ; preds = %262
%267 = load i32, i32* %26
%268 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 93, i32 %267, i32 0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0))
br label %269
269: ; preds = %266, %262
br label %270
270: ; preds = %269
br label %271
271: ; preds = %270
%272 = load i32, i32* @PTHREAD_MUTEX_RECURSIVE
%273 = call i32 @pthread_mutexattr_settype(i32* %3, i32 %272)
store i32 %273, i32* %27
%274 = load i32, i32* %27
%275 = icmp ne i32 %274, 0
br i1 %275, label %276, label %279
276: ; preds = %271
%277 = load i32, i32* %27
%278 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 96, i32 %277, i32 0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
br label %279
279: ; preds = %276, %271
br label %280
280: ; preds = %279
br label %281
281: ; preds = %280
%282 = call i32 @pthread_mutex_init(i32* %2, i32* %3)
store i32 %282, i32* %28
%283 = load i32, i32* %28
%284 = icmp ne i32 %283, 0
br i1 %284, label %285, label %288
285: ; preds = %281
%286 = load i32, i32* %28
%287 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 97, i32 %286, i32 0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
br label %288
288: ; preds = %285, %281
br label %289
289: ; preds = %288
br label %290
290: ; preds = %289
%291 = call i32 @pthread_mutex_lock(i32* %2)
store i32 %291, i32* %29
%292 = load i32, i32* %29
%293 = icmp ne i32 %292, 0
br i1 %293, label %294, label %297
294: ; preds = %290
%295 = load i32, i32* %29
%296 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 98, i32 %295, i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %297
297: ; preds = %294, %290
br label %298
298: ; preds = %297
br label %299
299: ; preds = %298
%300 = call i32 @pthread_mutex_lock(i32* %2)
store i32 %300, i32* %30
%301 = load i32, i32* %30
%302 = icmp ne i32 %301, 0
br i1 %302, label %303, label %306
303: ; preds = %299
%304 = load i32, i32* %30
%305 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 99, i32 %304, i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %306
306: ; preds = %303, %299
br label %307
307: ; preds = %306
br label %308
308: ; preds = %307
%309 = call i32 @pthread_mutex_unlock(i32* %2)
store i32 %309, i32* %31
%310 = load i32, i32* %31
%311 = icmp ne i32 %310, 0
br i1 %311, label %312, label %315
312: ; preds = %308
%313 = load i32, i32* %31
%314 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 100, i32 %313, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %315
315: ; preds = %312, %308
br label %316
316: ; preds = %315
br label %317
317: ; preds = %316
%318 = call i32 @pthread_mutex_unlock(i32* %2)
store i32 %318, i32* %32
%319 = load i32, i32* %32
%320 = icmp ne i32 %319, 0
br i1 %320, label %321, label %324
321: ; preds = %317
%322 = load i32, i32* %32
%323 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 101, i32 %322, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %324
324: ; preds = %321, %317
br label %325
325: ; preds = %324
br label %326
326: ; preds = %325
%327 = call i32 @pthread_mutex_trylock(i32* %2)
store i32 %327, i32* %33
%328 = load i32, i32* %33
%329 = icmp ne i32 %328, 0
br i1 %329, label %330, label %333
330: ; preds = %326
%331 = load i32, i32* %33
%332 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 102, i32 %331, i32 0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0))
br label %333
333: ; preds = %330, %326
br label %334
334: ; preds = %333
br label %335
335: ; preds = %334
%336 = call i32 @pthread_mutex_unlock(i32* %2)
store i32 %336, i32* %34
%337 = load i32, i32* %34
%338 = icmp ne i32 %337, 0
br i1 %338, label %339, label %342
339: ; preds = %335
%340 = load i32, i32* %34
%341 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 103, i32 %340, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %342
342: ; preds = %339, %335
br label %343
343: ; preds = %342
br label %344
344: ; preds = %343
%345 = call i32 @pthread_mutex_unlock(i32* %2)
store i32 %345, i32* %35
%346 = load i32, i32* %35
%347 = load i32, i32* @EPERM
%348 = icmp ne i32 %346, %347
br i1 %348, label %349, label %353
349: ; preds = %344
%350 = load i32, i32* %35
%351 = load i32, i32* @EPERM
%352 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 104, i32 %350, i32 %351, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %353
353: ; preds = %349, %344
br label %354
354: ; preds = %353
br label %355
355: ; preds = %354
%356 = call i32 @pthread_mutex_destroy(i32* %2)
store i32 %356, i32* %36
%357 = load i32, i32* %36
%358 = icmp ne i32 %357, 0
br i1 %358, label %359, label %362
359: ; preds = %355
%360 = load i32, i32* %36
%361 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 105, i32 %360, i32 0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0))
br label %362
362: ; preds = %359, %355
br label %363
363: ; preds = %362
%364 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@PTHREAD_MUTEX_INITIALIZER = global i32 0
@.str = [43 x i8] c"%s:%d: call returned %d instead of %d: %s\0A\00"
@.str.1 = [204 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Smartandroidtech/platform_system_extras/refs/heads/L-Test/B2G/system/extras/tests/bionic/libc/bionic/test_mutex.c\00"
@.str.2 = [32 x i8] c"pthread_mutexattr_init( &attr )\00"
@PTHREAD_MUTEX_NORMAL = global i32 0
@.str.3 = [57 x i8] c"pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_NORMAL )\00"
@.str.4 = [47 x i8] c"pthread_mutexattr_gettype( &attr, &attr_type )\00"
@.str.5 = [30 x i8] c"%s:%d: assertion failure: %s\0A\00"
@.str.6 = [34 x i8] c"attr_type == PTHREAD_MUTEX_NORMAL\00"
@PTHREAD_MUTEX_ERRORCHECK = global i32 0
@.str.7 = [61 x i8] c"pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_ERRORCHECK )\00"
@.str.8 = [38 x i8] c"attr_type == PTHREAD_MUTEX_ERRORCHECK\00"
@PTHREAD_MUTEX_RECURSIVE = global i32 0
@.str.9 = [60 x i8] c"pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE )\00"
@.str.10 = [37 x i8] c"attr_type == PTHREAD_MUTEX_RECURSIVE\00"
@.str.11 = [35 x i8] c"pthread_mutex_init( &lock, &attr )\00"
@.str.12 = [28 x i8] c"pthread_mutex_lock( &lock )\00"
@.str.13 = [30 x i8] c"pthread_mutex_unlock( &lock )\00"
@.str.14 = [31 x i8] c"pthread_mutex_destroy( &lock )\00"
@EDEADLK = global i32 0
@.str.15 = [31 x i8] c"pthread_mutex_trylock( &lock )\00"
@EPERM = global i32 0
@str = [3 x i8] c"ok\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = load i32, i32* @PTHREAD_MUTEX_INITIALIZER
store i32 %5, i32* %1
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = call i32 @pthread_mutexattr_init(i32* %2)
%9 = icmp eq i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %0
%11 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 62, i32 %8, i32 0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %0
%13 = load i32, i32* @PTHREAD_MUTEX_NORMAL
%14 = call i32 @pthread_mutexattr_settype(i32* %2, i32 %13)
%15 = icmp eq i32 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %12
%17 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 64, i32 %14, i32 0, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
br label %18
18: ; preds = %16, %12
%19 = call i32 @pthread_mutexattr_gettype(i32* %2, i32* %3)
%20 = icmp eq i32 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %18
%22 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 65, i32 %19, i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %3
%25 = load i32, i32* @PTHREAD_MUTEX_NORMAL
%26 = icmp eq i32 %24, %25
br i1 %26, label %29, label %27
27: ; preds = %23
%28 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 66, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
br label %29
29: ; preds = %23, %27
%30 = load i32, i32* @PTHREAD_MUTEX_ERRORCHECK
%31 = call i32 @pthread_mutexattr_settype(i32* %2, i32 %30)
%32 = icmp eq i32 %31, 0
br i1 %32, label %35, label %33
33: ; preds = %29
%34 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 68, i32 %31, i32 0, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0))
br label %35
35: ; preds = %33, %29
%36 = call i32 @pthread_mutexattr_gettype(i32* %2, i32* %3)
%37 = icmp eq i32 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 69, i32 %36, i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
br label %40
40: ; preds = %38, %35
%41 = load i32, i32* %3
%42 = load i32, i32* @PTHREAD_MUTEX_ERRORCHECK
%43 = icmp eq i32 %41, %42
br i1 %43, label %46, label %44
44: ; preds = %40
%45 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 70, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
br label %46
46: ; preds = %40, %44
%47 = load i32, i32* @PTHREAD_MUTEX_RECURSIVE
%48 = call i32 @pthread_mutexattr_settype(i32* %2, i32 %47)
%49 = icmp eq i32 %48, 0
br i1 %49, label %52, label %50
50: ; preds = %46
%51 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 72, i32 %48, i32 0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
br label %52
52: ; preds = %50, %46
%53 = call i32 @pthread_mutexattr_gettype(i32* %2, i32* %3)
%54 = icmp eq i32 %53, 0
br i1 %54, label %57, label %55
55: ; preds = %52
%56 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 73, i32 %53, i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
br label %57
57: ; preds = %55, %52
%58 = load i32, i32* %3
%59 = load i32, i32* @PTHREAD_MUTEX_RECURSIVE
%60 = icmp eq i32 %58, %59
br i1 %60, label %63, label %61
61: ; preds = %57
%62 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 74, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
br label %63
63: ; preds = %57, %61
%64 = load i32, i32* @PTHREAD_MUTEX_NORMAL
%65 = call i32 @pthread_mutexattr_settype(i32* %2, i32 %64)
%66 = icmp eq i32 %65, 0
br i1 %66, label %69, label %67
67: ; preds = %63
%68 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 77, i32 %65, i32 0, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
br label %69
69: ; preds = %67, %63
%70 = call i32 @pthread_mutex_init(i32* %1, i32* %2)
%71 = icmp eq i32 %70, 0
br i1 %71, label %74, label %72
72: ; preds = %69
%73 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 78, i32 %70, i32 0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
br label %74
74: ; preds = %72, %69
%75 = call i32 @pthread_mutex_lock(i32* %1)
%76 = icmp eq i32 %75, 0
br i1 %76, label %79, label %77
77: ; preds = %74
%78 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 79, i32 %75, i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %79
79: ; preds = %77, %74
%80 = call i32 @pthread_mutex_unlock(i32* %1)
%81 = icmp eq i32 %80, 0
br i1 %81, label %84, label %82
82: ; preds = %79
%83 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 80, i32 %80, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %84
84: ; preds = %82, %79
%85 = call i32 @pthread_mutex_destroy(i32* %1)
%86 = icmp eq i32 %85, 0
br i1 %86, label %89, label %87
87: ; preds = %84
%88 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 81, i32 %85, i32 0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0))
br label %89
89: ; preds = %87, %84
%90 = load i32, i32* @PTHREAD_MUTEX_ERRORCHECK
%91 = call i32 @pthread_mutexattr_settype(i32* %2, i32 %90)
%92 = icmp eq i32 %91, 0
br i1 %92, label %95, label %93
93: ; preds = %89
%94 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 84, i32 %91, i32 0, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0))
br label %95
95: ; preds = %93, %89
%96 = call i32 @pthread_mutex_init(i32* %1, i32* %2)
%97 = icmp eq i32 %96, 0
br i1 %97, label %100, label %98
98: ; preds = %95
%99 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 85, i32 %96, i32 0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
br label %100
100: ; preds = %98, %95
%101 = call i32 @pthread_mutex_lock(i32* %1)
%102 = icmp eq i32 %101, 0
br i1 %102, label %105, label %103
103: ; preds = %100
%104 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 86, i32 %101, i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %105
105: ; preds = %103, %100
%106 = call i32 @pthread_mutex_lock(i32* %1)
%107 = load i32, i32* @EDEADLK
%108 = icmp eq i32 %106, %107
br i1 %108, label %111, label %109
109: ; preds = %105
%110 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 87, i32 %106, i32 %107, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %111
111: ; preds = %109, %105
%112 = call i32 @pthread_mutex_unlock(i32* %1)
%113 = icmp eq i32 %112, 0
br i1 %113, label %116, label %114
114: ; preds = %111
%115 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 88, i32 %112, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %116
116: ; preds = %114, %111
%117 = call i32 @pthread_mutex_trylock(i32* %1)
%118 = icmp eq i32 %117, 0
br i1 %118, label %121, label %119
119: ; preds = %116
%120 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 89, i32 %117, i32 0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0))
br label %121
121: ; preds = %119, %116
%122 = call i32 @pthread_mutex_trylock(i32* %1)
%123 = load i32, i32* @EDEADLK
%124 = icmp eq i32 %122, %123
br i1 %124, label %127, label %125
125: ; preds = %121
%126 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 90, i32 %122, i32 %123, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0))
br label %127
127: ; preds = %125, %121
%128 = call i32 @pthread_mutex_unlock(i32* %1)
%129 = icmp eq i32 %128, 0
br i1 %129, label %132, label %130
130: ; preds = %127
%131 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 91, i32 %128, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %132
132: ; preds = %130, %127
%133 = call i32 @pthread_mutex_unlock(i32* %1)
%134 = load i32, i32* @EPERM
%135 = icmp eq i32 %133, %134
br i1 %135, label %138, label %136
136: ; preds = %132
%137 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 92, i32 %133, i32 %134, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %138
138: ; preds = %136, %132
%139 = call i32 @pthread_mutex_destroy(i32* %1)
%140 = icmp eq i32 %139, 0
br i1 %140, label %143, label %141
141: ; preds = %138
%142 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 93, i32 %139, i32 0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0))
br label %143
143: ; preds = %141, %138
%144 = load i32, i32* @PTHREAD_MUTEX_RECURSIVE
%145 = call i32 @pthread_mutexattr_settype(i32* %2, i32 %144)
%146 = icmp eq i32 %145, 0
br i1 %146, label %149, label %147
147: ; preds = %143
%148 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 96, i32 %145, i32 0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
br label %149
149: ; preds = %147, %143
%150 = call i32 @pthread_mutex_init(i32* %1, i32* %2)
%151 = icmp eq i32 %150, 0
br i1 %151, label %154, label %152
152: ; preds = %149
%153 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 97, i32 %150, i32 0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
br label %154
154: ; preds = %152, %149
%155 = call i32 @pthread_mutex_lock(i32* %1)
%156 = icmp eq i32 %155, 0
br i1 %156, label %159, label %157
157: ; preds = %154
%158 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 98, i32 %155, i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %159
159: ; preds = %157, %154
%160 = call i32 @pthread_mutex_lock(i32* %1)
%161 = icmp eq i32 %160, 0
br i1 %161, label %164, label %162
162: ; preds = %159
%163 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 99, i32 %160, i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %164
164: ; preds = %162, %159
%165 = call i32 @pthread_mutex_unlock(i32* %1)
%166 = icmp eq i32 %165, 0
br i1 %166, label %169, label %167
167: ; preds = %164
%168 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 100, i32 %165, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %169
169: ; preds = %167, %164
%170 = call i32 @pthread_mutex_unlock(i32* %1)
%171 = icmp eq i32 %170, 0
br i1 %171, label %174, label %172
172: ; preds = %169
%173 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 101, i32 %170, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %174
174: ; preds = %172, %169
%175 = call i32 @pthread_mutex_trylock(i32* %1)
%176 = icmp eq i32 %175, 0
br i1 %176, label %179, label %177
177: ; preds = %174
%178 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 102, i32 %175, i32 0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0))
br label %179
179: ; preds = %177, %174
%180 = call i32 @pthread_mutex_unlock(i32* %1)
%181 = icmp eq i32 %180, 0
br i1 %181, label %184, label %182
182: ; preds = %179
%183 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 103, i32 %180, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %184
184: ; preds = %182, %179
%185 = call i32 @pthread_mutex_unlock(i32* %1)
%186 = load i32, i32* @EPERM
%187 = icmp eq i32 %185, %186
br i1 %187, label %190, label %188
188: ; preds = %184
%189 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 104, i32 %185, i32 %186, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
br label %190
190: ; preds = %188, %184
%191 = call i32 @pthread_mutex_destroy(i32* %1)
%192 = icmp eq i32 %191, 0
br i1 %192, label %195, label %193
193: ; preds = %190
%194 = call i32 (i8*, i8*, i32, ...) @panic(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str.1, i64 0, i64 0), i32 105, i32 %191, i32 0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0))
br label %195
195: ; preds = %193, %190
%196 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}