	.file	"extr_platform-windows.c_os_get_cores_internal.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	os_get_cores_internal, @function
os_get_cores_internal:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR core_count_initialized[rip]
	mov	DWORD PTR 4[rsp], 0
	test	eax, eax
	je	.L14
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	lea	rbp, 4[rsp]
	xor	edi, edi
	mov	DWORD PTR core_count_initialized[rip], 1
	mov	rsi, rbp
	call	GetLogicalProcessorInformation@PLT
	xor	eax, eax
	call	GetLastError@PLT
	cmp	rax, QWORD PTR ERROR_INSUFFICIENT_BUFFER[rip]
	jne	.L1
	mov	edi, DWORD PTR 4[rsp]
	call	malloc@PLT
	mov	rsi, rbp
	mov	rdi, rax
	mov	r12, rax
	call	GetLogicalProcessorInformation@PLT
	test	rax, rax
	je	.L3
	movsx	rax, DWORD PTR 4[rsp]
	shr	rax, 4
	test	eax, eax
	jle	.L3
	lea	ebp, -1[rax]
	mov	rbx, r12
	add	rbp, 1
	sal	rbp, 4
	add	rbp, r12
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	add	rbx, 16
	cmp	rbx, rbp
	je	.L3
.L5:
	mov	rax, QWORD PTR RelationProcessorCore[rip]
	cmp	QWORD PTR [rbx], rax
	jne	.L4
	mov	edi, DWORD PTR 8[rbx]
	add	DWORD PTR physical_cores[rip], 1
	call	num_logical_cores@PLT
	add	DWORD PTR logical_cores[rip], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, r12
	call	free@PLT
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	os_get_cores_internal, .-os_get_cores_internal
	.comm	physical_cores,4,4
	.comm	logical_cores,4,4
	.comm	core_count_initialized,4,4
	.comm	RelationProcessorCore,8,8
	.comm	ERROR_INSUFFICIENT_BUFFER,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_platform-windows.c_os_get_cores_internal.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	os_get_cores_internal, %function
os_get_cores_internal:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r2, #0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L19
	ldr	r1, .L19+4
	ldr	r0, [r3]
	sub	sp, sp, #12
	cmp	r0, r2
	ldr	r1, [r1]
	str	r1, [sp, #4]
	mov	r1,#0
	str	r2, [sp]
	beq	.L17
.L1:
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L17:
	mov	r2, #1
	mov	r1, sp
	str	r2, [r3]
	bl	GetLogicalProcessorInformation
	bl	GetLastError
	ldr	r3, .L19+8
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L1
	ldr	r0, [sp]
	bl	malloc
	mov	r1, sp
	mov	r6, r0
	bl	GetLogicalProcessorInformation
	cmp	r0, #0
	beq	.L3
	ldr	r5, [sp]
	lsrs	r5, r5, #3
	beq	.L3
	add	r5, r5, #1
	ldr	r7, .L19+12
	ldr	r9, .L19+16
	ldr	r8, .L19+20
	add	r5, r6, r5, lsl #3
	add	r4, r6, #8
	b	.L5
.L4:
	add	r4, r4, #8
	cmp	r4, r5
	beq	.L3
.L5:
	ldr	r2, [r4, #-8]
	ldr	r3, [r7]
	cmp	r2, r3
	bne	.L4
	ldr	r3, [r9]
	ldr	r0, [r4, #-4]
	add	r3, r3, #1
	str	r3, [r9]
	bl	num_logical_cores
	ldr	r3, [r8]
	add	r3, r3, r0
	str	r3, [r8]
	b	.L4
.L3:
	mov	r0, r6
	bl	free
	b	.L1
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	core_count_initialized
	.word	.LC0
	.word	ERROR_INSUFFICIENT_BUFFER
	.word	RelationProcessorCore
	.word	physical_cores
	.word	logical_cores
	.size	os_get_cores_internal, .-os_get_cores_internal
	.comm	physical_cores,4,4
	.comm	logical_cores,4,4
	.comm	core_count_initialized,4,4
	.comm	RelationProcessorCore,4,4
	.comm	ERROR_INSUFFICIENT_BUFFER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
