	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_catas
_handle_catas:                          ## @handle_catas
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	24(%rdi), %rax
	movq	%rax, -32(%rbp)
	movq	_IB_EVENT_DEVICE_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	$0, -48(%rbp)
	movl	$0, (%rdi)
	leaq	-48(%rbp), %rdi
	callq	_ib_dispatch_event
	movq	16(%r15), %rdi
	callq	_readl
	movl	%eax, %edi
	callq	_swab32
	leaq	L_.str.5(%rip), %rsi
	leaq	L_.str.4(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_mthca_err
	cmpl	$0, 8(%r15)
	jle	LBB0_3
## %bb.1:
	leaq	L_.str.6(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rdi
	addq	%rbx, %rdi
	callq	_readl
	movl	%eax, %edi
	callq	_swab32
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_mthca_err
	incq	%rbx
	movslq	8(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movq	_catas_reset_disable@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	_catas_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	addq	$12, %r15
	movq	_catas_list@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_list_add
	movq	_catas_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_catas_work@GOTPCREL(%rip), %rsi
	callq	_queue_work
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_EVENT_DEVICE_FATAL,4,2      ## @IB_EVENT_DEVICE_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str.4:                               ## @.str.4
	.asciz	"unknown error"

L_.str.5:                               ## @.str.5
	.asciz	"Catastrophic error detected: %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"  buf[%02x]: %08x\n"

	.comm	_catas_reset_disable,8,3        ## @catas_reset_disable
	.comm	_catas_lock,4,2                 ## @catas_lock
	.comm	_catas_list,4,2                 ## @catas_list
	.comm	_catas_wq,4,2                   ## @catas_wq
	.comm	_catas_work,4,2                 ## @catas_work
	.no_dead_strip	_handle_catas
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_catas
_handle_catas:                          ; @handle_catas
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	add	x8, x0, #24
	str	x8, [sp, #40]
Lloh0:
	adrp	x8, _IB_EVENT_DEVICE_FATAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_EVENT_DEVICE_FATAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	str	xzr, [sp, #24]
	str	wzr, [x0]
	add	x0, sp, #24
	bl	_ib_dispatch_event
	ldr	x0, [x19, #16]
	bl	_readl
	bl	_swab32
Lloh3:
	adrp	x8, l_.str.4@PAGE
Lloh4:
	add	x8, x8, l_.str.4@PAGEOFF
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str.5@PAGE
Lloh6:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_mthca_err
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
Lloh7:
	adrp	x20, l_.str.6@PAGE
Lloh8:
	add	x20, x20, l_.str.6@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x0, x21, x8
	bl	_readl
	bl	_swab32
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp]
	mov	x0, x19
	mov	x1, x20
	bl	_mthca_err
	add	x21, x21, #1
	ldrsw	x8, [x19, #8]
	cmp	x21, x8
	b.lt	LBB0_2
LBB0_3:
Lloh9:
	adrp	x8, _catas_reset_disable@GOTPAGE
Lloh10:
	ldr	x8, [x8, _catas_reset_disable@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbnz	x8, LBB0_5
; %bb.4:
Lloh12:
	adrp	x20, _catas_lock@GOTPAGE
Lloh13:
	ldr	x20, [x20, _catas_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irqsave
	add	x0, x19, #12
Lloh14:
	adrp	x1, _catas_list@GOTPAGE
Lloh15:
	ldr	x1, [x1, _catas_list@GOTPAGEOFF]
	bl	_list_add
Lloh16:
	adrp	x8, _catas_wq@GOTPAGE
Lloh17:
	ldr	x8, [x8, _catas_wq@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, _catas_work@GOTPAGE
Lloh20:
	ldr	x1, [x1, _catas_work@GOTPAGEOFF]
	bl	_queue_work
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_EVENT_DEVICE_FATAL,4,2      ; @IB_EVENT_DEVICE_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str.4:                               ; @.str.4
	.asciz	"unknown error"

l_.str.5:                               ; @.str.5
	.asciz	"Catastrophic error detected: %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"  buf[%02x]: %08x\n"

	.comm	_catas_reset_disable,8,3        ; @catas_reset_disable
	.comm	_catas_lock,4,2                 ; @catas_lock
	.comm	_catas_list,4,2                 ; @catas_list
	.comm	_catas_wq,4,2                   ; @catas_wq
	.comm	_catas_work,4,2                 ; @catas_work
	.no_dead_strip	_handle_catas
.subsections_via_symbols
