	.file	"extr_mptsas.c_mptsas_probe_hba_phys.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mptsas_probe_hba_phys, @function
mptsas_probe_hba_phys:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, DWORD PTR ENOMEM[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	neg	r13d
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	mov	edi, 88
	call	kzalloc@PLT
	test	rax, rax
	je	.L1
	mov	rsi, rax
	mov	rdi, rbx
	mov	r12, rax
	call	mptsas_sas_io_unit_pg0@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L29
	mov	rdi, rbx
	lea	r14, 32[rbx]
	call	mptsas_sas_io_unit_pg1@PLT
	mov	rdi, r14
	call	mutex_lock@PLT
	mov	rbp, QWORD PTR 40[rbx]
	test	rbp, rbp
	je	.L5
	mov	ecx, DWORD PTR [r12]
	mov	rdi, QWORD PTR 8[r12]
	test	ecx, ecx
	jle	.L9
	sub	ecx, 1
	mov	rdx, QWORD PTR 8[rbp]
	lea	rax, 64[rdi]
	lea	rsi, [rcx+rcx*4]
	lea	rcx, [rcx+rsi*2]
	add	rdx, 64
	lea	rsi, 152[rdi+rcx*8]
	.p2align 4,,10
	.p2align 3
.L8:
	mov	ecx, DWORD PTR 12[rax]
	add	rax, 88
	add	rdx, 88
	mov	DWORD PTR -76[rdx], ecx
	mov	rcx, QWORD PTR -88[rax]
	mov	QWORD PTR -88[rdx], rcx
	mov	ecx, DWORD PTR -80[rax]
	mov	DWORD PTR -80[rdx], ecx
	cmp	rax, rsi
	jne	.L8
.L9:
	call	kfree@PLT
	mov	rdi, r12
	call	kfree@PLT
.L7:
	mov	rdi, r14
	xor	r12d, r12d
	xor	r14d, r14d
	call	mutex_unlock@PLT
	mov	edx, DWORD PTR 0[rbp]
	test	edx, edx
	jg	.L10
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L31:
	add	rsi, QWORD PTR 8[rbp]
.L14:
	mov	r8, QWORD PTR 24[rsi]
	mov	DWORD PTR 4[rsi], r12d
	mov	DWORD PTR 40[rsi], r12d
	test	r8, r8
	jne	.L30
	add	r12d, 1
	add	r14, 88
	cmp	DWORD PTR 0[rbp], r12d
	jle	.L16
.L10:
	mov	ecx, DWORD PTR MPI_SAS_PHY_PGAD_FORM_SHIFT[rip]
	mov	edx, DWORD PTR MPI_SAS_PHY_PGAD_FORM_PHY_NUMBER[rip]
	mov	rdi, rbx
	mov	rsi, QWORD PTR 8[rbp]
	sal	edx, cl
	mov	ecx, r12d
	add	rsi, r14
	call	mptsas_sas_phy_pg0@PLT
	mov	rsi, QWORD PTR 8[rbp]
	mov	ecx, DWORD PTR MPI_SAS_DEVICE_PGAD_FORM_SHIFT[rip]
	mov	rdi, rbx
	mov	edx, DWORD PTR MPI_SAS_DEVICE_PGAD_FORM_HANDLE[rip]
	add	rsi, r14
	mov	r8, QWORD PTR 64[rsi]
	sal	edx, cl
	add	rsi, 40
	mov	QWORD PTR 8[rsi], r8
	mov	rcx, r8
	call	mptsas_sas_device_pg0@PLT
	cmp	QWORD PTR 24[rbx], 0
	mov	rsi, r14
	jne	.L31
	add	rsi, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR 56[rsi]
	mov	QWORD PTR 24[rbx], rax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdi, r12
	call	kfree@PLT
.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
.L30:
	.cfi_restore_state
	add	rsi, 16
	mov	rdi, rbx
	add	r12d, 1
	add	r14, 88
	mov	ecx, DWORD PTR MPI_SAS_DEVICE_PGAD_FORM_SHIFT[rip]
	mov	edx, DWORD PTR MPI_SAS_DEVICE_PGAD_FORM_HANDLE[rip]
	sal	edx, cl
	mov	rcx, r8
	call	mptsas_sas_device_pg0@PLT
	cmp	DWORD PTR 0[rbp], r12d
	jg	.L10
.L16:
	mov	rsi, rbp
	mov	rdi, rbx
	call	mptsas_setup_wide_ports@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L1
	mov	edx, DWORD PTR 8[rbx]
	xor	r14d, r14d
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rsi, QWORD PTR 8[rbp]
	mov	rdi, QWORD PTR 16[rbx]
	mov	ecx, 1
	add	r14d, 1
	add	rsi, r12
	add	r12, 88
	call	mptsas_probe_one_phy@PLT
	mov	eax, DWORD PTR 8[rbx]
	lea	edx, 1[rax]
	mov	DWORD PTR 8[rbx], edx
	cmp	DWORD PTR 0[rbp], r14d
	jg	.L17
	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
.L5:
	.cfi_restore_state
	mov	eax, DWORD PTR [r12]
	mov	QWORD PTR 40[rbx], r12
	lea	rsi, 36[rbx]
	mov	rbp, r12
	lea	rdi, 80[r12]
	mov	DWORD PTR [rbx], eax
	call	list_add_tail@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	mptsas_probe_hba_phys, .-mptsas_probe_hba_phys
	.comm	MPI_SAS_PHY_PGAD_FORM_SHIFT,4,4
	.comm	MPI_SAS_PHY_PGAD_FORM_PHY_NUMBER,4,4
	.comm	MPI_SAS_DEVICE_PGAD_FORM_SHIFT,4,4
	.comm	MPI_SAS_DEVICE_PGAD_FORM_HANDLE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_mptsas.c_mptsas_probe_hba_phys.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mptsas_probe_hba_phys, %function
mptsas_probe_hba_phys:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, .L28
	ldr	r3, .L28+4
	mov	r4, r0
	ldr	r1, [r2]
	mov	r0, #52
	sub	sp, sp, #12
	ldr	r5, [r3]
	bl	kzalloc
	subs	r6, r0, #0
	beq	.L2
	mov	r1, r6
	mov	r0, r4
	bl	mptsas_sas_io_unit_pg0
	subs	r3, r0, #0
	str	r3, [sp, #4]
	bne	.L27
	mov	r0, r4
	add	r7, r4, #20
	bl	mptsas_sas_io_unit_pg1
	mov	r0, r7
	bl	mutex_lock
	ldr	r5, [r4, #28]
	cmp	r5, #0
	beq	.L5
	ldr	lr, [r6]
	ldr	r0, [r6, #8]
	cmp	lr, #0
	ble	.L9
	mov	r3, r0
	add	r2, lr, lr, lsl #1
	add	lr, lr, r2, lsl #2
	ldr	r2, [r5, #8]
	add	lr, r0, lr, lsl #2
.L8:
	ldr	ip, [r3, #44]
	ldr	r1, [r3, #36]
	str	ip, [r2, #44]
	ldr	ip, [r3, #40]
	add	r3, r3, #52
	cmp	r3, lr
	str	ip, [r2, #40]
	str	r1, [r2, #36]
	add	r2, r2, #52
	bne	.L8
.L9:
	bl	kfree
	mov	r0, r6
	bl	kfree
.L7:
	mov	r0, r7
	bl	mutex_unlock
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L16
	mov	r6, #0
	ldr	fp, .L28+8
	mov	r7, r6
	ldr	r10, .L28+12
	ldr	r9, .L28+16
	ldr	r8, .L28+20
	b	.L10
.L15:
	ldr	r3, [r5]
	add	r7, r7, #52
	cmp	r3, r6
	ble	.L16
.L10:
	ldr	r3, [r10]
	ldr	r2, [fp]
	ldr	r1, [r5, #8]
	lsl	r2, r2, r3
	add	r1, r1, r7
	mov	r3, r6
	mov	r0, r4
	bl	mptsas_sas_phy_pg0
	ldr	r1, [r5, #8]
	ldr	r0, [r8]
	add	r1, r1, r7
	ldr	r3, [r1, #36]
	ldr	r2, [r9]
	str	r3, [r1, #28]
	lsl	r2, r2, r0
	add	r1, r1, #24
	mov	r0, r4
	bl	mptsas_sas_device_pg0
	ldr	r3, [r4, #16]
	ldr	r1, [r5, #8]
	cmp	r3, #0
	add	r1, r1, r7
	ldreq	r3, [r1, #32]
	streq	r3, [r4, #16]
	ldr	r3, [r1, #16]
	str	r6, [r1, #4]
	cmp	r3, #0
	str	r6, [r1, #24]
	add	r6, r6, #1
	beq	.L15
	ldr	r0, [r9]
	ldr	r2, [r8]
	add	r1, r1, #12
	lsl	r2, r0, r2
	mov	r0, r4
	bl	mptsas_sas_device_pg0
	ldr	r3, [r5]
	add	r7, r7, #52
	cmp	r3, r6
	bgt	.L10
.L16:
	mov	r1, r5
	mov	r0, r4
	bl	mptsas_setup_wide_ports
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L1
	mov	r6, #0
	mov	r7, r6
	ldr	r2, [r4, #8]
.L17:
	ldr	r1, [r5, #8]
	mov	r3, #1
	add	r1, r1, r7
	ldr	r0, [r4, #12]
	bl	mptsas_probe_one_phy
	ldr	r3, [r5]
	ldr	r2, [r4, #8]
	add	r6, r6, #1
	add	r2, r2, #1
	cmp	r3, r6
	add	r7, r7, #52
	str	r2, [r4, #8]
	bgt	.L17
	ldr	r0, [sp, #4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	mov	r0, r6
	bl	kfree
.L1:
	ldr	r0, [sp, #4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	rsb	r3, r5, #0
	str	r3, [sp, #4]
	ldr	r0, [sp, #4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	mov	r0, r6
	mov	r1, r4
	ldr	r3, [r0], #48
	str	r6, [r4, #28]
	str	r3, [r1], #24
	mov	r5, r6
	bl	list_add_tail
	b	.L7
.L29:
	.align	2
.L28:
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	MPI_SAS_PHY_PGAD_FORM_PHY_NUMBER
	.word	MPI_SAS_PHY_PGAD_FORM_SHIFT
	.word	MPI_SAS_DEVICE_PGAD_FORM_HANDLE
	.word	MPI_SAS_DEVICE_PGAD_FORM_SHIFT
	.size	mptsas_probe_hba_phys, .-mptsas_probe_hba_phys
	.comm	MPI_SAS_PHY_PGAD_FORM_SHIFT,4,4
	.comm	MPI_SAS_PHY_PGAD_FORM_PHY_NUMBER,4,4
	.comm	MPI_SAS_DEVICE_PGAD_FORM_SHIFT,4,4
	.comm	MPI_SAS_DEVICE_PGAD_FORM_HANDLE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
