	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2o_iop_reset
_i2o_iop_reset:                         ## @i2o_iop_reset
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	16(%rdi), %r13
	movq	32(%rdi), %r15
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_osm_debug
	movq	_I2O_TIMEOUT_MESSAGE_GET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_i2o_msg_get_wait
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.19:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	32(%r14), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	xorl	%eax, %eax
	callq	_i2o_iop_quiesce_all
	movq	_EIGHT_WORD_MSG_SIZE@GOTPCREL(%rip), %rax
	movq	_SGL_OFFSET_0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movq	24(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	_I2O_CMD_ADAPTER_RESET@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	24(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	_i2o_exec_driver@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%rbx)
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%rbx)
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movq	(%rbx), %rcx
	movq	%rax, (%rcx)
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movq	(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movl	24(%r14), %edi
	callq	_i2o_dma_low
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	(%rbx), %rcx
	movq	%rax, 16(%rcx)
	movl	24(%r14), %edi
	callq	_i2o_dma_high
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	(%rbx), %rcx
	movq	%rax, 24(%rcx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_i2o_msg_post
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	_I2O_TIMEOUT_RESET@GOTPCREL(%rip), %rcx
	movq	_HZ@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	%rcx, %rbx
	imulq	(%rcx), %r15
	movq	(%r12), %rdi
	addq	%rdi, %r15
	cmpl	$0, (%r13)
	jne	LBB0_5
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_schedule_timeout_uninterruptible
	cmpl	$0, (%r13)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rdi
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_3
LBB0_5:
	movl	(%r13), %eax
	cmpl	$129, %eax
	je	LBB0_8
## %bb.6:
	cmpl	$128, %eax
	jne	LBB0_16
## %bb.7:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_osm_warn
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_8:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_osm_debug
	movq	%rbx, %r13
	movq	(%rbx), %rsi
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_i2o_msg_get_wait
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r12), %rdi
	movq	%r15, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$1, %edi
	callq	_schedule_timeout_uninterruptible
	movq	(%r13), %rsi
	jmp	LBB0_9
LBB0_16:
	movl	(%r14), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_osm_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_17:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	xorl	%eax, %eax
	callq	_i2o_iop_enable_all
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_i2o_msg_nop
	movl	$0, 8(%r14)
	movq	%r14, %rdi
	callq	_i2o_status_get
	cmpl	$0, 4(%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jne	LBB0_15
## %bb.13:
	movl	(%rax), %eax
	movq	_ADAPTER_STATE_RESET@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
LBB0_15:
	movl	(%r14), %esi
	leaq	L_.str.5(%rip), %rdi
	callq	_osm_debug
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_20:
	movl	(%r14), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_osm_err
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_18
LBB0_14:
	movl	(%r14), %esi
	leaq	L_.str.4(%rip), %rdi
	callq	_osm_warn
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Resetting controller\n"

	.comm	_I2O_TIMEOUT_MESSAGE_GET,8,3    ## @I2O_TIMEOUT_MESSAGE_GET
	.comm	_EIGHT_WORD_MSG_SIZE,4,2        ## @EIGHT_WORD_MSG_SIZE
	.comm	_SGL_OFFSET_0,4,2               ## @SGL_OFFSET_0
	.comm	_I2O_CMD_ADAPTER_RESET,4,2      ## @I2O_CMD_ADAPTER_RESET
	.comm	_HOST_TID,4,2                   ## @HOST_TID
	.comm	_ADAPTER_TID,4,2                ## @ADAPTER_TID
	.comm	_i2o_exec_driver,4,2            ## @i2o_exec_driver
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_I2O_TIMEOUT_RESET,8,3          ## @I2O_TIMEOUT_RESET
	.comm	_HZ,8,3                         ## @HZ
L_.str.1:                               ## @.str.1
	.asciz	"%s: IOP reset rejected\n"

	.comm	_EPERM,4,2                      ## @EPERM
L_.str.2:                               ## @.str.2
	.asciz	"%s: Reset in progress, waiting for reboot...\n"

L_.str.3:                               ## @.str.3
	.asciz	"%s: IOP reset timeout.\n"

	.comm	_ADAPTER_STATE_RESET,4,2        ## @ADAPTER_STATE_RESET
L_.str.4:                               ## @.str.4
	.asciz	"%s: reset completed, but adapter not in RESET state.\n"

L_.str.5:                               ## @.str.5
	.asciz	"%s: reset completed.\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_i2o_iop_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2o_iop_reset
_i2o_iop_reset:                         ; @i2o_iop_reset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x21, [x0, #16]
	ldr	x22, [x0, #32]
	ldr	w1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_osm_debug
Lloh2:
	adrp	x8, _I2O_TIMEOUT_MESSAGE_GET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2O_TIMEOUT_MESSAGE_GET@GOTPAGEOFF]
Lloh4:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_i2o_msg_get_wait
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	ldr	x0, [x19, #32]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	bl	_i2o_iop_quiesce_all
Lloh5:
	adrp	x8, _EIGHT_WORD_MSG_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIGHT_WORD_MSG_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SGL_OFFSET_0@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SGL_OFFSET_0@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_le32
	ldr	x8, [x20, #24]
	str	x0, [x8]
Lloh11:
	adrp	x8, _I2O_CMD_ADAPTER_RESET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I2O_CMD_ADAPTER_RESET@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _HOST_TID@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HOST_TID@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	lsl	w9, w9, #12
	orr	w8, w9, w8, lsl #24
Lloh17:
	adrp	x9, _ADAPTER_TID@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ADAPTER_TID@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_cpu_to_le32
	ldr	x8, [x20, #24]
	str	x0, [x8, #8]
Lloh20:
	adrp	x8, _i2o_exec_driver@GOTPAGE
Lloh21:
	ldr	x8, [x8, _i2o_exec_driver@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [x20, #16]
	mov	w0, #0
	bl	_cpu_to_le32
	str	x0, [x20, #8]
	mov	w0, #0
	bl	_cpu_to_le32
	ldr	x8, [x20]
	str	x0, [x8]
	mov	w0, #0
	bl	_cpu_to_le32
	ldr	x8, [x20]
	str	x0, [x8, #8]
	ldr	w0, [x19, #24]
	bl	_i2o_dma_low
	bl	_cpu_to_le32
	ldr	x8, [x20]
	str	x0, [x8, #16]
	ldr	w0, [x19, #24]
	bl	_i2o_dma_high
	bl	_cpu_to_le32
	ldr	x8, [x20]
	str	x0, [x8, #24]
	mov	x0, x19
	mov	x1, x20
	bl	_i2o_msg_post
Lloh23:
	adrp	x23, _jiffies@GOTPAGE
Lloh24:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x0, [x23]
Lloh25:
	adrp	x24, _I2O_TIMEOUT_RESET@GOTPAGE
Lloh26:
	ldr	x24, [x24, _I2O_TIMEOUT_RESET@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh27:
	adrp	x9, _HZ@GOTPAGE
Lloh28:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	madd	x20, x9, x8, x0
	ldr	w8, [x21]
	cbnz	w8, LBB0_6
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	bl	_schedule_timeout_uninterruptible
	ldr	w8, [x21]
	cbnz	w8, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x23]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x20
	bl	_time_after
	cbz	x0, LBB0_3
LBB0_6:
	ldr	w8, [x21]
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.7:
	cmp	w8, #128
	b.ne	LBB0_13
; %bb.8:
	ldr	w1, [x19]
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_osm_warn
Lloh32:
	adrp	x8, _EPERM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_14
LBB0_9:
	ldr	w1, [x19]
Lloh34:
	adrp	x0, l_.str.2@PAGE
Lloh35:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_osm_debug
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x24]
	mov	x0, x19
	bl	_i2o_msg_get_wait
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x0, [x23]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w0, #1
	bl	_schedule_timeout_uninterruptible
	b	LBB0_10
LBB0_13:
	ldr	w1, [x19]
Lloh36:
	adrp	x0, l_.str.3@PAGE
Lloh37:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_osm_err
Lloh38:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_15:
	bl	_i2o_iop_enable_all
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	x0, x19
	mov	x1, x21
	bl	_i2o_msg_nop
	str	wzr, [x19, #8]
	mov	x0, x19
	bl	_i2o_status_get
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_18
; %bb.17:
	ldr	w8, [x22]
Lloh40:
	adrp	x9, _ADAPTER_STATE_RESET@GOTPAGE
Lloh41:
	ldr	x9, [x9, _ADAPTER_STATE_RESET@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_20
LBB0_18:
	ldr	w1, [x19]
Lloh43:
	adrp	x0, l_.str.5@PAGE
Lloh44:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_osm_debug
	mov	w19, #0
	b	LBB0_15
LBB0_19:
	ldr	w1, [x19]
Lloh45:
	adrp	x0, l_.str.3@PAGE
Lloh46:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_osm_err
	mov	x0, x21
	bl	_PTR_ERR
	mov	x19, x0
	b	LBB0_15
LBB0_20:
	ldr	w1, [x19]
Lloh47:
	adrp	x0, l_.str.4@PAGE
Lloh48:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_osm_warn
	mov	w19, #0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Resetting controller\n"

	.comm	_I2O_TIMEOUT_MESSAGE_GET,8,3    ; @I2O_TIMEOUT_MESSAGE_GET
	.comm	_EIGHT_WORD_MSG_SIZE,4,2        ; @EIGHT_WORD_MSG_SIZE
	.comm	_SGL_OFFSET_0,4,2               ; @SGL_OFFSET_0
	.comm	_I2O_CMD_ADAPTER_RESET,4,2      ; @I2O_CMD_ADAPTER_RESET
	.comm	_HOST_TID,4,2                   ; @HOST_TID
	.comm	_ADAPTER_TID,4,2                ; @ADAPTER_TID
	.comm	_i2o_exec_driver,4,2            ; @i2o_exec_driver
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_I2O_TIMEOUT_RESET,8,3          ; @I2O_TIMEOUT_RESET
	.comm	_HZ,8,3                         ; @HZ
l_.str.1:                               ; @.str.1
	.asciz	"%s: IOP reset rejected\n"

	.comm	_EPERM,4,2                      ; @EPERM
l_.str.2:                               ; @.str.2
	.asciz	"%s: Reset in progress, waiting for reboot...\n"

l_.str.3:                               ; @.str.3
	.asciz	"%s: IOP reset timeout.\n"

	.comm	_ADAPTER_STATE_RESET,4,2        ; @ADAPTER_STATE_RESET
l_.str.4:                               ; @.str.4
	.asciz	"%s: reset completed, but adapter not in RESET state.\n"

l_.str.5:                               ; @.str.5
	.asciz	"%s: reset completed.\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_i2o_iop_reset
.subsections_via_symbols
