	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perf_sync_test
_perf_sync_test:                        ## @perf_sync_test
	.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
	movq	%rdi, %rbx
	movq	24(%rdi), %r13
	movq	_use_dma@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_6
## %bb.1:
	movl	16(%rbx), %r14d
	leaq	12(%rbx), %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	leaq	8(%r13), %rdi
	callq	_atomic_read
	movq	%rax, %rsi
	shrq	$63, %rsi
	jmp	LBB0_4
LBB0_2:
	movl	$1, %esi
LBB0_4:
	movl	%r14d, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_wait_event
	leaq	8(%r13), %rdi
	callq	_atomic_read
	testq	%rax, %rax
	js	LBB0_5
LBB0_6:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_ktime_sub
	movl	%eax, (%rbx)
	movq	(%r13), %rdi
	movl	4(%rbx), %ecx
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	(%r13), %r15
	movl	(%rbx), %edi
	movl	8(%rbx), %r12d
	callq	_ktime_to_us
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
	movq	(%r13), %r15
	movl	8(%rbx), %r12d
	movl	(%rbx), %edi
	movl	4(%rbx), %ebx
	callq	_ktime_to_us
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_div64_u64
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
	jmp	LBB0_7
LBB0_5:
	movq	_EINTR@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_use_dma,4,2                    ## @use_dma
	.comm	_EINTR,4,2                      ## @EINTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d: copied %llu bytes\n"

L_.str.1:                               ## @.str.1
	.asciz	"%d: lasted %llu usecs\n"

L_.str.2:                               ## @.str.2
	.asciz	"%d: %llu MBytes/s\n"

	.no_dead_strip	_perf_sync_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perf_sync_test
_perf_sync_test:                        ; @perf_sync_test
	.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
	mov	x19, x0
	ldr	x22, [x0, #24]
Lloh0:
	adrp	x8, _use_dma@GOTPAGE
Lloh1:
	ldr	x8, [x8, _use_dma@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	w20, [x19, #16]
	add	x0, x19, #12
	bl	_atomic_read
	cbz	x0, LBB0_3
; %bb.2:
	add	x0, x22, #8
	bl	_atomic_read
	lsr	x1, x0, #63
	b	LBB0_4
LBB0_3:
	mov	w1, #1
LBB0_4:
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_wait_event
	add	x0, x22, #8
	bl	_atomic_read
	tbnz	x0, #63, LBB0_6
LBB0_5:
	bl	_ktime_get
	ldr	w1, [x19]
	bl	_ktime_sub
	str	w0, [x19]
	ldr	x0, [x22]
	ldp	w3, w2, [x19, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x20, [x22]
	ldr	w21, [x19, #8]
	ldr	w0, [x19]
	bl	_ktime_to_us
	mov	x3, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
	ldr	x20, [x22]
	ldp	w22, w21, [x19, #4]
	ldr	w0, [x19]
	bl	_ktime_to_us
	mov	x1, x0
	mov	x0, x22
	bl	_div64_u64
	mov	x3, x0
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _EINTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_use_dma,4,2                    ; @use_dma
	.comm	_EINTR,4,2                      ; @EINTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d: copied %llu bytes\n"

l_.str.1:                               ; @.str.1
	.asciz	"%d: lasted %llu usecs\n"

l_.str.2:                               ; @.str.2
	.asciz	"%d: %llu MBytes/s\n"

	.no_dead_strip	_perf_sync_test
.subsections_via_symbols
