	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function epoch_testcase1
_epoch_testcase1:                       ## @epoch_testcase1
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ticks@GOTPCREL(%rip), %rax
	movl	(%rdi), %esi
	testb	$1, %sil
	jne	LBB0_1
## %bb.2:
	movq	_mutexB@GOTPCREL(%rip), %rbx
	jmp	LBB0_3
LBB0_1:
	movq	_mutexA@GOTPCREL(%rip), %rbx
LBB0_3:
	movl	(%rax), %eax
	movq	_iterations@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movl	%eax, %edx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.4:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_test_epoch@GOTPCREL(%rip), %r13
	leaq	-64(%rbp), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_epoch_enter_preempt
	movq	%rbx, %rdi
	callq	_mtx_lock
	incl	%r14d
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_epoch_exit_preempt
	movl	(%r13), %edi
	callq	_epoch_wait_preempt
	movl	(%r12), %ecx
	cmpl	%ecx, %r14d
	jl	LBB0_5
## %bb.6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	_ticks@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_7:
	subl	%eax, %edx
	leaq	L_.str(%rip), %rdi
	callq	_printf
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ticks,4,2                      ## @ticks
	.comm	_mutexA,4,2                     ## @mutexA
	.comm	_mutexB,4,2                     ## @mutexB
	.comm	_iterations,4,2                 ## @iterations
	.comm	_test_epoch,4,2                 ## @test_epoch
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test1: thread: %d took %d ticks to complete %d iterations\n"

	.no_dead_strip	_epoch_testcase1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function epoch_testcase1
_epoch_testcase1:                       ; @epoch_testcase1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x22, _ticks@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ticks@GOTPAGEOFF]
	ldr	w21, [x22]
	ldr	w1, [x0]
Lloh2:
	adrp	x8, _mutexA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mutexA@GOTPAGEOFF]
Lloh4:
	adrp	x9, _mutexB@GOTPAGE
Lloh5:
	ldr	x9, [x9, _mutexB@GOTPAGEOFF]
	tst	w1, #0x1
	csel	x20, x9, x8, eq
Lloh6:
	adrp	x23, _iterations@GOTPAGE
Lloh7:
	ldr	x23, [x23, _iterations@GOTPAGEOFF]
	ldr	w3, [x23]
	cmp	w3, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w24, #0
Lloh8:
	adrp	x25, _test_epoch@GOTPAGE
Lloh9:
	ldr	x25, [x25, _test_epoch@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	add	x1, sp, #8
	bl	_epoch_enter_preempt
	mov	x0, x20
	bl	_mtx_lock
	add	w24, w24, #1
	mov	x0, x20
	bl	_mtx_unlock
	ldr	w0, [x25]
	add	x1, sp, #8
	bl	_epoch_exit_preempt
	ldr	w0, [x25]
	bl	_epoch_wait_preempt
	ldr	w3, [x23]
	cmp	w24, w3
	b.lt	LBB0_2
; %bb.3:
	ldr	w1, [x19]
	ldr	w8, [x22]
	b	LBB0_5
LBB0_4:
	mov	x8, x21
LBB0_5:
	sub	w2, w8, w21
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ticks,4,2                      ; @ticks
	.comm	_mutexA,4,2                     ; @mutexA
	.comm	_mutexB,4,2                     ; @mutexB
	.comm	_iterations,4,2                 ; @iterations
	.comm	_test_epoch,4,2                 ; @test_epoch
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test1: thread: %d took %d ticks to complete %d iterations\n"

	.no_dead_strip	_epoch_testcase1
.subsections_via_symbols
