	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_slice_thread_init           ## -- Begin function ff_slice_thread_init
	.p2align	4, 0x90
_ff_slice_thread_init:                  ## @ff_slice_thread_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	movq	48(%rdi), %rdi
	callq	_av_codec_is_encoder
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	8(%rbx), %rax
	movq	_AV_CODEC_ID_MPEG1VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	cmpl	$2801, 16(%rbx)                 ## imm = 0xAF1
	jge	LBB0_3
LBB0_4:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.5:
	cmpl	$1, %r14d
	jg	LBB0_12
LBB0_6:
	movq	$0, 32(%rbx)
	jmp	LBB0_20
LBB0_7:
	xorl	%eax, %eax
	callq	_av_cpu_count
                                        ## kill: def $eax killed $eax def $rax
	movl	16(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_9
## %bb.8:
	leal	15(%rsi), %ecx
	addl	$30, %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	sarl	$4, %esi
	movl	%eax, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_FFMIN
LBB0_9:
	movl	$1, %r14d
	cmpl	$2, %eax
	jl	LBB0_11
## %bb.10:
	incl	%eax
	movq	_MAX_AUTO_THREADS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_FFMIN
	movq	%rax, %r14
LBB0_11:
	movl	%r14d, (%rbx)
	cmpl	$1, %r14d
	jle	LBB0_6
LBB0_12:
	movl	$4, %edi
	callq	_av_mallocz
	movq	%rax, %r15
	movq	40(%rbx), %rdi
	movq	%rax, (%rdi)
	movq	48(%rbx), %rax
	movq	_FF_CODEC_CAP_SLICE_THREAD_HAS_MF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	je	LBB0_14
## %bb.13:
	movq	_main_function@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_14:
	xorl	%ecx, %ecx
LBB0_15:
	movq	%rcx, _ff_slice_thread_init.mainfunc(%rip)
	testq	%r15, %r15
	je	LBB0_18
## %bb.16:
	movq	_worker_func@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %r8d
	callq	_avpriv_slicethread_create
	cmpl	$1, %eax
	jg	LBB0_19
## %bb.17:
	movq	%r15, %rdi
	callq	_avpriv_slicethread_free
	movq	40(%rbx), %rdi
LBB0_18:
	callq	_av_freep
LBB0_3:
	movl	$1, (%rbx)
	movq	$0, 32(%rbx)
	jmp	LBB0_20
LBB0_19:
	movl	%eax, (%rbx)
	movq	_thread_execute@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_thread_execute2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
LBB0_20:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_ff_slice_thread_init.mainfunc,8,3 ## @ff_slice_thread_init.mainfunc
	.comm	_AV_CODEC_ID_MPEG1VIDEO,8,3     ## @AV_CODEC_ID_MPEG1VIDEO
	.comm	_MAX_AUTO_THREADS,4,2           ## @MAX_AUTO_THREADS
	.comm	_FF_CODEC_CAP_SLICE_THREAD_HAS_MF,4,2 ## @FF_CODEC_CAP_SLICE_THREAD_HAS_MF
	.comm	_worker_func,4,2                ## @worker_func
	.comm	_thread_execute,4,2             ## @thread_execute
	.comm	_thread_execute2,4,2            ## @thread_execute2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_slice_thread_init           ; -- Begin function ff_slice_thread_init
	.p2align	2
_ff_slice_thread_init:                  ; @ff_slice_thread_init
	.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	x19, x0
	ldr	w20, [x0]
	ldr	x0, [x0, #48]
	bl	_av_codec_is_encoder
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _AV_CODEC_ID_MPEG1VIDEO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_CODEC_ID_MPEG1VIDEO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x19, #16]
	cmp	w8, #2801
	b.ge	LBB0_16
LBB0_3:
	cbz	w20, LBB0_6
; %bb.4:
	cmp	w20, #1
	b.gt	LBB0_12
LBB0_5:
	str	xzr, [x19, #32]
	b	LBB0_18
LBB0_6:
	bl	_av_cpu_count
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_8
; %bb.7:
	add	w9, w8, #15
	add	w8, w8, #30
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w1, w8, #4
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_FFMIN
LBB0_8:
	cmp	w0, #2
	b.lt	LBB0_10
; %bb.9:
	add	w0, w0, #1
Lloh3:
	adrp	x8, _MAX_AUTO_THREADS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_AUTO_THREADS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_FFMIN
	mov	x20, x0
	b	LBB0_11
LBB0_10:
	mov	w20, #1
LBB0_11:
	str	w20, [x19]
	cmp	w20, #1
	b.le	LBB0_5
LBB0_12:
	mov	w0, #4
	bl	_av_mallocz
	mov	x21, x0
	ldp	x0, x8, [x19, #40]
	str	x21, [x0]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _FF_CODEC_CAP_SLICE_THREAD_HAS_MF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FF_CODEC_CAP_SLICE_THREAD_HAS_MF@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _main_function@GOTPAGE
Lloh10:
	ldr	x10, [x10, _main_function@GOTPAGEOFF]
	tst	w9, w8
	csel	x3, xzr, x10, eq
	adrp	x8, _ff_slice_thread_init.mainfunc@PAGE
	str	x3, [x8, _ff_slice_thread_init.mainfunc@PAGEOFF]
	cbz	x21, LBB0_15
; %bb.13:
Lloh11:
	adrp	x8, _worker_func@GOTPAGE
Lloh12:
	ldr	x8, [x8, _worker_func@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x19
	mov	x4, x20
	bl	_avpriv_slicethread_create
	cmp	w0, #1
	b.gt	LBB0_17
; %bb.14:
	mov	x0, x21
	bl	_avpriv_slicethread_free
	ldr	x0, [x19, #40]
LBB0_15:
	bl	_av_freep
LBB0_16:
	mov	w8, #1
	str	w8, [x19]
	str	xzr, [x19, #32]
	b	LBB0_18
LBB0_17:
	str	w0, [x19]
Lloh14:
	adrp	x8, _thread_execute@GOTPAGE
Lloh15:
	ldr	x8, [x8, _thread_execute@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _thread_execute2@GOTPAGE
Lloh18:
	ldr	x9, [x9, _thread_execute2@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #20]
LBB0_18:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_ff_slice_thread_init.mainfunc,8,3 ; @ff_slice_thread_init.mainfunc
	.comm	_AV_CODEC_ID_MPEG1VIDEO,8,3     ; @AV_CODEC_ID_MPEG1VIDEO
	.comm	_MAX_AUTO_THREADS,4,2           ; @MAX_AUTO_THREADS
	.comm	_FF_CODEC_CAP_SLICE_THREAD_HAS_MF,4,2 ; @FF_CODEC_CAP_SLICE_THREAD_HAS_MF
	.comm	_worker_func,4,2                ; @worker_func
	.comm	_thread_execute,4,2             ; @thread_execute
	.comm	_thread_execute2,4,2            ; @thread_execute2
.subsections_via_symbols
