	.file	"extr_budget-ci.c_ciintf_slot_reset.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ciintf_slot_reset, @function
ciintf_slot_reset:
.LFB0:
	.cfi_startproc
	endbr64
	test	esi, esi
	jne	.L9
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbp, QWORD PTR [rdi]
	cmp	QWORD PTR 16[rbp], 0
	mov	r12, QWORD PTR 0[rbp]
	jne	.L10
.L4:
	mov	eax, DWORD PTR SLOTSTATUS_RESET[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	xor	r8d, r8d
	mov	rdi, rbp
	mov	edx, DWORD PTR DEBIADDR_CICONTROL[rip]
	mov	esi, DWORD PTR DEBICICTL[rip]
	mov	r9d, 1
	mov	ecx, 1
	mov	DWORD PTR 8[rbp], eax
	push	0
	.cfi_def_cfa_offset 48
	call	ttpci_budget_debiwrite@PLT
	mov	edi, 1
	call	msleep@PLT
	mov	r8d, DWORD PTR CICONTROL_RESET[rip]
	mov	ecx, 1
	mov	edx, DWORD PTR DEBIADDR_CICONTROL[rip]
	mov	esi, DWORD PTR DEBICICTL[rip]
	mov	r9d, 1
	mov	rdi, rbp
	mov	DWORD PTR [rsp], 0
	call	ttpci_budget_debiwrite@PLT
	mov	edx, DWORD PTR SAA7146_GPIO_OUTHI[rip]
	mov	rdi, r12
	mov	esi, 1
	call	saa7146_setgpio@PLT
	mov	esi, DWORD PTR BUDGET_VIDEO_PORTB[rip]
	mov	rdi, r12
	call	ttpci_budget_set_video_port@PLT
	add	rsp, 24
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_def_cfa_offset 32
	mov	edx, DWORD PTR SAA7146_GPIO_IRQHI[rip]
	xor	esi, esi
	mov	rdi, r12
	call	saa7146_setgpio@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_def_cfa_offset 8
	.cfi_restore 6
	.cfi_restore 12
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	ciintf_slot_reset, .-ciintf_slot_reset
	.comm	SLOTSTATUS_RESET,4,4
	.comm	SAA7146_GPIO_OUTHI,4,4
	.comm	SAA7146_GPIO_IRQHI,4,4
	.comm	EINVAL,4,4
	.comm	DEBICICTL,4,4
	.comm	DEBIADDR_CICONTROL,4,4
	.comm	CICONTROL_RESET,4,4
	.comm	BUDGET_VIDEO_PORTB,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_budget-ci.c_ciintf_slot_reset.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ciintf_slot_reset, %function
ciintf_slot_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	bne	.L12
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r6, [r0]
	sub	sp, sp, #20
	ldr	r3, [r6, #8]
	ldr	r7, [r6]
	cmp	r3, #0
	bne	.L13
.L4:
	mov	r5, #1
	mov	r4, #0
	ldr	r3, .L14
	ldr	r9, .L14+4
	ldr	r3, [r3]
	ldr	r8, .L14+8
	str	r3, [r6, #4]
	ldr	r2, [r9]
	mov	r3, r5
	ldr	r1, [r8]
	mov	r0, r6
	stm	sp, {r4, r5}
	str	r4, [sp, #8]
	bl	ttpci_budget_debiwrite
	mov	r0, r5
	bl	msleep
	ldr	r3, .L14+12
	str	r4, [sp, #8]
	ldr	r3, [r3]
	ldr	r2, [r9]
	ldr	r1, [r8]
	str	r3, [sp]
	mov	r0, r6
	mov	r3, r5
	str	r5, [sp, #4]
	bl	ttpci_budget_debiwrite
	ldr	r3, .L14+16
	mov	r1, r5
	ldr	r2, [r3]
	mov	r0, r7
	bl	saa7146_setgpio
	ldr	r3, .L14+20
	mov	r0, r7
	ldr	r1, [r3]
	bl	ttpci_budget_set_video_port
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L13:
	ldr	r3, .L14+24
	mov	r0, r7
	ldr	r2, [r3]
	bl	saa7146_setgpio
	b	.L4
.L12:
	ldr	r3, .L14+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L15:
	.align	2
.L14:
	.word	SLOTSTATUS_RESET
	.word	DEBIADDR_CICONTROL
	.word	DEBICICTL
	.word	CICONTROL_RESET
	.word	SAA7146_GPIO_OUTHI
	.word	BUDGET_VIDEO_PORTB
	.word	SAA7146_GPIO_IRQHI
	.word	EINVAL
	.size	ciintf_slot_reset, .-ciintf_slot_reset
	.comm	SLOTSTATUS_RESET,4,4
	.comm	SAA7146_GPIO_OUTHI,4,4
	.comm	SAA7146_GPIO_IRQHI,4,4
	.comm	EINVAL,4,4
	.comm	DEBICICTL,4,4
	.comm	DEBIADDR_CICONTROL,4,4
	.comm	CICONTROL_RESET,4,4
	.comm	BUDGET_VIDEO_PORTB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
