	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmbus_onoffer_rescind
_vmbus_onoffer_rescind:                 ## @vmbus_onoffer_rescind
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_trace_vmbus_onoffer_rescind
	movq	_vmbus_connection@GOTPCREL(%rip), %rbx
	addq	$4, %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_msleep
	jmp	LBB0_2
LBB0_3:
	movq	_vmbus_connection@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	(%r14), %edi
	callq	_relid2channel
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_mutex_unlock
	testq	%rbx, %rbx
	je	LBB0_20
## %bb.4:
	movq	%rbx, %rdi
	callq	_is_hvsock_channel
	movb	$1, %r15b
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_is_sub_channel
	testq	%rax, %rax
	setne	%r15b
LBB0_6:
	movq	%rbx, %rdi
	callq	_vmbus_reset_channel_cb
	movq	%rbx, %rdi
	callq	_vmbus_rescind_cleanup
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	40(%rbx), %edi
	callq	_READ_ONCE
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, %edi
	callq	_msleep
	jmp	LBB0_8
LBB0_9:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.10:
	movq	32(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	*%rax
	jmp	LBB0_19
LBB0_12:
	callq	_get_device
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%rax, %r14
	movq	24(%rbx), %rdi
	callq	_vmbus_device_unregister
	movq	%r14, %rdi
	callq	_put_device
LBB0_14:
	cmpq	$0, 16(%rbx)
	je	LBB0_19
## %bb.15:
	movq	_vmbus_connection@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	_CHANNEL_OPEN_STATE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.16:
	movq	%rbx, %rdi
	callq	_hv_process_channel_removal
	jmp	LBB0_18
LBB0_17:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_complete
LBB0_18:
	movq	_vmbus_connection@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_19:
	testb	%r15b, %r15b
	je	LBB0_20
## %bb.21:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_check_ready_for_suspend_event  ## TAILCALL
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vmbus_connection,8,2           ## @vmbus_connection
	.comm	_CHANNEL_OPEN_STATE,8,3         ## @CHANNEL_OPEN_STATE
	.no_dead_strip	_vmbus_onoffer_rescind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmbus_onoffer_rescind
_vmbus_onoffer_rescind:                 ; @vmbus_onoffer_rescind
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_trace_vmbus_onoffer_rescind
Lloh0:
	adrp	x8, _vmbus_connection@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vmbus_connection@GOTPAGEOFF]
	add	x20, x8, #4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_atomic_read
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	_msleep
	b	LBB0_1
LBB0_3:
Lloh2:
	adrp	x20, _vmbus_connection@GOTPAGE
Lloh3:
	ldr	x20, [x20, _vmbus_connection@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	ldr	w0, [x19]
	bl	_relid2channel
	mov	x19, x0
	mov	x0, x20
	bl	_mutex_unlock
	cbz	x19, LBB0_13
; %bb.4:
	mov	x0, x19
	bl	_is_hvsock_channel
	cbz	x0, LBB0_6
; %bb.5:
	mov	w21, #1
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_is_sub_channel
	cmp	x0, #0
	cset	w21, ne
LBB0_7:
	mov	x0, x19
	bl	_vmbus_reset_channel_cb
	mov	x0, x19
	bl	_vmbus_rescind_cleanup
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #40]
	bl	_READ_ONCE
	cbnz	w0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w0, #1
	bl	_msleep
	b	LBB0_8
LBB0_10:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_16
; %bb.11:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_14
; %bb.12:
	mov	x0, x19
	blr	x8
	tbnz	w21, #0, LBB0_22
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	_get_device
	cbz	x0, LBB0_16
; %bb.15:
	mov	x20, x0
	ldr	x0, [x19, #24]
	bl	_vmbus_device_unregister
	mov	x0, x20
	bl	_put_device
LBB0_16:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_21
; %bb.17:
Lloh4:
	adrp	x0, _vmbus_connection@GOTPAGE
Lloh5:
	ldr	x0, [x0, _vmbus_connection@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _CHANNEL_OPEN_STATE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CHANNEL_OPEN_STATE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_hv_process_channel_removal
	b	LBB0_20
LBB0_19:
	add	x0, x19, #8
	bl	_complete
LBB0_20:
Lloh9:
	adrp	x0, _vmbus_connection@GOTPAGE
Lloh10:
	ldr	x0, [x0, _vmbus_connection@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_21:
	cbz	w21, LBB0_13
LBB0_22:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_check_ready_for_suspend_event
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_vmbus_connection,8,2           ; @vmbus_connection
	.comm	_CHANNEL_OPEN_STATE,8,3         ; @CHANNEL_OPEN_STATE
	.no_dead_strip	_vmbus_onoffer_rescind
.subsections_via_symbols
