	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmbus_request_offers           ## -- Begin function vmbus_request_offers
	.p2align	4, 0x90
_vmbus_request_offers:                  ## @vmbus_request_offers
	.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
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$20, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_init_completion
	movq	8(%r14), %rdi
	movq	_CHANNELMSG_REQUESTOFFERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdi)
	movl	$4, %esi
	callq	_vmbus_post_msg
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_4:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %esi
	movq	%r14, %rdi
	callq	_wait_for_completion_timeout
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movq	%r14, %rdi
	callq	_kfree
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CHANNELMSG_REQUESTOFFERS,4,2   ## @CHANNELMSG_REQUESTOFFERS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to request offers - %d\n"

	.comm	_HZ,4,2                         ## @HZ
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmbus_request_offers           ; -- Begin function vmbus_request_offers
	.p2align	2
_vmbus_request_offers:                  ; @vmbus_request_offers
	.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
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #20
	bl	_kmalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_init_completion
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x8, _CHANNELMSG_REQUESTOFFERS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CHANNELMSG_REQUESTOFFERS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0]
	mov	w1, #4
	bl	_vmbus_post_msg
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_err
	b	LBB0_7
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x8, _HZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	add	w1, w8, w8, lsl #2
	mov	x0, x19
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_6
; %bb.5:
	mov	w20, #0
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x19
	bl	_kfree
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CHANNELMSG_REQUESTOFFERS,4,2   ; @CHANNELMSG_REQUESTOFFERS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to request offers - %d\n"

	.comm	_HZ,4,2                         ; @HZ
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
