	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function heartbeat_onchannelcallback
_heartbeat_onchannelcallback:           ## @heartbeat_onchannelcallback
	.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
	movq	%rdi, %r14
	movq	_util_heartbeat@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	%rbx, %rsi
	callq	_vmbus_recvpacket
	cmpl	$0, -44(%rbp)
	je	LBB0_7
## %bb.1:
	leaq	16(%rbx), %r15
	leaq	-44(%rbp), %r13
	leaq	-48(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	80(%rbx)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_ICMSGHDRFLAG_RESPONSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ICMSGHDRFLAG_TRANSACTION@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 24(%rbx)
	movl	-44(%rbp), %edx
	movl	-48(%rbp), %ecx
	movq	_VM_PKT_DATA_INBAND@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%r9d, %r9d
	callq	_vmbus_sendpacket
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rcx
	movq	%r12, %r8
	callq	_vmbus_recvpacket
	cmpl	$0, -44(%rbp)
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	_ICMSGTYPE_NEGOTIATE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_fw_versions@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FW_VER_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_hb_versions@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_HB_VER_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	pushq	_hb_srv_version@GOTPCREL(%rip)
	pushq	$0
	callq	_vmbus_prep_negotiate_resp
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_hb_srv_version@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%si, %edx
	sarl	$16, %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_util_heartbeat,8,3             ## @util_heartbeat
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_ICMSGTYPE_NEGOTIATE,8,3        ## @ICMSGTYPE_NEGOTIATE
	.comm	_fw_versions,4,2                ## @fw_versions
	.comm	_FW_VER_COUNT,4,2               ## @FW_VER_COUNT
	.comm	_hb_versions,4,2                ## @hb_versions
	.comm	_HB_VER_COUNT,4,2               ## @HB_VER_COUNT
	.comm	_hb_srv_version,4,2             ## @hb_srv_version
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Heartbeat IC version %d.%d\n"

	.comm	_ICMSGHDRFLAG_TRANSACTION,4,2   ## @ICMSGHDRFLAG_TRANSACTION
	.comm	_ICMSGHDRFLAG_RESPONSE,4,2      ## @ICMSGHDRFLAG_RESPONSE
	.comm	_VM_PKT_DATA_INBAND,4,2         ## @VM_PKT_DATA_INBAND
	.no_dead_strip	_heartbeat_onchannelcallback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function heartbeat_onchannelcallback
_heartbeat_onchannelcallback:           ; @heartbeat_onchannelcallback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _util_heartbeat@GOTPAGE
Lloh1:
	ldr	x8, [x8, _util_heartbeat@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
Lloh3:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w2, [x24]
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x1, x20
	bl	_vmbus_recvpacket
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_7
; %bb.1:
	add	x21, x20, #16
Lloh5:
	adrp	x25, _ICMSGTYPE_NEGOTIATE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _ICMSGTYPE_NEGOTIATE@GOTPAGEOFF]
Lloh7:
	adrp	x23, _HB_VER_COUNT@GOTPAGE
Lloh8:
	ldr	x23, [x23, _HB_VER_COUNT@GOTPAGEOFF]
Lloh9:
	adrp	x22, _hb_srv_version@GOTPAGE
Lloh10:
	ldr	x22, [x22, _hb_srv_version@GOTPAGEOFF]
Lloh11:
	adrp	x26, _ICMSGHDRFLAG_TRANSACTION@GOTPAGE
Lloh12:
	ldr	x26, [x26, _ICMSGHDRFLAG_TRANSACTION@GOTPAGEOFF]
Lloh13:
	adrp	x27, _ICMSGHDRFLAG_RESPONSE@GOTPAGE
Lloh14:
	ldr	x27, [x27, _ICMSGHDRFLAG_RESPONSE@GOTPAGEOFF]
Lloh15:
	adrp	x28, _VM_PKT_DATA_INBAND@GOTPAGE
Lloh16:
	ldr	x28, [x28, _VM_PKT_DATA_INBAND@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20, #80]
	add	w8, w8, #1
	str	w8, [x20, #80]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x27]
	orr	w8, w9, w8
	str	w8, [x20, #24]
	ldp	w3, w2, [sp, #8]
	ldr	w4, [x28]
	mov	x0, x19
	mov	x1, x20
	mov	w5, #0
	bl	_vmbus_sendpacket
	ldr	w2, [x24]
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_vmbus_recvpacket
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh17:
	adrp	x8, _fw_versions@GOTPAGE
Lloh18:
	ldr	x8, [x8, _fw_versions@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x8, _FW_VER_COUNT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FW_VER_COUNT@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
Lloh23:
	adrp	x8, _hb_versions@GOTPAGE
Lloh24:
	ldr	x8, [x8, _hb_versions@GOTPAGEOFF]
Lloh25:
	ldr	w4, [x8]
	ldr	w5, [x23]
	mov	x0, x21
	mov	x1, x20
	mov	x6, #0
	mov	x7, x22
	bl	_vmbus_prep_negotiate_resp
	cbz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22]
	asr	w1, w8, #16
	and	w2, w8, #0xffff
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	b	LBB0_3
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_util_heartbeat,8,3             ; @util_heartbeat
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_ICMSGTYPE_NEGOTIATE,8,3        ; @ICMSGTYPE_NEGOTIATE
	.comm	_fw_versions,4,2                ; @fw_versions
	.comm	_FW_VER_COUNT,4,2               ; @FW_VER_COUNT
	.comm	_hb_versions,4,2                ; @hb_versions
	.comm	_HB_VER_COUNT,4,2               ; @HB_VER_COUNT
	.comm	_hb_srv_version,4,2             ; @hb_srv_version
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Heartbeat IC version %d.%d\n"

	.comm	_ICMSGHDRFLAG_TRANSACTION,4,2   ; @ICMSGHDRFLAG_TRANSACTION
	.comm	_ICMSGHDRFLAG_RESPONSE,4,2      ; @ICMSGHDRFLAG_RESPONSE
	.comm	_VM_PKT_DATA_INBAND,4,2         ; @VM_PKT_DATA_INBAND
	.no_dead_strip	_heartbeat_onchannelcallback
.subsections_via_symbols
