	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_fence_add_callback         ## -- Begin function dma_fence_add_callback
	.p2align	4, 0x90
_dma_fence_add_callback:                ## @dma_fence_add_callback
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	testq	%rdi, %rdi
	sete	%al
	testq	%rdx, %rdx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	_DMA_FENCE_FLAG_SIGNALED_BIT@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	16(%r12), %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_INIT_LIST_HEAD
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%r12), %edi
	callq	_spin_lock_irqsave
	movq	_DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_and_set_bit
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_6
LBB0_10:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.12:
	negl	%ebx
	movq	%r14, %rdi
	callq	_INIT_LIST_HEAD
	jmp	LBB0_13
LBB0_6:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
LBB0_11:
	movq	%r15, 8(%r14)
	leaq	4(%r12), %rsi
	movq	%r14, %rdi
	callq	_list_add_tail
	xorl	%ebx, %ebx
LBB0_13:
	movl	(%r12), %edi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_14
LBB0_7:
	movq	8(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.8:
	movq	%r12, %rdi
	callq	_trace_dma_fence_enable_signal
	movq	8(%r12), %rax
	movq	%r12, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	%r12, %rdi
	callq	_dma_fence_signal_locked
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMA_FENCE_FLAG_SIGNALED_BIT,4,2 ## @DMA_FENCE_FLAG_SIGNALED_BIT
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,4,2 ## @DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_fence_add_callback         ; -- Begin function dma_fence_add_callback
	.p2align	2
_dma_fence_add_callback:                ; @dma_fence_add_callback
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	cmp	x0, #0
	ccmp	x2, #0, #4, ne
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh2:
	adrp	x24, _DMA_FENCE_FLAG_SIGNALED_BIT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DMA_FENCE_FLAG_SIGNALED_BIT@GOTPAGEOFF]
	ldr	w0, [x24]
	add	x22, x19, #16
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_INIT_LIST_HEAD
Lloh4:
	adrp	x8, _ENOENT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w0, [x19]
	bl	_spin_lock_irqsave
Lloh6:
	adrp	x8, _DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_and_set_bit
	mov	x23, x0
	ldr	w0, [x24]
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_9
LBB0_7:
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.8:
	neg	w21, w8
	mov	x0, x20
	bl	_INIT_LIST_HEAD
	b	LBB0_11
LBB0_9:
	cbz	w23, LBB0_12
LBB0_10:
	str	x21, [x20, #8]
	add	x1, x19, #4
	mov	x0, x20
	bl	_list_add_tail
	mov	w21, #0
LBB0_11:
	ldr	w0, [x19]
	bl	_spin_unlock_irqrestore
	b	LBB0_5
LBB0_12:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.13:
	mov	x0, x19
	bl	_trace_dma_fence_enable_signal
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_10
; %bb.14:
	mov	x0, x19
	bl	_dma_fence_signal_locked
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMA_FENCE_FLAG_SIGNALED_BIT,4,2 ; @DMA_FENCE_FLAG_SIGNALED_BIT
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,4,2 ; @DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT
.subsections_via_symbols
