	.file	"extr_wince.c_wince_initialize.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Can't initialize connection to remote device.\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"wince-stub.exe"
.LC2:
	.string	" "
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"couldn't get hostname of this system."
	.align 8
.LC4:
	.string	"Couldn't connect to host system."
	.section	.rodata.str1.1
.LC5:
	.string	"couldn't bind socket"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"Couldn't open socket for listening.\n"
	.align 8
.LC7:
	.string	"Unable to start remote stub '%s'.  Windows CE error %d."
	.align 8
.LC8:
	.string	"couldn't set up server for connection."
	.text
	.p2align 4
	.type	wince_initialize, @function
wince_initialize:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	sub	rsp, 296
	.cfi_def_cfa_offset 336
	mov	edx, DWORD PTR connection_initialized[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 280[rsp], rax
	xor	eax, eax
	test	edx, edx
	je	.L28
.L2:
	mov	esi, DWORD PTR WINCE_STUB[rip]
	lea	rdi, .LC1[rip]
	lea	r13, 16[rsp]
	call	upload_to_device@PLT
	mov	rdi, r13
	mov	rsi, rax
	mov	r12, rax
	call	strcpy@PLT
	cmp	QWORD PTR remote_add_host[rip], 0
	jne	.L29
.L5:
	mov	esi, DWORD PTR SOCK_STREAM[rip]
	mov	edi, DWORD PTR AF_INET[rip]
	xor	edx, edx
	call	socket@PLT
	mov	ebp, eax
	test	eax, eax
	js	.L30
.L9:
	mov	edx, DWORD PTR SO_REUSEADDR[rip]
	mov	rcx, rsp
	mov	edi, ebp
	lea	r14, 8[rsp]
	mov	esi, DWORD PTR SOL_SOCKET[rip]
	mov	r8d, 4
	mov	DWORD PTR [rsp], 1
	call	setsockopt@PLT
	xor	esi, esi
	mov	edx, 8
	mov	rdi, r14
	call	memset@PLT
	mov	eax, DWORD PTR AF_INET[rip]
	mov	edi, 7000
	mov	DWORD PTR 12[rsp], eax
	call	htons@PLT
	mov	edx, 8
	mov	rsi, r14
	mov	edi, ebp
	mov	DWORD PTR 8[rsp], eax
	call	bind@PLT
	test	rax, rax
	jne	.L31
.L10:
	mov	esi, 1
	mov	edi, ebp
	call	listen@PLT
	test	rax, rax
	jne	.L32
.L11:
	mov	rdi, r13
	xor	esi, esi
	call	towide@PLT
	xor	esi, esi
	mov	rdi, r12
	mov	r13d, eax
	call	towide@PLT
	xor	r9d, r9d
	xor	r8d, r8d
	xor	ecx, ecx
	mov	edi, eax
	lea	rax, 4[rsp]
	xor	edx, edx
	mov	esi, r13d
	push	rax
	.cfi_def_cfa_offset 344
	push	0
	.cfi_def_cfa_offset 352
	push	0
	.cfi_def_cfa_offset 360
	push	0
	.cfi_def_cfa_offset 368
	call	CeCreateProcess@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 336
	test	eax, eax
	je	.L33
.L12:
	xor	edx, edx
	xor	esi, esi
	mov	edi, ebp
	call	accept@PLT
	mov	DWORD PTR s[rip], eax
	test	eax, eax
	js	.L34
.L13:
	mov	edi, ebp
	call	close@PLT
	mov	rax, QWORD PTR 280[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L35
	add	rsp, 296
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	call	CeRapiInit@PLT
	test	eax, eax
	jne	.L3
	mov	DWORD PTR connection_initialized[rip], 1
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L33:
	call	CeGetLastError@PLT
	mov	rsi, r12
	lea	rdi, .LC7[rip]
	mov	rdx, rax
	xor	eax, eax
	call	error@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L32:
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	error@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L31:
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	error@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L29:
	lea	rsi, .LC2[rip]
	mov	rdi, r13
	call	strcat@PLT
	mov	rdi, r13
	xor	esi, esi
	call	strchr@PLT
	mov	rcx, r13
	mov	rdi, rax
.L6:
	mov	esi, DWORD PTR [rcx]
	add	rcx, 4
	lea	edx, -16843009[rsi]
	not	esi
	and	edx, esi
	and	edx, -2139062144
	je	.L6
	mov	eax, edx
	shr	eax, 16
	test	edx, 32896
	cmove	edx, eax
	lea	rax, 2[rcx]
	cmove	rcx, rax
	mov	eax, edx
	add	al, dl
	mov	rax, r13
	sbb	rcx, 3
	sub	rax, rcx
	lea	rsi, 256[rax]
	call	gethostname@PLT
	test	rax, rax
	je	.L5
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	error@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L30:
	lea	rdi, .LC4[rip]
	call	stub_error@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L34:
	lea	rdi, .LC8[rip]
	xor	eax, eax
	call	error@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L3:
	xor	eax, eax
	call	CeRapiUninit@PLT
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	error@PLT
	jmp	.L2
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	wince_initialize, .-wince_initialize
	.comm	s,4,4
	.comm	remote_add_host,8,8
	.comm	connection_initialized,4,4
	.comm	WINCE_STUB,4,4
	.comm	SO_REUSEADDR,4,4
	.comm	SOL_SOCKET,4,4
	.comm	SOCK_STREAM,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
	.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_wince.c_wince_initialize.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Can't initialize connection to remote device.\012\000"
	.align	2
.LC1:
	.ascii	"wince-stub.exe\000"
	.align	2
.LC2:
	.ascii	" \000"
	.align	2
.LC3:
	.ascii	"couldn't get hostname of this system.\000"
	.align	2
.LC4:
	.ascii	"Couldn't connect to host system.\000"
	.align	2
.LC5:
	.ascii	"couldn't bind socket\000"
	.align	2
.LC6:
	.ascii	"Couldn't open socket for listening.\012\000"
	.align	2
.LC7:
	.ascii	"Unable to start remote stub '%s'.  Windows CE error"
	.ascii	" %d.\000"
	.align	2
.LC8:
	.ascii	"couldn't set up server for connection.\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wince_initialize, %function
wince_initialize:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L32
	ldr	r4, .L32+4
	sub	sp, sp, #304
	ldr	r3, [r3]
	str	r3, [sp, #300]
	mov	r3,#0
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L24
.L2:
	ldr	r3, .L32+8
	ldr	r0, .L32+12
	ldr	r1, [r3]
	bl	upload_to_device
	mov	r1, r0
	mov	r5, r0
	add	r0, sp, #44
	bl	strcpy
	ldr	r3, .L32+16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L25
.L5:
	ldr	r3, .L32+20
	ldr	r6, .L32+24
	mov	r2, #0
	ldr	r1, [r3]
	ldr	r0, [r6]
	bl	socket
	subs	r4, r0, #0
	blt	.L26
.L7:
	mov	r1, #4
	mov	ip, #1
	ldr	r3, .L32+28
	ldr	r2, .L32+32
	str	r1, [sp]
	ldr	r1, [r3]
	ldr	r2, [r2]
	add	r3, sp, #28
	mov	r0, r4
	str	ip, [sp, #28]
	bl	setsockopt
	mov	r3, #0
	ldr	r2, [r6]
	ldr	r0, .L32+36
	str	r2, [sp, #40]
	str	r3, [sp, #36]
	bl	htons
	mov	r3, r0
	mov	r2, #8
	mov	r0, r4
	add	r1, sp, #36
	str	r3, [sp, #36]
	bl	bind
	cmp	r0, #0
	bne	.L27
.L8:
	mov	r1, #1
	mov	r0, r4
	bl	listen
	cmp	r0, #0
	bne	.L28
.L9:
	mov	r1, #0
	mov	r0, r5
	bl	towide
	mov	r1, #0
	mov	r6, r0
	add	r0, sp, #44
	bl	towide
	mov	r3, #0
	add	ip, sp, #32
	mov	r1, r0
	mov	r2, r3
	mov	r0, r6
	str	r3, [sp, #16]
	str	r3, [sp, #12]
	str	r3, [sp, #8]
	str	r3, [sp, #4]
	str	r3, [sp]
	str	ip, [sp, #20]
	bl	CeCreateProcess
	cmp	r0, #0
	beq	.L29
.L10:
	mov	r2, #0
	mov	r0, r4
	mov	r1, r2
	bl	accept
	ldr	r3, .L32+40
	cmp	r0, #0
	str	r0, [r3]
	blt	.L30
.L11:
	mov	r0, r4
	bl	close
	ldr	r3, .L32
	ldr	r2, [r3]
	ldr	r3, [sp, #300]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L31
	add	sp, sp, #304
	@ sp needed
	pop	{r4, r5, r6, pc}
.L24:
	bl	CeRapiInit
	cmp	r0, #0
	bne	.L3
	mov	r3, #1
	str	r3, [r4]
	b	.L2
.L29:
	bl	CeGetLastError
	mov	r1, r5
	mov	r2, r0
	ldr	r0, .L32+44
	bl	error
	b	.L10
.L28:
	ldr	r0, .L32+48
	bl	error
	b	.L9
.L27:
	ldr	r0, .L32+52
	bl	error
	b	.L8
.L25:
	add	r0, sp, #44
	bl	strlen
	add	r3, sp, #44
	mov	r2, #2
	add	r0, r3, r0
	ldr	r1, .L32+56
	bl	memcpy
	mov	r1, #0
	add	r0, sp, #44
	bl	strchr
	mov	r4, r0
	add	r0, sp, #44
	bl	strlen
	mov	r1, r0
	mov	r0, r4
	rsb	r1, r1, #256
	bl	gethostname
	cmp	r0, #0
	beq	.L5
	ldr	r0, .L32+60
	bl	error
	b	.L5
.L26:
	ldr	r0, .L32+64
	bl	stub_error
	b	.L7
.L30:
	ldr	r0, .L32+68
	bl	error
	b	.L11
.L3:
	bl	CeRapiUninit
	ldr	r0, .L32+72
	bl	error
	b	.L2
.L31:
	bl	__stack_chk_fail
.L33:
	.align	2
.L32:
	.word	.LC9
	.word	connection_initialized
	.word	WINCE_STUB
	.word	.LC1
	.word	remote_add_host
	.word	SOCK_STREAM
	.word	AF_INET
	.word	SOL_SOCKET
	.word	SO_REUSEADDR
	.word	7000
	.word	s
	.word	.LC7
	.word	.LC6
	.word	.LC5
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC8
	.word	.LC0
	.size	wince_initialize, .-wince_initialize
	.comm	s,4,4
	.comm	remote_add_host,4,4
	.comm	connection_initialized,4,4
	.comm	WINCE_STUB,4,4
	.comm	SO_REUSEADDR,4,4
	.comm	SOL_SOCKET,4,4
	.comm	SOCK_STREAM,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
