	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MtDec_PrepareRead              ## -- Begin function MtDec_PrepareRead
	.p2align	4, 0x90
_MtDec_PrepareRead:                     ## @MtDec_PrepareRead
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	40(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	movq	(%r12), %rax
	cmpq	8(%r12), %rax
	jne	LBB0_3
## %bb.2:
	movl	48(%r12), %edi
	callq	_ISzAlloc_Free
	movq	$0, 40(%r12)
LBB0_3:
	movq	_MTDEC__THREADS_MAX@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	32(%r12), %rdi
	addq	%r13, %rdi
	callq	_MtDecThread_FreeInBufs
	movl	(%r14), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	addq	$4, %r13
	cmpq	%rcx, %rbx
	jae	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r12), %ecx
	cmpq	%rcx, %rbx
	ja	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	24(%r12), %edx
	cmpq	%rdx, %rbx
	cmovael	%r15d, %ecx
	subl	%edx, %ecx
	addl	%ebx, %ecx
	cmpl	%ecx, 20(%r12)
	jbe	LBB0_7
	jmp	LBB0_8
LBB0_9:
	movl	$1, %eax
	cmpl	$0, 20(%r12)
	jne	LBB0_11
## %bb.10:
	movq	(%r12), %rcx
	xorl	%eax, %eax
	cmpq	8(%r12), %rcx
	setne	%al
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTDEC__THREADS_MAX,4,2         ## @MTDEC__THREADS_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MtDec_PrepareRead              ; -- Begin function MtDec_PrepareRead
	.p2align	2
_MtDec_PrepareRead:                     ; @MtDec_PrepareRead
	.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	x1, [x0, #40]
	cbz	x1, LBB0_3
; %bb.1:
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w0, [x19, #48]
	bl	_ISzAlloc_Free
	str	xzr, [x19, #40]
LBB0_3:
Lloh0:
	adrp	x20, _MTDEC__THREADS_MAX@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MTDEC__THREADS_MAX@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_9
; %bb.4:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #32]
	add	x0, x8, x21
	bl	_MtDecThread_FreeInBufs
	ldr	w8, [x20]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, #1
	add	x21, x21, #4
	cmp	x22, w8, uxtw
	b.hs	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19, #16]
	cmp	x22, x9
	b.hi	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldp	w10, w11, [x19, #20]
	cmp	x22, x11
	csel	w9, w9, wzr, lo
	sub	w9, w9, w11
	add	w9, w22, w9
	cmp	w10, w9
	b.ls	LBB0_5
	b	LBB0_6
LBB0_9:
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_11
; %bb.10:
	mov	w0, #1
	b	LBB0_12
LBB0_11:
	ldp	x8, x9, [x19]
	cmp	x8, x9
	cset	w0, ne
LBB0_12:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_MTDEC__THREADS_MAX,4,2         ; @MTDEC__THREADS_MAX
.subsections_via_symbols
