	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx18_stream_init
_cx18_stream_init:                      ## @cx18_stream_init
	.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, %r15
	movq	32(%rdi), %r13
	movslq	%esi, %r14
	imulq	$120, %r14, %rbx
	leaq	(%rbx,%r13), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movl	$120, %edx
	callq	_memset
	movq	$0, 112(%r13,%rbx)
	movq	%r15, 104(%r13,%rbx)
	movl	%r14d, (%r13,%rbx)
	movq	_cx18_stream_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%r14,%r14,2), %rcx
	movl	8(%rax,%rcx,4), %edx
	movl	%edx, 100(%r13,%rbx)
	movq	_CX18_INVALID_TASK_HANDLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 96(%r13,%rbx)
	movl	4(%rax,%rcx,4), %edx
	movl	%edx, 92(%r13,%rbx)
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 88(%r13,%rbx)
	movq	24(%r15), %rax
	movl	(%rax,%r14,4), %eax
	movl	%eax, 84(%r13,%rbx)
	movq	(%r15), %rax
	movl	(%rax,%r14,4), %eax
	movl	%eax, 4(%r13,%rbx)
	leaq	(%rbx,%r13), %rdi
	addq	$80, %rdi
	callq	_INIT_LIST_HEAD
	movl	$1, 8(%r13,%rbx)
	movl	4(%r13,%rbx), %eax
	movl	%eax, 12(%r13,%rbx)
	leaq	(%rbx,%r13), %rdi
	addq	$76, %rdi
	callq	_init_waitqueue_head
	movl	$-1, 16(%r13,%rbx)
	leaq	(%rbx,%r13), %r12
	addq	$72, %r12
	movq	%r12, %rdi
	callq	_spin_lock_init
	movq	%r12, %rdi
	callq	_cx18_queue_init
	leaq	(%rbx,%r13), %r12
	addq	$68, %r12
	movq	%r12, %rdi
	callq	_spin_lock_init
	movq	%r12, %rdi
	callq	_cx18_queue_init
	leaq	(%rbx,%r13), %r12
	addq	$64, %r12
	movq	%r12, %rdi
	callq	_spin_lock_init
	movq	%r12, %rdi
	callq	_cx18_queue_init
	leaq	(%rbx,%r13), %r12
	addq	$60, %r12
	movq	%r12, %rdi
	callq	_spin_lock_init
	movq	%r12, %rdi
	callq	_cx18_queue_init
	leaq	(%rbx,%r13), %rdi
	addq	$56, %rdi
	movq	_cx18_out_work_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	(%rbx,%r13), %rdi
	addq	$52, %rdi
	callq	_INIT_LIST_HEAD
	leaq	(%rbx,%r13), %rdi
	addq	$48, %rdi
	movq	_cx18_vb_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	leaq	(%rbx,%r13), %rdi
	addq	$44, %rdi
	callq	_spin_lock_init
	movq	_CX18_ENC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_2
## %bb.1:
	leaq	(%rbx,%r13), %r12
	addq	$32, %r12
	movq	%r12, %rdi
	callq	_spin_lock_init
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, 40(%r13,%rbx)
	leaq	(%rbx,%r13), %rdi
	addq	$36, %rdi
	movq	16(%r15), %rdx
	movl	(%rax), %r8d
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	12(%r15), %rax
	subq	$8, %rsp
	movq	_cx18_videobuf_qops@GOTPCREL(%rip), %rsi
	movq	%r12, %rcx
	pushq	%rax
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	$4
	callq	_videobuf_queue_vmalloc_init
	addq	$32, %rsp
	movq	_V4L2_PIX_FMT_HM12@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r13,%rbx)
	imull	$2160, 8(%r15), %eax            ## imm = 0x870
	sarl	%eax
	movl	%eax, 20(%r13,%rbx)
	movl	$720, 24(%r13,%rbx)             ## imm = 0x2D0
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cx18_stream_info,8,3           ## @cx18_stream_info
	.comm	_CX18_INVALID_TASK_HANDLE,4,2   ## @CX18_INVALID_TASK_HANDLE
	.comm	_cx18_out_work_handler,4,2      ## @cx18_out_work_handler
	.comm	_cx18_vb_timeout,4,2            ## @cx18_vb_timeout
	.comm	_CX18_ENC_STREAM_TYPE_YUV,4,2   ## @CX18_ENC_STREAM_TYPE_YUV
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_cx18_videobuf_qops,4,2         ## @cx18_videobuf_qops
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_V4L2_PIX_FMT_HM12,4,2          ## @V4L2_PIX_FMT_HM12
	.no_dead_strip	_cx18_stream_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx18_stream_init
_cx18_stream_init:                      ; @cx18_stream_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x23, [x0, #32]
	mov	w8, #120
	smaddl	x20, w1, w8, x23
	mov	x0, x20
	mov	w1, #0
	mov	w2, #120
	bl	_memset
	stp	x19, xzr, [x20, #104]
	str	w21, [x20]
Lloh0:
	adrp	x8, _cx18_stream_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cx18_stream_info@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	mov	w9, #12
	smaddl	x8, w21, w9, x8
	ldr	w9, [x8, #8]
	str	w9, [x20, #100]
Lloh3:
	adrp	x9, _CX18_INVALID_TASK_HANDLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CX18_INVALID_TASK_HANDLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [x20, #96]
	ldr	d0, [x8]
	str	d0, [x20, #88]
	ldr	x8, [x19, #24]
	sbfiz	x9, x21, #2, #32
	ldr	w8, [x8, x9]
	str	w8, [x20, #84]
	ldr	x8, [x19]
	ldr	w8, [x8, x9]
	str	w8, [x20, #4]
	add	x0, x20, #80
	bl	_INIT_LIST_HEAD
	mov	w8, #1
	ldr	w9, [x20, #4]
	stp	w8, w9, [x20, #8]
	add	x0, x20, #76
	bl	_init_waitqueue_head
	mov	w8, #-1
	str	w8, [x20, #16]
	add	x22, x20, #72
	mov	x0, x22
	bl	_spin_lock_init
	mov	x0, x22
	bl	_cx18_queue_init
	add	x22, x20, #68
	mov	x0, x22
	bl	_spin_lock_init
	mov	x0, x22
	bl	_cx18_queue_init
	add	x22, x20, #64
	mov	x0, x22
	bl	_spin_lock_init
	mov	x0, x22
	bl	_cx18_queue_init
	add	x22, x20, #60
	mov	x0, x22
	bl	_spin_lock_init
	mov	x0, x22
	bl	_cx18_queue_init
	add	x0, x20, #56
Lloh6:
	adrp	x8, _cx18_out_work_handler@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cx18_out_work_handler@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x20, #52
	bl	_INIT_LIST_HEAD
	add	x0, x20, #48
Lloh9:
	adrp	x8, _cx18_vb_timeout@GOTPAGE
Lloh10:
	ldr	x8, [x8, _cx18_vb_timeout@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	add	x0, x20, #44
	bl	_spin_lock_init
Lloh12:
	adrp	x8, _CX18_ENC_STREAM_TYPE_YUV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CX18_ENC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
	sxtw	x8, w21
	mov	w9, #120
	madd	x22, x8, x9, x23
	add	x21, x22, #32
	mov	x0, x21
	bl	_spin_lock_init
Lloh15:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
	ldr	w9, [x8]
	str	w9, [x22, #40]
	add	x0, x22, #36
	ldr	x2, [x19, #16]
	ldr	w4, [x8]
Lloh17:
	adrp	x8, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh19:
	ldr	w5, [x8]
	add	x8, x19, #12
	str	x8, [sp]
Lloh20:
	adrp	x1, _cx18_videobuf_qops@GOTPAGE
Lloh21:
	ldr	x1, [x1, _cx18_videobuf_qops@GOTPAGEOFF]
	mov	x3, x21
	mov	w6, #4
	mov	x7, x20
	bl	_videobuf_queue_vmalloc_init
Lloh22:
	adrp	x8, _V4L2_PIX_FMT_HM12@GOTPAGE
Lloh23:
	ldr	x8, [x8, _V4L2_PIX_FMT_HM12@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x22, #28]
	ldr	w8, [x19, #8]
	mov	w9, #2160
	mul	w8, w8, w9
	orr	w9, w8, #0x1
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #1
	mov	w9, #720
	stp	w8, w9, [x22, #20]
LBB0_2:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_cx18_stream_info,8,3           ; @cx18_stream_info
	.comm	_CX18_INVALID_TASK_HANDLE,4,2   ; @CX18_INVALID_TASK_HANDLE
	.comm	_cx18_out_work_handler,4,2      ; @cx18_out_work_handler
	.comm	_cx18_vb_timeout,4,2            ; @cx18_vb_timeout
	.comm	_CX18_ENC_STREAM_TYPE_YUV,4,2   ; @CX18_ENC_STREAM_TYPE_YUV
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_cx18_videobuf_qops,4,2         ; @cx18_videobuf_qops
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_V4L2_PIX_FMT_HM12,4,2          ; @V4L2_PIX_FMT_HM12
	.no_dead_strip	_cx18_stream_init
.subsections_via_symbols
