	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_avcodec_open                ## -- Begin function hb_avcodec_open
	.p2align	4, 0x90
_hb_avcodec_open:                       ## @hb_avcodec_open
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_HB_FFMPEG_THREADS_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %ecx
	jg	LBB0_2
## %bb.1:
	cmpl	%ecx, %eax
	jne	LBB0_6
LBB0_2:
	movq	(%r15), %rdx
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_6
## %bb.3:
	cmpl	%ecx, %eax
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_hb_get_cpu_count
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	incl	%ecx
LBB0_5:
	movl	%ecx, (%rbx)
	movq	_FF_THREAD_FRAME@GOTPCREL(%rip), %rax
	movq	_FF_THREAD_SLICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 4(%rbx)
	leaq	8(%rbx), %rax
	jmp	LBB0_7
LBB0_6:
	movq	%rbx, %rax
LBB0_7:
	movl	$1, (%rax)
	movq	_AV_CODEC_CAP_EXPERIMENTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	je	LBB0_9
## %bb.8:
	movq	_FF_COMPLIANCE_EXPERIMENTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
LBB0_9:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_avcodec_open2                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HB_FFMPEG_THREADS_AUTO,4,2     ## @HB_FFMPEG_THREADS_AUTO
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_FF_THREAD_FRAME,4,2            ## @FF_THREAD_FRAME
	.comm	_FF_THREAD_SLICE,4,2            ## @FF_THREAD_SLICE
	.comm	_AV_CODEC_CAP_EXPERIMENTAL,4,2  ## @AV_CODEC_CAP_EXPERIMENTAL
	.comm	_FF_COMPLIANCE_EXPERIMENTAL,4,2 ## @FF_COMPLIANCE_EXPERIMENTAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_avcodec_open                ; -- Begin function hb_avcodec_open
	.p2align	2
_hb_avcodec_open:                       ; @hb_avcodec_open
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _HB_FFMPEG_THREADS_AUTO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HB_FFMPEG_THREADS_AUTO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w3, #0
	b.gt	LBB0_2
; %bb.1:
	cmp	w8, w3
	b.ne	LBB0_6
LBB0_2:
	ldr	x9, [x20]
Lloh3:
	adrp	x10, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.3:
	cmp	w8, w3
	b.ne	LBB0_5
; %bb.4:
	bl	_hb_get_cpu_count
	cmp	w0, #0
	cinc	w8, w0, lt
	asr	w8, w8, #1
	add	w3, w8, #1
LBB0_5:
	str	w3, [x21]
Lloh6:
	adrp	x8, _FF_THREAD_FRAME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FF_THREAD_FRAME@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _FF_THREAD_SLICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _FF_THREAD_SLICE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x21, #4]
	add	x8, x21, #8
	b	LBB0_7
LBB0_6:
	mov	x8, x21
LBB0_7:
	mov	w9, #1
	str	w9, [x8]
	ldr	w8, [x20, #8]
Lloh12:
	adrp	x9, _AV_CODEC_CAP_EXPERIMENTAL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AV_CODEC_CAP_EXPERIMENTAL@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh15:
	adrp	x8, _FF_COMPLIANCE_EXPERIMENTAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FF_COMPLIANCE_EXPERIMENTAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x21, #12]
LBB0_9:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	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
	b	_avcodec_open2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_HB_FFMPEG_THREADS_AUTO,4,2     ; @HB_FFMPEG_THREADS_AUTO
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_FF_THREAD_FRAME,4,2            ; @FF_THREAD_FRAME
	.comm	_FF_THREAD_SLICE,4,2            ; @FF_THREAD_SLICE
	.comm	_AV_CODEC_CAP_EXPERIMENTAL,4,2  ; @AV_CODEC_CAP_EXPERIMENTAL
	.comm	_FF_COMPLIANCE_EXPERIMENTAL,4,2 ; @FF_COMPLIANCE_EXPERIMENTAL
.subsections_via_symbols
