	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ifmp_ring_enqueue              ## -- Begin function ifmp_ring_enqueue
	.p2align	4, 0x90
_ifmp_ring_enqueue:                     ## @ifmp_ring_enqueue
	.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	%r8d, -56(%rbp)                 ## 4-byte Spill
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%edi, %edi
	testq	%rsi, %rsi
	setne	%dil
	callq	_MPASS
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setg	%dil
	callq	_MPASS
	movl	8(%r15), %eax
	movl	%eax, -48(%rbp)
	movq	-48(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_space_available
	cmpl	%ebx, %eax
	jle	LBB0_4
## %bb.1:
	leaq	8(%r15), %r13
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	callq	_increment_idx
	movl	%eax, %r12d
	xorl	%eax, %eax
	callq	_critical_enter
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_atomic_fcmpset_64
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_critical_exit
	xorl	%eax, %eax
	callq	_cpu_spinwait
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_space_available
	cmpl	%ebx, %eax
	jle	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_increment_idx
	movl	%eax, %r12d
	xorl	%eax, %eax
	callq	_critical_enter
	movq	%r13, %rdi
	leaq	-48(%rbp), %rsi
	movl	%r12d, %edx
	callq	_atomic_fcmpset_64
	testq	%rax, %rax
	je	LBB0_3
LBB0_8:
	movl	-48(%rbp), %ebx
	cmpl	%ebx, %r12d
	je	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_cpu_spinwait
	cmpl	%ebx, (%r13)
	jne	LBB0_9
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	addq	$8, %r14
	cmpl	%r12d, %ebx
	je	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	movq	16(%r15), %rcx
	movslq	%ebx, %rbx
	movl	%eax, (%rcx,%rbx,4)
	incl	%ebx
	xorl	%edi, %edi
	cmpl	(%r15), %ebx
	sete	%dil
	callq	___predict_false
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_4:
	movl	24(%r15), %edi
	movl	%ebx, %esi
	callq	_counter_u64_add
	movq	-48(%rbp), %rax
	movq	_IDLE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_MPASS
	movq	-48(%rbp), %rax
	movq	_STALLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ifmp_ring_check_drainage
LBB0_6:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_23
LBB0_13:
	movl	(%r13), %eax
	movl	%eax, -48(%rbp)
                                        ## implicit-def: $r14d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_BUSY@GOTPCREL(%rip), %rax
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	(%rax), %rbx
	movq	%rbx, %r14
	shrq	$32, %r14
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%r13, %rdi
	leaq	-48(%rbp), %rsi
	movl	%ebx, %edx
	callq	_atomic_fcmpset_rel_64
	testq	%rax, %rax
	jne	LBB0_20
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-48(%rbp), %rax
	movl	%r12d, %ebx
	movq	_IDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_ABDICATED@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_20:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_critical_exit
	movl	4(%r15), %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_counter_u64_add
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_23
## %bb.21:
	movq	-48(%rbp), %rdx
	movq	_BUSY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_23
## %bb.22:
	shlq	$32, %r14
	movl	%ebx, %esi
	orq	%r14, %rsi
	movq	%r15, %rdi
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	callq	_drain_ring_lockless
LBB0_23:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDLE,8,3                       ## @IDLE
	.comm	_STALLED,8,3                    ## @STALLED
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_ABDICATED,8,3                  ## @ABDICATED
	.comm	_BUSY,8,3                       ## @BUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ifmp_ring_enqueue              ; -- Begin function ifmp_ring_enqueue
	.p2align	2
_ifmp_ring_enqueue:                     ; @ifmp_ring_enqueue
	.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
	mov	x21, x4
	mov	x20, x3
	mov	x22, x2
	mov	x24, x1
	mov	x19, x0
	cmp	x1, #0
	cset	w0, ne
	bl	_MPASS
	cmp	w22, #0
	cset	w0, gt
	bl	_MPASS
	mov	x23, x19
	ldr	w8, [x23, #8]!
	str	w8, [sp, #8]
	ldr	x25, [sp, #8]
	mov	x0, x19
	mov	x1, x25
	bl	_space_available
	cmp	w0, w22
	b.le	LBB0_5
; %bb.1:
	mov	x0, x19
	mov	x1, x25
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x2, x22
	bl	_increment_idx
	mov	x25, x0
	bl	_critical_enter
	add	x1, sp, #8
	mov	x0, x23
	mov	x2, x25
	bl	_atomic_fcmpset_64
	cbnz	x0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_critical_exit
	bl	_cpu_spinwait
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_space_available
	cmp	w0, w22
	b.le	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [sp, #8]
	mov	x0, x19
	b	LBB0_2
LBB0_5:
	ldr	w0, [x19, #24]
	mov	x1, x22
	bl	_counter_u64_add
	ldr	x8, [sp, #8]
Lloh0:
	adrp	x9, _IDLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IDLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_MPASS
	ldr	x8, [sp, #8]
Lloh3:
	adrp	x9, _STALLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STALLED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	w1, #0
	bl	_ifmp_ring_check_drainage
LBB0_7:
Lloh6:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_21
LBB0_8:
	ldr	w26, [sp, #8]
	cmp	w25, w26
	str	w20, [sp, #4]                   ; 4-byte Folded Spill
	b.eq	LBB0_10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	bl	_cpu_spinwait
	ldr	w8, [x23]
	cmp	w8, w26
	b.ne	LBB0_9
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24], #8
	ldr	x9, [x19, #16]
	str	w8, [x9, w26, sxtw #2]
	add	w8, w26, #1
	ldr	w9, [x19]
	cmp	w8, w9
	cset	w0, eq
	bl	___predict_false
	cmp	x0, #0
	csinc	w26, wzr, w26, ne
	cmp	w26, w25
	b.ne	LBB0_10
; %bb.11:
	ldr	w8, [x23]
	str	w8, [sp, #8]
Lloh9:
	adrp	x27, _BUSY@GOTPAGE
Lloh10:
	ldr	x27, [x27, _BUSY@GOTPAGEOFF]
Lloh11:
	adrp	x28, _IDLE@GOTPAGE
Lloh12:
	ldr	x28, [x28, _IDLE@GOTPAGEOFF]
Lloh13:
	adrp	x20, _ABDICATED@GOTPAGE
Lloh14:
	ldr	x20, [x20, _ABDICATED@GOTPAGEOFF]
                                        ; implicit-def: $w26
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	ldp	w24, w26, [x27]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x1, sp, #8
	mov	x0, x23
	mov	x2, x24
	bl	_atomic_fcmpset_rel_64
	cbnz	x0, LBB0_17
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	cbz	w21, LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [x28]
	mov	x24, x25
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldp	w24, w26, [x20]
	b	LBB0_13
LBB0_17:
	bl	_critical_exit
	ldr	w0, [x19, #4]
	mov	x1, x22
	bl	_counter_u64_add
	cbnz	w21, LBB0_20
; %bb.18:
	ldr	x2, [sp, #8]
	ldr	x8, [x27]
	cmp	x2, x8
	b.eq	LBB0_20
; %bb.19:
	mov	w1, w24
	bfi	x1, x26, #32, #32
	mov	x0, x19
	ldr	w3, [sp, #4]                    ; 4-byte Folded Reload
	bl	_drain_ring_lockless
LBB0_20:
	mov	w0, #0
LBB0_21:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IDLE,8,3                       ; @IDLE
	.comm	_STALLED,8,3                    ; @STALLED
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_ABDICATED,8,3                  ; @ABDICATED
	.comm	_BUSY,8,3                       ; @BUSY
.subsections_via_symbols
