	.file	"extr_port.c_mlx5_port_set_eth_ptys.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mlx5_port_set_eth_ptys
	.type	mlx5_port_set_eth_ptys, @function
mlx5_port_set_eth_ptys:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14d, esi
	push	r13
	.cfi_offset 13, -40
	mov	r13, rdi
	push	r12
	push	rbx
	sub	rsp, 56
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -84[rbp], edx
	mov	edi, DWORD PTR ptys_reg[rip]
	mov	DWORD PTR -88[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	call	MLX5_ST_SZ_DW@PLT
	mov	rcx, rsp
	mov	ebx, eax
	cdqe
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L27:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L27
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L28
.L4:
	mov	edi, DWORD PTR ptys_reg[rip]
	mov	QWORD PTR -96[rbp], rsp
	call	MLX5_ST_SZ_DW@PLT
	mov	rsi, rsp
	mov	r15d, eax
	cdqe
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L6
.L29:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L29
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L30
.L7:
	mov	rdi, r13
	lea	rcx, -68[rbp]
	lea	rdx, -64[rbp]
	mov	r12, rsp
	lea	rsi, -60[rbp]
	call	mlx5_port_query_eth_autoneg@PLT
	mov	edi, DWORD PTR -64[rbp]
	test	edi, edi
	jne	.L8
	mov	eax, DWORD PTR EPERM[rip]
	neg	eax
	test	r14d, r14d
	jne	.L1
.L8:
	sal	r15d, 2
	xor	esi, esi
	mov	rdi, r12
	mov	edx, r15d
	call	memset@PLT
	mov	edx, DWORD PTR local_port[rip]
	mov	ecx, 1
	mov	rsi, r12
	mov	edi, DWORD PTR ptys_reg[rip]
	call	MLX5_SET@PLT
	mov	edx, DWORD PTR -68[rbp]
	mov	ecx, r14d
	mov	rsi, r12
	mov	edi, DWORD PTR ptys_reg[rip]
	call	MLX5_SET@PLT
	mov	ecx, DWORD PTR MLX5_PTYS_EN[rip]
	mov	edx, DWORD PTR proto_mask[rip]
	mov	rsi, r12
	mov	edi, DWORD PTR ptys_reg[rip]
	call	MLX5_SET@PLT
	mov	esi, DWORD PTR -88[rbp]
	mov	ecx, DWORD PTR -84[rbp]
	test	esi, esi
	je	.L10
	mov	edx, DWORD PTR ext_eth_proto_admin[rip]
	mov	edi, DWORD PTR ptys_reg[rip]
	mov	rsi, r12
	call	MLX5_SET@PLT
.L11:
	push	1
	mov	rcx, QWORD PTR -96[rbp]
	mov	edx, r15d
	mov	rsi, r12
	push	0
	mov	r9d, DWORD PTR MLX5_REG_PTYS[rip]
	lea	r8d, 0[0+rbx*4]
	mov	rdi, r13
	call	mlx5_core_access_reg@PLT
	pop	rdx
	pop	rcx
.L1:
	mov	rbx, QWORD PTR -56[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L31
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edx, DWORD PTR eth_proto_admin[rip]
	mov	edi, DWORD PTR ptys_reg[rip]
	mov	rsi, r12
	call	MLX5_SET@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L30:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mlx5_port_set_eth_ptys, .-mlx5_port_set_eth_ptys
	.comm	ptys_reg,4,4
	.comm	proto_mask,4,4
	.comm	local_port,4,4
	.comm	ext_eth_proto_admin,4,4
	.comm	eth_proto_admin,4,4
	.comm	MLX5_REG_PTYS,4,4
	.comm	MLX5_PTYS_EN,4,4
	.comm	EPERM,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_port.c_mlx5_port_set_eth_ptys.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mlx5_port_set_eth_ptys
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx5_port_set_eth_ptys, %function
mlx5_port_set_eth_ptys:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #44
	ldr	r4, .L12
	str	r3, [fp, #-60]
	ldr	r3, .L12+4
	mov	r7, r0
	ldr	r0, [r4]
	mov	r9, r1
	mov	r10, r2
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	MLX5_ST_SZ_DW
	lsl	r8, r0, #2
	add	r3, r8, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r0, [r4]
	bl	MLX5_ST_SZ_DW
	lsl	r6, r0, #2
	add	r3, r6, #7
	add	r2, sp, #16
	bic	r3, r3, #7
	str	r2, [fp, #-56]
	sub	sp, sp, r3
	sub	r1, fp, #44
	sub	r3, fp, #52
	mov	r0, r7
	sub	r2, fp, #48
	bl	mlx5_port_query_eth_autoneg
	ldr	r3, [fp, #-48]
	subs	r1, r9, #0
	movne	r1, #1
	cmp	r3, #0
	movne	r1, #0
	cmp	r1, #0
	bne	.L10
	add	r5, sp, #16
	mov	r2, r6
	mov	r0, r5
	bl	memset
	ldr	r2, .L12+8
	mov	r3, #1
	mov	r1, r5
	ldr	r2, [r2]
	ldr	r0, [r4]
	bl	MLX5_SET
	mov	r3, r9
	mov	r1, r5
	ldr	r2, [fp, #-52]
	ldr	r0, [r4]
	bl	MLX5_SET
	ldr	r3, .L12+12
	ldr	r2, .L12+16
	mov	r1, r5
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r0, [r4]
	bl	MLX5_SET
	ldr	r3, [fp, #-60]
	mov	r1, r5
	cmp	r3, #0
	ldrne	r2, .L12+20
	ldreq	r2, .L12+24
	mov	r3, r10
	ldr	r0, [r4]
	ldr	r2, [r2]
	bl	MLX5_SET
	mov	lr, #1
	mov	ip, #0
	ldr	r3, .L12+28
	str	r8, [sp]
	ldr	r4, [r3]
	mov	r2, r6
	mov	r1, r5
	mov	r0, r7
	stmib	sp, {r4, ip, lr}
	ldr	r3, [fp, #-56]
	bl	mlx5_core_access_reg
.L1:
	ldr	r3, .L12+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	ldr	r3, .L12+32
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	ptys_reg
	.word	.LC0
	.word	local_port
	.word	MLX5_PTYS_EN
	.word	proto_mask
	.word	ext_eth_proto_admin
	.word	eth_proto_admin
	.word	MLX5_REG_PTYS
	.word	EPERM
	.size	mlx5_port_set_eth_ptys, .-mlx5_port_set_eth_ptys
	.comm	ptys_reg,4,4
	.comm	proto_mask,4,4
	.comm	local_port,4,4
	.comm	ext_eth_proto_admin,4,4
	.comm	eth_proto_admin,4,4
	.comm	MLX5_REG_PTYS,4,4
	.comm	MLX5_PTYS_EN,4,4
	.comm	EPERM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
