	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbox_controller_register       ## -- Begin function mbox_controller_register
	.p2align	4, 0x90
_mbox_controller_register:              ## @mbox_controller_register
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r15
	movl	28(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_4
## %bb.2:
	movq	32(%r15), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.5:
	cmpq	$0, 48(%r15)
	je	LBB0_7
## %bb.6:
	movq	_TXDONE_BY_IRQ@GOTPCREL(%rip), %rdx
	jmp	LBB0_10
LBB0_7:
	cmpq	$0, 40(%r15)
	jne	LBB0_8
## %bb.9:
	movq	_TXDONE_BY_ACK@GOTPCREL(%rip), %rdx
	jmp	LBB0_10
LBB0_8:
	movq	_TXDONE_BY_POLL@GOTPCREL(%rip), %rdx
LBB0_10:
	movl	(%rdx), %r14d
	movq	_TXDONE_BY_POLL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r14d
	jne	LBB0_14
## %bb.11:
	cmpl	$0, (%rax)
	je	LBB0_12
## %bb.13:
	leaq	24(%r15), %rdi
	movq	_CLOCK_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HRTIMER_MODE_REL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hrtimer_init
	movq	_txdone_hrtimer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movl	(%r15), %ecx
LBB0_14:
	testl	%ecx, %ecx
	jle	LBB0_17
## %bb.15:
	movl	$16, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movq	$0, (%rax,%rbx)
	movq	%r15, -8(%rax,%rbx)
	movl	%r14d, -16(%rax,%rbx)
	leaq	(%rax,%rbx), %rdi
	addq	$-12, %rdi
	callq	_spin_lock_init
	incq	%r12
	movslq	(%r15), %rax
	addq	$24, %rbx
	cmpq	%rax, %r12
	jl	LBB0_16
LBB0_17:
	cmpq	$0, 8(%r15)
	jne	LBB0_19
## %bb.18:
	movq	_of_mbox_index_xlate@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
LBB0_19:
	movq	_con_mutex@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	addq	$4, %r15
	movq	_mbox_cons@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_12:
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TXDONE_BY_IRQ,4,2              ## @TXDONE_BY_IRQ
	.comm	_TXDONE_BY_POLL,4,2             ## @TXDONE_BY_POLL
	.comm	_TXDONE_BY_ACK,4,2              ## @TXDONE_BY_ACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"last_tx_done method is absent\n"

	.comm	_CLOCK_MONOTONIC,4,2            ## @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_REL,4,2           ## @HRTIMER_MODE_REL
	.comm	_txdone_hrtimer,4,2             ## @txdone_hrtimer
	.comm	_of_mbox_index_xlate,8,3        ## @of_mbox_index_xlate
	.comm	_con_mutex,4,2                  ## @con_mutex
	.comm	_mbox_cons,4,2                  ## @mbox_cons
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbox_controller_register       ; -- Begin function mbox_controller_register
	.p2align	2
_mbox_controller_register:              ; @mbox_controller_register
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x0, LBB0_17
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #28]
	cbz	w0, LBB0_17
; %bb.2:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_17
; %bb.3:
	ldr	w9, [x19]
	cbz	w9, LBB0_17
; %bb.4:
	ldr	x11, [x19, #48]
Lloh0:
	adrp	x10, _TXDONE_BY_POLL@GOTPAGE
Lloh1:
	ldr	x10, [x10, _TXDONE_BY_POLL@GOTPAGEOFF]
	cbz	x11, LBB0_6
; %bb.5:
Lloh2:
	adrp	x11, _TXDONE_BY_IRQ@GOTPAGE
Lloh3:
	ldr	x11, [x11, _TXDONE_BY_IRQ@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	ldr	x11, [x19, #40]
Lloh4:
	adrp	x12, _TXDONE_BY_ACK@GOTPAGE
Lloh5:
	ldr	x12, [x12, _TXDONE_BY_ACK@GOTPAGEOFF]
	cmp	x11, #0
	csel	x11, x12, x10, eq
LBB0_7:
	ldr	w20, [x11]
	ldr	w10, [x10]
	cmp	w20, w10
	b.ne	LBB0_10
; %bb.8:
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.9:
	add	x0, x19, #24
Lloh6:
	adrp	x8, _CLOCK_MONOTONIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CLOCK_MONOTONIC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _HRTIMER_MODE_REL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HRTIMER_MODE_REL@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	bl	_hrtimer_init
Lloh12:
	adrp	x8, _txdone_hrtimer@GOTPAGE
Lloh13:
	ldr	x8, [x8, _txdone_hrtimer@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	ldr	w9, [x19]
LBB0_10:
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x21, #0
	mov	x22, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	stp	x19, xzr, [x8, #8]
	str	w20, [x8]
	add	x0, x8, #4
	bl	_spin_lock_init
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #24
	cmp	x22, x8
	b.lt	LBB0_12
LBB0_13:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_15
; %bb.14:
Lloh15:
	adrp	x8, _of_mbox_index_xlate@GOTPAGE
Lloh16:
	ldr	x8, [x8, _of_mbox_index_xlate@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_15:
Lloh18:
	adrp	x20, _con_mutex@GOTPAGE
Lloh19:
	ldr	x20, [x20, _con_mutex@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #4
Lloh20:
	adrp	x1, _mbox_cons@GOTPAGE
Lloh21:
	ldr	x1, [x1, _mbox_cons@GOTPAGEOFF]
	bl	_list_add_tail
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_18
LBB0_16:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_17:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TXDONE_BY_IRQ,4,2              ; @TXDONE_BY_IRQ
	.comm	_TXDONE_BY_POLL,4,2             ; @TXDONE_BY_POLL
	.comm	_TXDONE_BY_ACK,4,2              ; @TXDONE_BY_ACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"last_tx_done method is absent\n"

	.comm	_CLOCK_MONOTONIC,4,2            ; @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_REL,4,2           ; @HRTIMER_MODE_REL
	.comm	_txdone_hrtimer,4,2             ; @txdone_hrtimer
	.comm	_of_mbox_index_xlate,8,3        ; @of_mbox_index_xlate
	.comm	_con_mutex,4,2                  ; @con_mutex
	.comm	_mbox_cons,4,2                  ; @mbox_cons
.subsections_via_symbols
