	.file	"extr_channel_mgmt.c_vmbus_onoffer_rescind.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vmbus_onoffer_rescind, @function
vmbus_onoffer_rescind:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	lea	rbp, vmbus_connection[rip+4]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	call	trace_vmbus_onoffer_rescind@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, 1
	call	msleep@PLT
.L2:
	mov	rdi, rbp
	call	atomic_read@PLT
	test	rax, rax
	jne	.L3
	lea	rdi, vmbus_connection[rip]
	call	mutex_lock@PLT
	mov	edi, DWORD PTR [rbx]
	call	relid2channel@PLT
	lea	rdi, vmbus_connection[rip]
	mov	rbp, rax
	call	mutex_unlock@PLT
	test	rbp, rbp
	je	.L1
	mov	rdi, rbp
	mov	ebx, 1
	call	is_hvsock_channel@PLT
	test	rax, rax
	je	.L28
.L6:
	mov	rdi, rbp
	call	vmbus_reset_channel_cb@PLT
	mov	rdi, rbp
	call	vmbus_rescind_cleanup@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, 1
	call	msleep@PLT
.L7:
	mov	edi, DWORD PTR 40[rbp]
	call	READ_ONCE@PLT
	test	eax, eax
	je	.L8
	mov	rdi, QWORD PTR 24[rbp]
	test	rdi, rdi
	je	.L10
	mov	rax, QWORD PTR 32[rbp]
	test	rax, rax
	je	.L11
	mov	rdi, rbp
	call	rax
.L26:
	test	ebx, ebx
	je	.L1
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	check_ready_for_suspend_event@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	rdi, rbp
	xor	ebx, ebx
	call	is_sub_channel@PLT
	test	rax, rax
	setne	bl
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	call	get_device@PLT
	mov	r12, rax
	test	rax, rax
	je	.L10
	mov	rdi, QWORD PTR 24[rbp]
	call	vmbus_device_unregister@PLT
	mov	rdi, r12
	call	put_device@PLT
.L10:
	cmp	QWORD PTR 16[rbp], 0
	je	.L26
	lea	rdi, vmbus_connection[rip]
	call	mutex_lock@PLT
	mov	rax, QWORD PTR CHANNEL_OPEN_STATE[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L29
	lea	rdi, 8[rbp]
	call	complete@PLT
.L16:
	lea	rdi, vmbus_connection[rip]
	call	mutex_unlock@PLT
	jmp	.L26
.L29:
	mov	rdi, rbp
	call	hv_process_channel_removal@PLT
	jmp	.L16
	.cfi_endproc
.LFE0:
	.size	vmbus_onoffer_rescind, .-vmbus_onoffer_rescind
	.comm	vmbus_connection,8,8
	.comm	CHANNEL_OPEN_STATE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_channel_mgmt.c_vmbus_onoffer_rescind.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vmbus_onoffer_rescind, %function
vmbus_onoffer_rescind:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	ldr	r4, .L35
	bl	trace_vmbus_onoffer_rescind
	b	.L2
.L3:
	mov	r0, #1
	bl	msleep
.L2:
	mov	r0, r4
	bl	atomic_read
	cmp	r0, #0
	bne	.L3
	ldr	r0, .L35+4
	bl	mutex_lock
	ldr	r0, [r5]
	bl	relid2channel
	mov	r4, r0
	ldr	r0, .L35+4
	bl	mutex_unlock
	cmp	r4, #0
	popeq	{r4, r5, r6, pc}
	mov	r0, r4
	bl	is_hvsock_channel
	cmp	r0, #0
	movne	r5, #1
	beq	.L32
.L6:
	mov	r0, r4
	bl	vmbus_reset_channel_cb
	mov	r0, r4
	bl	vmbus_rescind_cleanup
	b	.L7
.L8:
	mov	r0, #1
	bl	msleep
.L7:
	ldr	r0, [r4, #20]
	bl	READ_ONCE
	cmp	r0, #0
	beq	.L8
	ldr	r0, [r4, #12]
	cmp	r0, #0
	beq	.L10
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L11
	mov	r0, r4
	blx	r3
.L30:
	cmp	r5, #0
	popeq	{r4, r5, r6, pc}
.L34:
	pop	{r4, r5, r6, lr}
	b	check_ready_for_suspend_event
.L32:
	mov	r0, r4
	bl	is_sub_channel
	subs	r5, r0, #0
	movne	r5, #1
	b	.L6
.L11:
	bl	get_device
	subs	r6, r0, #0
	beq	.L10
	ldr	r0, [r4, #12]
	bl	vmbus_device_unregister
	mov	r0, r6
	bl	put_device
.L10:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L30
	ldr	r0, .L35+4
	bl	mutex_lock
	ldr	r3, .L35+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L33
	add	r0, r4, #4
	bl	complete
.L16:
	ldr	r0, .L35+4
	bl	mutex_unlock
	cmp	r5, #0
	popeq	{r4, r5, r6, pc}
	b	.L34
.L33:
	mov	r0, r4
	bl	hv_process_channel_removal
	b	.L16
.L36:
	.align	2
.L35:
	.word	vmbus_connection+4
	.word	vmbus_connection
	.word	CHANNEL_OPEN_STATE
	.size	vmbus_onoffer_rescind, .-vmbus_onoffer_rescind
	.comm	vmbus_connection,8,4
	.comm	CHANNEL_OPEN_STATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
