	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_sdma                     ## -- Begin function setup_sdma
	.p2align	4, 0x90
_setup_sdma:                            ## @setup_sdma
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -56(%rbp)
	movq	$0, -64(%rbp)
	callq	_alloc_sdma
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	cmpl	$0, 112(%r12)
	je	LBB0_2
## %bb.3:
	movq	_IPATH_SDMA_ABORT_ABORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	40(%r12), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%eax, 40(%r12)
	movl	$0, (%r12)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 72(%r12)
	movups	%xmm0, 88(%r12)
	movq	$0, 104(%r12)
	movq	48(%r12), %rax
	movl	32(%rax), %esi
	movl	4(%r12), %edx
	movq	%r12, %rdi
	callq	_ipath_write_kreg
	movl	$262144, %edx                   ## imm = 0x40000
	orl	8(%r12), %edx
	movq	48(%r12), %rax
	movl	28(%rax), %esi
	movq	%r12, %rdi
	callq	_ipath_write_kreg
	movq	48(%r12), %rax
	movl	24(%rax), %esi
	movl	(%r12), %edx
	movq	%r12, %rdi
	callq	_ipath_write_kreg
	movq	48(%r12), %rax
	movl	20(%rax), %esi
	movl	12(%r12), %edx
	movq	%r12, %rdi
	callq	_ipath_write_kreg
	movl	20(%r12), %r13d
	movl	28(%r12), %ebx
	addl	16(%r12), %r13d
	addl	24(%r12), %ebx
	movl	%r13d, %edx
	subl	%ebx, %edx
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	callq	_ipath_chg_pioavailkernel
	movl	$0, %r15d
	movl	$0, %edx
	cmpl	%ebx, %r13d
	jbe	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r15d
	shrl	$6, %r15d
	xorl	%edi, %edi
	cmpl	$192, %ebx
	setae	%dil
	callq	_BUG_ON
	movl	$1, %eax
	movl	%ebx, %ecx
	shlq	%cl, %rax
	orl	%eax, -64(%rbp,%r15,4)
	incl	%ebx
	cmpl	%r13d, %ebx
	jb	LBB0_4
## %bb.5:
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %r15d
	movl	-56(%rbp), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
LBB0_6:
	movq	48(%r12), %rax
	movl	16(%rax), %esi
	movq	%r12, %rdi
	callq	_ipath_write_kreg
	movq	48(%r12), %rax
	movl	12(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_ipath_write_kreg
	movq	48(%r12), %rax
	movl	8(%rax), %esi
	movq	%r12, %rdi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	callq	_ipath_write_kreg
	leaq	68(%r12), %rdi
	callq	_INIT_LIST_HEAD
	leaq	64(%r12), %rdi
	callq	_INIT_LIST_HEAD
	leaq	60(%r12), %rdi
	movq	_sdma_notify_task@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_tasklet_init
	leaq	56(%r12), %rdi
	movq	_sdma_abort_task@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_tasklet_init
	leaq	36(%r12), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_INFINIPATH_S_SDMAINTENABLE@GOTPCREL(%rip), %rax
	movl	32(%r12), %edx
	orl	(%rax), %edx
	movl	%edx, 32(%r12)
	movq	48(%r12), %rax
	movl	4(%rax), %esi
	movq	%r12, %rdi
	callq	_ipath_write_kreg
	movq	48(%r12), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ipath_read_kreg64
	movq	_IPATH_SDMA_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	___set_bit
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_ipath_dev_err
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SendDMA memory not allocated\n"

	.comm	_IPATH_SDMA_ABORT_ABORTED,4,2   ## @IPATH_SDMA_ABORT_ABORTED
	.comm	_sdma_notify_task,4,2           ## @sdma_notify_task
	.comm	_sdma_abort_task,4,2            ## @sdma_abort_task
	.comm	_INFINIPATH_S_SDMAINTENABLE,4,2 ## @INFINIPATH_S_SDMAINTENABLE
	.comm	_IPATH_SDMA_RUNNING,4,2         ## @IPATH_SDMA_RUNNING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_sdma                     ; -- Begin function setup_sdma
	.p2align	2
_setup_sdma:                            ; @setup_sdma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	str	wzr, [sp, #16]
	str	xzr, [sp, #8]
	bl	_alloc_sdma
	mov	x19, x0
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	w8, [x20, #112]
	cbz	w8, LBB0_7
; %bb.2:
Lloh3:
	adrp	x8, _IPATH_SDMA_ABORT_ABORTED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPATH_SDMA_ABORT_ABORTED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x21, x20
	str	w8, [x21, #40]!
	str	wzr, [x20]
	movi.2d	v0, #0000000000000000
	stur	q0, [x20, #72]
	stur	q0, [x20, #88]
	str	xzr, [x20, #104]
	ldr	x8, [x20, #48]
	ldr	w1, [x8, #32]
	ldr	w2, [x20, #4]
	mov	x0, x20
	bl	_ipath_write_kreg
	ldr	w8, [x20, #8]
	orr	w2, w8, #0x40000
	ldr	x8, [x20, #48]
	ldr	w1, [x8, #28]
	mov	x0, x20
	bl	_ipath_write_kreg
	ldr	x8, [x20, #48]
	ldr	w1, [x8, #24]
	ldr	w2, [x20]
	mov	x0, x20
	bl	_ipath_write_kreg
	ldr	x8, [x20, #48]
	ldr	w1, [x8, #20]
	ldr	w2, [x20, #12]
	mov	x0, x20
	bl	_ipath_write_kreg
	ldp	w8, w9, [x20, #16]
	add	w25, w9, w8
	ldp	w8, w9, [x20, #24]
	add	w22, w9, w8
	subs	w2, w25, w22
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	bl	_ipath_chg_pioavailkernel
	mov	w23, #0
	mov	w24, #0
	mov	w2, #0
	cmp	w25, w22
	b.ls	LBB0_6
; %bb.3:
	mov	w23, #1
	add	x24, sp, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w26, w22, #6
	cmp	w22, #191
	cset	w0, hi
	bl	_BUG_ON
	lsl	x8, x26, #2
	ldr	w9, [x24, x8]
	lsl	x10, x23, x22
	orr	w9, w9, w10
	str	w9, [x24, x8]
	add	w22, w22, #1
	cmp	w22, w25
	b.lo	LBB0_4
; %bb.5:
	ldp	w2, w24, [sp, #8]
	ldr	w23, [sp, #16]
LBB0_6:
	ldr	x8, [x20, #48]
	ldr	w1, [x8, #16]
	mov	x0, x20
	bl	_ipath_write_kreg
	ldr	x8, [x20, #48]
	ldr	w1, [x8, #12]
	mov	x0, x20
	mov	x2, x24
	bl	_ipath_write_kreg
	ldr	x8, [x20, #48]
	ldr	w1, [x8, #8]
	mov	x0, x20
	mov	x2, x23
	bl	_ipath_write_kreg
	add	x0, x20, #68
	bl	_INIT_LIST_HEAD
	add	x0, x20, #64
	bl	_INIT_LIST_HEAD
	add	x0, x20, #60
Lloh6:
	adrp	x8, _sdma_notify_task@GOTPAGE
Lloh7:
	ldr	x8, [x8, _sdma_notify_task@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_tasklet_init
	add	x0, x20, #56
Lloh9:
	adrp	x8, _sdma_abort_task@GOTPAGE
Lloh10:
	ldr	x8, [x8, _sdma_abort_task@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_tasklet_init
	add	x22, x20, #36
	mov	x0, x22
	bl	_spin_lock_irqsave
Lloh12:
	adrp	x8, _INFINIPATH_S_SDMAINTENABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INFINIPATH_S_SDMAINTENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x20, #32]
	orr	w2, w9, w8
	str	w2, [x20, #32]
	ldr	x8, [x20, #48]
	ldr	w1, [x8, #4]
	mov	x0, x20
	bl	_ipath_write_kreg
	ldr	x8, [x20, #48]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ipath_read_kreg64
Lloh15:
	adrp	x8, _IPATH_SDMA_RUNNING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IPATH_SDMA_RUNNING@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x21
	bl	___set_bit
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	b	LBB0_8
LBB0_7:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ipath_dev_err
LBB0_8:
	ldr	x8, [sp, #24]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	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
	add	sp, sp, #112
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SendDMA memory not allocated\n"

	.comm	_IPATH_SDMA_ABORT_ABORTED,4,2   ; @IPATH_SDMA_ABORT_ABORTED
	.comm	_sdma_notify_task,4,2           ; @sdma_notify_task
	.comm	_sdma_abort_task,4,2            ; @sdma_abort_task
	.comm	_INFINIPATH_S_SDMAINTENABLE,4,2 ; @INFINIPATH_S_SDMAINTENABLE
	.comm	_IPATH_SDMA_RUNNING,4,2         ; @IPATH_SDMA_RUNNING
.subsections_via_symbols
