	.file	"extr_iss_resizer.c_resizer_set_stream.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	resizer_set_stream, @function
resizer_set_stream:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	v4l2_get_subdevdata@PLT
	mov	rbx, rax
	mov	rdi, rax
	call	to_iss_device@PLT
	cmp	DWORD PTR [rbx], 128
	lea	r14, 16[rbx]
	mov	r12, rax
	je	.L32
	cmp	ebp, 128
	je	.L8
	cmp	ebp, 129
	je	.L4
.L30:
	xor	r13d, r13d
.L5:
	mov	DWORD PTR [rbx], ebp
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, rbx
	call	resizer_configure@PLT
	mov	rdi, rbx
	call	resizer_print_status@PLT
	mov	eax, DWORD PTR 4[rbx]
	test	DWORD PTR RESIZER_OUTPUT_MEMORY[rip], eax
	je	.L6
	mov	r13d, DWORD PTR 16[rbx]
	and	r13d, DWORD PTR ISS_VIDEO_DMAQUEUE_QUEUED[rip]
	je	.L5
.L6:
	lea	rdi, 8[rbx]
	xor	esi, esi
	xor	r13d, r13d
	call	atomic_set@PLT
	mov	esi, 1
	mov	rdi, rbx
	call	resizer_enable@PLT
	mov	rdi, r14
	call	iss_video_dmaqueue_flags_clr@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L32:
	xor	r13d, r13d
	cmp	ebp, 128
	je	.L1
	mov	esi, DWORD PTR OMAP4_ISS_ISP_SUBCLK_RSZ[rip]
	mov	rdi, rax
	call	omap4iss_isp_subclk_enable@PLT
	mov	ecx, DWORD PTR RSZ_GCK_MMR_MMR[rip]
	mov	edx, DWORD PTR RSZ_GCK_MMR[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR OMAP4_ISS_MEM_ISP_RESIZER[rip]
	call	iss_reg_set@PLT
	mov	ecx, DWORD PTR RSZ_GCK_SDR_CORE[rip]
	mov	edx, DWORD PTR RSZ_GCK_SDR[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR OMAP4_ISS_MEM_ISP_RESIZER[rip]
	call	iss_reg_set@PLT
	mov	ecx, DWORD PTR RSZ_SYSCONFIG_RSZA_CLK_EN[rip]
	mov	edx, DWORD PTR RSZ_SYSCONFIG[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR OMAP4_ISS_MEM_ISP_RESIZER[rip]
	call	iss_reg_set@PLT
	cmp	ebp, 129
	je	.L4
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, r13
	lea	rdx, 8[rbx]
	lea	rsi, 12[rbx]
	call	omap4iss_module_sync_idle@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L7
	mov	r13d, DWORD PTR ETIMEDOUT[rip]
	neg	r13d
.L7:
	xor	esi, esi
	mov	rdi, rbx
	call	resizer_enable@PLT
	mov	ecx, DWORD PTR RSZ_SYSCONFIG_RSZA_CLK_EN[rip]
	mov	edx, DWORD PTR RSZ_SYSCONFIG[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR OMAP4_ISS_MEM_ISP_RESIZER[rip]
	call	iss_reg_clr@PLT
	mov	ecx, DWORD PTR RSZ_GCK_SDR_CORE[rip]
	mov	edx, DWORD PTR RSZ_GCK_SDR[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR OMAP4_ISS_MEM_ISP_RESIZER[rip]
	call	iss_reg_clr@PLT
	mov	ecx, DWORD PTR RSZ_GCK_MMR_MMR[rip]
	mov	edx, DWORD PTR RSZ_GCK_MMR[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR OMAP4_ISS_MEM_ISP_RESIZER[rip]
	call	iss_reg_clr@PLT
	mov	esi, DWORD PTR OMAP4_ISS_ISP_SUBCLK_RSZ[rip]
	mov	rdi, r12
	call	omap4iss_isp_subclk_disable@PLT
	mov	rdi, r14
	call	iss_video_dmaqueue_flags_clr@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	resizer_set_stream, .-resizer_set_stream
	.comm	RSZ_SYSCONFIG_RSZA_CLK_EN,4,4
	.comm	RSZ_SYSCONFIG,4,4
	.comm	RSZ_GCK_SDR_CORE,4,4
	.comm	RSZ_GCK_SDR,4,4
	.comm	RSZ_GCK_MMR_MMR,4,4
	.comm	RSZ_GCK_MMR,4,4
	.comm	RESIZER_OUTPUT_MEMORY,4,4
	.comm	OMAP4_ISS_MEM_ISP_RESIZER,4,4
	.comm	OMAP4_ISS_ISP_SUBCLK_RSZ,4,4
	.comm	ISS_VIDEO_DMAQUEUE_QUEUED,4,4
	.comm	ETIMEDOUT,4,4
	.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_iss_resizer.c_resizer_set_stream.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	resizer_set_stream, %function
resizer_set_stream:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r1
	mov	r7, r0
	bl	v4l2_get_subdevdata
	mov	r8, r0
	mov	r4, r0
	bl	to_iss_device
	ldr	r3, [r8], #16
	mov	r6, r0
	cmp	r3, #128
	beq	.L31
	cmp	r5, #128
	beq	.L8
	cmp	r5, #129
	beq	.L4
.L29:
	mov	r7, #0
.L5:
	str	r5, [r4]
.L1:
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	mov	r0, r4
	bl	resizer_configure
	mov	r0, r4
	bl	resizer_print_status
	ldr	r3, .L32
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L6
	ldr	r3, .L32+4
	ldr	r7, [r4, #16]
	ldr	r0, [r3]
	ands	r7, r7, r0
	beq	.L5
.L6:
	mov	r1, #0
	add	r0, r4, #8
	bl	atomic_set
	mov	r1, #1
	mov	r0, r4
	bl	resizer_enable
	mov	r0, r8
	bl	iss_video_dmaqueue_flags_clr
	b	.L29
.L31:
	cmp	r5, #128
	moveq	r7, #0
	beq	.L1
	ldr	r3, .L32+8
	ldr	r7, .L32+12
	ldr	r1, [r3]
	bl	omap4iss_isp_subclk_enable
	ldr	r3, .L32+16
	ldr	r2, .L32+20
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [r7]
	mov	r0, r6
	bl	iss_reg_set
	ldr	r3, .L32+24
	ldr	r2, .L32+28
	ldr	r1, [r7]
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r0, r6
	bl	iss_reg_set
	ldr	r3, .L32+32
	ldr	r2, .L32+36
	mov	r0, r6
	ldr	r1, [r7]
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	iss_reg_set
	cmp	r5, #129
	beq	.L4
	b	.L29
.L8:
	add	r2, r4, #8
	add	r1, r4, #12
	mov	r0, r7
	bl	omap4iss_module_sync_idle
	subs	r7, r0, #0
	ldrne	r3, .L32+40
	mov	r1, #0
	ldrne	r7, [r3]
	mov	r0, r4
	rsbne	r7, r7, #0
	ldr	r9, .L32+12
	bl	resizer_enable
	ldr	r3, .L32+32
	ldr	r2, .L32+36
	ldr	r1, [r9]
	mov	r0, r6
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	iss_reg_clr
	ldr	r3, .L32+24
	ldr	r2, .L32+28
	ldr	r1, [r9]
	mov	r0, r6
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	iss_reg_clr
	ldr	r3, .L32+16
	ldr	r2, .L32+20
	ldr	r1, [r9]
	ldr	r2, [r2]
	mov	r0, r6
	ldr	r3, [r3]
	bl	iss_reg_clr
	ldr	r3, .L32+8
	mov	r0, r6
	ldr	r1, [r3]
	bl	omap4iss_isp_subclk_disable
	mov	r0, r8
	bl	iss_video_dmaqueue_flags_clr
	b	.L5
.L33:
	.align	2
.L32:
	.word	RESIZER_OUTPUT_MEMORY
	.word	ISS_VIDEO_DMAQUEUE_QUEUED
	.word	OMAP4_ISS_ISP_SUBCLK_RSZ
	.word	OMAP4_ISS_MEM_ISP_RESIZER
	.word	RSZ_GCK_MMR_MMR
	.word	RSZ_GCK_MMR
	.word	RSZ_GCK_SDR_CORE
	.word	RSZ_GCK_SDR
	.word	RSZ_SYSCONFIG_RSZA_CLK_EN
	.word	RSZ_SYSCONFIG
	.word	ETIMEDOUT
	.size	resizer_set_stream, .-resizer_set_stream
	.comm	RSZ_SYSCONFIG_RSZA_CLK_EN,4,4
	.comm	RSZ_SYSCONFIG,4,4
	.comm	RSZ_GCK_SDR_CORE,4,4
	.comm	RSZ_GCK_SDR,4,4
	.comm	RSZ_GCK_MMR_MMR,4,4
	.comm	RSZ_GCK_MMR,4,4
	.comm	RESIZER_OUTPUT_MEMORY,4,4
	.comm	OMAP4_ISS_MEM_ISP_RESIZER,4,4
	.comm	OMAP4_ISS_ISP_SUBCLK_RSZ,4,4
	.comm	ISS_VIDEO_DMAQUEUE_QUEUED,4,4
	.comm	ETIMEDOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
