	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbp2_logout_device
_sbp2_logout_device:                    ## @sbp2_logout_device
	.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
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	64(%rdi), %r14
	movq	40(%rdi), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	_SBP2_LOGOUT_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ORB_SET_FUNCTION
	movq	40(%rbx), %rcx
	movl	%eax, 28(%rcx)
	movq	56(%rbx), %rax
	movl	(%rax), %edi
	callq	_ORB_SET_LOGIN_ID
	movq	40(%rbx), %rcx
	orl	%eax, 28(%rcx)
	movl	$1, %edi
	callq	_ORB_SET_NOTIFY
	movq	40(%rbx), %rcx
	orl	%eax, 28(%rcx)
	movl	$0, 16(%rcx)
	movl	48(%rbx), %edi
	movq	(%r14), %rax
	movl	(%rax), %esi
	callq	_ORB_SET_STATUS_FIFO_HI
	movq	40(%rbx), %rcx
	movl	%eax, 24(%rcx)
	movl	48(%rbx), %edi
	callq	_ORB_SET_STATUS_FIFO_LO
	movq	40(%rbx), %rdi
	movl	%eax, 20(%rdi)
	movl	$4, %esi
	callq	_sbp2util_cpu_to_be32_buffer
	movq	(%r14), %rax
	movl	(%rax), %esi
	leaq	-96(%rbp), %r14
	movq	%r14, %rdi
	callq	_ORB_SET_NODE_ID
	movups	8(%rbx), %xmm0
	movups	24(%rbx), %xmm1
	movaps	%xmm1, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_sbp2util_cpu_to_be32_buffer
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	movq	%r14, %rdx
	movl	$8, %ecx
	callq	_hpsb_node_write
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sbp2util_access_timeout
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_SBP2_INFO
	xorl	%eax, %eax
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SBP2_LOGOUT_REQUEST,4,2        ## @SBP2_LOGOUT_REQUEST
	.comm	_HZ,4,2                         ## @HZ
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Logged out of SBP-2 device"

	.no_dead_strip	_sbp2_logout_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbp2_logout_device
_sbp2_logout_device:                    ; @sbp2_logout_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	x20, [x0, #64]
	ldr	x8, [x0, #40]
	stp	xzr, xzr, [x8]
Lloh3:
	adrp	x8, _SBP2_LOGOUT_REQUEST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SBP2_LOGOUT_REQUEST@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_ORB_SET_FUNCTION
	ldr	x8, [x19, #40]
	str	w0, [x8, #28]
	ldr	x8, [x19, #56]
	ldr	w0, [x8]
	bl	_ORB_SET_LOGIN_ID
	ldr	x8, [x19, #40]
	ldr	w9, [x8, #28]
	orr	w9, w9, w0
	str	w9, [x8, #28]
	mov	w0, #1
	bl	_ORB_SET_NOTIFY
	ldr	x8, [x19, #40]
	ldr	w9, [x8, #28]
	orr	w9, w9, w0
	str	w9, [x8, #28]
	str	wzr, [x8, #16]
	ldr	w0, [x19, #48]
	ldr	x8, [x20]
	ldr	w1, [x8]
	bl	_ORB_SET_STATUS_FIFO_HI
	ldr	x8, [x19, #40]
	str	w0, [x8, #24]
	ldr	w0, [x19, #48]
	bl	_ORB_SET_STATUS_FIFO_LO
	ldr	x8, [x19, #40]
	str	w0, [x8, #20]
	mov	x0, x8
	mov	w1, #4
	bl	_sbp2util_cpu_to_be32_buffer
	ldr	x8, [x20]
	ldr	w0, [x8]
	add	x8, sp, #8
	bl	_ORB_SET_NODE_ID
	ldur	q0, [x19, #8]
	ldur	q1, [x19, #24]
	stur	q0, [sp, #40]
	stur	q1, [sp, #56]
	add	x0, sp, #8
	mov	w1, #8
	bl	_sbp2util_cpu_to_be32_buffer
	ldp	w1, w0, [x19]
	add	x2, sp, #8
	mov	w3, #8
	bl	_hpsb_node_write
	cbnz	w0, LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _HZ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sbp2util_access_timeout
	cbz	x0, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SBP2_INFO
	mov	w0, #0
LBB0_4:
	ldur	x8, [x29, #-24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SBP2_LOGOUT_REQUEST,4,2        ; @SBP2_LOGOUT_REQUEST
	.comm	_HZ,4,2                         ; @HZ
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Logged out of SBP-2 device"

	.no_dead_strip	_sbp2_logout_device
.subsections_via_symbols
