	.file	"extr_file.c_msvcrt_init_io.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	":handles (%p)(%p)(%p)\n"
	.text
	.p2align 4
	.globl	msvcrt_init_io
	.type	msvcrt_init_io, @function
msvcrt_init_io:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rdi, rsp
	call	GetStartupInfoA@PLT
	mov	eax, DWORD PTR [rsp]
	cmp	eax, 3
	jbe	.L5
	mov	r12, QWORD PTR 8[rsp]
	test	r12, r12
	je	.L5
	movabs	rsi, -2049638230412172401
	mov	edx, DWORD PTR [r12]
	mov	rdi, rdx
	lea	rbp, 16[r12+rdx*4]
	movsx	rdx, eax
	sub	rdx, 4
	mov	rax, rdx
	mul	rsi
	shr	rdx, 3
	mov	esi, edx
	call	min@PLT
	mov	esi, DWORD PTR MSVCRT_MAX_FILES[rip]
	mov	edi, eax
	call	min@PLT
	test	eax, eax
	je	.L5
	lea	r13d, -1[rax]
	xor	ebx, ebx
	lea	r14, __badioinfo[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rbx, rax
.L8:
	mov	eax, DWORD PTR 16[r12+rbx*4]
	test	DWORD PTR WX_OPEN[rip], eax
	je	.L6
	mov	rax, QWORD PTR INVALID_HANDLE_VALUE[rip]
	cmp	QWORD PTR 0[rbp+rbx*8], rax
	je	.L6
	mov	edi, ebx
	call	get_ioinfo_alloc_fd@PLT
	mov	r15, rax
	cmp	rax, r14
	je	.L7
	mov	edx, DWORD PTR 16[r12+rbx*4]
	mov	rsi, QWORD PTR 0[rbp+rbx*8]
	mov	rdi, rax
	call	msvcrt_set_fd@PLT
.L7:
	mov	rdi, r15
	call	release_ioinfo@PLT
.L6:
	lea	rax, 1[rbx]
	cmp	rbx, r13
	jne	.L25
.L5:
	mov	edi, DWORD PTR STDIN_FILENO[rip]
	call	get_ioinfo_alloc_fd@PLT
	mov	rbp, rax
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR WX_OPEN[rip], eax
	je	.L3
	mov	rax, QWORD PTR INVALID_HANDLE_VALUE[rip]
	cmp	QWORD PTR 8[rbp], rax
	je	.L3
.L9:
	mov	rdi, rbp
	call	release_ioinfo@PLT
	mov	edi, DWORD PTR STDOUT_FILENO[rip]
	call	get_ioinfo_alloc_fd@PLT
	mov	rbp, rax
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR WX_OPEN[rip], eax
	je	.L12
	mov	rax, QWORD PTR INVALID_HANDLE_VALUE[rip]
	cmp	QWORD PTR 8[rbp], rax
	je	.L12
.L13:
	mov	rdi, rbp
	call	release_ioinfo@PLT
	mov	edi, DWORD PTR STDERR_FILENO[rip]
	call	get_ioinfo_alloc_fd@PLT
	mov	rbp, rax
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR WX_OPEN[rip], eax
	je	.L16
	mov	rax, QWORD PTR INVALID_HANDLE_VALUE[rip]
	cmp	QWORD PTR 8[rbp], rax
	je	.L16
.L17:
	mov	rdi, rbp
	call	release_ioinfo@PLT
	mov	edi, DWORD PTR STDERR_FILENO[rip]
	call	get_ioinfo_nolock@PLT
	mov	edi, DWORD PTR STDOUT_FILENO[rip]
	mov	r13d, DWORD PTR [rax]
	call	get_ioinfo_nolock@PLT
	mov	edi, DWORD PTR STDIN_FILENO[rip]
	mov	r12d, DWORD PTR [rax]
	call	get_ioinfo_nolock@PLT
	mov	ecx, r13d
	lea	rdi, .LC0[rip]
	mov	esi, DWORD PTR [rax]
	mov	edx, r12d
	call	TRACE@PLT
	mov	rdi, QWORD PTR _iob[rip]
	mov	edx, 12
	xor	esi, esi
	call	memset@PLT
	mov	ecx, DWORD PTR _IOWRT[rip]
	mov	esi, DWORD PTR _IOREAD[rip]
	xor	edx, edx
	mov	rax, QWORD PTR _iob[rip]
.L23:
	mov	DWORD PTR [rax], edx
	mov	QWORD PTR 8[rax], 0
	test	edx, edx
	je	.L47
	mov	DWORD PTR 4[rax], ecx
	cmp	edx, 2
	jne	.L21
	mov	DWORD PTR MSVCRT_stream_idx[rip], 3
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L48
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L16:
	.cfi_restore_state
	mov	edi, DWORD PTR STD_ERROR_HANDLE[rip]
	call	GetStdHandle@PLT
	mov	rdi, rax
	mov	r12, rax
	call	GetFileType@PLT
	mov	edx, DWORD PTR WX_OPEN[rip]
	or	edx, DWORD PTR WX_TEXT[rip]
	and	eax, 15
	cmp	eax, DWORD PTR FILE_TYPE_CHAR[rip]
	je	.L49
	cmp	eax, DWORD PTR FILE_TYPE_PIPE[rip]
	je	.L50
.L19:
	mov	rsi, r12
	mov	rdi, rbp
	call	msvcrt_set_fd@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, DWORD PTR STD_OUTPUT_HANDLE[rip]
	call	GetStdHandle@PLT
	mov	rdi, rax
	mov	r12, rax
	call	GetFileType@PLT
	mov	edx, DWORD PTR WX_OPEN[rip]
	or	edx, DWORD PTR WX_TEXT[rip]
	and	eax, 15
	cmp	eax, DWORD PTR FILE_TYPE_CHAR[rip]
	je	.L51
	cmp	eax, DWORD PTR FILE_TYPE_PIPE[rip]
	je	.L52
.L15:
	mov	rsi, r12
	mov	rdi, rbp
	call	msvcrt_set_fd@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR STD_INPUT_HANDLE[rip]
	call	GetStdHandle@PLT
	mov	rdi, rax
	mov	r12, rax
	call	GetFileType@PLT
	mov	edx, DWORD PTR WX_OPEN[rip]
	or	edx, DWORD PTR WX_TEXT[rip]
	and	eax, 15
	cmp	eax, DWORD PTR FILE_TYPE_CHAR[rip]
	je	.L53
	cmp	eax, DWORD PTR FILE_TYPE_PIPE[rip]
	je	.L54
.L11:
	mov	rsi, r12
	mov	rdi, rbp
	call	msvcrt_set_fd@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L47:
	mov	DWORD PTR 4[rax], esi
.L21:
	add	edx, 1
	add	rax, 16
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L54:
	or	edx, DWORD PTR WX_PIPE[rip]
	mov	rsi, r12
	mov	rdi, rbp
	call	msvcrt_set_fd@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L49:
	or	edx, DWORD PTR WX_TTY[rip]
	cmp	eax, DWORD PTR FILE_TYPE_PIPE[rip]
	jne	.L19
.L50:
	or	edx, DWORD PTR WX_PIPE[rip]
	mov	rsi, r12
	mov	rdi, rbp
	call	msvcrt_set_fd@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L51:
	or	edx, DWORD PTR WX_TTY[rip]
	cmp	eax, DWORD PTR FILE_TYPE_PIPE[rip]
	jne	.L15
.L52:
	or	edx, DWORD PTR WX_PIPE[rip]
	mov	rsi, r12
	mov	rdi, rbp
	call	msvcrt_set_fd@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L53:
	or	edx, DWORD PTR WX_TTY[rip]
	cmp	eax, DWORD PTR FILE_TYPE_PIPE[rip]
	jne	.L11
	jmp	.L54
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	msvcrt_init_io, .-msvcrt_init_io
	.comm	_iob,8,8
	.comm	__badioinfo,16,16
	.comm	_IOWRT,4,4
	.comm	_IOREAD,4,4
	.comm	WX_TTY,4,4
	.comm	WX_TEXT,4,4
	.comm	WX_PIPE,4,4
	.comm	WX_OPEN,4,4
	.comm	STD_OUTPUT_HANDLE,4,4
	.comm	STD_INPUT_HANDLE,4,4
	.comm	STD_ERROR_HANDLE,4,4
	.comm	STDOUT_FILENO,4,4
	.comm	STDIN_FILENO,4,4
	.comm	STDERR_FILENO,4,4
	.comm	MSVCRT_stream_idx,4,4
	.comm	MSVCRT_MAX_FILES,4,4
	.comm	INVALID_HANDLE_VALUE,8,8
	.comm	FILE_TYPE_PIPE,4,4
	.comm	FILE_TYPE_CHAR,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_file.c_msvcrt_init_io.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	":handles (%p)(%p)(%p)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	msvcrt_init_io
	.syntax unified
	.arm
	.fpu softvfp
	.type	msvcrt_init_io, %function
msvcrt_init_io:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L49
	sub	sp, sp, #20
	add	r0, sp, #4
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	GetStartupInfoA
	ldr	r3, [sp, #4]
	cmp	r3, #3
	bls	.L46
	ldr	r6, [sp, #8]
	cmp	r6, #0
	beq	.L46
	ldr	r1, .L49+4
	sub	r3, r3, #4
	umull	r2, r1, r3, r1
	ldr	r0, [r6]
	lsr	r1, r1, #2
	add	r8, r6, r0, lsl #2
	bl	min
	ldr	r3, .L49+8
	add	r8, r8, #16
	ldr	r1, [r3]
	bl	min
	subs	r7, r0, #0
	beq	.L46
	mov	r4, #0
	ldr	r5, .L49+12
	ldr	r9, .L49+16
	ldr	r10, .L49+20
	add	r6, r6, #12
.L8:
	ldr	r2, [r6, #4]!
	ldr	r3, [r5]
	tst	r2, r3
	beq	.L6
	ldr	r2, [r8, r4, lsl #2]
	ldr	r3, [r9]
	cmp	r2, r3
	beq	.L6
	mov	r0, r4
	bl	get_ioinfo_alloc_fd
	cmp	r0, r10
	mov	fp, r0
	beq	.L7
	ldr	r2, [r6]
	ldr	r1, [r8, r4, lsl #2]
	bl	msvcrt_set_fd
.L7:
	mov	r0, fp
	bl	release_ioinfo
.L6:
	add	r4, r4, #1
	cmp	r7, r4
	bne	.L8
	b	.L5
.L46:
	ldr	r5, .L49+12
.L5:
	ldr	r8, .L49+24
	ldr	r0, [r8]
	bl	get_ioinfo_alloc_fd
	ldr	r3, [r5]
	ldr	r2, [r0]
	mov	r4, r0
	tst	r2, r3
	beq	.L3
	ldr	r3, .L49+16
	ldr	r2, [r0, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L3
.L9:
	ldr	r7, .L49+28
	mov	r0, r4
	bl	release_ioinfo
	ldr	r0, [r7]
	bl	get_ioinfo_alloc_fd
	ldr	r3, [r5]
	ldr	r2, [r0]
	mov	r4, r0
	tst	r2, r3
	beq	.L12
	ldr	r3, .L49+16
	ldr	r2, [r0, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L12
.L13:
	ldr	r6, .L49+32
	mov	r0, r4
	bl	release_ioinfo
	ldr	r0, [r6]
	bl	get_ioinfo_alloc_fd
	ldr	r3, [r5]
	ldr	r2, [r0]
	mov	r4, r0
	tst	r2, r3
	beq	.L16
	ldr	r3, .L49+16
	ldr	r2, [r0, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L16
.L17:
	mov	r0, r4
	bl	release_ioinfo
	ldr	r0, [r8]
	bl	get_ioinfo_nolock
	mov	r3, r0
	ldr	r0, [r7]
	ldr	r5, [r3]
	bl	get_ioinfo_nolock
	mov	r3, r0
	ldr	r0, [r6]
	ldr	r6, [r3]
	bl	get_ioinfo_nolock
	ldr	r4, .L49+36
	ldr	r3, [r0]
	mov	r2, r6
	mov	r1, r5
	ldr	r0, .L49+40
	bl	TRACE
	mov	r2, #12
	mov	r1, #0
	ldr	r0, [r4]
	bl	memset
	mov	r2, #0
	mov	r1, r2
	ldr	r0, .L49+44
	ldr	ip, .L49+48
	ldr	r3, [r4]
	ldr	r0, [r0]
	ldr	ip, [ip]
.L23:
	cmp	r2, #0
	str	r2, [r3]
	str	r1, [r3, #8]
	streq	ip, [r3, #4]
	beq	.L21
	cmp	r2, #2
	str	r0, [r3, #4]
	bne	.L21
	mov	r2, #3
	ldr	r3, .L49+52
	str	r2, [r3]
	ldr	r3, .L49
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L48
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r3, .L49+56
	ldr	r0, [r3]
	bl	GetStdHandle
	mov	r9, r0
	bl	GetFileType
	ldr	r3, .L49+60
	ldr	r1, .L49+64
	ldr	ip, [r3]
	ldr	r1, [r1]
	and	r3, r0, #15
	ldr	r2, [r5]
	cmp	r3, ip
	orr	r2, r2, r1
	ldreq	r1, .L49+68
	mov	r0, r4
	ldreq	r1, [r1]
	orreq	r2, r2, r1
	ldr	r1, .L49+72
	ldr	r1, [r1]
	cmp	r3, r1
	ldreq	r3, .L49+76
	mov	r1, r9
	ldreq	r3, [r3]
	orreq	r2, r2, r3
	bl	msvcrt_set_fd
	b	.L17
.L12:
	ldr	r3, .L49+80
	ldr	r0, [r3]
	bl	GetStdHandle
	mov	r6, r0
	bl	GetFileType
	ldr	r3, .L49+60
	ldr	r2, .L49+64
	ldr	ip, [r3]
	ldr	r1, [r2]
	and	r3, r0, #15
	ldr	r2, [r5]
	cmp	r3, ip
	orr	r2, r2, r1
	ldreq	r1, .L49+68
	mov	r0, r4
	ldreq	r1, [r1]
	orreq	r2, r2, r1
	ldr	r1, .L49+72
	ldr	r1, [r1]
	cmp	r3, r1
	ldreq	r3, .L49+76
	mov	r1, r6
	ldreq	r3, [r3]
	orreq	r2, r2, r3
	bl	msvcrt_set_fd
	b	.L13
.L3:
	ldr	r3, .L49+84
	ldr	r0, [r3]
	bl	GetStdHandle
	mov	r6, r0
	bl	GetFileType
	ldr	r3, .L49+60
	ldr	r2, .L49+64
	ldr	ip, [r3]
	ldr	r1, [r2]
	and	r3, r0, #15
	ldr	r2, [r5]
	cmp	r3, ip
	orr	r2, r2, r1
	ldreq	r1, .L49+68
	mov	r0, r4
	ldreq	r1, [r1]
	orreq	r2, r2, r1
	ldr	r1, .L49+72
	ldr	r1, [r1]
	cmp	r3, r1
	ldreq	r3, .L49+76
	mov	r1, r6
	ldreq	r3, [r3]
	orreq	r2, r2, r3
	bl	msvcrt_set_fd
	b	.L9
.L21:
	add	r2, r2, #1
	add	r3, r3, #12
	b	.L23
.L48:
	bl	__stack_chk_fail
.L50:
	.align	2
.L49:
	.word	.LC1
	.word	-858993459
	.word	MSVCRT_MAX_FILES
	.word	WX_OPEN
	.word	INVALID_HANDLE_VALUE
	.word	__badioinfo
	.word	STDIN_FILENO
	.word	STDOUT_FILENO
	.word	STDERR_FILENO
	.word	_iob
	.word	.LC0
	.word	_IOWRT
	.word	_IOREAD
	.word	MSVCRT_stream_idx
	.word	STD_ERROR_HANDLE
	.word	FILE_TYPE_CHAR
	.word	WX_TEXT
	.word	WX_TTY
	.word	FILE_TYPE_PIPE
	.word	WX_PIPE
	.word	STD_OUTPUT_HANDLE
	.word	STD_INPUT_HANDLE
	.size	msvcrt_init_io, .-msvcrt_init_io
	.comm	_iob,4,4
	.comm	__badioinfo,8,4
	.comm	_IOWRT,4,4
	.comm	_IOREAD,4,4
	.comm	WX_TTY,4,4
	.comm	WX_TEXT,4,4
	.comm	WX_PIPE,4,4
	.comm	WX_OPEN,4,4
	.comm	STD_OUTPUT_HANDLE,4,4
	.comm	STD_INPUT_HANDLE,4,4
	.comm	STD_ERROR_HANDLE,4,4
	.comm	STDOUT_FILENO,4,4
	.comm	STDIN_FILENO,4,4
	.comm	STDERR_FILENO,4,4
	.comm	MSVCRT_stream_idx,4,4
	.comm	MSVCRT_MAX_FILES,4,4
	.comm	INVALID_HANDLE_VALUE,4,4
	.comm	FILE_TYPE_PIPE,4,4
	.comm	FILE_TYPE_CHAR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
