#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_rwlockattr_t;

/* Variables and functions */
int PTHREAD_PROCESS_PRIVATE;
int PTHREAD_PROCESS_SHARED;
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ pthread_rwlockattr_destroy(int /*<<< orphan*/ *);
scalar_t__ pthread_rwlockattr_getpshared(int /*<<< orphan*/ *, int *);
scalar_t__ pthread_rwlockattr_init(int /*<<< orphan*/ *);
int pthread_rwlockattr_setpshared(int /*<<< orphan*/ *, int);
int main(void) {
  pthread_rwlockattr_t rwla;
  int pshared;
  int rc = 0;
  printf("process-shared attribute is not available for testing\n");
  return 4;
  if (pthread_rwlockattr_init(&rwla) != 0) {
    printf("Error at pthread_rwlockattr_init()\n");
    return 2;
  }
  rc = pthread_rwlockattr_setpshared(&rwla, PTHREAD_PROCESS_PRIVATE);
  if (rc != 0) {
    printf("Test FAILED: Error at pthread_rwlockattr_setpshared(), return "
           "error: %d\n",
           rc);
    return 1;
  }
  if (pthread_rwlockattr_getpshared(&rwla, &pshared) != 0) {
    printf("Error at pthread_rwlockattr_getpshared()\n");
    return 2;
  }
  if (pshared != PTHREAD_PROCESS_PRIVATE) {
    printf("Test FAILED: Expect PTHREAD_PROCESS_PRIVATE, but got %d\n",
           pshared);
    return 1;
  }
  rc = pthread_rwlockattr_setpshared(&rwla, PTHREAD_PROCESS_SHARED);
  if (rc != 0) {
    printf("Test FAILED: Error at pthread_rwlockattr_setpshared(), return "
           "error: %d\n",
           rc);
    return 1;
  }
  if (pthread_rwlockattr_getpshared(&rwla, &pshared) != 0) {
    printf("Error at pthread_rwlockattr_getpshared()\n");
    return 2;
  }
  if (pshared != PTHREAD_PROCESS_SHARED) {
    printf("Test FAILED: Expect PTHREAD_PROCESS_SHARED, but got %d\n", pshared);
    return 1;
  }
  if (pthread_rwlockattr_destroy(&rwla) != 0) {
    printf("Error at pthread_rwlockattr_destroy()");
    return 2;
  }
  printf("Test PASSED\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [55 x i8] c"process-shared attribute is not available for testing\0A\00"
@PTHREAD_PROCESS_PRIVATE = global i32 0
@PTHREAD_PROCESS_SHARED = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i32 4
}

LLVM IR (-O2):
@PTHREAD_PROCESS_PRIVATE = global i32 0
@PTHREAD_PROCESS_SHARED = global i32 0
@str = [54 x i8] c"process-shared attribute is not available for testing\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
ret i32 4
}