	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_fence_wait_any_timeout     ## -- Begin function dma_fence_wait_any_timeout
	.p2align	4, 0x90
_dma_fence_wait_any_timeout:            ## @dma_fence_wait_any_timeout
	.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	%r8, %r12
	movq	%rcx, %r13
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	testq	%rdi, %rdi
	sete	%al
	testl	%esi, %esi
	sete	%cl
	testq	%r13, %r13
	sets	%dl
	orb	%al, %cl
	orb	%dl, %cl
	movzbl	%cl, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subq	(%rax), %r13
	jmp	LBB0_33
LBB0_2:
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	testq	%r13, %r13
	je	LBB0_18
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_22
## %bb.4:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.5:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%r15,8), %rdi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx,%r15,8)
	movq	_dma_fence_default_wait_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rsi
	callq	_dma_fence_add_callback
	testq	%rax, %rax
	jne	LBB0_24
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	addq	$8, %r12
	cmpq	%r15, %rbx
	jne	LBB0_6
LBB0_8:
	testq	%r13, %r13
	jle	LBB0_28
## %bb.9:
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %r12
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	testq	%r13, %r13
	jle	LBB0_29
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rax
	testl	%ecx, %ecx
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	(%rax), %edi
	callq	_set_current_state
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_dma_fence_test_signaled_any
	testq	%rax, %rax
	jne	LBB0_29
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r13, %rdi
	callq	_schedule_timeout
	movq	%rax, %r13
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	testq	%r13, %r13
	jle	LBB0_10
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	testq	%rax, %rax
	je	LBB0_10
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	xorl	%r13d, %r13d
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	subq	(%rax), %r13
	jmp	LBB0_10
LBB0_18:
	testl	%ebx, %ebx
	je	LBB0_23
## %bb.19:
	movl	%ebx, %r15d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rbx,8), %rdi
	callq	_dma_fence_is_signaled
	testq	%rax, %rax
	jne	LBB0_26
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_20
	jmp	LBB0_33
LBB0_22:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subq	(%rax), %r13
	jmp	LBB0_32
LBB0_23:
	xorl	%r13d, %r13d
	jmp	LBB0_33
LBB0_24:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_34
## %bb.25:
	movl	%r15d, (%rax)
LBB0_34:
	movl	%r15d, %ebx
	testl	%ebx, %ebx
	jne	LBB0_30
	jmp	LBB0_32
LBB0_26:
	movl	$1, %r13d
	testq	%r12, %r12
	je	LBB0_33
## %bb.27:
	movl	%ebx, (%r12)
	jmp	LBB0_33
LBB0_28:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_29:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___set_current_state
	testl	%ebx, %ebx
	je	LBB0_32
LBB0_30:
	movl	%ebx, %ebx
	shlq	$3, %rbx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	addq	$-8, %r15
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movq	-8(%r14,%rbx), %rdi
	leaq	(%r15,%rbx), %rsi
	callq	_dma_fence_remove_callback
	addq	$-8, %rbx
	jne	LBB0_31
LBB0_32:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
LBB0_33:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,8,3                     ## @ENOMEM
	.comm	_current,4,2                    ## @current
	.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	_ERESTARTSYS,8,3                ## @ERESTARTSYS
	.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_wait_any_timeout     ; -- Begin function dma_fence_wait_any_timeout
	.p2align	2
_dma_fence_wait_any_timeout:            ; @dma_fence_wait_any_timeout
	.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	x22, x4
	mov	x19, x3
	mov	x24, x2
	mov	x23, x1
	mov	x20, x0
	cmp	x0, #0
	ccmp	w1, #0, #4, ne
	ccmp	x3, #0, #8, ne
	cset	w0, lt
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_29
LBB0_2:
	cbz	x19, LBB0_16
; %bb.3:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x23
	mov	w1, #8
	bl	_kcalloc
	mov	x25, x0
	cbz	x0, LBB0_22
; %bb.4:
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
	cbz	w23, LBB0_8
; %bb.5:
	mov	x26, #0
Lloh6:
	adrp	x27, _current@GOTPAGE
Lloh7:
	ldr	x27, [x27, _current@GOTPAGEOFF]
Lloh8:
	adrp	x28, _dma_fence_default_wait_cb@GOTPAGE
Lloh9:
	ldr	x28, [x28, _dma_fence_default_wait_cb@GOTPAGEOFF]
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
	mov	w21, w23
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, x26, lsl #3]
	ldr	w8, [x27]
	str	w8, [x25, #4]
	ldr	w2, [x28]
	mov	x1, x25
	bl	_dma_fence_add_callback
	cbnz	x0, LBB0_23
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x26, x26, #1
	add	x25, x25, #8
	cmp	x21, x26
	b.ne	LBB0_6
LBB0_8:
	cmp	x19, #1
	b.lt	LBB0_21
; %bb.9:
Lloh10:
	adrp	x25, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh11:
	ldr	x25, [x25, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh12:
	adrp	x26, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh13:
	ldr	x26, [x26, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
Lloh14:
	adrp	x27, _current@GOTPAGE
Lloh15:
	ldr	x27, [x27, _current@GOTPAGEOFF]
Lloh16:
	adrp	x28, _ERESTARTSYS@GOTPAGE
Lloh17:
	ldr	x28, [x28, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	cmp	x19, #0
	b.le	LBB0_21
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	cmp	w24, #0
	csel	x8, x25, x26, ne
	ldr	w0, [x8]
	bl	_set_current_state
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	bl	_dma_fence_test_signaled_any
	cbnz	x0, LBB0_21
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	bl	_schedule_timeout
	mov	x19, x0
	cbz	w24, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	x19, #1
	b.lt	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x27]
	bl	_signal_pending
	cbz	x0, LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x28]
	neg	x19, x8
	b	LBB0_10
LBB0_16:
	mov	x19, #0
	cbz	w23, LBB0_29
; %bb.17:
	mov	w21, w23
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, x19, lsl #3]
	bl	_dma_fence_is_signaled
	cbnz	x0, LBB0_30
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x19, x19, #1
	cmp	x21, x19
	b.ne	LBB0_18
; %bb.20:
	mov	x19, #0
	b	LBB0_29
LBB0_21:
Lloh18:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	___set_current_state
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
	cbnz	w23, LBB0_26
	b	LBB0_28
LBB0_22:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_28
LBB0_23:
	cbz	x22, LBB0_25
; %bb.24:
	str	w26, [x22]
LBB0_25:
	mov	x23, x26
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
	cbz	w23, LBB0_28
LBB0_26:
	mov	w8, w23
	lsl	x21, x8, #3
	sub	x20, x20, #8
	sub	x22, x25, #8
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, x21]
	add	x1, x22, x21
	bl	_dma_fence_remove_callback
	subs	x21, x21, #8
	b.ne	LBB0_27
LBB0_28:
	mov	x0, x25
	bl	_kfree
LBB0_29:
	mov	x0, x19
	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_30:
	cbz	x22, LBB0_32
; %bb.31:
	str	w19, [x22]
LBB0_32:
	mov	w19, #1
	b	LBB0_29
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,8,3                     ; @ENOMEM
	.comm	_current,4,2                    ; @current
	.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	_ERESTARTSYS,8,3                ; @ERESTARTSYS
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
.subsections_via_symbols
