	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2o_iop_clear
_i2o_iop_clear:                         ## @i2o_iop_clear
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_I2O_TIMEOUT_MESSAGE_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2o_msg_get_wait
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	xorl	%eax, %eax
	callq	_i2o_iop_quiesce_all
	movq	_FOUR_WORD_MSG_SIZE@GOTPCREL(%rip), %rax
	movq	_SGL_OFFSET_0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movq	(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	_I2O_CMD_ADAPTER_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$24, %eax
	movq	_HOST_TID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	shll	$12, %edi
	orl	%eax, %edi
	movq	_ADAPTER_TID@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movq	(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$30, %edx
	callq	_i2o_msg_post_wait
	movl	%eax, %ebx
	movl	(%r14), %esi
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%ebx, %edx
	negl	%edx
	leaq	L_.str(%rip), %rdi
	callq	_osm_info
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_osm_debug
LBB0_4:
	xorl	%eax, %eax
	callq	_i2o_iop_enable_all
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2O_TIMEOUT_MESSAGE_GET,4,2    ## @I2O_TIMEOUT_MESSAGE_GET
	.comm	_FOUR_WORD_MSG_SIZE,4,2         ## @FOUR_WORD_MSG_SIZE
	.comm	_SGL_OFFSET_0,4,2               ## @SGL_OFFSET_0
	.comm	_I2O_CMD_ADAPTER_CLEAR,4,2      ## @I2O_CMD_ADAPTER_CLEAR
	.comm	_HOST_TID,4,2                   ## @HOST_TID
	.comm	_ADAPTER_TID,4,2                ## @ADAPTER_TID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Unable to clear (status=%#x).\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: Cleared.\n"

	.no_dead_strip	_i2o_iop_clear
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2o_iop_clear
_i2o_iop_clear:                         ; @i2o_iop_clear
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _I2O_TIMEOUT_MESSAGE_GET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2O_TIMEOUT_MESSAGE_GET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2o_msg_get_wait
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	bl	_i2o_iop_quiesce_all
Lloh3:
	adrp	x8, _FOUR_WORD_MSG_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FOUR_WORD_MSG_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _SGL_OFFSET_0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SGL_OFFSET_0@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_le32
	ldr	x8, [x20]
	str	x0, [x8]
Lloh9:
	adrp	x8, _I2O_CMD_ADAPTER_CLEAR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I2O_CMD_ADAPTER_CLEAR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _HOST_TID@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HOST_TID@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	lsl	w9, w9, #12
	orr	w8, w9, w8, lsl #24
Lloh15:
	adrp	x9, _ADAPTER_TID@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ADAPTER_TID@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_cpu_to_le32
	ldr	x8, [x20]
	str	x0, [x8, #8]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #30
	bl	_i2o_msg_post_wait
	mov	x20, x0
	ldr	w1, [x19]
	cbz	w0, LBB0_4
; %bb.3:
	neg	w2, w20
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_osm_info
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_osm_debug
LBB0_5:
	bl	_i2o_iop_enable_all
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_I2O_TIMEOUT_MESSAGE_GET,4,2    ; @I2O_TIMEOUT_MESSAGE_GET
	.comm	_FOUR_WORD_MSG_SIZE,4,2         ; @FOUR_WORD_MSG_SIZE
	.comm	_SGL_OFFSET_0,4,2               ; @SGL_OFFSET_0
	.comm	_I2O_CMD_ADAPTER_CLEAR,4,2      ; @I2O_CMD_ADAPTER_CLEAR
	.comm	_HOST_TID,4,2                   ; @HOST_TID
	.comm	_ADAPTER_TID,4,2                ; @ADAPTER_TID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Unable to clear (status=%#x).\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: Cleared.\n"

	.no_dead_strip	_i2o_iop_clear
.subsections_via_symbols
