	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx18_get_mdl
_cx18_get_mdl:                          ## @cx18_get_mdl
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %r14
	movq	32(%r14), %r12
	movq	_CX18_ENC_STREAM_TYPE_VBI@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	shlq	$5, %rbx
	leaq	(%r12,%rbx), %r15
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DEFINE_WAIT
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	$0, (%r13)
	leaq	(%r12,%rbx), %rax
	addq	$20, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	16(%r12,%rbx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	leaq	16(%r12), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	20(%r12), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	12(%r12), %rbx
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_finish_wait
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_23
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	(%r12), %rax
	movq	_CX18_ENC_STREAM_TYPE_MPG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %r13
	movq	24(%r14), %rbx
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	addq	%rax, %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rax
	movq	%rax, 24(%r14)
	movq	%r14, %rdi
	callq	_cx18_dualwatch
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_CX18_F_S_INTERNAL_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_test_bit
	testq	%rax, %rax
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_CX18_F_S_APPL_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_cx18_dequeue
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r15), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cx18_process_vbi_data
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_cx18_stream_put_mdl_fw
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_cx18_dequeue
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r14), %rax
	cmpq	8(%r14), %rax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_cx18_dequeue
	testq	%rax, %rax
	jne	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_CX18_F_S_STREAMING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	callq	_test_bit
	testq	%rax, %rax
	movq	_wait@GOTPCREL(%rip), %r13
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_prepare_to_wait
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_read
	testl	%eax, %eax
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_schedule
	jmp	LBB0_22
LBB0_12:
	movq	%rax, %r13
	movq	_CX18_F_M_NEED_SWAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	addq	$16, %rsi
	callq	_test_and_clear_bit
	testl	%eax, %eax
	je	LBB0_25
## %bb.13:
	movq	(%r12), %rdx
	movq	_CX18_ENC_STREAM_TYPE_MPG@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_15
## %bb.14:
	movq	%r13, %rdi
	callq	_cx18_mdl_swap
	jmp	LBB0_25
LBB0_17:
	movl	8(%r12), %esi
	leaq	L_.str(%rip), %rdi
	callq	_CX18_DEBUG_INFO
	xorl	%r13d, %r13d
	jmp	LBB0_25
LBB0_19:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_23:
	movl	8(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_CX18_DEBUG_INFO
	movq	_EINTR@GOTPCREL(%rip), %rax
LBB0_24:
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	jmp	LBB0_25
LBB0_10:
	movq	%r14, %r13
	jmp	LBB0_25
LBB0_15:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_cx18_process_vbi_data
LBB0_25:
	movq	%r13, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CX18_ENC_STREAM_TYPE_VBI,8,3   ## @CX18_ENC_STREAM_TYPE_VBI
	.comm	_wait,4,2                       ## @wait
	.comm	_CX18_ENC_STREAM_TYPE_MPG,8,3   ## @CX18_ENC_STREAM_TYPE_MPG
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_CX18_F_S_INTERNAL_USE,4,2      ## @CX18_F_S_INTERNAL_USE
	.comm	_CX18_F_S_APPL_IO,4,2           ## @CX18_F_S_APPL_IO
	.comm	_CX18_F_M_NEED_SWAP,4,2         ## @CX18_F_M_NEED_SWAP
	.comm	_CX18_F_S_STREAMING,4,2         ## @CX18_F_S_STREAMING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EOS %s\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_current,4,2                    ## @current
L_.str.1:                               ## @.str.1
	.asciz	"User stopped %s\n"

	.comm	_EINTR,4,2                      ## @EINTR
	.no_dead_strip	_cx18_get_mdl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx18_get_mdl
_cx18_get_mdl:                          ; @cx18_get_mdl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x25, [x0, #24]
Lloh0:
	adrp	x8, _CX18_ENC_STREAM_TYPE_VBI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CX18_ENC_STREAM_TYPE_VBI@GOTPAGEOFF]
	ldr	x9, [x25, #32]
Lloh2:
	ldr	x8, [x8]
	add	x23, x9, x8, lsl #5
Lloh3:
	adrp	x24, _wait@GOTPAGE
Lloh4:
	ldr	x24, [x24, _wait@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_DEFINE_WAIT
	str	wzr, [x19]
	add	x8, x23, #20
	stp	x19, x8, [sp, #8]               ; 16-byte Folded Spill
	add	x26, x23, #16
	add	x27, x21, #16
	add	x8, x21, #20
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	add	x20, x21, #12
Lloh5:
	adrp	x28, _CX18_ENC_STREAM_TYPE_MPG@GOTPAGE
Lloh6:
	ldr	x28, [x28, _CX18_ENC_STREAM_TYPE_MPG@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x24
	bl	_finish_wait
Lloh7:
	adrp	x8, _current@GOTPAGE
Lloh8:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_signal_pending
	cbnz	x0, LBB0_21
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x21]
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x22
Lloh10:
	adrp	x28, _jiffies@GOTPAGE
Lloh11:
	ldr	x28, [x28, _jiffies@GOTPAGEOFF]
	ldr	x19, [x28]
	ldr	x22, [x25, #24]
	mov	w0, #1000
	bl	_msecs_to_jiffies
	add	x1, x0, x22
	mov	x0, x19
	bl	_time_after
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x28]
	str	x8, [x25, #24]
	mov	x0, x25
	bl	_cx18_dualwatch
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh12:
	adrp	x8, _CX18_F_S_INTERNAL_USE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CX18_F_S_INTERNAL_USE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	bl	_test_bit
	cbz	x0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh15:
	adrp	x8, _CX18_F_S_APPL_IO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CX18_F_S_APPL_IO@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	bl	_test_bit
	cbnz	x0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	mov	x1, x26
	bl	_cx18_dequeue
	cbz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x19, x0
LBB0_9:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x2, [x23]
	mov	x0, x25
	mov	x1, x19
	bl	_cx18_process_vbi_data
	mov	x0, x23
	mov	x1, x19
	bl	_cx18_stream_put_mdl_fw
	mov	x0, x23
	mov	x1, x26
	bl	_cx18_dequeue
	mov	x19, x0
	cbnz	x0, LBB0_9
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	x8, x9, [x25]
	cmp	x8, x9
	mov	x22, x24
Lloh18:
	adrp	x24, _wait@GOTPAGE
Lloh19:
	ldr	x24, [x24, _wait@GOTPAGEOFF]
Lloh20:
	adrp	x28, _CX18_ENC_STREAM_TYPE_MPG@GOTPAGE
Lloh21:
	ldr	x28, [x28, _CX18_ENC_STREAM_TYPE_MPG@GOTPAGEOFF]
	b.ne	LBB0_23
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x1, x27
	bl	_cx18_dequeue
	cbnz	x0, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh22:
	adrp	x8, _CX18_F_S_STREAMING@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CX18_F_S_STREAMING@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	x1, [sp, #24]                   ; 8-byte Folded Reload
	bl	_test_bit
	cbz	x0, LBB0_19
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w22, LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh25:
	adrp	x8, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x24
	bl	_prepare_to_wait
	mov	x0, x27
	bl	_atomic_read
	cbnz	w0, LBB0_1
; %bb.15:                               ;   in Loop: Header=BB0_2 Depth=1
	bl	_schedule
	b	LBB0_1
LBB0_16:
	mov	x19, x0
Lloh28:
	adrp	x8, _CX18_F_M_NEED_SWAP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CX18_F_M_NEED_SWAP@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_test_and_clear_bit
	cbz	w0, LBB0_25
; %bb.17:
	ldr	x2, [x21]
	ldr	x8, [x28]
	cmp	x2, x8
	b.ne	LBB0_24
; %bb.18:
	mov	x0, x19
	bl	_cx18_mdl_swap
	b	LBB0_25
LBB0_19:
	ldr	w1, [x21, #8]
Lloh31:
	adrp	x0, l_.str@PAGE
Lloh32:
	add	x0, x0, l_.str@PAGEOFF
	bl	_CX18_DEBUG_INFO
	mov	x19, #0
	b	LBB0_25
LBB0_20:
	mov	x19, #0
Lloh33:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_22
LBB0_21:
	ldr	w1, [x21, #8]
Lloh35:
	adrp	x0, l_.str.1@PAGE
Lloh36:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_CX18_DEBUG_INFO
	mov	x19, #0
Lloh37:
	adrp	x8, _EINTR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_22:
	ldr	w8, [x8]
	neg	w8, w8
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
	b	LBB0_25
LBB0_23:
	mov	x19, x25
	b	LBB0_25
LBB0_24:
	mov	x0, x25
	mov	x1, x19
	bl	_cx18_process_vbi_data
LBB0_25:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_CX18_ENC_STREAM_TYPE_VBI,8,3   ; @CX18_ENC_STREAM_TYPE_VBI
	.comm	_wait,4,2                       ; @wait
	.comm	_CX18_ENC_STREAM_TYPE_MPG,8,3   ; @CX18_ENC_STREAM_TYPE_MPG
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_CX18_F_S_INTERNAL_USE,4,2      ; @CX18_F_S_INTERNAL_USE
	.comm	_CX18_F_S_APPL_IO,4,2           ; @CX18_F_S_APPL_IO
	.comm	_CX18_F_M_NEED_SWAP,4,2         ; @CX18_F_M_NEED_SWAP
	.comm	_CX18_F_S_STREAMING,4,2         ; @CX18_F_S_STREAMING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EOS %s\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_current,4,2                    ; @current
l_.str.1:                               ; @.str.1
	.asciz	"User stopped %s\n"

	.comm	_EINTR,4,2                      ; @EINTR
	.no_dead_strip	_cx18_get_mdl
.subsections_via_symbols
