	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmbus_negotiate_version
_vmbus_negotiate_version:               ## @vmbus_negotiate_version
	.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
	movl	%esi, %r12d
	movq	%rdi, %r15
	addq	$12, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_init_completion
	movq	16(%r15), %rbx
	movq	_CHANNELMSG_INITIATE_CONTACT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	%r12d, 24(%rbx)
	movq	_vmbus_connection@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_virt_to_phys
	movq	%rax, 16(%rbx)
	movq	8(%r14), %rdi
	callq	_virt_to_phys
	movq	%rax, 8(%rbx)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	callq	_virt_to_phys
	movq	%rax, (%rbx)
	leaq	20(%r14), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	leaq	8(%r15), %r13
	leaq	24(%r14), %rsi
	movq	%r13, %rdi
	callq	_list_add_tail
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_vmbus_post_msg
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	%r13, %rdi
	callq	_list_del
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_8
LBB0_2:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_wait_for_completion_timeout
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	%r13, %rdi
	callq	_list_del
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.4:
	cmpq	$0, (%r15)
	je	LBB0_6
## %bb.5:
	movq	_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_ECONNREFUSED@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHANNELMSG_INITIATE_CONTACT,4,2 ## @CHANNELMSG_INITIATE_CONTACT
	.comm	_vmbus_connection,32,3          ## @vmbus_connection
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_HZ,4,2                         ## @HZ
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_CONNECTED,4,2                  ## @CONNECTED
	.comm	_ECONNREFUSED,4,2               ## @ECONNREFUSED
	.no_dead_strip	_vmbus_negotiate_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmbus_negotiate_version
_vmbus_negotiate_version:               ; @vmbus_negotiate_version
	.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	x21, x1
	mov	x19, x0
	add	x20, x0, #12
	mov	x0, x20
	bl	_init_completion
	ldr	x23, [x19, #16]
Lloh0:
	adrp	x8, _CHANNELMSG_INITIATE_CONTACT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHANNELMSG_INITIATE_CONTACT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w21, w8, [x23, #24]
Lloh3:
	adrp	x24, _vmbus_connection@GOTPAGE
Lloh4:
	ldr	x24, [x24, _vmbus_connection@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_virt_to_phys
	str	x0, [x23, #16]
	ldr	x0, [x24, #8]
	bl	_virt_to_phys
	str	x0, [x23, #8]
	ldr	x8, [x24, #8]
Lloh5:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_virt_to_phys
	str	x0, [x23]
	add	x21, x24, #20
	mov	x0, x21
	bl	_spin_lock_irqsave
	add	x22, x19, #8
	add	x1, x24, #24
	mov	x0, x22
	bl	_list_add_tail
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x23
	mov	w1, #32
	bl	_vmbus_post_msg
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x22
	bl	_list_del
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	b	LBB0_8
LBB0_2:
Lloh8:
	adrp	x8, _HZ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	add	w1, w8, w8, lsl #2
	mov	x0, x20
	bl	_wait_for_completion_timeout
	mov	x20, x0
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x22
	bl	_list_del
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cbz	w20, LBB0_5
; %bb.3:
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.4:
	mov	w23, #0
Lloh11:
	adrp	x8, _CONNECTED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CONNECTED@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x24, #16]
	b	LBB0_8
LBB0_5:
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh16:
	adrp	x8, _ECONNREFUSED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ECONNREFUSED@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_8:
	mov	x0, x23
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CHANNELMSG_INITIATE_CONTACT,4,2 ; @CHANNELMSG_INITIATE_CONTACT
	.comm	_vmbus_connection,32,3          ; @vmbus_connection
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_HZ,4,2                         ; @HZ
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_CONNECTED,4,2                  ; @CONNECTED
	.comm	_ECONNREFUSED,4,2               ; @ECONNREFUSED
	.no_dead_strip	_vmbus_negotiate_version
.subsections_via_symbols
