	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwc_next_fill_frame
_pwc_next_fill_frame:                   ## @pwc_next_fill_frame
	.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
	callq	_spin_lock_irqsave
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.3:
	leaq	32(%rbx), %rcx
	movq	32(%rbx), %rdx
	movq	%rax, (%rdx)
	jmp	LBB0_4
LBB0_2:
	movq	%rax, 16(%rbx)
	leaq	32(%rbx), %rcx
LBB0_4:
	movq	%rax, (%rcx)
LBB0_5:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	24(%rbx), %rcx
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_7:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	leaq	16(%rbx), %rcx
	movl	$1, %r14d
LBB0_9:
	movq	%rax, 8(%rbx)
	movq	(%rax), %rdx
	movq	%rdx, (%rcx)
	movq	$0, (%rax)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_10:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str(%rip), %rdi
	callq	_PWC_ERROR
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Neither empty or full frames available!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_pwc_next_fill_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwc_next_fill_frame
_pwc_next_fill_frame:                   ; @pwc_next_fill_frame
	.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
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_3
; %bb.2:
	mov	x9, x19
	ldr	x10, [x9, #32]!
	str	x8, [x10]
	b	LBB0_4
LBB0_3:
	str	x8, [x19, #16]
	add	x9, x19, #32
LBB0_4:
	str	x8, [x9]
LBB0_5:
	mov	x9, x19
	ldr	x8, [x9, #24]!
	cbz	x8, LBB0_7
; %bb.6:
	mov	w20, #0
	b	LBB0_9
LBB0_7:
	mov	x9, x19
	ldr	x8, [x9, #16]!
	cbz	x8, LBB0_11
; %bb.8:
	mov	w20, #1
LBB0_9:
	str	x8, [x19, #8]
	ldr	x10, [x8]
	str	x10, [x9]
	str	xzr, [x8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_PWC_ERROR
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Neither empty or full frames available!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_pwc_next_fill_frame
.subsections_via_symbols
