	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function frame_queue_peek_writable
_frame_queue_peek_writable:             ## @frame_queue_peek_writable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	40(%rdi), %edi
	callq	_SDL_LockMutex
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jl	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	32(%rbx), %rax
	cmpq	$0, (%rax)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	40(%rbx), %esi
	movl	44(%rbx), %edi
	callq	_SDL_CondWait
	jmp	LBB0_1
LBB0_4:
	movl	40(%rbx), %edi
	callq	_SDL_UnlockMutex
	movq	32(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_6:
	movq	16(%rbx), %rax
	shlq	$2, %rax
	addq	24(%rbx), %rax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_frame_queue_peek_writable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function frame_queue_peek_writable
_frame_queue_peek_writable:             ; @frame_queue_peek_writable
	.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
	ldr	w0, [x0, #40]
	bl	_SDL_LockMutex
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.lt	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	cbnz	x8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldp	w1, w0, [x19, #40]
	bl	_SDL_CondWait
	b	LBB0_1
LBB0_4:
	ldr	w0, [x19, #40]
	bl	_SDL_UnlockMutex
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, #0
	b	LBB0_7
LBB0_6:
	ldp	x9, x8, [x19, #16]
	add	x0, x8, x9, lsl #2
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_frame_queue_peek_writable
.subsections_via_symbols
