	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx18_init_struct2
_cx18_init_struct2:                     ## @cx18_init_struct2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_CX18_CARD_MAX_VIDEO_INPUTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%ecx, %ecx
	movl	$0, %edx
	cmpl	$2, %r8d
	jl	LBB0_5
## %bb.1:
	decl	%r8d
	movq	16(%rdi), %rax
	movq	(%rax), %rsi
	movl	%r8d, %eax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rsi)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	addq	$16, %rsi
	cmpq	%rdx, %rax
	jne	LBB0_2
## %bb.4:
	movl	%r8d, %edx
LBB0_5:
	movl	%edx, %eax
	movl	%edx, (%rdi)
	movq	_CX18_CARD_MAX_AUDIO_INPUTS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	cmpl	$2, %r8d
	jl	LBB0_10
## %bb.6:
	decl	%r8d
	movq	16(%rdi), %rcx
	movq	8(%rcx), %rsi
	movl	%r8d, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rsi,%rcx,8)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rcx
	cmpq	%rcx, %rdx
	jne	LBB0_7
## %bb.9:
	movl	%r8d, %ecx
LBB0_10:
	movl	%ecx, 4(%rdi)
	xorl	%r9d, %r9d
	movq	16(%rdi), %rcx
	movq	(%rcx), %r8
	movl	$0, %esi
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	movq	_CX18_CARD_INPUT_VID_TUNER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	xorl	%esi, %esi
	movq	%r8, %rcx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rcx)
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rsi
	addq	$16, %rcx
	cmpq	%rsi, %rax
	jne	LBB0_12
## %bb.14:
	movl	%eax, %esi
LBB0_15:
	cmpl	%eax, %esi
	cmovnel	%esi, %r9d
	movl	%r9d, 8(%rdi)
	shlq	$4, %r9
	movl	8(%r8,%r9), %eax
	movl	%eax, 24(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CX18_CARD_MAX_VIDEO_INPUTS,4,2 ## @CX18_CARD_MAX_VIDEO_INPUTS
	.comm	_CX18_CARD_MAX_AUDIO_INPUTS,4,2 ## @CX18_CARD_MAX_AUDIO_INPUTS
	.comm	_CX18_CARD_INPUT_VID_TUNER,8,3  ## @CX18_CARD_INPUT_VID_TUNER
	.no_dead_strip	_cx18_init_struct2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx18_init_struct2
_cx18_init_struct2:                     ; @cx18_init_struct2
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _CX18_CARD_MAX_VIDEO_INPUTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CX18_CARD_MAX_VIDEO_INPUTS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	cmp	w9, #2
	b.lt	LBB0_4
; %bb.1:
	mov	x8, #0
	sub	w9, w9, #1
	ldr	x10, [x0, #16]
	ldr	x10, [x10]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	cbz	x11, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x8, #1
	add	x10, x10, #16
	cmp	x9, x8
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w9, #0
	b	LBB0_6
LBB0_5:
	mov	x9, x8
LBB0_6:
	mov	w8, w9
	str	w9, [x0]
Lloh3:
	adrp	x9, _CX18_CARD_MAX_AUDIO_INPUTS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CX18_CARD_MAX_AUDIO_INPUTS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, #2
	b.lt	LBB0_10
; %bb.7:
	mov	x10, #0
	sub	w9, w9, #1
	ldr	x11, [x0, #16]
	ldr	x11, [x11, #8]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11, x10, lsl #3]
	cbz	x12, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x10, x10, #1
	cmp	x9, x10
	b.ne	LBB0_8
	b	LBB0_12
LBB0_10:
	mov	w9, #0
	b	LBB0_12
LBB0_11:
	mov	x9, x10
LBB0_12:
	str	w9, [x0, #4]
	ldr	x9, [x0, #16]
	ldr	x9, [x9]
	cbz	w8, LBB0_17
; %bb.13:
	mov	x10, #0
Lloh6:
	adrp	x11, _CX18_CARD_INPUT_VID_TUNER@GOTPAGE
Lloh7:
	ldr	x11, [x11, _CX18_CARD_INPUT_VID_TUNER@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	mov	x12, x9
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x12]
	cmp	x13, x11
	b.eq	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x10, x10, #1
	add	x12, x12, #16
	cmp	x8, x10
	b.ne	LBB0_14
; %bb.16:
	mov	x10, x8
	b	LBB0_18
LBB0_17:
	mov	w10, #0
LBB0_18:
	cmp	w10, w8
	csel	w8, wzr, w10, eq
	str	w8, [x0, #8]
	add	x8, x9, w8, uxtw #4
	ldr	w8, [x8, #8]
	str	w8, [x0, #24]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CX18_CARD_MAX_VIDEO_INPUTS,4,2 ; @CX18_CARD_MAX_VIDEO_INPUTS
	.comm	_CX18_CARD_MAX_AUDIO_INPUTS,4,2 ; @CX18_CARD_MAX_AUDIO_INPUTS
	.comm	_CX18_CARD_INPUT_VID_TUNER,8,3  ; @CX18_CARD_INPUT_VID_TUNER
	.no_dead_strip	_cx18_init_struct2
.subsections_via_symbols
