	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function select_from_pts_buffer
_select_from_pts_buffer:                ## @select_from_pts_buffer
	.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	%rdx, %r9
	movq	%rsi, %r12
	movq	24(%rdi), %rax
	movq	(%rax), %rax
	movq	_AV_CODEC_ID_H264@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_AV_CODEC_ID_HEVC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
LBB0_19:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r9
	jne	LBB0_21
## %bb.20:
	movq	(%r12), %r9
LBB0_21:
	movq	%r9, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %r14d
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	%r9, %rax
	jne	LBB0_3
## %bb.10:
	testl	%r14d, %r14d
	jle	LBB0_19
## %bb.11:
	movq	_INT64_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	(%rdi), %r11
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_19
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r11,%rbx,4), %rcx
	testq	%rcx, %rcx
	je	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	8(%rdi), %rax
	movq	(%rax,%rbx,8), %rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	cqto
	idivq	%rcx
	cmpq	%r8, %rax
	jge	LBB0_18
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r8, %rax
	jge	LBB0_18
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r12,%rbx,8), %r9
	movq	%rax, %r8
	jmp	LBB0_18
LBB0_3:
	testl	%r14d, %r14d
	jle	LBB0_19
## %bb.4:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	decq	%r14
	xorl	%r13d, %r13d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%r13,8), %rdi
	cmpq	%rax, %rdi
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	subq	%r9, %rdi
	movq	%r9, %rbx
	callq	_FFABS
	movq	8(%r15), %rcx
	movq	(%rcx,%r13,8), %rsi
	leaq	(%rax,%rsi), %rdi
	callq	_FFMAX
	movq	%rbx, %r9
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rbx
	movq	8(%r15), %r8
	movq	%rax, (%r8,%r13,8)
	movq	(%r15), %rcx
	movl	(%rcx,%r13,4), %edi
	leal	1(%rdi), %edx
	movl	%edx, (%rcx,%r13,4)
	cmpl	$250, %edi
	jl	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	sarq	%rax
	movq	%rax, (%r8,%r13,8)
	shrl	%edx
	movl	%edx, (%rcx,%r13,4)
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r13, %r14
	je	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rax
	incq	%r13
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_ID_H264,8,3           ## @AV_CODEC_ID_H264
	.comm	_AV_CODEC_ID_HEVC,8,3           ## @AV_CODEC_ID_HEVC
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_INT64_MAX,8,3                  ## @INT64_MAX
	.no_dead_strip	_select_from_pts_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function select_from_pts_buffer
_select_from_pts_buffer:                ; @select_from_pts_buffer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	ldr	x8, [x0, #24]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _AV_CODEC_ID_H264@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_CODEC_ID_H264@GOTPAGEOFF]
Lloh2:
	adrp	x10, _AV_CODEC_ID_HEVC@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AV_CODEC_ID_HEVC@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
Lloh6:
	adrp	x22, _AV_NOPTS_VALUE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _AV_NOPTS_VALUE@GOTPAGEOFF]
	b.ne	LBB0_15
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	w8, [x8]
	ldr	x9, [x22]
	cmp	x9, x19
	b.ne	LBB0_8
; %bb.2:
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.3:
	mov	x9, #0
Lloh8:
	adrp	x10, _INT64_MAX@GOTPAGE
Lloh9:
	ldr	x10, [x10, _INT64_MAX@GOTPAGEOFF]
Lloh10:
	ldr	x11, [x10]
	ldr	x10, [x21]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.eq	LBB0_15
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x12, [x10, x9, lsl #2]
	cbz	w12, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x13, [x21, #8]
	ldr	x13, [x13, x9, lsl #3]
	sdiv	x12, x13, x12
	cmp	x12, x11
	b.ge	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x19, [x20, x9, lsl #3]
	mov	x11, x12
	b	LBB0_4
LBB0_8:
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.9:
	mov	x23, #0
	sub	x24, x8, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, x23, lsl #3]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	sub	x0, x8, x19
	bl	_FFABS
	ldr	x8, [x21, #8]
	lsl	x25, x23, #3
	ldr	x1, [x8, x25]
	add	x0, x1, x0
	bl	_FFMAX
	ldp	x9, x8, [x21]
	str	x0, [x8, x25]
	lsl	x11, x23, #2
	ldr	w12, [x9, x11]
	add	w10, w12, #1
	str	w10, [x9, x11]
	cmp	w12, #250
	b.lt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	asr	x11, x0, #1
	str	x11, [x8, x23, lsl #3]
	lsr	w8, w10, #1
	str	w8, [x9, x23, lsl #2]
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	cmp	x24, x23
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [x22]
	add	x23, x23, #1
	b	LBB0_10
LBB0_15:
	ldr	x8, [x22]
	cmp	x19, x8
	b.ne	LBB0_17
; %bb.16:
	ldr	x19, [x20]
LBB0_17:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_ID_H264,8,3           ; @AV_CODEC_ID_H264
	.comm	_AV_CODEC_ID_HEVC,8,3           ; @AV_CODEC_ID_HEVC
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_INT64_MAX,8,3                  ; @INT64_MAX
	.no_dead_strip	_select_from_pts_buffer
.subsections_via_symbols
