	.file	"extr_nbt.c_NetBTAstatRemote.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"adapter %p, NCB %p\n"
.LC1:
	.string	"returning 0x%02x\n"
	.text
	.p2align 4
	.type	NetBTAstatRemote, @function
NetBTAstatRemote:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	rdx, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	mov	rsi, rdi
	lea	rdi, .LC0[rip]
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 8[rsp], 0
	call	TRACE@PLT
	mov	r12d, DWORD PTR NRC_BADDR[rip]
	test	rbp, rbp
	je	.L1
	mov	r12d, DWORD PTR NRC_INVADDRESS[rip]
	test	rbx, rbx
	je	.L1
	lea	rdx, 8[rsp]
	mov	rsi, rbx
	mov	rdi, rbp
	call	NetBTInternalFindName@PLT
	cmp	DWORD PTR NRC_GOODRET[rip], eax
	mov	r12d, eax
	je	.L23
.L5:
	cmp	DWORD PTR NRC_CMDCAN[rip], r12d
	je	.L8
.L6:
	mov	r12d, DWORD PTR NRC_CMDTMO[rip]
.L8:
	movsx	rsi, r12d
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	TRACE@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L23:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rsp]
	test	rax, rax
	je	.L5
	cmp	QWORD PTR [rax], 0
	jle	.L6
	mov	r9d, DWORD PTR WSA_FLAG_OVERLAPPED[rip]
	mov	edx, DWORD PTR IPPROTO_UDP[rip]
	xor	r8d, r8d
	xor	ecx, ecx
	mov	esi, DWORD PTR SOCK_DGRAM[rip]
	mov	edi, DWORD PTR PF_INET[rip]
	call	WSASocketA@PLT
	cmp	QWORD PTR INVALID_SOCKET[rip], rax
	mov	r14, rax
	je	.L25
	movsx	rdx, DWORD PTR 8[rbx]
	add	DWORD PTR 0[rbp], 1
	xor	r13d, r13d
	lea	r15, 16[rsp]
	mov	eax, DWORD PTR FALSE[rip]
	mov	QWORD PTR [rdx], 0
	mov	QWORD PTR 24[rsp], rdx
	mov	edx, DWORD PTR 4[rbx]
	mov	DWORD PTR 16[rsp], eax
	mov	DWORD PTR 20[rsp], edx
	test	eax, eax
	je	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, DWORD PTR 16[rsp]
	add	r13, 1
	test	eax, eax
	jne	.L10
.L9:
	cmp	QWORD PTR gWINSQueries[rip], r13
	jle	.L10
	mov	rdi, rbx
	call	NCB_CANCELLED@PLT
	mov	r12d, DWORD PTR NRC_CMDCAN[rip]
	test	eax, eax
	jne	.L13
	mov	rax, QWORD PTR 8[rsp]
	mov	r9d, DWORD PTR FALSE[rip]
	mov	rdi, r14
	mov	ecx, DWORD PTR NBNS_TYPE_NBSTAT[rip]
	mov	edx, DWORD PTR 0[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	esi, DWORD PTR [rbx]
	mov	r8d, DWORD PTR [rax]
	call	NetBTSendNameQuery@PLT
	mov	r12d, DWORD PTR NRC_SYSTEM[rip]
	test	eax, eax
	jne	.L13
	mov	r12d, DWORD PTR NetBTNodeStatusAnswerCallback[rip]
	call	GetTickCount@PLT
	mov	r8, r15
	mov	rsi, r14
	mov	rdi, rbp
	add	rax, QWORD PTR gWINSQueryTimeout[rip]
	mov	ecx, r12d
	mov	rdx, rax
	call	NetBTWaitForNameResponse@PLT
	mov	r12d, eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L25:
	mov	r12d, DWORD PTR NRC_OSRESNOTAV[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, r14
	call	closesocket@PLT
	jmp	.L8
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	NetBTAstatRemote, .-NetBTAstatRemote
	.comm	gWINSQueryTimeout,8,8
	.comm	gWINSQueries,8,8
	.comm	WSA_FLAG_OVERLAPPED,4,4
	.comm	SOCK_DGRAM,4,4
	.comm	PF_INET,4,4
	.comm	NetBTNodeStatusAnswerCallback,4,4
	.comm	NRC_SYSTEM,4,4
	.comm	NRC_OSRESNOTAV,4,4
	.comm	NRC_INVADDRESS,4,4
	.comm	NRC_GOODRET,4,4
	.comm	NRC_CMDTMO,4,4
	.comm	NRC_CMDCAN,4,4
	.comm	NRC_BADDR,4,4
	.comm	NBNS_TYPE_NBSTAT,4,4
	.comm	IPPROTO_UDP,4,4
	.comm	INVALID_SOCKET,8,8
	.comm	FALSE,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_nbt.c_NetBTAstatRemote.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"adapter %p, NCB %p\012\000"
	.align	2
.LC1:
	.ascii	"returning 0x%02x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	NetBTAstatRemote, %function
NetBTAstatRemote:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	mov	r9, #0
	ldr	r3, .L29
	sub	sp, sp, #36
	mov	r2, r1
	mov	r4, r1
	mov	r1, r0
	ldr	r0, .L29+4
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	str	r9, [sp, #12]
	bl	TRACE
	cmp	r5, r9
	beq	.L23
	cmp	r4, #0
	beq	.L24
	mov	r1, r4
	mov	r0, r5
	add	r2, sp, #12
	bl	NetBTInternalFindName
	ldr	r3, .L29+8
	mov	r6, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L25
.L5:
	ldr	r3, .L29+12
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L8
.L6:
	ldr	r3, .L29+16
	ldr	r6, [r3]
.L8:
	mov	r1, r6
	ldr	r0, .L29+20
	bl	TRACE
.L1:
	ldr	r3, .L29
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L26
	mov	r0, r6
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	ldr	r3, .L29+24
	ldr	r6, [r3]
	b	.L1
.L25:
	ldr	r3, [sp, #12]
	cmp	r3, #0
	beq	.L5
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L6
	ldr	r3, .L29+28
	ldr	r2, .L29+32
	ldr	r0, [r3]
	ldr	r1, .L29+36
	ldr	r3, .L29+40
	str	r9, [sp]
	str	r0, [sp, #4]
	ldr	r0, [r3]
	ldr	r2, [r2]
	mov	r3, r9
	ldr	r1, [r1]
	bl	WSASocketA
	ldr	r3, .L29+44
	mov	r8, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L27
	ldr	r3, [r5]
	ldr	fp, .L29+48
	add	r3, r3, #1
	ldr	r2, [r4, #8]
	str	r3, [r5]
	ldr	r7, [fp]
	ldr	r3, [r4, #4]
	cmp	r7, #0
	str	r9, [r2]
	str	r2, [sp, #24]
	str	r7, [sp, #16]
	str	r3, [sp, #20]
	bne	.L10
	ldr	r9, .L29+52
	ldr	r10, .L29+12
	b	.L9
.L13:
	ldr	r3, [sp, #16]
	add	r7, r7, #1
	cmp	r3, #0
	bne	.L10
.L9:
	ldr	r3, [r9]
	cmp	r3, r7
	ble	.L10
	mov	r0, r4
	bl	NCB_CANCELLED
	cmp	r0, #0
	ldrne	r6, [r10]
	bne	.L13
	ldr	r2, [fp]
	ldr	r3, [sp, #12]
	str	r2, [sp, #4]
	ldr	r2, [r3, #4]
	ldr	r3, .L29+56
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r5]
	str	r1, [sp]
	mov	r0, r8
	ldr	r1, [r4]
	bl	NetBTSendNameQuery
	cmp	r0, #0
	beq	.L28
	ldr	r3, .L29+60
	ldr	r6, [r3]
	b	.L13
.L23:
	ldr	r3, .L29+64
	ldr	r6, [r3]
	b	.L1
.L27:
	ldr	r3, .L29+68
	ldr	r6, [r3]
	b	.L8
.L10:
	mov	r0, r8
	bl	closesocket
	b	.L8
.L28:
	bl	GetTickCount
	ldr	r3, .L29+72
	mov	r1, r8
	ldr	r2, [r3]
	add	r3, sp, #16
	str	r3, [sp]
	ldr	r3, .L29+76
	add	r2, r0, r2
	ldr	r3, [r3]
	mov	r0, r5
	bl	NetBTWaitForNameResponse
	mov	r6, r0
	b	.L13
.L26:
	bl	__stack_chk_fail
.L30:
	.align	2
.L29:
	.word	.LC2
	.word	.LC0
	.word	NRC_GOODRET
	.word	NRC_CMDCAN
	.word	NRC_CMDTMO
	.word	.LC1
	.word	NRC_INVADDRESS
	.word	WSA_FLAG_OVERLAPPED
	.word	IPPROTO_UDP
	.word	SOCK_DGRAM
	.word	PF_INET
	.word	INVALID_SOCKET
	.word	FALSE
	.word	gWINSQueries
	.word	NBNS_TYPE_NBSTAT
	.word	NRC_SYSTEM
	.word	NRC_BADDR
	.word	NRC_OSRESNOTAV
	.word	gWINSQueryTimeout
	.word	NetBTNodeStatusAnswerCallback
	.size	NetBTAstatRemote, .-NetBTAstatRemote
	.comm	gWINSQueryTimeout,4,4
	.comm	gWINSQueries,4,4
	.comm	WSA_FLAG_OVERLAPPED,4,4
	.comm	SOCK_DGRAM,4,4
	.comm	PF_INET,4,4
	.comm	NetBTNodeStatusAnswerCallback,4,4
	.comm	NRC_SYSTEM,4,4
	.comm	NRC_OSRESNOTAV,4,4
	.comm	NRC_INVADDRESS,4,4
	.comm	NRC_GOODRET,4,4
	.comm	NRC_CMDTMO,4,4
	.comm	NRC_CMDCAN,4,4
	.comm	NRC_BADDR,4,4
	.comm	NBNS_TYPE_NBSTAT,4,4
	.comm	IPPROTO_UDP,4,4
	.comm	INVALID_SOCKET,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
