	.file	"extr_mqtt_msg.c_mqtt_get_publish_data.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mqtt_get_publish_data
	.type	mqtt_get_publish_data, @function
mqtt_get_publish_data:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r10d, DWORD PTR [rsi]
	cmp	r10d, 1
	jle	.L14
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	ecx, ecx
	mov	eax, 2
	xor	r9d, r9d
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	lea	esi, -2[r10]
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	add	rsi, 3
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	add	rax, 1
	add	ecx, 7
	cmp	rax, rsi
	je	.L17
.L5:
	mov	r8d, DWORD PTR -4[rbp+rax*4]
	mov	edi, eax
	mov	edx, r8d
	and	edx, 127
	sal	edx, cl
	add	r9d, edx
	and	r8d, 128
	lea	edx, 1[rax]
	jne	.L3
.L17:
	lea	ebx, [r9+rdi]
	cmp	edx, r10d
	jge	.L18
	movsx	rax, edi
	movsx	rdx, edx
	mov	eax, DWORD PTR 0[rbp+rax*4]
	sal	eax, 8
	or	eax, DWORD PTR 0[rbp+rdx*4]
	lea	r13d, 2[rdi+rax]
	cmp	r10d, r13d
	jl	.L20
	mov	rdi, rbp
	call	mqtt_get_qos@PLT
	test	rax, rax
	jle	.L9
	lea	eax, 1[r13]
	cmp	eax, DWORD PTR [r12]
	jge	.L18
	add	r13d, 2
.L9:
	cmp	r13d, ebx
	jg	.L18
	mov	edx, DWORD PTR [r12]
	mov	ecx, ebx
	sub	ecx, r13d
	mov	eax, edx
	sub	eax, r13d
	cmp	edx, ebx
	movsx	r13, r13d
	cmovge	eax, ecx
	mov	DWORD PTR [r12], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	lea	rax, 0[rbp+r13*4]
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	DWORD PTR [r12], 0
.L18:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	mqtt_get_publish_data, .-mqtt_get_publish_data
	.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_mqtt_msg.c_mqtt_get_publish_data.c"
	.text
	.align	2
	.global	mqtt_get_publish_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	mqtt_get_publish_data, %function
mqtt_get_publish_data:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, [r1]
	cmp	r7, #1
	ble	.L2
	mov	lr, #0
	mov	r6, r1
	mov	r5, r0
	mov	r1, r0
	mov	r4, lr
	mov	r2, #1
	b	.L5
.L3:
	cmp	r7, r2
	add	lr, lr, #7
	beq	.L15
.L5:
	ldr	r3, [r1, #4]!
	add	ip, r2, #2
	tst	r3, #128
	and	r3, r3, #127
	add	r4, r4, r3, lsl lr
	add	r2, r2, #1
	bne	.L3
	cmp	ip, r7
	add	r4, r4, r2
	bge	.L2
.L6:
	ldr	r8, [r5, r2, lsl #2]
	ldr	r0, [r5, ip, lsl #2]
	add	r2, r2, #2
	orr	r0, r0, r8, lsl #8
	add	r8, r0, r2
	cmp	r7, r8
	blt	.L16
	mov	r0, r5
	bl	mqtt_get_qos
	cmp	r0, #0
	ble	.L9
	ldr	r3, [r6]
	add	r2, r8, #1
	cmp	r2, r3
	bge	.L2
	add	r8, r8, #2
.L9:
	cmp	r8, r4
	bgt	.L2
	ldr	r3, [r6]
	add	r0, r5, r8, lsl #2
	cmp	r3, r4
	subge	r4, r4, r8
	sublt	r4, r3, r8
	str	r4, [r6]
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	cmp	ip, r7
	mov	r2, r7
	add	r4, r7, r4
	blt	.L6
.L2:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	mov	r0, #0
	str	r0, [r6]
	pop	{r4, r5, r6, r7, r8, pc}
	.size	mqtt_get_publish_data, .-mqtt_get_publish_data
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
