	.file	"extr_mdns.c__mdns_append_answer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	_mdns_append_answer, @function
_mdns_append_answer:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdx]
	cmp	rax, QWORD PTR MDNS_TYPE_PTR[rip]
	je	.L25
	cmp	rax, QWORD PTR MDNS_TYPE_SRV[rip]
	je	.L26
	cmp	rax, QWORD PTR MDNS_TYPE_TXT[rip]
	je	.L27
	cmp	rax, QWORD PTR MDNS_TYPE_SDPTR[rip]
	je	.L28
	cmp	rax, QWORD PTR MDNS_TYPE_A[rip]
	mov	rbp, rcx
	je	.L29
	xor	r8d, r8d
	cmp	rax, QWORD PTR MDNS_TYPE_AAAA[rip]
	je	.L30
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L31
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
.L25:
	.cfi_restore_state
	mov	rdi, QWORD PTR 16[rdx]
	mov	r14d, DWORD PTR 8[rdx]
	mov	ebp, DWORD PTR 12[rdx]
	test	rdi, rdi
	je	.L3
	mov	ebx, DWORD PTR [rdi]
	mov	r15d, DWORD PTR 4[rdi]
	call	_mdns_get_service_instance_name@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	mov	r9d, ebp
	push	r14
	.cfi_def_cfa_offset 96
	mov	edx, eax
	mov	r8d, ebx
	mov	ecx, r15d
.L22:
	mov	rsi, r13
	mov	rdi, r12
	call	_mdns_append_ptr_record@PLT
	xor	r8d, r8d
	pop	rsi
	.cfi_def_cfa_offset 88
	pop	rdi
	.cfi_def_cfa_offset 80
	test	rax, rax
	setg	r8b
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	mov	rax, QWORD PTR _mdns_server[rip]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR MDNS_IP_PROTOCOL_V6[rip]
	sal	rax, 4
	add	rax, QWORD PTR [rdx+rcx*8]
	mov	edx, DWORD PTR 8[rax]
	test	edx, edx
	jne	.L14
	mov	rsi, QWORD PTR PCB_DUP[rip]
	cmp	QWORD PTR [rax], rsi
	je	.L14
	.p2align 4,,10
	.p2align 3
.L16:
	xor	r8d, r8d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	mov	ecx, DWORD PTR 12[rdx]
	mov	r8d, DWORD PTR 8[rbx]
	mov	rdx, QWORD PTR 16[rdx]
	call	_mdns_append_sdptr_record@PLT
	xor	r8d, r8d
	test	rax, rax
	setg	r8b
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, rbp
	mov	r14, rsp
	call	_mdns_get_esp_netif@PLT
	mov	rsi, r14
	mov	edi, eax
	call	esp_netif_get_ip6_linklocal@PLT
	test	rax, rax
	jne	.L16
	mov	rdi, QWORD PTR [rsp]
	call	_ipv6_address_is_zero@PLT
	test	rax, rax
	jne	.L16
	mov	ecx, DWORD PTR 12[rbx]
	mov	r8d, DWORD PTR 8[rbx]
	mov	rsi, r13
	mov	rdi, r12
	mov	rdx, QWORD PTR [rsp]
	call	_mdns_append_aaaa_record@PLT
	test	rax, rax
	jle	.L16
	mov	rdi, rbp
	call	_mdns_if_is_dup@PLT
	test	eax, eax
	je	.L18
	mov	rdi, rbp
	call	_mdns_get_other_if@PLT
	mov	rdi, rax
	call	_mdns_get_esp_netif@PLT
	mov	rsi, r14
	mov	edi, eax
	call	esp_netif_get_ip6_linklocal@PLT
	test	rax, rax
	jne	.L18
	mov	ecx, DWORD PTR 12[rbx]
	mov	r8d, DWORD PTR 8[rbx]
	mov	rsi, r13
	mov	rdi, r12
	mov	rdx, QWORD PTR [rsp]
	call	_mdns_append_aaaa_record@PLT
	test	rax, rax
	jle	.L18
.L23:
	mov	r8d, 2
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rax, QWORD PTR _mdns_server[rip]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR MDNS_IP_PROTOCOL_V4[rip]
	sal	rax, 4
	add	rax, QWORD PTR [rdx+rcx*8]
	mov	ecx, DWORD PTR 8[rax]
	test	ecx, ecx
	jne	.L9
	mov	rsi, QWORD PTR PCB_DUP[rip]
	cmp	QWORD PTR [rax], rsi
	jne	.L16
.L9:
	mov	rdi, rbp
	mov	r14, rsp
	call	_mdns_get_esp_netif@PLT
	mov	rsi, r14
	mov	edi, eax
	call	esp_netif_get_ip_info@PLT
	test	rax, rax
	jne	.L16
	mov	ecx, DWORD PTR 12[rbx]
	mov	r8d, DWORD PTR 8[rbx]
	mov	rsi, r13
	mov	rdi, r12
	mov	edx, DWORD PTR [rsp]
	call	_mdns_append_a_record@PLT
	test	rax, rax
	jle	.L16
	mov	rdi, rbp
	call	_mdns_if_is_dup@PLT
	test	eax, eax
	je	.L18
	mov	rdi, rbp
	call	_mdns_get_other_if@PLT
	mov	rdi, rax
	call	_mdns_get_esp_netif@PLT
	mov	rsi, r14
	mov	edi, eax
	call	esp_netif_get_ip_info@PLT
	test	rax, rax
	jne	.L18
	mov	ecx, DWORD PTR 12[rbx]
	mov	r8d, DWORD PTR 8[rbx]
	mov	rsi, r13
	mov	rdi, r12
	mov	edx, DWORD PTR [rsp]
	call	_mdns_append_a_record@PLT
	test	rax, rax
	jg	.L23
	.p2align 4,,10
	.p2align 3
.L18:
	mov	r8d, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	sub	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 88
	mov	ecx, DWORD PTR 28[rdx]
	mov	r9d, ebp
	mov	edx, DWORD PTR 32[rdx]
	push	r14
	.cfi_def_cfa_offset 96
	mov	r8d, DWORD PTR 24[rbx]
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	mov	ecx, DWORD PTR 12[rdx]
	mov	r8d, DWORD PTR 8[rbx]
	mov	rdx, QWORD PTR 16[rdx]
	call	_mdns_append_srv_record@PLT
	xor	r8d, r8d
	test	rax, rax
	setg	r8b
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	mov	ecx, DWORD PTR 12[rdx]
	mov	r8d, DWORD PTR 8[rbx]
	mov	rdx, QWORD PTR 16[rdx]
	call	_mdns_append_txt_record@PLT
	xor	r8d, r8d
	test	rax, rax
	setg	r8b
	jmp	.L1
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	_mdns_append_answer, .-_mdns_append_answer
	.comm	_mdns_server,8,8
	.comm	PCB_DUP,8,8
	.comm	MDNS_TYPE_TXT,8,8
	.comm	MDNS_TYPE_SRV,8,8
	.comm	MDNS_TYPE_SDPTR,8,8
	.comm	MDNS_TYPE_PTR,8,8
	.comm	MDNS_TYPE_AAAA,8,8
	.comm	MDNS_TYPE_A,8,8
	.comm	MDNS_IP_PROTOCOL_V6,8,8
	.comm	MDNS_IP_PROTOCOL_V4,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_mdns.c__mdns_append_answer.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_mdns_append_answer, %function
_mdns_append_answer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	ip, .L36
	mov	r4, r2
	ldr	ip, [ip]
	ldr	r2, [r2]
	mov	r7, r3
	ldr	r3, .L36+4
	sub	sp, sp, #28
	cmp	r2, ip
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r6, r0
	mov	r5, r1
	beq	.L29
	ldr	r3, .L36+8
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L30
	ldr	r3, .L36+12
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L31
	ldr	r3, .L36+16
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L32
	ldr	r3, .L36+20
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L33
	ldr	r3, .L36+24
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L34
.L19:
	mov	r0, #0
.L1:
	ldr	r3, .L36+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L35
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L29:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L3
	mov	r0, r3
	bl	_mdns_get_service_instance_name
	ldr	r1, [r4, #12]
	ldr	ip, [r4, #4]
	mov	r2, r0
	ldr	r0, [r4, #8]
	ldr	r3, [r1, #4]
	stmib	sp, {r0, ip}
	ldr	ip, [r1]
	mov	r0, r6
	mov	r1, r5
	str	ip, [sp]
	bl	_mdns_append_ptr_record
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
	b	.L1
.L34:
	ldr	r3, .L36+28
	ldr	r2, .L36+32
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r3, [r3, r7, lsl #2]
	add	r1, r3, r2, lsl #3
	ldr	r1, [r1, #4]
	cmp	r1, #0
	bne	.L13
	ldr	r1, .L36+36
	ldr	r2, [r3, r2, lsl #3]
	ldr	r3, [r1]
	cmp	r2, r3
	bne	.L19
.L13:
	mov	r0, r7
	bl	_mdns_get_esp_netif
	add	r1, sp, #16
	bl	esp_netif_get_ip6_linklocal
	cmp	r0, #0
	bne	.L19
	ldr	r0, [sp, #16]
	bl	_ipv6_address_is_zero
	cmp	r0, #0
	bne	.L19
	ldmib	r4, {r2, r3}
	mov	r1, r5
	str	r2, [sp]
	mov	r0, r6
	ldr	r2, [sp, #16]
	bl	_mdns_append_aaaa_record
	cmp	r0, #0
	ble	.L19
	mov	r0, r7
	bl	_mdns_if_is_dup
	cmp	r0, #0
	beq	.L16
	mov	r0, r7
	bl	_mdns_get_other_if
	bl	_mdns_get_esp_netif
	add	r1, sp, #16
	bl	esp_netif_get_ip6_linklocal
	cmp	r0, #0
	bne	.L16
	ldr	r3, [r4, #4]
	mov	r1, r5
	str	r3, [sp]
	mov	r0, r6
	ldr	r3, [r4, #8]
	ldr	r2, [sp, #16]
	bl	_mdns_append_aaaa_record
	cmp	r0, #0
	ble	.L16
.L20:
	mov	r0, #2
	b	.L1
.L32:
	ldmib	r4, {r2, r3}
	str	r2, [sp]
	ldr	r2, [r4, #12]
	bl	_mdns_append_sdptr_record
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
	b	.L1
.L33:
	ldr	r3, .L36+28
	ldr	r2, .L36+40
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r3, [r3, r7, lsl #2]
	add	r1, r3, r2, lsl #3
	ldr	r1, [r1, #4]
	cmp	r1, #0
	bne	.L9
	ldr	r1, .L36+36
	ldr	r2, [r3, r2, lsl #3]
	ldr	r3, [r1]
	cmp	r2, r3
	bne	.L19
.L9:
	mov	r0, r7
	bl	_mdns_get_esp_netif
	add	r1, sp, #16
	bl	esp_netif_get_ip_info
	cmp	r0, #0
	bne	.L19
	ldmib	r4, {r2, r3}
	mov	r1, r5
	str	r2, [sp]
	mov	r0, r6
	ldr	r2, [sp, #16]
	bl	_mdns_append_a_record
	cmp	r0, #0
	ble	.L19
	mov	r0, r7
	bl	_mdns_if_is_dup
	cmp	r0, #0
	beq	.L16
	mov	r0, r7
	bl	_mdns_get_other_if
	bl	_mdns_get_esp_netif
	add	r1, sp, #16
	bl	esp_netif_get_ip_info
	cmp	r0, #0
	bne	.L16
	ldr	r3, [r4, #4]
	mov	r1, r5
	str	r3, [sp]
	mov	r0, r6
	ldr	r3, [r4, #8]
	ldr	r2, [sp, #16]
	bl	_mdns_append_a_record
	cmp	r0, #0
	bgt	.L20
.L16:
	mov	r0, #1
	b	.L1
.L3:
	ldr	r2, [r4, #8]
	ldr	ip, [r4, #4]
	ldr	r3, [r4, #16]
	stmib	sp, {r2, ip}
	str	r3, [sp]
	ldr	r3, [r4, #20]
	ldr	r2, [r4, #24]
	bl	_mdns_append_ptr_record
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
	b	.L1
.L30:
	ldmib	r4, {r2, r3}
	str	r2, [sp]
	ldr	r2, [r4, #12]
	bl	_mdns_append_srv_record
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
	b	.L1
.L31:
	ldmib	r4, {r2, r3}
	str	r2, [sp]
	ldr	r2, [r4, #12]
	bl	_mdns_append_txt_record
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
	b	.L1
.L35:
	bl	__stack_chk_fail
.L37:
	.align	2
.L36:
	.word	MDNS_TYPE_PTR
	.word	.LC0
	.word	MDNS_TYPE_SRV
	.word	MDNS_TYPE_TXT
	.word	MDNS_TYPE_SDPTR
	.word	MDNS_TYPE_A
	.word	MDNS_TYPE_AAAA
	.word	_mdns_server
	.word	MDNS_IP_PROTOCOL_V6
	.word	PCB_DUP
	.word	MDNS_IP_PROTOCOL_V4
	.size	_mdns_append_answer, .-_mdns_append_answer
	.comm	_mdns_server,4,4
	.comm	PCB_DUP,4,4
	.comm	MDNS_TYPE_TXT,4,4
	.comm	MDNS_TYPE_SRV,4,4
	.comm	MDNS_TYPE_SDPTR,4,4
	.comm	MDNS_TYPE_PTR,4,4
	.comm	MDNS_TYPE_AAAA,4,4
	.comm	MDNS_TYPE_A,4,4
	.comm	MDNS_IP_PROTOCOL_V6,4,4
	.comm	MDNS_IP_PROTOCOL_V4,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
