	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_sdma_errors
_handle_sdma_errors:                    ## @handle_sdma_errors
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ipath_debug@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	___IPATH_DBG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	%esi, %r14d
	movq	_INFINIPATH_E_SDMAERRS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	%esi, %ecx
	leaq	-176(%rbp), %r15
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$128, %edx
	callq	_ipath_decode_err
	movslq	%r14d, %rsi
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rdx
	callq	_ipath_dbg
	movl	(%rbx), %eax
LBB0_2:
	movq	___IPATH_VERBDBG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	8(%r13), %rax
	movl	12(%rax), %esi
	movq	%r13, %rdi
	callq	_ipath_read_kreg64
	movq	%rax, %r14
	movq	8(%r13), %rax
	movl	8(%rax), %esi
	movq	%r13, %rdi
	callq	_ipath_read_kreg64
	movq	%rax, %r15
	movq	8(%r13), %rax
	movl	4(%rax), %esi
	movq	%r13, %rdi
	callq	_ipath_read_kreg64
	movq	%rax, %r12
	movq	8(%r13), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ipath_read_kreg64
	movq	_VERBOSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%r12, %r8
	movq	%rax, %r9
	callq	_ipath_cdbg
LBB0_4:
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	_IPATH_SDMA_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r13), %rbx
	movq	%rbx, %rsi
	callq	___set_bit
	movq	_IPATH_SDMA_ABORTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_ipath_cancel_sends
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ipath_debug,4,2                ## @ipath_debug
	.comm	___IPATH_DBG,4,2                ## @__IPATH_DBG
	.comm	_INFINIPATH_E_SDMAERRS,4,2      ## @INFINIPATH_E_SDMAERRS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"errors %lx (%s)\n"

	.comm	___IPATH_VERBDBG,4,2            ## @__IPATH_VERBDBG
	.comm	_VERBOSE,4,2                    ## @VERBOSE
L_.str.1:                               ## @.str.1
	.asciz	"sdma tl 0x%lx hd 0x%lx status 0x%lx lengen 0x%lx\n"

	.comm	_IPATH_SDMA_DISABLED,4,2        ## @IPATH_SDMA_DISABLED
	.comm	_IPATH_SDMA_ABORTING,4,2        ## @IPATH_SDMA_ABORTING
	.no_dead_strip	_handle_sdma_errors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_sdma_errors
_handle_sdma_errors:                    ; @handle_sdma_errors
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x21, _ipath_debug@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ipath_debug@GOTPAGEOFF]
	stur	x8, [x29, #-40]
	ldr	w8, [x21]
Lloh5:
	adrp	x9, ___IPATH_DBG@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___IPATH_DBG@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x20, x1
Lloh8:
	adrp	x8, _INFINIPATH_E_SDMAERRS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _INFINIPATH_E_SDMAERRS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w3, w8, w1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #128
	bl	_ipath_decode_err
	sxtw	x1, w20
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #8
	bl	_ipath_dbg
	ldr	w8, [x21]
LBB0_2:
Lloh13:
	adrp	x9, ___IPATH_VERBDBG@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___IPATH_VERBDBG@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #12]
	mov	x0, x19
	bl	_ipath_read_kreg64
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_ipath_read_kreg64
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_ipath_read_kreg64
	mov	x22, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ipath_read_kreg64
	mov	x5, x0
Lloh16:
	adrp	x8, _VERBOSE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VERBOSE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x21
	mov	x4, x22
	bl	_ipath_cdbg
LBB0_4:
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh21:
	adrp	x8, _IPATH_SDMA_DISABLED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IPATH_SDMA_DISABLED@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	add	x20, x19, #4
	mov	x1, x20
	bl	___set_bit
Lloh24:
	adrp	x8, _IPATH_SDMA_ABORTING@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IPATH_SDMA_ABORTING@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	mov	x20, x0
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	cbnz	w20, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_ipath_cancel_sends
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ipath_debug,4,2                ; @ipath_debug
	.comm	___IPATH_DBG,4,2                ; @__IPATH_DBG
	.comm	_INFINIPATH_E_SDMAERRS,4,2      ; @INFINIPATH_E_SDMAERRS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"errors %lx (%s)\n"

	.comm	___IPATH_VERBDBG,4,2            ; @__IPATH_VERBDBG
	.comm	_VERBOSE,4,2                    ; @VERBOSE
l_.str.1:                               ; @.str.1
	.asciz	"sdma tl 0x%lx hd 0x%lx status 0x%lx lengen 0x%lx\n"

	.comm	_IPATH_SDMA_DISABLED,4,2        ; @IPATH_SDMA_DISABLED
	.comm	_IPATH_SDMA_ABORTING,4,2        ; @IPATH_SDMA_ABORTING
	.no_dead_strip	_handle_sdma_errors
.subsections_via_symbols
