	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_unused_picture
_find_unused_picture:                   ## @find_unused_picture
	.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, %r15
	movq	%rdi, %r14
	movq	_MAX_PICTURE_COUNT@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%edx, %edx
	je	LBB0_5
## %bb.1:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rbx,8), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	jne	LBB0_3
	jmp	LBB0_9
LBB0_5:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_pic_is_unused
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	(%r12), %rax
	addq	$8, %r15
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_9:
	movq	_AV_LOG_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	xorl	%eax, %eax
	callq	_abort
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PICTURE_COUNT,4,2          ## @MAX_PICTURE_COUNT
	.comm	_AV_LOG_FATAL,4,2               ## @AV_LOG_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Internal error, picture buffer overflow\n"

	.no_dead_strip	_find_unused_picture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_unused_picture
_find_unused_picture:                   ; @find_unused_picture
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x22, _MAX_PICTURE_COUNT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_PICTURE_COUNT@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w2, LBB0_5
; %bb.1:
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, x21, lsl #3]
	ldr	x9, [x9]
	ldr	w9, [x9]
	cbz	w9, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	cmp	x8, x21
	b.ne	LBB0_3
	b	LBB0_9
LBB0_5:
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x21, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_pic_is_unused
	cbnz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x22]
	add	x20, x20, #8
	cmp	x21, x8
	b.lt	LBB0_7
LBB0_9:
Lloh2:
	adrp	x8, _AV_LOG_FATAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_FATAL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	bl	_abort
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PICTURE_COUNT,4,2          ; @MAX_PICTURE_COUNT
	.comm	_AV_LOG_FATAL,4,2               ; @AV_LOG_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Internal error, picture buffer overflow\n"

	.no_dead_strip	_find_unused_picture
.subsections_via_symbols
