	.file	"extr_transport.c_bt_mesh_heartbeat_send.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"InitTTL %u feat 0x%04x"
	.text
	.p2align 4
	.globl	bt_mesh_heartbeat_send
	.type	bt_mesh_heartbeat_send, @function
bt_mesh_heartbeat_send:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 88
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	bt_mesh_cfg_get@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 16[rsp], rax
	mov	eax, DWORD PTR 8[rbx]
	mov	DWORD PTR 24[rsp], eax
	mov	eax, DWORD PTR BLE_MESH_KEY_UNUSED[rip]
	mov	DWORD PTR 28[rsp], eax
	mov	eax, DWORD PTR 12[rbx]
	mov	DWORD PTR 32[rsp], eax
	xor	eax, eax
	call	bt_mesh_net_transmit_get@PLT
	mov	edi, DWORD PTR 16[rbx]
	mov	DWORD PTR 48[rsp], eax
	call	bt_mesh_model_elem@PLT
	mov	edi, DWORD PTR 12[rbx]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 52[rsp], eax
	lea	rax, 16[rsp]
	mov	QWORD PTR 56[rsp], rax
	call	bt_mesh_subnet_get@PLT
	mov	DWORD PTR 64[rsp], eax
	mov	rax, QWORD PTR BLE_MESH_ADDR_UNASSIGNED[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L1
	mov	eax, DWORD PTR 8[rbx]
	xor	r12d, r12d
	mov	DWORD PTR 8[rsp], eax
	xor	eax, eax
	call	bt_mesh_relay_get@PLT
	cmp	rax, QWORD PTR BLE_MESH_RELAY_ENABLED[rip]
	je	.L15
	xor	eax, eax
	call	bt_mesh_gatt_proxy_get@PLT
	cmp	rax, QWORD PTR BLE_MESH_GATT_PROXY_ENABLED[rip]
	je	.L16
.L5:
	xor	eax, eax
	call	bt_mesh_friend_get@PLT
	cmp	rax, QWORD PTR BLE_MESH_FRIEND_ENABLED[rip]
	je	.L17
.L6:
	xor	eax, eax
	call	bt_mesh_lpn_established@PLT
	test	rax, rax
	jne	.L18
.L7:
	mov	edi, r12d
	call	sys_cpu_to_be16@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	edx, r12d
	lea	rdi, .LC0[rip]
	mov	DWORD PTR 12[rsp], eax
	call	BT_DBG@PLT
	lea	rdx, 8[rsp]
	xor	r9d, r9d
	xor	r8d, r8d
	lea	rdi, 48[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	mov	esi, DWORD PTR TRANS_CTL_OP_HEARTBEAT[rip]
	mov	ecx, 8
	push	0
	.cfi_def_cfa_offset 128
	call	bt_mesh_ctl_send@PLT
	pop	rax
	.cfi_def_cfa_offset 120
	pop	rdx
	.cfi_def_cfa_offset 112
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	or	r12d, DWORD PTR BLE_MESH_FEAT_LOW_POWER[rip]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	xor	eax, eax
	or	r12d, DWORD PTR BLE_MESH_FEAT_FRIEND[rip]
	call	bt_mesh_lpn_established@PLT
	test	rax, rax
	je	.L7
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	xor	eax, eax
	or	r12d, DWORD PTR BLE_MESH_FEAT_PROXY[rip]
	call	bt_mesh_friend_get@PLT
	cmp	rax, QWORD PTR BLE_MESH_FRIEND_ENABLED[rip]
	jne	.L6
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L15:
	xor	eax, eax
	mov	r12d, DWORD PTR BLE_MESH_FEAT_RELAY[rip]
	call	bt_mesh_gatt_proxy_get@PLT
	cmp	rax, QWORD PTR BLE_MESH_GATT_PROXY_ENABLED[rip]
	jne	.L5
	jmp	.L16
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bt_mesh_heartbeat_send, .-bt_mesh_heartbeat_send
	.comm	TRANS_CTL_OP_HEARTBEAT,4,4
	.comm	BLE_MESH_RELAY_ENABLED,8,8
	.comm	BLE_MESH_KEY_UNUSED,4,4
	.comm	BLE_MESH_GATT_PROXY_ENABLED,8,8
	.comm	BLE_MESH_FRIEND_ENABLED,8,8
	.comm	BLE_MESH_FEAT_RELAY,4,4
	.comm	BLE_MESH_FEAT_PROXY,4,4
	.comm	BLE_MESH_FEAT_LOW_POWER,4,4
	.comm	BLE_MESH_FEAT_FRIEND,4,4
	.comm	BLE_MESH_ADDR_UNASSIGNED,8,8
	.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_transport.c_bt_mesh_heartbeat_send.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"InitTTL %u feat 0x%04x\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bt_mesh_heartbeat_send
	.syntax unified
	.arm
	.fpu softvfp
	.type	bt_mesh_heartbeat_send, %function
bt_mesh_heartbeat_send:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, .L16
	sub	sp, sp, #68
	ldr	r3, [r3]
	str	r3, [sp, #60]
	mov	r3,#0
	bl	bt_mesh_cfg_get
	mov	r4, r0
	ldr	r3, .L16+4
	ldr	r0, [r0]
	ldr	r3, [r3]
	ldmib	r4, {r1, r2}
	str	r0, [sp, #28]
	str	r1, [sp, #32]
	str	r2, [sp, #40]
	str	r3, [sp, #36]
	bl	bt_mesh_net_transmit_get
	mov	r3, r0
	ldr	r0, [r4, #12]
	str	r3, [sp, #44]
	bl	bt_mesh_model_elem
	ldr	r2, [r0]
	add	r3, sp, #28
	ldr	r0, [r4, #8]
	str	r2, [sp, #48]
	str	r3, [sp, #52]
	bl	bt_mesh_subnet_get
	ldr	r3, .L16+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	str	r0, [sp, #56]
	cmp	r2, r3
	beq	.L1
	ldr	r3, [r4, #4]
	str	r3, [sp, #20]
	bl	bt_mesh_relay_get
	ldr	r3, .L16+12
	ldr	r3, [r3]
	cmp	r0, r3
	ldreq	r3, .L16+16
	movne	r5, #0
	ldreq	r5, [r3]
	bl	bt_mesh_gatt_proxy_get
	ldr	r3, .L16+20
	ldr	r3, [r3]
	cmp	r0, r3
	ldreq	r3, .L16+24
	ldreq	r3, [r3]
	orreq	r5, r5, r3
	bl	bt_mesh_friend_get
	ldr	r3, .L16+28
	ldr	r3, [r3]
	cmp	r0, r3
	ldreq	r3, .L16+32
	ldreq	r3, [r3]
	orreq	r5, r5, r3
	bl	bt_mesh_lpn_established
	cmp	r0, #0
	ldrne	r3, .L16+36
	ldrne	r3, [r3]
	orrne	r5, r5, r3
	mov	r0, r5
	bl	sys_cpu_to_be16
	mov	r3, r0
	ldr	r1, [r4, #4]
	mov	r2, r5
	ldr	r0, .L16+40
	str	r3, [sp, #24]
	bl	BT_DBG
	mov	r3, #0
	ldr	r2, .L16+44
	str	r3, [sp, #8]
	str	r3, [sp, #4]
	str	r3, [sp]
	ldr	r1, [r2]
	mov	r3, #8
	add	r2, sp, #20
	add	r0, sp, #44
	bl	bt_mesh_ctl_send
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #60]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, pc}
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC1
	.word	BLE_MESH_KEY_UNUSED
	.word	BLE_MESH_ADDR_UNASSIGNED
	.word	BLE_MESH_RELAY_ENABLED
	.word	BLE_MESH_FEAT_RELAY
	.word	BLE_MESH_GATT_PROXY_ENABLED
	.word	BLE_MESH_FEAT_PROXY
	.word	BLE_MESH_FRIEND_ENABLED
	.word	BLE_MESH_FEAT_FRIEND
	.word	BLE_MESH_FEAT_LOW_POWER
	.word	.LC0
	.word	TRANS_CTL_OP_HEARTBEAT
	.size	bt_mesh_heartbeat_send, .-bt_mesh_heartbeat_send
	.comm	TRANS_CTL_OP_HEARTBEAT,4,4
	.comm	BLE_MESH_RELAY_ENABLED,4,4
	.comm	BLE_MESH_KEY_UNUSED,4,4
	.comm	BLE_MESH_GATT_PROXY_ENABLED,4,4
	.comm	BLE_MESH_FRIEND_ENABLED,4,4
	.comm	BLE_MESH_FEAT_RELAY,4,4
	.comm	BLE_MESH_FEAT_PROXY,4,4
	.comm	BLE_MESH_FEAT_LOW_POWER,4,4
	.comm	BLE_MESH_FEAT_FRIEND,4,4
	.comm	BLE_MESH_ADDR_UNASSIGNED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
