	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hb_detelecine_work
_hb_detelecine_work:                    ## @hb_detelecine_work
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	(%rsi), %rcx
	movq	_HB_BUF_FLAG_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	%rcx, (%rbx)
	movq	$0, (%r13)
	movq	_HB_FILTER_DONE@GOTPCREL(%rip), %rbx
	jmp	LBB0_21
LBB0_2:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	movq	32(%r12), %r14
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_pullup_get_buffer
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	movl	(%rcx), %edi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	callq	_memcpy
	movq	(%r15), %rax
	movq	8(%r15), %rcx
	movl	4(%rcx), %edi
	movq	8(%rbx), %rcx
	movl	4(%rcx), %esi
	movl	4(%rax), %edx
	callq	_memcpy
	movq	(%r15), %rax
	movq	8(%r15), %rcx
	movl	8(%rcx), %edi
	movq	8(%rbx), %rcx
	movl	8(%rcx), %esi
	movl	8(%rax), %edx
	callq	_memcpy
	movq	_PIC_FLAG_TOP_FIELD_FIRST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	sete	%al
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	setne	%dl
	andb	%al, %dl
	cmpl	$1, %ecx
	sete	%al
	orb	%dl, %al
	movzbl	%al, %r12d
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_pullup_submit_field
	movl	%r12d, %edx
	xorl	$1, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_pullup_submit_field
	movq	_PIC_FLAG_REPEAT_FIRST_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_pullup_submit_field
LBB0_6:
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_pullup_release_buffer
	movq	%r14, %rdi
	callq	_pullup_get_frame
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	%rax, %r12
	cmpl	$1, (%rax)
	jg	LBB0_16
## %bb.10:
	movq	%r12, %rdi
	callq	_pullup_release_frame
	movq	%r14, %r15
	movq	%r14, %rdi
	callq	_pullup_get_frame
	movq	_HB_FILTER_OK@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	je	LBB0_21
## %bb.11:
	movq	%rax, %r12
	cmpl	$1, (%rax)
	jg	LBB0_15
## %bb.12:
	movq	%r12, %rdi
	callq	_pullup_release_frame
	movq	_PIC_FLAG_REPEAT_FIRST_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_21
## %bb.13:
	movq	%r15, %rdi
	callq	_pullup_get_frame
	testq	%rax, %rax
	je	LBB0_21
## %bb.14:
	movq	%rax, %r12
	cmpl	$1, (%rax)
	jg	LBB0_15
## %bb.22:
	movq	%r12, %rdi
	callq	_pullup_release_frame
	jmp	LBB0_21
LBB0_3:
	movq	%r14, %rdi
	callq	_pullup_get_frame
	movq	%rax, %rdi
	callq	_pullup_release_frame
	leaq	L_.str(%rip), %rdi
	callq	_hb_log
	movq	_HB_FILTER_FAILED@GOTPCREL(%rip), %rbx
	jmp	LBB0_21
LBB0_7:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.8:
	decq	%rax
	movq	%rax, 24(%rcx)
	movq	$0, (%r13)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_15:
	movq	%r15, %r14
LBB0_16:
	cmpq	$0, 8(%r12)
	jne	LBB0_18
## %bb.17:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_pullup_pack_frame
LBB0_18:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	16(%r15), %edi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	32(%r14), %edx
	movl	36(%r14), %esi
	callq	_hb_frame_buffer_init
	movq	%rax, %rbx
	movups	(%r15), %xmm0
	movups	%xmm0, 16(%rax)
	movq	8(%rax), %rax
	movl	(%rax), %edi
	movq	8(%r12), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movl	(%rax), %esi
	movl	(%rcx), %edx
	callq	_memcpy
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	movq	8(%r12), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movl	4(%rax), %esi
	movl	4(%rcx), %edx
	callq	_memcpy
	movq	8(%rbx), %rax
	movl	8(%rax), %edi
	movq	8(%r12), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movl	8(%rax), %esi
	movl	8(%rcx), %edx
	callq	_memcpy
	movq	%r12, %rdi
	callq	_pullup_release_frame
	movl	(%r14), %eax
	movl	%eax, (%rbx)
LBB0_19:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
LBB0_20:
	movq	_HB_FILTER_OK@GOTPCREL(%rip), %rbx
LBB0_21:
	movl	(%rbx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HB_BUF_FLAG_EOF,4,2            ## @HB_BUF_FLAG_EOF
	.comm	_HB_FILTER_DONE,4,2             ## @HB_FILTER_DONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not get buffer from pullup!"

	.comm	_HB_FILTER_FAILED,4,2           ## @HB_FILTER_FAILED
	.comm	_PIC_FLAG_TOP_FIELD_FIRST,4,2   ## @PIC_FLAG_TOP_FIELD_FIRST
	.comm	_PIC_FLAG_REPEAT_FIRST_FIELD,4,2 ## @PIC_FLAG_REPEAT_FIRST_FIELD
	.comm	_HB_FILTER_OK,4,2               ## @HB_FILTER_OK
	.no_dead_strip	_hb_detelecine_work
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hb_detelecine_work
_hb_detelecine_work:                    ; @hb_detelecine_work
	.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	x21, x1
	ldr	x24, [x1]
	ldr	w8, [x24]
Lloh0:
	adrp	x9, _HB_BUF_FLAG_EOF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HB_BUF_FLAG_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	str	x24, [x19]
	str	xzr, [x21]
Lloh3:
	adrp	x8, _HB_FILTER_DONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HB_FILTER_DONE@GOTPAGEOFF]
	b	LBB0_21
LBB0_2:
	ldr	x25, [x0]
	ldr	x20, [x25, #32]
	mov	x0, x20
	mov	w1, #2
	bl	_pullup_get_buffer
	cbz	x0, LBB0_13
; %bb.3:
	mov	x22, x0
	ldp	x9, x8, [x0]
	ldr	w0, [x8]
	ldr	x8, [x24, #8]
	ldr	w1, [x8]
	ldr	w2, [x9]
	bl	_memcpy
	ldp	x9, x8, [x22]
	ldr	w0, [x8, #4]
	ldr	x8, [x24, #8]
	ldr	w1, [x8, #4]
	ldr	w2, [x9, #4]
	bl	_memcpy
	ldp	x9, x8, [x22]
	ldr	w0, [x8, #8]
	ldr	x8, [x24, #8]
	ldr	w1, [x8, #8]
	ldr	w2, [x9, #8]
	bl	_memcpy
	ldr	w8, [x24]
Lloh5:
	adrp	x9, _PIC_FLAG_TOP_FIELD_FIRST@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PIC_FLAG_TOP_FIELD_FIRST@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	ldr	w8, [x20]
	ccmp	w8, #0, #4, eq
	ccmp	w8, #1, #4, eq
	cset	w23, eq
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_pullup_submit_field
	eor	w2, w23, #0x1
	mov	x0, x20
	mov	x1, x22
	bl	_pullup_submit_field
	ldr	w8, [x24]
Lloh8:
	adrp	x26, _PIC_FLAG_REPEAT_FIRST_FIELD@GOTPAGE
Lloh9:
	ldr	x26, [x26, _PIC_FLAG_REPEAT_FIRST_FIELD@GOTPAGEOFF]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_pullup_submit_field
LBB0_5:
	mov	x0, x22
	mov	w1, #2
	bl	_pullup_release_buffer
	mov	x0, x20
	bl	_pullup_get_frame
	cbz	x0, LBB0_17
; %bb.6:
	mov	x22, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.gt	LBB0_14
; %bb.7:
	mov	x0, x22
	bl	_pullup_release_frame
	mov	x0, x20
	bl	_pullup_get_frame
	cbz	x0, LBB0_20
; %bb.8:
	mov	x22, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.gt	LBB0_14
; %bb.9:
	mov	x0, x22
	bl	_pullup_release_frame
	ldr	w8, [x24]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.10:
	mov	x0, x20
	bl	_pullup_get_frame
	cbz	x0, LBB0_20
; %bb.11:
	mov	x22, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.gt	LBB0_14
; %bb.12:
	mov	x0, x22
	bl	_pullup_release_frame
	b	LBB0_20
LBB0_13:
	mov	x0, x20
	bl	_pullup_get_frame
	bl	_pullup_release_frame
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_log
Lloh12:
	adrp	x8, _HB_FILTER_FAILED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HB_FILTER_FAILED@GOTPAGEOFF]
	b	LBB0_21
LBB0_14:
	ldr	x8, [x22, #8]
	cbnz	x8, LBB0_16
; %bb.15:
	mov	x0, x20
	mov	x1, x22
	bl	_pullup_pack_frame
LBB0_16:
	ldr	w0, [x25, #16]
	ldp	w2, w1, [x24, #32]
	bl	_hb_frame_buffer_init
	mov	x20, x0
	ldr	q0, [x25]
	str	q0, [x0, #16]
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	ldr	x8, [x22, #8]
	ldp	x8, x9, [x8]
	ldr	w1, [x9]
	ldr	w2, [x8]
	bl	_memcpy
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #4]
	ldr	x8, [x22, #8]
	ldp	x8, x9, [x8]
	ldr	w1, [x9, #4]
	ldr	w2, [x8, #4]
	bl	_memcpy
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #8]
	ldr	x8, [x22, #8]
	ldp	x8, x9, [x8]
	ldr	w1, [x9, #8]
	ldr	w2, [x8, #8]
	bl	_memcpy
	mov	x0, x22
	bl	_pullup_release_frame
	ldr	w8, [x24]
	str	w8, [x20]
	mov	x24, x20
	b	LBB0_19
LBB0_17:
	ldr	x8, [x25, #24]
	cbz	x8, LBB0_20
; %bb.18:
	sub	x8, x8, #1
	str	x8, [x25, #24]
	str	xzr, [x21]
LBB0_19:
	str	x24, [x19]
LBB0_20:
Lloh14:
	adrp	x8, _HB_FILTER_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HB_FILTER_OK@GOTPAGEOFF]
LBB0_21:
	ldr	w0, [x8]
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_HB_BUF_FLAG_EOF,4,2            ; @HB_BUF_FLAG_EOF
	.comm	_HB_FILTER_DONE,4,2             ; @HB_FILTER_DONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not get buffer from pullup!"

	.comm	_HB_FILTER_FAILED,4,2           ; @HB_FILTER_FAILED
	.comm	_PIC_FLAG_TOP_FIELD_FIRST,4,2   ; @PIC_FLAG_TOP_FIELD_FIRST
	.comm	_PIC_FLAG_REPEAT_FIRST_FIELD,4,2 ; @PIC_FLAG_REPEAT_FIRST_FIELD
	.comm	_HB_FILTER_OK,4,2               ; @HB_FILTER_OK
	.no_dead_strip	_hb_detelecine_work
.subsections_via_symbols
