	.file	"extr_l_net_berkeley.c_WINS_Init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"WINS_Init: Unable to resolve hostname\n"
	.align 8
.LC1:
	.string	"WINS_Init: Unable to open control socket\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Winsock Initialized\n"
	.text
	.p2align 4
	.globl	WINS_Init
	.type	WINS_Init, @function
WINS_Init:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 16
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAXHOSTNAMELEN[rip]
	mov	rbx, rsp
	mov	rsi, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rbx, rax
	and	rdx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L3
.L36:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L36
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L37
.L4:
	mov	rax, QWORD PTR DEFAULTnet_hostport[rip]
	mov	rdi, rsp
	mov	rbx, rsp
	mov	QWORD PTR net_hostport[rip], rax
	call	gethostname@PLT
	mov	rdi, rsp
	call	gethostbyname@PLT
	test	rax, rax
	je	.L38
	mov	rax, QWORD PTR [rax]
	movzx	esi, BYTE PTR [rsp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR myAddr[rip], eax
	test	sil, sil
	je	.L7
	mov	eax, esi
	mov	rdx, rsp
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L17:
	movzx	eax, BYTE PTR 1[rdx]
	add	rdx, 1
	test	al, al
	je	.L7
.L10:
	lea	ecx, -48[rax]
	cmp	cl, 9
	jbe	.L17
	cmp	al, 46
	je	.L17
	xor	eax, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L39:
	movzx	esi, BYTE PTR [rbx+rax]
.L8:
	movsx	rdx, eax
	cmp	sil, 46
	je	.L11
	add	rax, 1
	cmp	rax, 15
	jne	.L39
	mov	edx, 15
.L11:
	mov	BYTE PTR [rbx+rdx], 0
.L7:
	xor	edi, edi
	call	WINS_OpenSocket@PLT
	cmp	eax, DWORD PTR SOCKET_ERROR[rip]
	mov	DWORD PTR net_controlsocket[rip], eax
	je	.L40
.L12:
	mov	eax, DWORD PTR AF_INET[rip]
	mov	edi, DWORD PTR net_hostport[rip]
	lea	r12, -28[rbp]
	mov	DWORD PTR broadcastaddr[rip+8], eax
	mov	eax, DWORD PTR INADDR_BROADCAST[rip]
	mov	DWORD PTR broadcastaddr[rip+4], eax
	call	htons@PLT
	mov	edi, DWORD PTR net_controlsocket[rip]
	mov	rsi, r12
	mov	DWORD PTR broadcastaddr[rip], eax
	call	WINS_GetSocketAddr@PLT
	mov	rdi, r12
	call	WINS_AddrToString@PLT
	mov	edi, DWORD PTR my_tcpip_address[rip]
	mov	esi, eax
	call	strcpy@PLT
	mov	edi, DWORD PTR my_tcpip_address[rip]
	mov	esi, 58
	call	strrchr@PLT
	test	rax, rax
	je	.L13
	mov	BYTE PTR [rax], 0
.L13:
	lea	rdi, .LC2[rip]
	call	WinPrint@PLT
	mov	eax, DWORD PTR net_controlsocket[rip]
.L1:
	mov	rbx, QWORD PTR -24[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L41
	lea	rsp, -16[rbp]
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L40:
	lea	rdi, .LC1[rip]
	call	WinError@PLT
	jmp	.L12
.L38:
	lea	rdi, .LC0[rip]
	call	WinError@PLT
	xor	eax, eax
	jmp	.L1
.L41:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	WINS_Init, .-WINS_Init
	.comm	winsockdata,4,4
	.comm	net_hostport,8,8
	.comm	net_controlsocket,4,4
	.comm	my_tcpip_address,4,4
	.comm	myAddr,4,4
	.comm	broadcastaddr,4,4
	.comm	SOCKET_ERROR,4,4
	.comm	MAXHOSTNAMELEN,4,4
	.comm	INADDR_BROADCAST,4,4
	.comm	DEFAULTnet_hostport,8,8
	.comm	AF_INET,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_l_net_berkeley.c_WINS_Init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"WINS_Init: Unable to resolve hostname\012\000"
	.align	2
.LC1:
	.ascii	"WINS_Init: Unable to open control socket\012\000"
	.align	2
.LC2:
	.ascii	"Winsock Initialized\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	WINS_Init
	.syntax unified
	.arm
	.fpu softvfp
	.type	WINS_Init, %function
WINS_Init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #12
	ldr	r2, .L32
	ldr	r3, .L32+4
	ldr	r1, [r2]
	ldr	r2, [r3]
	add	r3, r1, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r4, .L32+8
	ldr	r3, .L32+12
	mov	r0, sp
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	str	r2, [r4]
	bl	gethostname
	mov	r0, sp
	bl	gethostbyname
	subs	r5, r0, #0
	beq	.L28
	ldr	r3, [r5]
	ldrb	r0, [sp]	@ zero_extendqisi2
	ldr	r2, [r3]
	ldr	r3, .L32+16
	ldr	r2, [r2]
	cmp	r0, #0
	str	r2, [r3]
	beq	.L4
	mov	ip, sp
	mov	r3, r0
	mov	r1, sp
	b	.L7
.L5:
	ldrb	r3, [r1, #1]!	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L4
.L7:
	sub	r2, r3, #48
	cmp	r3, #46
	cmpne	r2, #9
	bls	.L5
	mov	r2, ip
	mov	r3, #0
	b	.L6
.L29:
	ldrb	r0, [r2, #1]!	@ zero_extendqisi2
.L6:
	cmp	r0, #46
	beq	.L8
	add	r3, r3, #1
	cmp	r3, #15
	bne	.L29
.L8:
	mov	r2, #0
	strb	r2, [ip, r3]
.L4:
	mov	r0, #0
	bl	WINS_OpenSocket
	ldr	r3, .L32+20
	ldr	r5, .L32+24
	ldr	r3, [r3]
	str	r0, [r5]
	cmp	r0, r3
	beq	.L30
.L9:
	ldr	r2, .L32+28
	ldr	r3, .L32+32
	ldr	r2, [r2]
	ldr	r6, .L32+36
	ldr	r3, [r3]
	ldr	r0, [r4]
	str	r2, [r6, #8]
	str	r3, [r6, #4]
	bl	htons
	mov	r3, r0
	sub	r1, fp, #28
	str	r3, [r6]
	ldr	r4, .L32+40
	ldr	r0, [r5]
	bl	WINS_GetSocketAddr
	sub	r0, fp, #28
	ldr	r6, [r4]
	bl	WINS_AddrToString
	mov	r1, r0
	mov	r0, r6
	bl	strcpy
	mov	r1, #58
	ldr	r0, [r4]
	bl	strrchr
	cmp	r0, #0
	movne	r3, #0
	strbne	r3, [r0]
	ldr	r0, .L32+44
	bl	WinPrint
	ldr	r0, [r5]
.L1:
	ldr	r3, .L32+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L31
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L30:
	ldr	r0, .L32+48
	bl	WinError
	b	.L9
.L28:
	ldr	r0, .L32+52
	bl	WinError
	mov	r0, r5
	b	.L1
.L31:
	bl	__stack_chk_fail
.L33:
	.align	2
.L32:
	.word	MAXHOSTNAMELEN
	.word	DEFAULTnet_hostport
	.word	net_hostport
	.word	.LC3
	.word	myAddr
	.word	SOCKET_ERROR
	.word	net_controlsocket
	.word	AF_INET
	.word	INADDR_BROADCAST
	.word	broadcastaddr
	.word	my_tcpip_address
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.size	WINS_Init, .-WINS_Init
	.comm	winsockdata,4,4
	.comm	net_hostport,4,4
	.comm	net_controlsocket,4,4
	.comm	my_tcpip_address,4,4
	.comm	myAddr,4,4
	.comm	broadcastaddr,4,4
	.comm	SOCKET_ERROR,4,4
	.comm	MAXHOSTNAMELEN,4,4
	.comm	INADDR_BROADCAST,4,4
	.comm	DEFAULTnet_hostport,4,4
	.comm	AF_INET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
