	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_rwlock_init            ## -- Begin function pthread_rwlock_init
	.p2align	4, 0x90
_pthread_rwlock_init:                   ## @pthread_rwlock_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.2:
	cmpq	$0, (%rsi)
	je	LBB0_4
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_4:
	movl	$1, %edi
	movl	$40, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	%rax, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax)
	movq	$0, 32(%rax)
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_pthread_mutex_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	leaq	4(%rbx), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_pthread_mutex_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	addq	$12, %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_pthread_cond_init
	testl	%eax, %eax
	je	LBB0_17
## %bb.8:
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_pthread_mutex_destroy
	movl	%r13d, %r15d
LBB0_9:
	movq	%rbx, %rdi
	callq	_pthread_mutex_destroy
LBB0_10:
	movq	%rbx, %rdi
	callq	_free
	jmp	LBB0_14
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_16
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %r15d
LBB0_14:
	xorl	%ebx, %ebx
LBB0_15:
	movq	%rbx, (%r14)
LBB0_16:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_PTE_RWLOCK_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PTE_RWLOCK_MAGIC,4,2           ## @PTE_RWLOCK_MAGIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_rwlock_init            ; -- Begin function pthread_rwlock_init
	.p2align	2
_pthread_rwlock_init:                   ; @pthread_rwlock_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	cbz	x1, LBB0_4
; %bb.2:
	ldr	x8, [x1]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x20, #0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_4:
	mov	w0, #1
	mov	w1, #40
	bl	_calloc
	mov	x20, x0
	cbz	x0, LBB0_12
; %bb.5:
	stp	xzr, xzr, [x20, #16]
	str	xzr, [x20, #32]
	mov	x0, x20
	mov	x1, #0
	bl	_pthread_mutex_init
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.6:
	add	x22, x20, #4
	mov	x0, x22
	mov	x1, #0
	bl	_pthread_mutex_init
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.7:
	add	x0, x20, #12
	mov	x1, #0
	bl	_pthread_cond_init
	mov	x21, x0
	cbz	w0, LBB0_16
; %bb.8:
	mov	x0, x22
	bl	_pthread_mutex_destroy
LBB0_9:
	mov	x0, x20
	bl	_pthread_mutex_destroy
LBB0_10:
	mov	x0, x20
	bl	_free
	mov	x20, #0
	b	LBB0_14
LBB0_11:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	b	LBB0_15
LBB0_12:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_13:
	ldr	w21, [x8]
LBB0_14:
	str	x20, [x19]
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh7:
	adrp	x8, _PTE_RWLOCK_MAGIC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PTE_RWLOCK_MAGIC@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PTE_RWLOCK_MAGIC,4,2           ; @PTE_RWLOCK_MAGIC
.subsections_via_symbols
