	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mutex3_threadfunc
_mutex3_threadfunc:                     ## @mutex3_threadfunc
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movslq	(%rdi), %rbx
	xorl	%eax, %eax
	callq	_pthread_self
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_printf
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	_static_mutex@GOTPCREL(%rip), %r14
	movq	_ts_lengthy@GOTPCREL(%rip), %r15
	movq	_global_x@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mutex_lock
	movl	%eax, %edi
	callq	_PTHREAD_REQUIRE
	incl	(%r12)
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	movl	%eax, %edi
	callq	_PTHREAD_REQUIRE
	decq	%rbx
	jne	LBB0_3
## %bb.4:
	movq	$-1, %rbx
	jmp	LBB0_5
LBB0_1:
	decq	%rbx
LBB0_5:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"2: Second thread (%p). Count is %ld\n"

	.comm	_static_mutex,4,2               ## @static_mutex
	.comm	_ts_lengthy,4,2                 ## @ts_lengthy
	.comm	_global_x,4,2                   ## @global_x
	.no_dead_strip	_mutex3_threadfunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mutex3_threadfunc
_mutex3_threadfunc:                     ; @mutex3_threadfunc
	.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
	ldrsw	x19, [x0]
	bl	_pthread_self
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_printf
	cbz	w19, LBB0_4
; %bb.1:
Lloh2:
	adrp	x20, _static_mutex@GOTPAGE
Lloh3:
	ldr	x20, [x20, _static_mutex@GOTPAGEOFF]
Lloh4:
	adrp	x21, _ts_lengthy@GOTPAGE
Lloh5:
	ldr	x21, [x21, _ts_lengthy@GOTPAGEOFF]
Lloh6:
	adrp	x22, _global_x@GOTPAGE
Lloh7:
	ldr	x22, [x22, _global_x@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_mutex_lock
	bl	_PTHREAD_REQUIRE
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
	mov	x0, x20
	bl	_pthread_mutex_unlock
	bl	_PTHREAD_REQUIRE
	subs	x19, x19, #1
	b.ne	LBB0_2
; %bb.3:
	mov	x0, #-1
	b	LBB0_5
LBB0_4:
	sub	x0, x19, #1
LBB0_5:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"2: Second thread (%p). Count is %ld\n"

	.comm	_static_mutex,4,2               ; @static_mutex
	.comm	_ts_lengthy,4,2                 ; @ts_lengthy
	.comm	_global_x,4,2                   ; @global_x
	.no_dead_strip	_mutex3_threadfunc
.subsections_via_symbols
