	.file	"extr_spectrum_trap.c___mlxsw_sp_trap_group_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	__mlxsw_sp_trap_group_init, @function
__mlxsw_sp_trap_group_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MLXSW_REG_HTGT_LEN[rip]
	mov	rcx, rsp
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L13:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L13
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L14
.L4:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	cmp	DWORD PTR [rsi], 128
	jne	.L1
	mov	edx, DWORD PTR MLXSW_SP_DISCARD_POLICER_ID[rip]
	mov	esi, DWORD PTR MLXSW_REG_HTGT_TRAP_GROUP_SP_L2_DISCARDS[rip]
	mov	r8d, 1
	xor	ecx, ecx
	mov	rdi, rsp
	call	mlxsw_reg_htgt_pack@PLT
	mov	edi, DWORD PTR htgt[rip]
	call	MLXSW_REG@PLT
	mov	edi, DWORD PTR [rbx]
	mov	rdx, rsp
	mov	esi, eax
	call	mlxsw_reg_write@PLT
.L1:
	mov	rbx, QWORD PTR -24[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L15
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	__mlxsw_sp_trap_group_init, .-__mlxsw_sp_trap_group_init
	.comm	htgt,4,4
	.comm	MLXSW_SP_DISCARD_POLICER_ID,4,4
	.comm	MLXSW_REG_HTGT_TRAP_GROUP_SP_L2_DISCARDS,4,4
	.comm	MLXSW_REG_HTGT_LEN,4,4
	.comm	EINVAL,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_spectrum_trap.c___mlxsw_sp_trap_group_init.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__mlxsw_sp_trap_group_init, %function
__mlxsw_sp_trap_group_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	ldr	r3, .L9
	ldr	r2, [r1]
	ldr	r3, [r3]
	cmp	r2, #128
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L9+4
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	beq	.L7
	ldr	r3, .L9+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L7:
	mov	r1, #1
	mov	r4, r0
	ldr	r3, .L9+12
	ldr	r2, .L9+16
	str	r1, [sp]
	add	r5, sp, #8
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r3, #0
	mov	r0, r5
	bl	mlxsw_reg_htgt_pack
	ldr	r3, .L9+20
	ldr	r4, [r4]
	ldr	r0, [r3]
	bl	MLXSW_REG
	mov	r2, r5
	mov	r1, r0
	mov	r0, r4
	bl	mlxsw_reg_write
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	MLXSW_REG_HTGT_LEN
	.word	.LC0
	.word	EINVAL
	.word	MLXSW_REG_HTGT_TRAP_GROUP_SP_L2_DISCARDS
	.word	MLXSW_SP_DISCARD_POLICER_ID
	.word	htgt
	.size	__mlxsw_sp_trap_group_init, .-__mlxsw_sp_trap_group_init
	.comm	htgt,4,4
	.comm	MLXSW_SP_DISCARD_POLICER_ID,4,4
	.comm	MLXSW_REG_HTGT_TRAP_GROUP_SP_L2_DISCARDS,4,4
	.comm	MLXSW_REG_HTGT_LEN,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
