	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function send_msg_to_mgmt
_send_msg_to_mgmt:                      ## @send_msg_to_mgmt
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r14d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	16(%rbp), %r13d
	callq	_SYNC_MSG_ID
	movl	%eax, %r12d
	movq	_MGMT_RESP@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	24(%rbp), %r12d
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_SYNC_MSG_ID_INC
LBB0_3:
	movl	%r12d, (%rsp)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	16(%rbp), %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	_prepare_header
	movl	%eax, -52(%rbp)
	movl	(%rbx), %edi
	leaq	-52(%rbp), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%r14d, %ecx
	callq	_prepare_mgmt_cmd
	movq	8(%rbx), %rax
	movq	_HINIC_API_CMD_WRITE_TO_MGMT_CPU@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r15
	movq	_HINIC_NODE_ID_MGMT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	(%rbx), %ebx
	movl	%r14d, %edi
	callq	_mgmt_msg_len
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_hinic_api_cmd_write
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MGMT_RESP,4,2                  ## @MGMT_RESP
	.comm	_HINIC_API_CMD_WRITE_TO_MGMT_CPU,8,3 ## @HINIC_API_CMD_WRITE_TO_MGMT_CPU
	.comm	_HINIC_NODE_ID_MGMT,4,2         ## @HINIC_NODE_ID_MGMT
	.no_dead_strip	_send_msg_to_mgmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function send_msg_to_mgmt
_send_msg_to_mgmt:                      ; @send_msg_to_mgmt
	.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	x25, x7
	mov	x22, x6
	mov	x23, x5
	mov	x19, x4
	mov	x21, x3
	mov	x24, x2
	mov	x26, x1
	mov	x20, x0
	bl	_SYNC_MSG_ID
Lloh0:
	adrp	x8, _MGMT_RESP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MGMT_RESP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w22
	b.eq	LBB0_2
; %bb.1:
	mov	x27, x0
	mov	x0, x20
	bl	_SYNC_MSG_ID_INC
	mov	x25, x27
LBB0_2:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x26
	mov	x3, x23
	mov	x4, x22
	mov	x5, x24
	mov	x6, x25
	bl	_prepare_header
	str	w0, [sp, #12]
	ldr	w0, [x20]
	add	x1, sp, #12
	mov	x2, x21
	mov	x3, x19
	bl	_prepare_mgmt_cmd
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _HINIC_API_CMD_WRITE_TO_MGMT_CPU@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HINIC_API_CMD_WRITE_TO_MGMT_CPU@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x21, [x8, x9, lsl #3]
Lloh6:
	adrp	x8, _HINIC_NODE_ID_MGMT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HINIC_NODE_ID_MGMT@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	ldr	w20, [x20]
	mov	x0, x19
	bl	_mgmt_msg_len
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_hinic_api_cmd_write
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MGMT_RESP,4,2                  ; @MGMT_RESP
	.comm	_HINIC_API_CMD_WRITE_TO_MGMT_CPU,8,3 ; @HINIC_API_CMD_WRITE_TO_MGMT_CPU
	.comm	_HINIC_NODE_ID_MGMT,4,2         ; @HINIC_NODE_ID_MGMT
	.no_dead_strip	_send_msg_to_mgmt
.subsections_via_symbols
