	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_ipmb_get_msg_cmd
_handle_ipmb_get_msg_cmd:               ## @handle_ipmb_get_msg_cmd
	.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
	cmpl	$9, (%rsi)
	jg	LBB0_2
## %bb.1:
	movq	_invalid_commands@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ipmi_inc_stat
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_2:
	movq	%rsi, %r15
	movq	8(%rsi), %rax
	xorl	%ebx, %ebx
	cmpl	$0, 8(%rax)
	jne	LBB0_12
## %bb.3:
	movl	12(%rax), %ebx
	movl	16(%rax), %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r13d
	shrl	$2, %r13d
	movzbl	32(%rax), %r12d
	xorl	%eax, %eax
	callq	_rcu_read_lock
	andl	$15, %ebx
	movzbl	%r13b, %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	callq	_find_cmd_rcvr
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	(%rax), %r12
	movq	%r12, %rdi
	callq	_kref_get
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	testq	%r12, %r12
	je	LBB0_6
## %bb.9:
	movq	_handled_commands@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ipmi_inc_stat
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ipmi_alloc_recv_msg
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%rax, %r14
	movq	_IPMI_IPMB_ADDR_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r14)
	movq	8(%r15), %rsi
	movl	24(%rsi), %eax
	movl	%eax, 40(%r14)
	movl	28(%rsi), %eax
	andl	$3, %eax
	movl	%eax, 44(%r14)
	movl	12(%rsi), %eax
	andl	$15, %eax
	movl	%eax, 48(%r14)
	movq	%r12, 32(%r14)
	movq	_IPMI_CMD_RECV_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movl	28(%rsi), %eax
	sarl	$2, %eax
	movl	%eax, (%r14)
	movl	16(%rsi), %eax
	sarl	$2, %eax
	movl	%eax, 8(%r14)
	movl	32(%rsi), %eax
	movl	%eax, 12(%r14)
	movl	4(%r14), %edi
	movl	%edi, 20(%r14)
	movl	(%r15), %edx
	addl	$-10, %edx
	movl	%edx, 16(%r14)
	addq	$36, %rsi
	callq	_memcpy
	movq	%r14, %rdi
	callq	_deliver_response
	jmp	LBB0_12
LBB0_4:
	xorl	%eax, %eax
	callq	_rcu_read_unlock
LBB0_6:
	movq	_unhandled_commands@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ipmi_inc_stat
	movq	_IPMI_NETFN_APP_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$2, %eax
	movq	16(%r15), %rcx
	movl	%eax, (%rcx)
	movq	_IPMI_SEND_MSG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rcx)
	movq	8(%r15), %rax
	movl	12(%rax), %edx
	movl	%edx, 8(%rcx)
	movl	24(%rax), %edx
	leaq	12(%rcx), %rdi
	movl	%edx, 12(%rcx)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	andl	$1020, %edx                     ## imm = 0x3FC
	movl	28(%rax), %eax
	andl	$3, %eax
	addl	%edx, %eax
	addl	$4, %eax
	movl	%eax, 16(%rcx)
	movl	$2, %esi
	callq	_ipmb_checksum
	movq	16(%r15), %rcx
	movl	%eax, 20(%rcx)
	movq	16(%r14), %rax
	movq	8(%r15), %rdx
	movl	12(%rdx), %esi
	andl	$15, %esi
	movzbl	(%rax,%rsi), %eax
	leaq	24(%rcx), %rdi
	movl	%eax, 24(%rcx)
	movl	$252, %eax
	andl	28(%rdx), %eax
	movl	16(%rdx), %esi
	andl	$3, %esi
	orl	%eax, %esi
	movl	%esi, 28(%rcx)
	movl	32(%rdx), %eax
	movl	%eax, 32(%rcx)
	movq	_IPMI_INVALID_CMD_COMPLETION_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rcx)
	movl	$4, %esi
	callq	_ipmb_checksum
	movq	16(%r15), %rcx
	movl	%eax, 40(%rcx)
	movl	$11, 24(%r15)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	(%r14), %edi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	*(%rax)
	movl	$-1, %ebx
LBB0_8:
	xorl	%eax, %eax
	callq	_rcu_read_unlock
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_free_user@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_kref_put
	movl	$1, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_invalid_commands,4,2           ## @invalid_commands
	.comm	_unhandled_commands,4,2         ## @unhandled_commands
	.comm	_IPMI_NETFN_APP_REQUEST,4,2     ## @IPMI_NETFN_APP_REQUEST
	.comm	_IPMI_SEND_MSG_CMD,4,2          ## @IPMI_SEND_MSG_CMD
	.comm	_IPMI_INVALID_CMD_COMPLETION_CODE,4,2 ## @IPMI_INVALID_CMD_COMPLETION_CODE
	.comm	_handled_commands,4,2           ## @handled_commands
	.comm	_free_user,4,2                  ## @free_user
	.comm	_IPMI_IPMB_ADDR_TYPE,4,2        ## @IPMI_IPMB_ADDR_TYPE
	.comm	_IPMI_CMD_RECV_TYPE,4,2         ## @IPMI_CMD_RECV_TYPE
	.no_dead_strip	_handle_ipmb_get_msg_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_ipmb_get_msg_cmd
_handle_ipmb_get_msg_cmd:               ; @handle_ipmb_get_msg_cmd
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	ldr	w8, [x1]
	cmp	w8, #9
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _invalid_commands@GOTPAGE
Lloh1:
	ldr	x8, [x8, _invalid_commands@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ipmi_inc_stat
	b	LBB0_3
LBB0_2:
	mov	x19, x1
	ldr	x8, [x1, #8]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_5
LBB0_3:
	mov	w19, #0
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldrb	w21, [x8, #32]
	ldp	w23, w22, [x8, #12]
	bl	_rcu_read_lock
	ubfx	w1, w22, #2, #8
	and	w3, w23, #0xf
	mov	x0, x20
	mov	x2, x21
	bl	_find_cmd_rcvr
	cbz	x0, LBB0_9
; %bb.6:
	ldr	x21, [x0]
	mov	x0, x21
	bl	_kref_get
	bl	_rcu_read_unlock
	cbz	x21, LBB0_10
; %bb.7:
Lloh3:
	adrp	x8, _handled_commands@GOTPAGE
Lloh4:
	ldr	x8, [x8, _handled_commands@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ipmi_inc_stat
	bl	_ipmi_alloc_recv_msg
	cbz	x0, LBB0_13
; %bb.8:
	mov	x20, x0
Lloh6:
	adrp	x8, _IPMI_IPMB_ADDR_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IPMI_IPMB_ADDR_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x0, #52]
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #24]
	str	w9, [x0, #40]
	ldr	w9, [x8, #28]
	and	w9, w9, #0x3
	str	w9, [x0, #44]
	ldr	w9, [x8, #12]
	and	w9, w9, #0xf
	str	w9, [x0, #48]
	str	x21, [x0, #32]
Lloh9:
	adrp	x9, _IPMI_CMD_RECV_TYPE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IPMI_CMD_RECV_TYPE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	str	w9, [x0, #24]
	ldr	w9, [x8, #28]
	asr	w9, w9, #2
	str	w9, [x0]
	ldr	w9, [x8, #16]
	asr	w9, w9, #2
	str	w9, [x0, #8]
	ldr	w9, [x8, #32]
	ldr	w0, [x0, #4]
	str	w0, [x20, #20]
	ldr	w10, [x19]
	sub	w2, w10, #10
	stp	w9, w2, [x20, #12]
	add	x1, x8, #36
	bl	_memcpy
	mov	x0, x20
	bl	_deliver_response
	b	LBB0_3
LBB0_9:
	bl	_rcu_read_unlock
LBB0_10:
Lloh12:
	adrp	x8, _unhandled_commands@GOTPAGE
Lloh13:
	ldr	x8, [x8, _unhandled_commands@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ipmi_inc_stat
Lloh15:
	adrp	x8, _IPMI_NETFN_APP_REQUEST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IPMI_NETFN_APP_REQUEST@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	lsl	w8, w8, #2
	ldp	x9, x0, [x19, #8]
	str	w8, [x0]
Lloh18:
	adrp	x8, _IPMI_SEND_MSG_CMD@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IPMI_SEND_MSG_CMD@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x0, #4]
	ldr	w8, [x9, #12]
	str	w8, [x0, #8]
	ldr	w8, [x9, #24]
	str	w8, [x0, #12]!
	and	w8, w22, #0x3fc
	ldr	w9, [x9, #28]
	bfxil	w8, w9, #0, #2
	add	w8, w8, #4
	str	w8, [x0, #4]
	mov	w1, #2
	bl	_ipmb_checksum
	ldp	x9, x8, [x19, #8]
	str	w0, [x8, #20]
	ldr	x10, [x20, #16]
	ldr	w11, [x9, #12]
	and	x11, x11, #0xf
	ldrb	w10, [x10, x11]
	str	w10, [x8, #24]!
	ldr	w10, [x9, #28]
	and	w10, w10, #0xfc
	ldr	w11, [x9, #16]
	bfxil	w10, w11, #0, #2
	str	w10, [x8, #4]
	ldr	w9, [x9, #32]
Lloh21:
	adrp	x10, _IPMI_INVALID_CMD_COMPLETION_CODE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _IPMI_INVALID_CMD_COMPLETION_CODE@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	stp	w9, w10, [x8, #8]
	mov	x0, x8
	mov	w1, #4
	bl	_ipmb_checksum
	ldr	x8, [x19, #16]
	str	w0, [x8, #40]
	mov	w8, #11
	str	w8, [x19, #24]
	bl	_rcu_read_lock
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	x8, [x8]
	ldr	w0, [x20]
	mov	x1, x19
	mov	w2, #0
	blr	x8
	mov	w19, #-1
	bl	_rcu_read_unlock
	b	LBB0_4
LBB0_12:
	mov	w19, #0
	bl	_rcu_read_unlock
	b	LBB0_4
LBB0_13:
Lloh24:
	adrp	x8, _free_user@GOTPAGE
Lloh25:
	ldr	x8, [x8, _free_user@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kref_put
	mov	w19, #1
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_invalid_commands,4,2           ; @invalid_commands
	.comm	_unhandled_commands,4,2         ; @unhandled_commands
	.comm	_IPMI_NETFN_APP_REQUEST,4,2     ; @IPMI_NETFN_APP_REQUEST
	.comm	_IPMI_SEND_MSG_CMD,4,2          ; @IPMI_SEND_MSG_CMD
	.comm	_IPMI_INVALID_CMD_COMPLETION_CODE,4,2 ; @IPMI_INVALID_CMD_COMPLETION_CODE
	.comm	_handled_commands,4,2           ; @handled_commands
	.comm	_free_user,4,2                  ; @free_user
	.comm	_IPMI_IPMB_ADDR_TYPE,4,2        ; @IPMI_IPMB_ADDR_TYPE
	.comm	_IPMI_CMD_RECV_TYPE,4,2         ; @IPMI_CMD_RECV_TYPE
	.no_dead_strip	_handle_ipmb_get_msg_cmd
.subsections_via_symbols
