	.file	"extr_mgmt.c_tlv_data_max_len.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tlv_data_max_len, @function
tlv_data_max_len:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	r12d, DWORD PTR HCI_MAX_AD_LENGTH[rip]
	test	edx, edx
	je	.L2
	mov	eax, DWORD PTR MGMT_ADV_FLAG_DISCOV[rip]
	or	eax, DWORD PTR MGMT_ADV_FLAG_LIMITED_DISCOV[rip]
	lea	edx, -3[r12]
	or	eax, DWORD PTR MGMT_ADV_FLAG_MANAGED_FLAGS[rip]
	test	eax, esi
	cmovne	r12d, edx
	test	DWORD PTR MGMT_ADV_FLAG_TX_POWER[rip], esi
	lea	eax, -3[r12]
	cmovne	r12d, eax
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	test	DWORD PTR MGMT_ADV_FLAG_LOCAL_NAME[rip], esi
	jne	.L17
	lea	eax, -4[r12]
	test	DWORD PTR MGMT_ADV_FLAG_APPEARANCE[rip], esi
	cmovne	r12d, eax
.L18:
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	DWORD PTR 12[rsp], esi
	call	calculate_name_len@PLT
	mov	esi, DWORD PTR 12[rsp]
	sub	r12d, eax
	test	DWORD PTR MGMT_ADV_FLAG_APPEARANCE[rip], esi
	lea	eax, -4[r12]
	cmovne	r12d, eax
	jmp	.L18
	.cfi_endproc
.LFE0:
	.size	tlv_data_max_len, .-tlv_data_max_len
	.comm	MGMT_ADV_FLAG_TX_POWER,4,4
	.comm	MGMT_ADV_FLAG_MANAGED_FLAGS,4,4
	.comm	MGMT_ADV_FLAG_LOCAL_NAME,4,4
	.comm	MGMT_ADV_FLAG_LIMITED_DISCOV,4,4
	.comm	MGMT_ADV_FLAG_DISCOV,4,4
	.comm	MGMT_ADV_FLAG_APPEARANCE,4,4
	.comm	HCI_MAX_AD_LENGTH,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_mgmt.c_tlv_data_max_len.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tlv_data_max_len, %function
tlv_data_max_len:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L22
	cmp	r2, #0
	push	{r4, r5, r6, lr}
	mov	r4, r1
	ldr	r5, [r3]
	beq	.L2
	ldr	r3, .L22+4
	ldr	r1, .L22+8
	ldr	r2, .L22+12
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r3, r3, r2
	tst	r3, r4
	ldr	r3, .L22+16
	subne	r5, r5, #3
	ldr	r3, [r3]
	tst	r4, r3
	subne	r5, r5, #3
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r3, .L22+20
	ldr	r3, [r3]
	tst	r1, r3
	bne	.L20
	ldr	r3, .L22+24
	ldr	r3, [r3]
	tst	r4, r3
	subne	r5, r5, #4
.L21:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L20:
	bl	calculate_name_len
	ldr	r3, .L22+24
	sub	r5, r5, r0
	ldr	r3, [r3]
	tst	r4, r3
	subne	r5, r5, #4
	b	.L21
.L23:
	.align	2
.L22:
	.word	HCI_MAX_AD_LENGTH
	.word	MGMT_ADV_FLAG_DISCOV
	.word	MGMT_ADV_FLAG_LIMITED_DISCOV
	.word	MGMT_ADV_FLAG_MANAGED_FLAGS
	.word	MGMT_ADV_FLAG_TX_POWER
	.word	MGMT_ADV_FLAG_LOCAL_NAME
	.word	MGMT_ADV_FLAG_APPEARANCE
	.size	tlv_data_max_len, .-tlv_data_max_len
	.comm	MGMT_ADV_FLAG_TX_POWER,4,4
	.comm	MGMT_ADV_FLAG_MANAGED_FLAGS,4,4
	.comm	MGMT_ADV_FLAG_LOCAL_NAME,4,4
	.comm	MGMT_ADV_FLAG_LIMITED_DISCOV,4,4
	.comm	MGMT_ADV_FLAG_DISCOV,4,4
	.comm	MGMT_ADV_FLAG_APPEARANCE,4,4
	.comm	HCI_MAX_AD_LENGTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
