	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_msg
_add_msg:                               ## @add_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_R3964_MAX_MSG_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	cmpl	%eax, (%rdi)
	jl	LBB0_1
## %bb.11:
	movq	16(%rbx), %rax
	movq	_R3964_MSG_ACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	cmpl	%r15d, (%rax)
	jne	LBB0_12
## %bb.14:
	movq	_R3964_OVERFLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	cmpl	%r12d, 8(%rax)
	jne	LBB0_13
## %bb.15:
	incl	4(%rax)
	leaq	L_.str.1(%rip), %rdi
	callq	_TRACE_PE
	jmp	LBB0_16
LBB0_12:
	movq	_R3964_OVERFLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	callq	_TRACE_PE
	xorl	%r14d, %r14d
	xorl	%r8d, %r8d
LBB0_1:
	testl	%r12d, %r12d
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	jne	LBB0_2
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kmalloc
	movq	%rax, %r13
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_TRACE_M
	testq	%r13, %r13
	je	LBB0_17
## %bb.5:
	leaq	24(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movl	%r15d, (%r13)
	movl	%r14d, 4(%r13)
	movl	%r12d, 8(%r13)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 24(%r13)
	movq	$0, 16(%r13)
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.7:
	leaq	16(%rbx), %rax
	movq	%r13, 16(%rcx)
	jmp	LBB0_8
LBB0_6:
	movq	%r13, 16(%rbx)
	leaq	32(%rbx), %rax
LBB0_8:
	movq	%r13, (%rax)
	incl	(%rbx)
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.9:
	incl	(%rdx)
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
LBB0_16:
	movq	_R3964_USE_SIGIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_17
## %bb.18:
	movl	8(%rbx), %edi
	movq	_SIGIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kill_pid                       ## TAILCALL
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R3964_MAX_MSG_COUNT,4,2        ## @R3964_MAX_MSG_COUNT
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"add_msg - kmalloc %p"

	.comm	_R3964_MSG_ACK,4,2              ## @R3964_MSG_ACK
	.comm	_R3964_OVERFLOW,4,2             ## @R3964_OVERFLOW
L_.str.1:                               ## @.str.1
	.asciz	"add_msg - inc prev OVERFLOW-msg"

L_.str.2:                               ## @.str.2
	.asciz	"add_msg - queue OVERFLOW-msg"

	.comm	_R3964_USE_SIGIO,4,2            ## @R3964_USE_SIGIO
	.comm	_SIGIO,4,2                      ## @SIGIO
	.no_dead_strip	_add_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_msg
_add_msg:                               ; @add_msg
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _R3964_MAX_MSG_COUNT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _R3964_MAX_MSG_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w9, w9, #1
	cmp	w8, w9
	b.lt	LBB0_6
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	w9, [x8]
Lloh3:
	adrp	x10, _R3964_MSG_ACK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _R3964_MSG_ACK@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x10]
	cmp	w9, w21
	b.ne	LBB0_4
; %bb.2:
	ldr	w9, [x8, #8]
Lloh6:
	adrp	x10, _R3964_OVERFLOW@GOTPAGE
Lloh7:
	ldr	x10, [x10, _R3964_OVERFLOW@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x10]
	cmp	w9, w22
	b.ne	LBB0_5
; %bb.3:
	ldr	w9, [x8, #4]
	add	w9, w9, #1
	str	w9, [x8, #4]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE_PE
	b	LBB0_13
LBB0_4:
Lloh11:
	adrp	x8, _R3964_OVERFLOW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R3964_OVERFLOW@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
LBB0_5:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE_PE
	mov	w23, #0
	mov	x20, #0
LBB0_6:
Lloh16:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh18:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
	cmp	w22, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kmalloc
	mov	x25, x0
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x25
	bl	_TRACE_M
	cbz	x25, LBB0_15
; %bb.7:
	add	x24, x19, #24
	mov	x0, x24
	bl	_spin_lock_irqsave
	stp	w21, w23, [x25]
	str	w22, [x25, #8]
	stp	xzr, x20, [x25, #16]
	mov	x8, x19
	ldr	x9, [x8, #16]!
	cbz	x9, LBB0_9
; %bb.8:
	str	x25, [x9, #16]
	b	LBB0_10
LBB0_9:
	str	x25, [x19, #16]
	add	x8, x19, #32
LBB0_10:
	str	x25, [x8]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	cbz	x20, LBB0_12
; %bb.11:
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
LBB0_12:
	mov	x0, x24
	bl	_spin_unlock_irqrestore
LBB0_13:
	ldr	w8, [x19, #4]
Lloh22:
	adrp	x9, _R3964_USE_SIGIO@GOTPAGE
Lloh23:
	ldr	x9, [x9, _R3964_USE_SIGIO@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
	ldr	w0, [x19, #8]
Lloh25:
	adrp	x8, _SIGIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SIGIO@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	w2, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_kill_pid
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_R3964_MAX_MSG_COUNT,4,2        ; @R3964_MAX_MSG_COUNT
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"add_msg - kmalloc %p"

	.comm	_R3964_MSG_ACK,4,2              ; @R3964_MSG_ACK
	.comm	_R3964_OVERFLOW,4,2             ; @R3964_OVERFLOW
l_.str.1:                               ; @.str.1
	.asciz	"add_msg - inc prev OVERFLOW-msg"

l_.str.2:                               ; @.str.2
	.asciz	"add_msg - queue OVERFLOW-msg"

	.comm	_R3964_USE_SIGIO,4,2            ; @R3964_USE_SIGIO
	.comm	_SIGIO,4,2                      ; @SIGIO
	.no_dead_strip	_add_msg
.subsections_via_symbols
