	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_msg_to_mgmt              ## -- Begin function hinic_msg_to_mgmt
	.p2align	4, 0x90
_hinic_msg_to_mgmt:                     ## @hinic_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	_HINIC_MGMT_MSG_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	24(%rbp), %eax
	jne	LBB0_1
## %bb.3:
	movl	%r8d, %ebx
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%r8d, %edi
	callq	_MSG_SZ_IS_VALID
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_MGMT_DIRECT_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_MSG_NOT_RESP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	subq	$8, %rsp
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, %r8d
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	pushq	%rax
	pushq	%r10
	pushq	16(%rbp)
	callq	_msg_to_mgmt_sync
	addq	$56, %rsp
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$24, %rsp
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HINIC_MGMT_MSG_SYNC,4,2        ## @HINIC_MGMT_MSG_SYNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid MGMT msg type\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Invalid MGMT msg buffer size\n"

	.comm	_MGMT_DIRECT_SEND,4,2           ## @MGMT_DIRECT_SEND
	.comm	_MSG_NOT_RESP,4,2               ## @MSG_NOT_RESP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_msg_to_mgmt              ; -- Begin function hinic_msg_to_mgmt
	.p2align	2
_hinic_msg_to_mgmt:                     ; @hinic_msg_to_mgmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x8, [x0]
	ldr	x26, [x8]
Lloh0:
	adrp	x8, _HINIC_MGMT_MSG_SYNC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HINIC_MGMT_MSG_SYNC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w7
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x6
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
	mov	x0, x4
	bl	_MSG_SZ_IS_VALID
	cbz	w0, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _MGMT_DIRECT_SEND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MGMT_DIRECT_SEND@GOTPAGEOFF]
Lloh5:
	ldr	w7, [x8]
Lloh6:
	adrp	x8, _MSG_NOT_RESP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSG_NOT_RESP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	mov	x6, x19
	bl	_msg_to_mgmt_sync
	b	LBB0_6
LBB0_3:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x26
	bl	_dev_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_HINIC_MGMT_MSG_SYNC,4,2        ; @HINIC_MGMT_MSG_SYNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid MGMT msg type\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Invalid MGMT msg buffer size\n"

	.comm	_MGMT_DIRECT_SEND,4,2           ; @MGMT_DIRECT_SEND
	.comm	_MSG_NOT_RESP,4,2               ; @MSG_NOT_RESP
.subsections_via_symbols
