	.file	"extr_mlx4_main.c_mlx4_change_port_types.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to set port %d, aborting\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Failed to register device\n"
	.text
	.p2align 4
	.globl	mlx4_change_port_types
	.type	mlx4_change_port_types, @function
mlx4_change_port_types:
.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, 8
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	jle	.L9
	mov	rbp, rdi
	mov	r13, rsi
	mov	rdi, QWORD PTR 8[rdi]
	lea	esi, -1[rax]
	xor	edx, edx
	xor	r12d, r12d
	mov	ecx, 1
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdx, rax
.L4:
	mov	eax, DWORD PTR 4[rdi+rdx*4]
	cmp	DWORD PTR 0[r13+rdx*4], eax
	lea	rax, 1[rdx]
	cmovne	r12d, ecx
	cmp	rsi, rdx
	jne	.L10
	test	r12d, r12d
	jne	.L17
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L17:
	.cfi_restore_state
	mov	rdi, rbp
	call	mlx4_unregister_device@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L5
	mov	ebx, 1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jl	.L5
.L7:
	mov	esi, ebx
	mov	rdi, rbp
	call	mlx4_CLOSE_PORT@PLT
	mov	edx, DWORD PTR -4[r13+rbx*4]
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, ebx
	mov	rdi, rbp
	mov	DWORD PTR [rax+rbx*4], edx
	mov	edx, -1
	call	mlx4_SET_PORT@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L6
	mov	edx, ebx
	mov	rdi, rbp
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	mlx4_err@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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	rdi, rbp
	call	mlx4_set_port_mask@PLT
	mov	rdi, rbp
	call	mlx4_register_device@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L18
	mov	rdi, rbp
	call	mlx4_request_modules@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L9:
	.cfi_restore_state
.L2:
	endbr64
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	r12d, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	mlx4_err@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	mlx4_change_port_types, .-mlx4_change_port_types
	.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_mlx4_main.c_mlx4_change_port_types.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to set port %d, aborting\012\000"
	.align	2
.LC1:
	.ascii	"Failed to register device\012\000"
	.text
	.align	2
	.global	mlx4_change_port_types
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_change_port_types, %function
mlx4_change_port_types:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, [r0]
	push	{r4, r5, r6, lr}
	cmp	ip, #0
	ble	.L9
	sub	r6, r1, #4
	mov	r5, r0
	mov	r3, r6
	mov	r4, #0
	ldr	r2, [r0, #4]
	add	ip, r6, ip, lsl #2
.L4:
	ldr	r0, [r3, #4]!
	ldr	r1, [r2, #4]!
	cmp	r0, r1
	movne	r4, #1
	cmp	r3, ip
	bne	.L4
	cmp	r4, #0
	bne	.L17
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L17:
	mov	r0, r5
	bl	mlx4_unregister_device
	ldr	r3, [r5]
	cmp	r3, #0
	bgt	.L7
	b	.L5
.L6:
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	blt	.L5
.L7:
	mov	r1, r4
	mov	r0, r5
	bl	mlx4_CLOSE_PORT
	ldr	r3, [r5, #4]
	ldr	r1, [r6, #4]!
	mvn	r2, #0
	str	r1, [r3, r4, lsl #2]
	mov	r0, r5
	mov	r1, r4
	bl	mlx4_SET_PORT
	subs	r3, r0, #0
	beq	.L6
	mov	r2, r4
	mov	r4, r3
	mov	r0, r5
	ldr	r1, .L19
	bl	mlx4_err
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L5:
	mov	r0, r5
	bl	mlx4_set_port_mask
	mov	r0, r5
	bl	mlx4_register_device
	subs	r4, r0, #0
	mov	r0, r5
	bne	.L18
	bl	mlx4_request_modules
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L9:
.L2:
	mov	r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L18:
	ldr	r1, .L19+4
	bl	mlx4_err
	b	.L1
.L20:
	.align	2
.L19:
	.word	.LC0
	.word	.LC1
	.size	mlx4_change_port_types, .-mlx4_change_port_types
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
