	.file	"extr_ivtv-driver.c_ivtv_init_struct2.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ivtv_init_struct2, @function
ivtv_init_struct2:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r11, QWORD PTR 16[rdi]
	mov	ecx, DWORD PTR IVTV_CARD_MAX_VIDEO_INPUTS[rip]
	mov	r10, QWORD PTR 8[r11]
	test	ecx, ecx
	jle	.L9
	mov	rax, r10
	xor	edx, edx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	add	edx, 1
	add	rax, 16
	cmp	edx, ecx
	je	.L2
.L3:
	cmp	QWORD PTR [rax], 0
	jne	.L18
.L2:
	mov	eax, DWORD PTR IVTV_CARD_MAX_AUDIO_INPUTS[rip]
	mov	DWORD PTR [rdi], edx
	test	eax, eax
	jle	.L10
	lea	r9d, -1[rax]
	mov	r8, QWORD PTR 16[r11]
	xor	eax, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	lea	ecx, 1[rax]
	lea	rsi, 1[rax]
	cmp	r9, rax
	je	.L4
	mov	rax, rsi
.L5:
	cmp	QWORD PTR [r8+rax*8], 0
	mov	ecx, eax
	jne	.L19
.L4:
	mov	eax, DWORD PTR [r11]
	and	eax, DWORD PTR IVTV_HW_CX25840[rip]
	mov	DWORD PTR 4[rdi], ecx
	cmp	eax, 1
	sbb	eax, eax
	and	al, 32
	add	eax, 288
	mov	DWORD PTR 28[rdi], eax
	test	edx, edx
	je	.L13
	mov	rsi, QWORD PTR IVTV_CARD_INPUT_VID_TUNER[rip]
	mov	rcx, r10
	xor	eax, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	add	eax, 1
	add	rcx, 16
	cmp	eax, edx
	je	.L13
.L8:
	cmp	QWORD PTR [rcx], rsi
	jne	.L20
	mov	r10, rcx
	mov	DWORD PTR 8[rdi], eax
	mov	eax, DWORD PTR 8[r10]
	mov	DWORD PTR 24[rdi], eax
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	xor	eax, eax
	mov	DWORD PTR 8[rdi], eax
	mov	eax, DWORD PTR 8[r10]
	mov	DWORD PTR 24[rdi], eax
	ret
.L10:
	xor	ecx, ecx
	jmp	.L4
.L9:
	xor	edx, edx
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ivtv_init_struct2, .-ivtv_init_struct2
	.comm	IVTV_HW_CX25840,4,4
	.comm	IVTV_CARD_MAX_VIDEO_INPUTS,4,4
	.comm	IVTV_CARD_MAX_AUDIO_INPUTS,4,4
	.comm	IVTV_CARD_INPUT_VID_TUNER,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ivtv-driver.c_ivtv_init_struct2.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ivtv_init_struct2, %function
ivtv_init_struct2:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L29
	push	{r4, r5, lr}
	ldr	ip, [r3]
	ldr	r5, [r0, #12]
	cmp	ip, #0
	mov	r3, #0
	ldr	r1, [r5, #4]
	bgt	.L3
	b	.L2
.L26:
	add	r3, r3, #1
	cmp	r3, ip
	beq	.L2
.L3:
	ldr	r2, [r1, r3, lsl #3]
	cmp	r2, #0
	bne	.L26
.L2:
	ldr	r2, .L29+4
	str	r3, [r0]
	ldr	r4, [r2]
	mov	r2, #0
	cmp	r4, #0
	ble	.L4
	ldr	ip, [r5, #8]
	sub	ip, ip, #4
	b	.L5
.L27:
	add	r2, r2, #1
	cmp	r2, r4
	beq	.L4
.L5:
	ldr	lr, [ip, #4]!
	cmp	lr, #0
	bne	.L27
.L4:
	ldr	ip, .L29+8
	ldr	lr, [r5]
	ldr	ip, [ip]
	str	r2, [r0, #4]
	tst	lr, ip
	movne	r2, #288
	moveq	r2, #64
	cmp	r3, #0
	str	r2, [r0, #20]
	beq	.L24
	ldr	lr, .L29+12
	mov	ip, r1
	mov	r2, #0
	ldr	r4, [lr]
	b	.L8
.L28:
	add	r2, r2, #1
	cmp	r2, r3
	add	ip, ip, #8
	beq	.L24
.L8:
	ldr	lr, [r1, r2, lsl #3]
	cmp	lr, r4
	bne	.L28
	mov	r1, ip
	b	.L7
.L24:
	mov	r2, #0
.L7:
	ldr	r3, [r1, #4]
	str	r2, [r0, #8]
	str	r3, [r0, #16]
	pop	{r4, r5, pc}
.L30:
	.align	2
.L29:
	.word	IVTV_CARD_MAX_VIDEO_INPUTS
	.word	IVTV_CARD_MAX_AUDIO_INPUTS
	.word	IVTV_HW_CX25840
	.word	IVTV_CARD_INPUT_VID_TUNER
	.size	ivtv_init_struct2, .-ivtv_init_struct2
	.comm	IVTV_HW_CX25840,4,4
	.comm	IVTV_CARD_MAX_VIDEO_INPUTS,4,4
	.comm	IVTV_CARD_MAX_AUDIO_INPUTS,4,4
	.comm	IVTV_CARD_INPUT_VID_TUNER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
