	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_fence_default_wait         ## -- Begin function dma_fence_default_wait
	.p2align	4, 0x90
_dma_fence_default_wait:                ## @dma_fence_default_wait
	.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	%rdx, %r13
	testq	%rdx, %rdx
	movl	$1, %ebx
	cmovneq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_DMA_FENCE_FLAG_SIGNALED_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r14), %r12
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_27
## %bb.1:
	movl	(%r14), %edi
	callq	_spin_lock_irqsave
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.2:
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_26
LBB0_4:
	movq	_DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_and_set_bit
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_DMA_FENCE_FLAG_SIGNALED_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_26
## %bb.5:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_6
LBB0_9:
	testq	%r13, %r13
	je	LBB0_10
## %bb.11:
	movq	_dma_fence_default_wait_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	8(%r14), %rsi
	leaq	-56(%rbp), %rdi
	callq	_list_add
	movq	_DMA_FENCE_FLAG_SIGNALED_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_12
## %bb.13:
	movq	%r13, %rbx
	testq	%r13, %r13
	jle	LBB0_23
## %bb.14:
	movq	_DMA_FENCE_FLAG_SIGNALED_BIT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	(%rax), %edi
	callq	___set_current_state
	movl	(%r14), %edi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_schedule_timeout
	movq	%rax, %rbx
	movl	(%r14), %edi
	callq	_spin_lock_irqsave
	testl	%r15d, %r15d
	je	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	testq	%rbx, %rbx
	jle	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_15 Depth=1
	xorl	%ebx, %ebx
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	subq	(%rax), %rbx
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	(%r13), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_15 Depth=1
	testq	%rbx, %rbx
	jg	LBB0_15
	jmp	LBB0_23
LBB0_6:
	movq	16(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	callq	_trace_dma_fence_enable_signal
	movq	16(%r14), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_dma_fence_signal_locked
	jmp	LBB0_26
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_12:
	movq	%r13, %rbx
LBB0_23:
	leaq	-56(%rbp), %rdi
	callq	_list_empty
	testl	%eax, %eax
	jne	LBB0_25
## %bb.24:
	leaq	-56(%rbp), %rdi
	callq	_list_del
LBB0_25:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___set_current_state
LBB0_26:
	movl	(%r14), %edi
	callq	_spin_unlock_irqrestore
LBB0_27:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_FENCE_FLAG_SIGNALED_BIT,4,2 ## @DMA_FENCE_FLAG_SIGNALED_BIT
	.comm	_current,4,2                    ## @current
	.comm	_ERESTARTSYS,8,3                ## @ERESTARTSYS
	.comm	_DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,4,2 ## @DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT
	.comm	_dma_fence_default_wait_cb,4,2  ## @dma_fence_default_wait_cb
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_fence_default_wait         ; -- Begin function dma_fence_default_wait
	.p2align	2
_dma_fence_default_wait:                ; @dma_fence_default_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	cmp	x2, #0
	csinc	x20, x2, xzr, ne
Lloh0:
	adrp	x25, _DMA_FENCE_FLAG_SIGNALED_BIT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DMA_FENCE_FLAG_SIGNALED_BIT@GOTPAGEOFF]
	ldr	w0, [x25]
	add	x22, x19, #4
	mov	x1, x22
	bl	_test_bit
	cbnz	x0, LBB0_17
; %bb.1:
	ldr	w0, [x19]
	bl	_spin_lock_irqsave
	cbz	w21, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _current@GOTPAGE
Lloh3:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_signal_pending
	cbz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	neg	x20, x8
	b	LBB0_16
LBB0_4:
Lloh8:
	adrp	x8, _DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_and_set_bit
	mov	x24, x0
	ldr	w0, [x25]
	mov	x1, x22
	bl	_test_bit
	cbnz	x0, LBB0_16
; %bb.5:
	cbz	w24, LBB0_12
LBB0_6:
	cbz	x23, LBB0_15
; %bb.7:
Lloh11:
	adrp	x8, _dma_fence_default_wait_cb@GOTPAGE
Lloh12:
	ldr	x8, [x8, _dma_fence_default_wait_cb@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x24, _current@GOTPAGE
Lloh15:
	ldr	x24, [x24, _current@GOTPAGEOFF]
	ldr	w9, [x24]
	stp	w8, w9, [sp, #4]
	add	x1, x19, #8
	mov	x0, sp
	bl	_list_add
	ldr	w0, [x25]
	mov	x1, x22
	bl	_test_bit
	cmp	x0, #0
	ccmp	x23, #1, #8, eq
	b.ge	LBB0_18
; %bb.8:
	mov	x20, x23
LBB0_9:
	mov	x0, sp
	bl	_list_empty
	cbnz	w0, LBB0_11
; %bb.10:
	mov	x0, sp
	bl	_list_del
LBB0_11:
Lloh16:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	___set_current_state
	b	LBB0_16
LBB0_12:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.13:
	mov	x0, x19
	bl	_trace_dma_fence_enable_signal
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_6
; %bb.14:
	mov	x0, x19
	bl	_dma_fence_signal_locked
	b	LBB0_16
LBB0_15:
	mov	x20, #0
LBB0_16:
	ldr	w0, [x19]
	bl	_spin_unlock_irqrestore
LBB0_17:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_18:
Lloh19:
	adrp	x26, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh20:
	ldr	x26, [x26, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh21:
	adrp	x27, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh22:
	ldr	x27, [x27, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
	mov	x20, x23
Lloh23:
	adrp	x23, _ERESTARTSYS@GOTPAGE
Lloh24:
	ldr	x23, [x23, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	ldr	w0, [x25]
	mov	x1, x22
	bl	_test_bit
	cmp	x0, #0
	ccmp	x20, #0, #4, eq
	b.le	LBB0_9
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	cmp	w21, #0
	csel	x8, x26, x27, ne
	ldr	w0, [x8]
	bl	___set_current_state
	ldr	w0, [x19]
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_schedule_timeout
	mov	x20, x0
	ldr	w0, [x19]
	bl	_spin_lock_irqsave
	cbz	w21, LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	cmp	x20, #1
	b.lt	LBB0_19
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	w0, [x24]
	bl	_signal_pending
	cbz	x0, LBB0_19
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x8, [x23]
	neg	x20, x8
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_FENCE_FLAG_SIGNALED_BIT,4,2 ; @DMA_FENCE_FLAG_SIGNALED_BIT
	.comm	_current,4,2                    ; @current
	.comm	_ERESTARTSYS,8,3                ; @ERESTARTSYS
	.comm	_DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,4,2 ; @DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT
	.comm	_dma_fence_default_wait_cb,4,2  ; @dma_fence_default_wait_cb
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
.subsections_via_symbols
