	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_mbox_startup
_omap_mbox_startup:                     ## @omap_mbox_startup
	.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	%rdi, %rbx
	movq	_mbox_rx_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mbox_queue_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, (%rbx)
	movq	%rbx, (%rax)
	movl	24(%rbx), %ecx
	movl	28(%rbx), %edi
	movq	_mbox_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %r8
	callq	_request_irq
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_pr_err
	movq	(%rbx), %rdi
	callq	_mbox_queue_free
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_7
LBB0_4:
	cmpq	$0, 16(%rbx)
	je	LBB0_6
## %bb.5:
	movq	_TXDONE_BY_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
LBB0_6:
	movq	_IRQ_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	__omap_mbox_enable_irq
	xorl	%r14d, %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mbox_rx_work,4,2               ## @mbox_rx_work
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mbox_interrupt,4,2             ## @mbox_interrupt
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to register mailbox interrupt:%d\n"

	.comm	_TXDONE_BY_ACK,4,2              ## @TXDONE_BY_ACK
	.comm	_IRQ_RX,4,2                     ## @IRQ_RX
	.no_dead_strip	_omap_mbox_startup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_mbox_startup
_omap_mbox_startup:                     ; @omap_mbox_startup
	.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	x19, x0
Lloh0:
	adrp	x8, _mbox_rx_work@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mbox_rx_work@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mbox_queue_alloc
	cbz	x0, LBB0_3
; %bb.1:
	str	x0, [x19]
	str	x19, [x0]
Lloh3:
	adrp	x8, _mbox_interrupt@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mbox_interrupt@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	ldp	w3, w0, [x19, #24]
	mov	x4, x19
	bl	_request_irq
	mov	x20, x0
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.2:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_err
	ldr	x0, [x19]
	bl	_mbox_queue_free
	b	LBB0_7
LBB0_3:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_4:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.5:
Lloh14:
	adrp	x8, _TXDONE_BY_ACK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TXDONE_BY_ACK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9]
LBB0_6:
Lloh17:
	adrp	x8, _IRQ_RX@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IRQ_RX@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	__omap_mbox_enable_irq
	mov	w20, #0
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_mbox_rx_work,4,2               ; @mbox_rx_work
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mbox_interrupt,4,2             ; @mbox_interrupt
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to register mailbox interrupt:%d\n"

	.comm	_TXDONE_BY_ACK,4,2              ; @TXDONE_BY_ACK
	.comm	_IRQ_RX,4,2                     ; @IRQ_RX
	.no_dead_strip	_omap_mbox_startup
.subsections_via_symbols
