	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_msg
_process_msg:                           ## @process_msg
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%esi, %eax
	movq	%rdi, %rbx
	movl	%edx, (%r8)
	leal	-128(%rax), %ecx
	cmpl	$16, %ecx
	ja	LBB0_10
## %bb.1:
	movq	%r8, %r15
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rcx,4), %rcx
	addq	%rsi, %rcx
	jmpq	*%rcx
LBB0_2:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_device_printf
LBB0_3:
	movl	$0, (%r14)
	jmp	LBB0_14
LBB0_4:
	movl	4(%rbx), %edi
	imull	$1000, %edx, %esi               ## imm = 0x3E8
	xorl	%edx, %edx
	callq	_clk_set_freq
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movl	4(%rbx), %edi
	leaq	-28(%rbp), %rsi
	callq	_clk_get_freq
	movslq	-28(%rbp), %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movl	%ecx, (%r15)
	jmp	LBB0_8
LBB0_7:
	movl	8(%rbx), %edi
	imull	$1000, %edx, %esi               ## imm = 0x3E8
	xorl	%edx, %edx
	callq	_clk_set_freq
	testl	%eax, %eax
	je	LBB0_11
LBB0_8:
	testl	%eax, %eax
	jne	LBB0_12
LBB0_9:
	movq	_MBOX_CMD_ACK@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_device_printf                  ## TAILCALL
LBB0_11:
	movl	8(%rbx), %edi
	leaq	-28(%rbp), %rsi
	callq	_clk_get_freq
	movslq	-28(%rbp), %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movl	%ecx, (%r15)
	testl	%eax, %eax
	je	LBB0_9
LBB0_12:
	movq	_MBOX_CMD_NAK@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_3
	.long	L0_0_set_9
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_2
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_MBOX_CMD_ACK,4,2               ## @MBOX_CMD_ACK
	.comm	_MBOX_CMD_NAK,4,2               ## @MBOX_CMD_NAK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received unused/unexpected command: %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"Received unknown command: %u\n"

	.no_dead_strip	_process_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_msg
_process_msg:                           ; @process_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x8, x1
	mov	x21, x0
	str	w2, [x4]
	sub	w9, w1, #128
	cmp	w9, #16
	b.hi	LBB0_13
; %bb.1:
	mov	x20, x4
	mov	x19, x3
Lloh0:
	adrp	x10, lJTI0_0@PAGE
Lloh1:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
Lloh2:
	adrp	x8, _MBOX_CMD_NAK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MBOX_CMD_NAK@GOTPAGEOFF]
	b	LBB0_11
LBB0_3:
	ldr	w0, [x21]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x8
	bl	_device_printf
LBB0_4:
	str	wzr, [x19]
	b	LBB0_12
LBB0_5:
	ldr	w0, [x21, #4]
	mov	w8, #1000
	mul	w1, w2, w8
	mov	w2, #0
	bl	_clk_set_freq
	cbnz	w0, LBB0_10
; %bb.6:
	ldr	w0, [x21, #4]
	b	LBB0_9
LBB0_7:
	ldr	w0, [x21, #8]
	mov	w8, #1000
	mul	w1, w2, w8
	mov	w2, #0
	bl	_clk_set_freq
	cbnz	w0, LBB0_10
; %bb.8:
	ldr	w0, [x21, #8]
LBB0_9:
	add	x1, sp, #12
	bl	_clk_get_freq
	ldrsw	x8, [sp, #12]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	str	w8, [x20]
LBB0_10:
Lloh6:
	adrp	x8, _MBOX_CMD_ACK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MBOX_CMD_ACK@GOTPAGEOFF]
Lloh8:
	adrp	x9, _MBOX_CMD_NAK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MBOX_CMD_NAK@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x8, x9, eq
LBB0_11:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_12:
	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
	add	sp, sp, #64
	ret
LBB0_13:
	ldr	w0, [x21]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x8
	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
	add	sp, sp, #64
	b	_device_printf
LBB0_14:
Lloh12:
	adrp	x8, _MBOX_CMD_ACK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBOX_CMD_ACK@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
                                        ; -- End function
	.comm	_MBOX_CMD_ACK,4,2               ; @MBOX_CMD_ACK
	.comm	_MBOX_CMD_NAK,4,2               ; @MBOX_CMD_NAK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received unused/unexpected command: %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"Received unknown command: %u\n"

	.no_dead_strip	_process_msg
.subsections_via_symbols
