	.file	"extr_ciss.c_ciss_soft_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"error resetting controller (%d)\n"
	.text
	.p2align 4
	.type	ciss_soft_reset, @function
ciss_soft_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	mov	QWORD PTR [rsp], 0
	test	eax, eax
	jle	.L1
	mov	r13, rdi
	xor	ebx, ebx
	mov	rbp, rsp
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 8[r13]
	lea	r12, 0[0+rbx*8]
	cmp	QWORD PTR [rax+rbx*8], 0
	je	.L4
	mov	rsi, rbp
	mov	rdi, r13
	call	ciss_get_request@PLT
	test	eax, eax
	jne	.L5
	mov	edx, DWORD PTR CISS_BMIC_SOFT_RESET[rip]
	xor	r8d, r8d
	xor	ecx, ecx
	mov	rsi, rbp
	mov	rdi, r13
	call	ciss_get_bmic_request@PLT
	test	eax, eax
	jne	.L5
	mov	rdi, QWORD PTR [rsp]
	mov	rdx, QWORD PTR 8[r13]
	mov	esi, 60000
	mov	rax, QWORD PTR [rdi]
	mov	rdx, QWORD PTR [rdx+r12]
	mov	QWORD PTR [rax], rdx
	call	ciss_synch_request@PLT
	test	eax, eax
	jne	.L5
	mov	rdi, QWORD PTR [rsp]
	call	ciss_release_request@PLT
.L4:
	add	rbx, 1
	cmp	DWORD PTR 0[r13], ebx
	jg	.L2
.L7:
	mov	rdi, QWORD PTR [rsp]
	test	rdi, rdi
	je	.L1
	call	ciss_release_request@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edx, eax
	lea	rsi, .LC0[rip]
	mov	rdi, r13
	call	ciss_printf@PLT
	jmp	.L7
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ciss_soft_reset, .-ciss_soft_reset
	.comm	CISS_BMIC_SOFT_RESET,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_ciss.c_ciss_soft_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"error resetting controller (%d)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ciss_soft_reset, %function
ciss_soft_reset:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, #0
	ldr	r2, [r0]
	ldr	r3, .L20
	sub	sp, sp, #16
	cmp	r2, r4
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	str	r4, [sp, #8]
	ble	.L1
	mov	r5, r0
	ldr	r6, .L20+4
	ldr	r7, .L20+8
.L2:
	ldr	r3, [r5, #4]
	lsl	r8, r4, #2
	ldr	r3, [r3, r4, lsl #2]
	cmp	r3, #0
	beq	.L4
	mov	r0, r5
	add	r1, sp, #8
	bl	ciss_get_request
	subs	r3, r0, #0
	bne	.L5
	str	r3, [sp]
	mov	r0, r5
	ldr	r2, [r6]
	add	r1, sp, #8
	bl	ciss_get_bmic_request
	subs	r3, r0, #0
	bne	.L5
	ldr	r0, [sp, #8]
	ldr	r2, [r5, #4]
	ldr	r3, [r0]
	ldr	r2, [r2, r8]
	mov	r1, r7
	str	r2, [r3]
	bl	ciss_synch_request
	subs	r3, r0, #0
	bne	.L5
	ldr	r0, [sp, #8]
	bl	ciss_release_request
	ldr	r2, [r5]
.L4:
	add	r4, r4, #1
	cmp	r2, r4
	bgt	.L2
.L7:
	ldr	r0, [sp, #8]
	cmp	r0, #0
	beq	.L1
	bl	ciss_release_request
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r2, r3
	mov	r0, r5
	ldr	r1, .L20+12
	bl	ciss_printf
	b	.L7
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC1
	.word	CISS_BMIC_SOFT_RESET
	.word	60000
	.word	.LC0
	.size	ciss_soft_reset, .-ciss_soft_reset
	.comm	CISS_BMIC_SOFT_RESET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
