	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __rvu_mbox_up_handler
___rvu_mbox_up_handler:                 ## @__rvu_mbox_up_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %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, -48(%rbp)                 ## 8-byte Spill
	cmpl	$128, %esi
	je	LBB0_3
## %bb.1:
	cmpl	$129, %esi
	jne	LBB0_18
## %bb.2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	32(%rax), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %rcx
LBB0_4:
	subq	16(%rcx), %rdi
	shrq	$3, %rdi
	movq	8(%rcx), %rax
	movslq	%edi, %rbx
	shlq	$4, %rbx
	movq	%rax, %r14
	movq	8(%rax,%rbx), %r13
	movslq	(%rcx), %r15
	movq	%r15, %rax
	shlq	$5, %rax
	cmpl	$0, (%r13,%rax)
	je	LBB0_19
## %bb.5:
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	addq	%rax, %r13
	movq	_MBOX_MSG_ALIGN@GOTPCREL(%rip), %rax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_ALIGN
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpl	$0, (%r13)
	jle	LBB0_17
## %bb.6:
	leaq	(%r14,%rbx), %rcx
	addq	$8, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	addl	%r15d, %eax
	addq	%rbx, %r14
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rcx, %rdx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	24(%r12,%rbx), %eax
	addl	(%rdi), %eax
	incl	(%r14)
	incl	%r15d
	cmpl	(%r13), %r15d
	jge	LBB0_17
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %r12
	movslq	%eax, %rbx
	shlq	$5, %rbx
	movslq	4(%r12,%rbx), %rcx
	movq	_MBOX_MSG_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jge	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r12,%rbx), %rdx
	movq	_OTX2_MBOX_RSP_SIG@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$130, %ecx
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%r12,%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_15
LBB0_17:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_otx2_mbox_reset                ## TAILCALL
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mbox up handler: num_msgs = 0\n"

	.comm	_MBOX_MSG_ALIGN,4,2             ## @MBOX_MSG_ALIGN
	.comm	_MBOX_MSG_MAX,4,2               ## @MBOX_MSG_MAX
L_.str.1:                               ## @.str.1
	.asciz	"Mbox msg with unknown ID 0x%x\n"

	.comm	_OTX2_MBOX_RSP_SIG,8,3          ## @OTX2_MBOX_RSP_SIG
L_.str.2:                               ## @.str.2
	.asciz	"Mbox msg with wrong signature %x, ID 0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Mbox msg response has err %d, ID 0x%x\n"

	.no_dead_strip	___rvu_mbox_up_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __rvu_mbox_up_handler
___rvu_mbox_up_handler:                 ; @__rvu_mbox_up_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x24, [x0]
	cmp	w1, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w1, #129
	b.ne	LBB0_18
; %bb.2:
	add	x19, x24, #32
	b	LBB0_4
LBB0_3:
	add	x19, x24, #8
LBB0_4:
	ldp	x20, x8, [x19, #8]
	sub	x21, x0, x8
	lsr	x9, x21, #3
	add	x25, x20, w9, sxtw #4
	ldr	x8, [x25, #8]!
	ldrsw	x22, [x19]
	add	x26, x8, x22, lsl #5
	ldr	w8, [x26]
	cbz	w8, LBB0_19
; %bb.5:
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _MBOX_MSG_ALIGN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBOX_MSG_ALIGN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_ALIGN
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.6:
	mov	w27, #0
	sbfx	x9, x21, #3, #32
	add	w8, w0, w22
	add	x28, x20, x9, lsl #4
Lloh3:
	adrp	x21, _MBOX_MSG_MAX@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MBOX_MSG_MAX@GOTPAGEOFF]
Lloh5:
	adrp	x23, l_.str.1@PAGE
Lloh6:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x24]
	mov	x1, x23
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	bl	_dev_err
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19]
	add	x9, x20, x22, lsl #5
	ldr	w9, [x9, #24]
	add	w8, w9, w8
	ldr	w9, [x28]
	add	w9, w9, #1
	str	w9, [x28]
	add	w27, w27, #1
	ldr	w9, [x26]
	cmp	w27, w9
	b.ge	LBB0_17
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x25]
	sxtw	x22, w8
	add	x8, x20, x22, lsl #5
	ldrsw	x2, [x8, #4]
	ldr	w9, [x21]
	cmp	w2, w9
	b.ge	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x8, #8]
Lloh7:
	adrp	x9, _OTX2_MBOX_RSP_SIG@GOTPAGE
Lloh8:
	ldr	x9, [x9, _OTX2_MBOX_RSP_SIG@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w2, #130
	b.eq	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x20, x22, lsl #5
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x24]
	str	x2, [sp]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x24]
	str	x2, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x2, x8
	b	LBB0_8
LBB0_17:
	mov	x0, x19
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
                                        ; kill: def $w1 killed $w1 killed $x1
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_otx2_mbox_reset
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_19:
	ldr	w0, [x24]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_dev_warn
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mbox up handler: num_msgs = 0\n"

	.comm	_MBOX_MSG_ALIGN,4,2             ; @MBOX_MSG_ALIGN
	.comm	_MBOX_MSG_MAX,4,2               ; @MBOX_MSG_MAX
l_.str.1:                               ; @.str.1
	.asciz	"Mbox msg with unknown ID 0x%x\n"

	.comm	_OTX2_MBOX_RSP_SIG,8,3          ; @OTX2_MBOX_RSP_SIG
l_.str.2:                               ; @.str.2
	.asciz	"Mbox msg with wrong signature %x, ID 0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Mbox msg response has err %d, ID 0x%x\n"

	.no_dead_strip	___rvu_mbox_up_handler
.subsections_via_symbols
