	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbp2_update
_sbp2_update:                           ## @sbp2_update
	.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
	callq	_dev_get_drvdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_sbp2_reconnect_device
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movl	8(%rbx), %edi
	callq	_hpsb_node_entry_valid
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	callq	_sbp2_logout_device
	movq	%rbx, %rdi
	callq	_sbp2_login_device
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	8(%rbx), %edi
	callq	_hpsb_node_entry_valid
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_SBP2_ERR
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	callq	_sbp2_set_busy_timeout
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_sbp2_agent_reset
	movq	%rbx, %rdi
	callq	_sbp2_max_speed_and_size
	movq	_DID_BUS_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sbp2scsi_complete_all_commands
	movl	8(%rbx), %edi
	callq	_hpsb_node_entry_valid
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	addq	$4, %rdi
	movq	_SBP2LU_STATE_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_atomic_set
	movl	(%rbx), %edi
	callq	_scsi_unblock_requests
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to reconnect to sbp2 device!"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_DID_BUS_BUSY,4,2               ## @DID_BUS_BUSY
	.comm	_SBP2LU_STATE_RUNNING,4,2       ## @SBP2LU_STATE_RUNNING
	.no_dead_strip	_sbp2_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbp2_update
_sbp2_update:                           ; @sbp2_update
	.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
	bl	_dev_get_drvdata
	mov	x19, x0
	bl	_sbp2_reconnect_device
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w0, [x19, #8]
	bl	_hpsb_node_entry_valid
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_sbp2_logout_device
	mov	x0, x19
	bl	_sbp2_login_device
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_hpsb_node_entry_valid
	cbz	x0, LBB0_7
; %bb.4:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SBP2_ERR
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_sbp2_set_busy_timeout
	mov	x0, x19
	mov	w1, #1
	bl	_sbp2_agent_reset
	mov	x0, x19
	bl	_sbp2_max_speed_and_size
Lloh5:
	adrp	x8, _DID_BUS_BUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DID_BUS_BUSY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sbp2scsi_complete_all_commands
	ldr	w0, [x19, #8]
	bl	_hpsb_node_entry_valid
	cbz	x0, LBB0_7
; %bb.6:
	add	x0, x19, #4
Lloh8:
	adrp	x8, _SBP2LU_STATE_RUNNING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SBP2LU_STATE_RUNNING@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_atomic_set
	ldr	w0, [x19]
	bl	_scsi_unblock_requests
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to reconnect to sbp2 device!"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_DID_BUS_BUSY,4,2               ; @DID_BUS_BUSY
	.comm	_SBP2LU_STATE_RUNNING,4,2       ; @SBP2LU_STATE_RUNNING
	.no_dead_strip	_sbp2_update
.subsections_via_symbols
