	.file	"extr_sja1105_static_config.c_sja1105_static_config_pack.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sja1105_static_config_pack
	.type	sja1105_static_config_pack, @function
sja1105_static_config_pack:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	xmm0, xmm0
	xor	ecx, ecx
	mov	r8d, 4
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	edx, 31
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	add	rsi, 8
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	movaps	XMMWORD PTR 16[rsp], xmm0
	mov	QWORD PTR 32[rsp], 0
	call	sja1105_pack@PLT
	movsx	rcx, DWORD PTR SJA1105_SIZE_DEVICE_ID[rip]
	add	r13, rcx
	mov	ecx, DWORD PTR BLK_IDX_MAX[rip]
	test	ecx, ecx
	je	.L18
	lea	rax, 16[rsp]
	xor	ebx, ebx
	mov	QWORD PTR 8[rsp], rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	add	ebx, 1
	cmp	DWORD PTR BLK_IDX_MAX[rip], ebx
	jbe	.L2
.L6:
	mov	rax, QWORD PTR [r12]
	mov	edx, ebx
	lea	rsi, [rdx+rdx*2]
	lea	r15, [rax+rsi*8]
	mov	eax, DWORD PTR [r15]
	test	eax, eax
	je	.L3
	mov	rcx, QWORD PTR blk_id_map[rip]
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, r13
	mov	rdx, QWORD PTR [rcx+rdx*8]
	mov	QWORD PTR 24[rsp], rdx
	mov	rdx, QWORD PTR 8[r15]
	imul	eax, DWORD PTR [rdx]
	lea	edx, 3[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 2
	mov	DWORD PTR 16[rsp], eax
	call	sja1105_table_header_pack_with_crc@PLT
	movsx	rdi, DWORD PTR SJA1105_SIZE_TABLE_HEADER[rip]
	mov	edx, DWORD PTR [r15]
	lea	r14, 0[r13+rdi]
	mov	QWORD PTR [rsp], r14
	test	edx, edx
	jle	.L8
	mov	rax, QWORD PTR 8[r15]
	xor	r13d, r13d
	mov	edx, DWORD PTR [rax]
	.p2align 4,,10
	.p2align 3
.L5:
	mov	ebp, DWORD PTR 4[rax]
	mov	rax, QWORD PTR 16[r15]
	mov	rdi, r14
	xor	esi, esi
	imul	ebp, r13d
	add	r13d, 1
	movsx	rbp, ebp
	lea	rbp, [rax+rbp*4]
	call	memset@PLT
	mov	rax, QWORD PTR 8[r15]
	mov	rsi, rbp
	mov	rdi, r14
	mov	edx, DWORD PTR PACK[rip]
	call	[QWORD PTR 8[rax]]
	mov	rax, QWORD PTR 8[r15]
	movsx	rsi, DWORD PTR [rax]
	mov	rdx, rsi
	add	r14, rsi
	cmp	DWORD PTR [r15], r13d
	jg	.L5
	mov	rdi, QWORD PTR [rsp]
	mov	rsi, r14
	lea	r13, 4[r14]
	call	sja1105_table_write_crc@PLT
.L20:
	add	ebx, 1
	cmp	DWORD PTR BLK_IDX_MAX[rip], ebx
	ja	.L6
.L2:
	mov	edx, DWORD PTR SJA1105_SIZE_TABLE_HEADER[rip]
	xor	esi, esi
	mov	rdi, r13
	movabs	rax, -2401053092612145152
	mov	QWORD PTR 16[rsp], rax
	mov	QWORD PTR 24[rsp], 0
	call	memset@PLT
	mov	edx, DWORD PTR PACK[rip]
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, r13
	call	sja1105_table_header_packing@PLT
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	r14, QWORD PTR [rsp]
	mov	rdi, QWORD PTR [rsp]
	mov	rsi, r14
	lea	r13, 4[r14]
	call	sja1105_table_write_crc@PLT
	jmp	.L20
.L18:
	lea	rax, 16[rsp]
	mov	QWORD PTR 8[rsp], rax
	jmp	.L2
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sja1105_static_config_pack, .-sja1105_static_config_pack
	.comm	blk_id_map,8,8
	.comm	SJA1105_SIZE_TABLE_HEADER,4,4
	.comm	SJA1105_SIZE_DEVICE_ID,4,4
	.comm	PACK,4,4
	.comm	BLK_IDX_MAX,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_sja1105_static_config.c_sja1105_static_config_pack.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sja1105_static_config_pack
	.syntax unified
	.arm
	.fpu softvfp
	.type	sja1105_static_config_pack, %function
sja1105_static_config_pack:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r2, #4
	mov	r5, #0
	mov	r4, r0
	sub	sp, sp, #44
	ldr	ip, .L22
	str	r2, [sp]
	mov	r3, r5
	mov	r9, r1
	ldr	fp, .L22+4
	add	r1, r1, r2
	mov	r2, #31
	ldr	ip, [ip]
	str	ip, [sp, #36]
	mov	ip,#0
	str	r5, [sp, #20]
	str	r5, [sp, #24]
	str	r5, [sp, #28]
	str	r5, [sp, #32]
	bl	sja1105_pack
	ldr	r2, .L22+8
	ldr	r3, [fp]
	ldr	r10, [r2]
	cmp	r3, r5
	add	r4, r4, r10
	beq	.L19
	ldr	r3, .L22+12
	ldr	r8, .L22+16
	str	r3, [sp, #12]
	mov	r3, r9
	mov	r9, r5
	mov	r10, r3
	b	.L6
.L3:
	ldr	r2, [fp]
	add	r9, r9, #1
	cmp	r2, r9
	bls	.L2
.L6:
	ldr	r6, [r10]
	add	r7, r9, r9, lsl #1
	ldr	r2, [r6, r7, lsl #2]
	add	r5, r6, r7, lsl #2
	cmp	r2, #0
	beq	.L3
	ldr	r1, [r5, #4]
	ldr	r3, .L22+20
	ldr	r1, [r1]
	ldr	r0, [r3]
	mul	r2, r1, r2
	cmp	r2, #0
	add	r1, r2, #3
	movlt	r2, r1
	ldr	ip, [r0, r9, lsl #2]
	asr	r2, r2, #2
	mov	r0, r4
	add	r1, sp, #20
	str	r2, [sp, #20]
	str	ip, [sp, #28]
	bl	sja1105_table_header_pack_with_crc
	ldr	r3, [sp, #12]
	ldr	r2, [r6, r7, lsl #2]
	ldr	r3, [r3]
	cmp	r2, #0
	add	r4, r4, r3
	str	r4, [sp, #8]
	ble	.L8
	mov	r6, #0
	ldr	r1, [r5, #4]
	ldr	r2, [r1]
.L5:
	ldr	r3, [r1, #4]
	ldr	r7, [r5, #8]
	mul	r3, r6, r3
	mov	r1, #0
	mov	r0, r4
	add	r7, r7, r3, lsl #2
	bl	memset
	ldr	r3, [r5, #4]
	mov	r1, r7
	mov	r0, r4
	ldr	r3, [r3, #8]
	ldr	r2, [r8]
	blx	r3
	ldr	r1, [r5, #4]
	ldr	r3, [r5]
	ldr	r2, [r1]
	add	r6, r6, #1
	cmp	r3, r6
	add	r4, r4, r2
	bgt	.L5
	mov	r1, r4
	ldr	r0, [sp, #8]
	bl	sja1105_table_write_crc
	add	r4, r4, #4
.L21:
	ldr	r2, [fp]
	add	r9, r9, #1
	cmp	r2, r9
	bhi	.L6
.L2:
	mov	r1, #0
	ldr	r2, [sp, #12]
	ldr	r3, .L22+24
	ldr	r2, [r2]
	mov	r0, r4
	str	r3, [sp, #24]
	str	r1, [sp, #28]
	str	r1, [sp, #20]
	bl	memset
	ldr	r2, [r8]
	mov	r0, r4
	add	r1, sp, #20
	bl	sja1105_table_header_packing
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	ldr	r4, [sp, #8]
	ldr	r0, [sp, #8]
	mov	r1, r4
	bl	sja1105_table_write_crc
	add	r4, r4, #4
	b	.L21
.L19:
	ldr	r3, .L22+12
	ldr	r8, .L22+16
	str	r3, [sp, #12]
	b	.L2
.L20:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	.LC0
	.word	BLK_IDX_MAX
	.word	SJA1105_SIZE_DEVICE_ID
	.word	SJA1105_SIZE_TABLE_HEADER
	.word	PACK
	.word	blk_id_map
	.word	-559038737
	.size	sja1105_static_config_pack, .-sja1105_static_config_pack
	.comm	blk_id_map,4,4
	.comm	SJA1105_SIZE_TABLE_HEADER,4,4
	.comm	SJA1105_SIZE_DEVICE_ID,4,4
	.comm	PACK,4,4
	.comm	BLK_IDX_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
