	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_delta_get_free_frame           ## -- Begin function delta_get_free_frame
	.p2align	4, 0x90
_delta_get_free_frame:                  ## @delta_get_free_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	movq	$0, (%rsi)
	movl	4(%rdi), %edi
	callq	_v4l2_m2m_dst_buf_remove
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rdi
	callq	_to_frame
	movq	%rax, %r15
	movq	_DELTA_FRAME_M2M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	4(%r15), %eax
	movl	%eax, 4(%r15)
	movq	_DELTA_FRAME_FREE@GOTPCREL(%rip), %rsi
	movl	(%r12), %edi
	movl	(%rbx), %edx
	movl	(%r15), %ecx
	cmpl	(%rsi), %eax
	jne	LBB0_4
## %bb.2:
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	movq	%r15, (%r14)
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_3:
	movl	(%r12), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_dump_frames_status
	movq	_ENODATA@GOTPCREL(%rip), %rax
LBB0_5:
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s no frame available"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_DELTA_FRAME_M2M,4,2            ## @DELTA_FRAME_M2M
	.comm	_DELTA_FRAME_FREE,4,2           ## @DELTA_FRAME_FREE
L_.str.1:                               ## @.str.1
	.asciz	"%s frame[%d] is not free\n"

	.comm	_ENODATA,4,2                    ## @ENODATA
L_.str.2:                               ## @.str.2
	.asciz	"%s get free frame[%d]\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_delta_get_free_frame           ; -- Begin function delta_get_free_frame
	.p2align	2
_delta_get_free_frame:                  ; @delta_get_free_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	str	xzr, [x1]
	ldr	w0, [x0, #4]
	bl	_v4l2_m2m_dst_buf_remove
	cbz	x0, LBB0_3
; %bb.1:
	bl	_to_frame
	mov	x21, x0
Lloh0:
	adrp	x8, _DELTA_FRAME_M2M@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DELTA_FRAME_M2M@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w3, w9, [x0]
	bic	w8, w9, w8
	str	w8, [x0, #4]
Lloh3:
	adrp	x9, _DELTA_FRAME_FREE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DELTA_FRAME_FREE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	w0, [x22]
	ldr	w2, [x19]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_dev_dbg
	mov	w0, #0
	str	x21, [x20]
	b	LBB0_6
LBB0_3:
	ldr	w0, [x22]
	ldr	w2, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
	str	x3, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_dump_frames_status
Lloh14:
	adrp	x8, _ENODATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s no frame available"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_DELTA_FRAME_M2M,4,2            ; @DELTA_FRAME_M2M
	.comm	_DELTA_FRAME_FREE,4,2           ; @DELTA_FRAME_FREE
l_.str.1:                               ; @.str.1
	.asciz	"%s frame[%d] is not free\n"

	.comm	_ENODATA,4,2                    ; @ENODATA
l_.str.2:                               ; @.str.2
	.asciz	"%s get free frame[%d]\n"

.subsections_via_symbols
