	.file	"extr_scsi_transport_fc.c_fc_remote_port_rolechg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	fc_remote_port_rolechg
	.type	fc_remote_port_rolechg, @function
fc_remote_port_rolechg:
.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	r13d, esi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	call	rport_to_shost@PLT
	mov	rbp, rax
	mov	rdi, rax
	call	shost_to_fc_host@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r12
	mov	r14, rax
	call	spin_lock_irqsave@PLT
	mov	eax, DWORD PTR FC_PORT_ROLE_FCP_TARGET[rip]
	test	eax, r13d
	jne	.L2
	mov	DWORD PTR 4[rbx], r13d
.L9:
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r12
.L10:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	jmp	spin_unlock_irqrestore@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	cmp	DWORD PTR [rbx], -1
	mov	edi, DWORD PTR 0[rbp]
	je	.L12
	test	DWORD PTR 4[rbx], eax
	mov	r12d, 0
	mov	DWORD PTR 4[rbx], r13d
	mov	rsi, r12
	jne	.L10
	call	spin_unlock_irqrestore@PLT
	lea	rdi, 24[rbx]
	call	cancel_delayed_work@PLT
	test	eax, eax
	jne	.L6
.L13:
	mov	rdi, rbp
	call	fc_flush_devloss@PLT
	lea	rdi, 20[rbx]
	call	cancel_delayed_work@PLT
	test	eax, eax
	jne	.L7
.L14:
	mov	rdi, rbp
	call	fc_flush_devloss@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, DWORD PTR [r14]
	xor	r12d, r12d
	mov	rsi, r12
	lea	edx, 1[rax]
	mov	DWORD PTR [r14], edx
	mov	DWORD PTR [rbx], eax
	mov	DWORD PTR 4[rbx], r13d
	call	spin_unlock_irqrestore@PLT
	lea	rdi, 24[rbx]
	call	cancel_delayed_work@PLT
	test	eax, eax
	je	.L13
.L6:
	lea	rdi, 20[rbx]
	call	cancel_delayed_work@PLT
	test	eax, eax
	je	.L14
.L7:
	xor	r12d, r12d
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r12
	call	spin_lock_irqsave@PLT
	mov	eax, DWORD PTR FC_RPORT_FAST_FAIL_TIMEDOUT[rip]
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r12
	or	eax, DWORD PTR FC_RPORT_DEVLOSS_PENDING[rip]
	or	eax, DWORD PTR FC_RPORT_DEVLOSS_CALLBK_DONE[rip]
	not	eax
	and	DWORD PTR 8[rbx], eax
	call	spin_unlock_irqrestore@PLT
	mov	rdi, rbp
	call	fc_flush_work@PLT
	mov	esi, DWORD PTR SDEV_RUNNING[rip]
	lea	rdi, 16[rbx]
	call	scsi_target_unblock@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r12
	call	spin_lock_irqsave@PLT
	mov	eax, DWORD PTR FC_RPORT_SCAN_PENDING[rip]
	or	DWORD PTR 8[rbx], eax
	lea	rsi, 12[rbx]
	mov	rdi, rbp
	call	scsi_queue_work@PLT
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	fc_remote_port_rolechg, .-fc_remote_port_rolechg
	.comm	SDEV_RUNNING,4,4
	.comm	FC_RPORT_SCAN_PENDING,4,4
	.comm	FC_RPORT_FAST_FAIL_TIMEDOUT,4,4
	.comm	FC_RPORT_DEVLOSS_PENDING,4,4
	.comm	FC_RPORT_DEVLOSS_CALLBK_DONE,4,4
	.comm	FC_PORT_ROLE_FCP_TARGET,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_scsi_transport_fc.c_fc_remote_port_rolechg.c"
	.text
	.align	2
	.global	fc_remote_port_rolechg
	.syntax unified
	.arm
	.fpu softvfp
	.type	fc_remote_port_rolechg, %function
fc_remote_port_rolechg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r4, r0
	bl	rport_to_shost
	mov	r7, r0
	bl	shost_to_fc_host
	mov	r1, #0
	mov	r6, r0
	ldr	r0, [r7]
	bl	spin_lock_irqsave
	ldr	r3, .L14
	ldr	r3, [r3]
	tst	r3, r5
	bne	.L2
	ldr	r0, [r7]
	str	r5, [r4, #4]
	mov	r1, #0
	pop	{r4, r5, r6, r7, r8, lr}
	b	spin_unlock_irqrestore
.L2:
	ldr	r2, [r4]
	ldr	r0, [r7]
	cmn	r2, #1
	beq	.L11
	ldr	r2, [r4, #4]
	mov	r1, #0
	tst	r3, r2
	str	r5, [r4, #4]
	bne	.L9
	bl	spin_unlock_irqrestore
	add	r0, r4, #24
	bl	cancel_delayed_work
	cmp	r0, #0
	bne	.L6
.L12:
	mov	r0, r7
	bl	fc_flush_devloss
	add	r0, r4, #20
	bl	cancel_delayed_work
	cmp	r0, #0
	bne	.L7
.L13:
	mov	r0, r7
	bl	fc_flush_devloss
	b	.L7
.L11:
	ldr	r3, [r6]
	mov	r1, #0
	add	r2, r3, #1
	str	r2, [r6]
	stm	r4, {r3, r5}
	bl	spin_unlock_irqrestore
	add	r0, r4, #24
	bl	cancel_delayed_work
	cmp	r0, #0
	beq	.L12
.L6:
	add	r0, r4, #20
	bl	cancel_delayed_work
	cmp	r0, #0
	beq	.L13
.L7:
	mov	r5, #0
	ldr	r0, [r7]
	mov	r1, r5
	bl	spin_lock_irqsave
	ldr	r3, .L14+4
	ldr	r2, .L14+8
	ldr	r1, .L14+12
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, r2
	ldr	r2, [r4, #8]
	orr	r3, r3, r1
	bic	r3, r2, r3
	mov	r1, r5
	str	r3, [r4, #8]
	ldr	r0, [r7]
	bl	spin_unlock_irqrestore
	mov	r0, r7
	bl	fc_flush_work
	ldr	r3, .L14+16
	add	r0, r4, #16
	ldr	r1, [r3]
	bl	scsi_target_unblock
	mov	r1, r5
	ldr	r0, [r7]
	bl	spin_lock_irqsave
	ldr	r2, .L14+20
	ldr	r3, [r4, #8]
	ldr	r2, [r2]
	add	r1, r4, #12
	orr	r3, r3, r2
	mov	r0, r7
	str	r3, [r4, #8]
	bl	scsi_queue_work
	mov	r1, r5
	ldr	r0, [r7]
.L9:
	pop	{r4, r5, r6, r7, r8, lr}
	b	spin_unlock_irqrestore
.L15:
	.align	2
.L14:
	.word	FC_PORT_ROLE_FCP_TARGET
	.word	FC_RPORT_FAST_FAIL_TIMEDOUT
	.word	FC_RPORT_DEVLOSS_PENDING
	.word	FC_RPORT_DEVLOSS_CALLBK_DONE
	.word	SDEV_RUNNING
	.word	FC_RPORT_SCAN_PENDING
	.size	fc_remote_port_rolechg, .-fc_remote_port_rolechg
	.comm	SDEV_RUNNING,4,4
	.comm	FC_RPORT_SCAN_PENDING,4,4
	.comm	FC_RPORT_FAST_FAIL_TIMEDOUT,4,4
	.comm	FC_RPORT_DEVLOSS_PENDING,4,4
	.comm	FC_RPORT_DEVLOSS_CALLBK_DONE,4,4
	.comm	FC_PORT_ROLE_FCP_TARGET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
