	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_oem_get_msg_cmd
_handle_oem_get_msg_cmd:                ## @handle_oem_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
	movl	%edi, %r14d
	cmpl	$3, (%rsi)
	jg	LBB0_3
## %bb.1:
	movq	_invalid_commands@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_ipmi_inc_stat
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_3:
	movq	%rsi, %r15
	movq	8(%rsi), %rax
	xorl	%ebx, %ebx
	cmpl	$0, 8(%rax)
	je	LBB0_5
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%rax), %ebx
	movl	12(%rax), %r13d
	shrl	$2, %ebx
	movzbl	4(%rax), %r12d
	xorl	%eax, %eax
	callq	_rcu_read_lock
	andl	$15, %r13d
	movzbl	%bl, %esi
	movl	%r14d, %edi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	callq	_find_cmd_rcvr
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	(%rax), %r12
	movq	%r12, %rdi
	callq	_kref_get
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	testq	%r12, %r12
	je	LBB0_10
## %bb.7:
	movq	_handled_commands@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_ipmi_inc_stat
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ipmi_alloc_recv_msg
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%rax, %r14
	movq	_IPMI_SYSTEM_INTERFACE_ADDR_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r14)
	movq	_IPMI_BMC_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movq	8(%r15), %rsi
	movl	(%rsi), %eax
	andl	$3, %eax
	movl	%eax, 40(%r14)
	movq	%r12, 32(%r14)
	movq	$0, 24(%r14)
	movq	_IPMI_OEM_RECV_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	movl	(%rsi), %eax
	sarl	$2, %eax
	movl	%eax, 4(%r14)
	movl	4(%rsi), %eax
	movl	%eax, 8(%r14)
	movl	(%r14), %edi
	movl	%edi, 16(%r14)
	movl	(%r15), %edx
	addl	$-4, %edx
	movl	%edx, 12(%r14)
	addq	$16, %rsi
	callq	_memcpy
	movq	%r14, %rdi
	callq	_deliver_response
	jmp	LBB0_4
LBB0_9:
	xorl	%eax, %eax
	callq	_rcu_read_unlock
LBB0_10:
	movq	_unhandled_commands@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_11:
	movq	_free_user@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_kref_put
	movl	$1, %ebx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_invalid_commands,4,2           ## @invalid_commands
	.comm	_unhandled_commands,4,2         ## @unhandled_commands
	.comm	_handled_commands,4,2           ## @handled_commands
	.comm	_free_user,4,2                  ## @free_user
	.comm	_IPMI_SYSTEM_INTERFACE_ADDR_TYPE,4,2 ## @IPMI_SYSTEM_INTERFACE_ADDR_TYPE
	.comm	_IPMI_BMC_CHANNEL,4,2           ## @IPMI_BMC_CHANNEL
	.comm	_IPMI_OEM_RECV_TYPE,4,2         ## @IPMI_OEM_RECV_TYPE
	.no_dead_strip	_handle_oem_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_oem_get_msg_cmd
_handle_oem_get_msg_cmd:                ; @handle_oem_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, #3
	b.gt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _invalid_commands@GOTPAGE
Lloh1:
	ldr	x8, [x8, _invalid_commands@GOTPAGEOFF]
LBB0_2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ipmi_inc_stat
	b	LBB0_4
LBB0_3:
	mov	x19, x1
	ldr	x8, [x1, #8]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_6
LBB0_4:
	mov	w0, #0
LBB0_5:
	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_6:
	ldr	w22, [x8]
	ldrb	w21, [x8, #4]
	ldr	w23, [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_10
; %bb.7:
	ldr	x21, [x0]
	mov	x0, x21
	bl	_kref_get
	bl	_rcu_read_unlock
	cbz	x21, LBB0_11
; %bb.8:
Lloh2:
	adrp	x8, _handled_commands@GOTPAGE
Lloh3:
	ldr	x8, [x8, _handled_commands@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ipmi_inc_stat
	bl	_ipmi_alloc_recv_msg
	cbz	x0, LBB0_12
; %bb.9:
	mov	x20, x0
Lloh5:
	adrp	x8, _IPMI_SYSTEM_INTERFACE_ADDR_TYPE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IPMI_SYSTEM_INTERFACE_ADDR_TYPE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _IPMI_BMC_CHANNEL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IPMI_BMC_CHANNEL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #44]
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	and	w9, w9, #0x3
	str	w9, [x0, #40]
	stp	xzr, x21, [x0, #24]
Lloh11:
	adrp	x9, _IPMI_OEM_RECV_TYPE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IPMI_OEM_RECV_TYPE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	str	w9, [x0, #20]
	ldr	w9, [x8]
	asr	w9, w9, #2
	str	w9, [x0, #4]
	ldr	w9, [x8, #4]
	ldr	w0, [x0]
	str	w0, [x20, #16]
	ldr	w10, [x19]
	sub	w2, w10, #4
	stp	w9, w2, [x20, #8]
	add	x1, x8, #16
	bl	_memcpy
	mov	x0, x20
	bl	_deliver_response
	b	LBB0_4
LBB0_10:
	bl	_rcu_read_unlock
LBB0_11:
Lloh14:
	adrp	x8, _unhandled_commands@GOTPAGE
Lloh15:
	ldr	x8, [x8, _unhandled_commands@GOTPAGEOFF]
	b	LBB0_2
LBB0_12:
Lloh16:
	adrp	x8, _free_user@GOTPAGE
Lloh17:
	ldr	x8, [x8, _free_user@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kref_put
	mov	w0, #1
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_invalid_commands,4,2           ; @invalid_commands
	.comm	_unhandled_commands,4,2         ; @unhandled_commands
	.comm	_handled_commands,4,2           ; @handled_commands
	.comm	_free_user,4,2                  ; @free_user
	.comm	_IPMI_SYSTEM_INTERFACE_ADDR_TYPE,4,2 ; @IPMI_SYSTEM_INTERFACE_ADDR_TYPE
	.comm	_IPMI_BMC_CHANNEL,4,2           ; @IPMI_BMC_CHANNEL
	.comm	_IPMI_OEM_RECV_TYPE,4,2         ; @IPMI_OEM_RECV_TYPE
	.no_dead_strip	_handle_oem_get_msg_cmd
.subsections_via_symbols
