	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aem_msg_handler
_aem_msg_handler:                       ## @aem_msg_handler
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rdx
	movq	(%rsi), %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_7
## %bb.1:
	movl	24(%r14), %eax
	movl	%eax, 24(%rbx)
	movl	8(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_2
## %bb.4:
	movq	16(%r14), %rsi
	movl	(%rsi), %ecx
	movl	%ecx, 20(%rbx)
	cmpl	$1, %eax
	je	LBB0_3
## %bb.5:
	decl	%eax
	movl	8(%rbx), %ecx
	cmpw	%ax, %cx
	cmovbl	%ecx, %eax
	movl	16(%rbx), %edi
	movw	%ax, 8(%rbx)
	addq	$4, %rsi
	movzwl	%ax, %edx
	callq	_memcpy
	jmp	LBB0_6
LBB0_7:
	movl	28(%rbx), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_dev_err
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ipmi_free_recv_msg             ## TAILCALL
LBB0_2:
	movq	_IPMI_UNKNOWN_ERR_COMPLETION_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
LBB0_3:
	movw	$0, 8(%rbx)
LBB0_6:
	movq	%r14, %rdi
	callq	_ipmi_free_recv_msg
	addq	$12, %rbx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_complete                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Mismatch between received msgid (%02x) and transmitted msgid (%02x)!\n"

	.comm	_IPMI_UNKNOWN_ERR_COMPLETION_CODE,4,2 ## @IPMI_UNKNOWN_ERR_COMPLETION_CODE
	.no_dead_strip	_aem_msg_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aem_msg_handler
_aem_msg_handler:                       ; @aem_msg_handler
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x2, [x0]
	ldr	x3, [x1]
	cmp	x2, x3
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x19, #24]
	str	w8, [x20, #24]
	ldr	w9, [x19, #8]
	cmp	w9, #0
	b.le	LBB0_5
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	w10, [x8]
	str	w10, [x20, #20]
	subs	w9, w9, #1
	b.eq	LBB0_6
; %bb.3:
	and	w9, w9, #0xffff
	ldrh	w10, [x20, #8]
	cmp	w10, w9
	csel	w2, w10, w9, lo
	strh	w2, [x20, #8]
	ldr	w0, [x20, #16]
	add	x1, x8, #4
	bl	_memcpy
	b	LBB0_7
LBB0_4:
	ldr	w0, [x20, #28]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_dev_err
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ipmi_free_recv_msg
LBB0_5:
Lloh2:
	adrp	x8, _IPMI_UNKNOWN_ERR_COMPLETION_CODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IPMI_UNKNOWN_ERR_COMPLETION_CODE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x20, #20]
LBB0_6:
	strh	wzr, [x20, #8]
LBB0_7:
	mov	x0, x19
	bl	_ipmi_free_recv_msg
	add	x0, x20, #12
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_complete
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Mismatch between received msgid (%02x) and transmitted msgid (%02x)!\n"

	.comm	_IPMI_UNKNOWN_ERR_COMPLETION_CODE,4,2 ; @IPMI_UNKNOWN_ERR_COMPLETION_CODE
	.no_dead_strip	_aem_msg_handler
.subsections_via_symbols
