	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_mutex_init             ## -- Begin function pthread_mutex_init
	.p2align	4, 0x90
_pthread_mutex_init:                    ## @pthread_mutex_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	$1, %edi
	movl	$40, %esi
	callq	_calloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	movq	(%r15), %rax
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	movq	_PTHREAD_MUTEX_DEFAULT@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	$0, 8(%rbx)
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_pte_osSemaphoreCreate
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_9
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_8:
	movq	%rbx, (%r14)
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PTHREAD_MUTEX_DEFAULT,4,2      ## @PTHREAD_MUTEX_DEFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_mutex_init             ; -- Begin function pthread_mutex_init
	.p2align	2
_pthread_mutex_init:                    ; @pthread_mutex_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_5
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	mov	w0, #1
	mov	w1, #40
	bl	_calloc
	mov	x20, x0
	cbz	x0, LBB0_6
; %bb.2:
	stp	xzr, xzr, [x20, #24]
Lloh0:
	adrp	x8, _PTHREAD_MUTEX_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTHREAD_MUTEX_DEFAULT@GOTPAGEOFF]
	cbz	x21, LBB0_4
; %bb.3:
	ldr	x9, [x21]
	cmp	x9, #0
	csel	x8, x8, x9, eq
LBB0_4:
	ldr	w8, [x8]
	str	w8, [x20, #16]
	str	xzr, [x20, #8]
	mov	w0, #0
	mov	x1, x20
	bl	_pte_osSemaphoreCreate
	mov	w0, #0
	b	LBB0_7
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_6:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
LBB0_7:
	str	x20, [x19]
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PTHREAD_MUTEX_DEFAULT,4,2      ; @PTHREAD_MUTEX_DEFAULT
.subsections_via_symbols
