	.file	"extr_kblayouts.c_GetLayoutCount.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str4.8,"aMS",@progbits,4
	.align 8
.LC0:
	.string	"K"
	.string	""
	.string	""
	.string	"e"
	.string	""
	.string	""
	.string	"y"
	.string	""
	.string	""
	.string	"b"
	.string	""
	.string	""
	.string	"o"
	.string	""
	.string	""
	.string	"a"
	.string	""
	.string	""
	.string	"r"
	.string	""
	.string	""
	.string	"d"
	.string	""
	.string	""
	.string	" "
	.string	""
	.string	""
	.string	"L"
	.string	""
	.string	""
	.string	"a"
	.string	""
	.string	""
	.string	"y"
	.string	""
	.string	""
	.string	"o"
	.string	""
	.string	""
	.string	"u"
	.string	""
	.string	""
	.string	"t"
	.string	""
	.string	""
	.string	"\\"
	.string	""
	.string	""
	.string	"P"
	.string	""
	.string	""
	.string	"r"
	.string	""
	.string	""
	.string	"e"
	.string	""
	.string	""
	.string	"l"
	.string	""
	.string	""
	.string	"o"
	.string	""
	.string	""
	.string	"a"
	.string	""
	.string	""
	.string	"d"
	.string	""
	.string	""
	.string	""
	.string	""
	.string	""
	.string	""
	.text
	.p2align 4
	.type	GetLayoutCount, @function
GetLayoutCount:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 88
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -108[rbp], edi
	mov	rcx, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR CCH_LAYOUT_ID[rip]
	lea	r12d, 1[rax]
	movsx	rax, r12d
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L24
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L25
.L4:
	movsx	rax, DWORD PTR MAX_PATH[rip]
	mov	rsi, rsp
	mov	r13, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L6
.L26:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L26
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L27
.L7:
	mov	ecx, DWORD PTR KEY_QUERY_VALUE[rip]
	xor	edx, edx
	lea	r8, -92[rbp]
	mov	rbx, rsp
	mov	edi, DWORD PTR HKEY_CURRENT_USER[rip]
	lea	rsi, .LC0[rip]
	call	RegOpenKeyExW@PLT
	cmp	rax, QWORD PTR ERROR_SUCCESS[rip]
	mov	DWORD PTR -104[rbp], 0
	je	.L28
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L29
	mov	eax, DWORD PTR -104[rbp]
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L25:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L28:
	mov	DWORD PTR -84[rbp], 16
	lea	eax, 0[0+r12*4]
	lea	r15, -84[rbp]
	mov	DWORD PTR -112[rbp], eax
	lea	rax, -88[rbp]
	lea	r14, -80[rbp]
	mov	DWORD PTR -100[rbp], 0
	mov	QWORD PTR -120[rbp], rax
	.p2align 4,,10
	.p2align 3
.L9:
	push	0
	mov	r9, QWORD PTR -120[rbp]
	xor	r8d, r8d
	mov	rcx, r15
	mov	esi, DWORD PTR -100[rbp]
	mov	edi, DWORD PTR -92[rbp]
	push	0
	mov	rdx, r14
	call	RegEnumValue@PLT
	cmp	rax, QWORD PTR ERROR_SUCCESS[rip]
	pop	rdx
	pop	rcx
	jne	.L30
	mov	eax, DWORD PTR -112[rbp]
	mov	edi, DWORD PTR -92[rbp]
	mov	r9, r15
	mov	r8d, r13d
	xor	ecx, ecx
	xor	edx, edx
	mov	rsi, r14
	mov	r12d, 4
	mov	DWORD PTR -84[rbp], eax
	call	RegQueryValueExW@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	mov	eax, DWORD PTR 0[r13+r12*4]
	mov	DWORD PTR -16[rbx+r12*4], eax
	add	r12, 1
.L10:
	mov	rdi, r13
	call	wcslen@PLT
	cmp	eax, r12d
	jge	.L11
	mov	esi, DWORD PTR -108[rbp]
	mov	rdi, rbx
	call	wcscmp@PLT
	mov	DWORD PTR -84[rbp], 16
	cmp	rax, 1
	adc	DWORD PTR -104[rbp], 0
	add	DWORD PTR -100[rbp], 1
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L30:
	mov	edi, DWORD PTR -92[rbp]
	call	RegCloseKey@PLT
	jmp	.L1
.L27:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	GetLayoutCount, .-GetLayoutCount
	.comm	MAX_PATH,4,4
	.comm	KEY_QUERY_VALUE,4,4
	.comm	HKEY_CURRENT_USER,4,4
	.comm	ERROR_SUCCESS,8,8
	.comm	CCH_LAYOUT_ID,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_kblayouts.c_GetLayoutCount.c"
	.text
	.section	.rodata.str4.4,"aMS",%progbits,4
	.align	2
.LC0:
	.ascii	"K\000\000\000e\000\000\000y\000\000\000b\000\000\000"
	.ascii	"o\000\000\000a\000\000\000r\000\000\000d\000\000\000"
	.ascii	" \000\000\000L\000\000\000a\000\000\000y\000\000\000"
	.ascii	"o\000\000\000u\000\000\000t\000\000\000\\\000\000\000"
	.ascii	"P\000\000\000r\000\000\000e\000\000\000l\000\000\000"
	.ascii	"o\000\000\000a\000\000\000d\000\000\000\000\000\000"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	GetLayoutCount, %function
GetLayoutCount:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #68
	mov	ip, r0
	ldr	r2, .L15
	ldr	r3, .L15+4
	ldr	r2, [r2]
	ldr	r3, [r3]
	add	r2, r2, #1
	lsl	r2, r2, #2
	str	r2, [fp, #-76]
	lsl	r3, r3, #2
	add	r2, r2, #7
	bic	r2, r2, #7
	add	r3, r3, #7
	sub	sp, sp, r2
	bic	r3, r3, #7
	ldr	r1, .L15+8
	ldr	r2, .L15+12
	sub	r0, fp, #68
	add	r4, sp, #16
	sub	sp, sp, r3
	str	r0, [sp]
	str	ip, [fp, #-80]
	ldr	ip, .L15+16
	ldr	r3, [r1]
	ldr	r0, [r2]
	ldr	r1, .L15+20
	mov	r2, #0
	ldr	ip, [ip]
	str	ip, [fp, #-40]
	mov	ip,#0
	bl	RegOpenKeyExW
	ldr	r10, .L15+24
	ldr	r3, [r10]
	cmp	r0, r3
	movne	r3, #0
	strne	r3, [fp, #-72]
	beq	.L12
.L1:
	ldr	r3, .L15+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	ldr	r0, [fp, #-72]
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r2, #0
	mov	r3, #16
	mov	r6, r2
	mov	r7, r2
	add	r8, sp, #16
	str	r2, [fp, #-72]
	str	r3, [fp, #-60]
	str	r3, [fp, #-84]
.L3:
	sub	r3, fp, #64
	str	r3, [sp, #4]
	mov	r1, r7
	sub	r3, fp, #60
	ldr	r0, [fp, #-68]
	str	r6, [sp, #12]
	str	r6, [sp, #8]
	str	r6, [sp]
	sub	r2, fp, #56
	bl	RegEnumValue
	ldr	r3, [r10]
	cmp	r0, r3
	bne	.L14
	mov	r3, #0
	ldr	ip, [fp, #-76]
	sub	r2, fp, #60
	str	r2, [sp, #4]
	ldr	r0, [fp, #-68]
	mov	r2, r3
	str	r4, [sp]
	sub	r1, fp, #56
	str	ip, [fp, #-60]
	mov	r9, #4
	bl	RegQueryValueExW
	sub	r5, r8, #4
	b	.L4
.L5:
	ldr	r3, [r4, r9, lsl #2]
	add	r9, r9, #1
	str	r3, [r5, #4]!
.L4:
	mov	r0, r4
	bl	wcslen
	cmp	r9, r0
	ble	.L5
	mov	r0, r8
	ldr	r1, [fp, #-80]
	bl	wcscmp
	cmp	r0, #0
	ldreq	r3, [fp, #-72]
	add	r7, r7, #1
	addeq	r3, r3, #1
	streq	r3, [fp, #-72]
	ldr	r3, [fp, #-84]
	str	r3, [fp, #-60]
	b	.L3
.L14:
	ldr	r0, [fp, #-68]
	bl	RegCloseKey
	b	.L1
.L13:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	CCH_LAYOUT_ID
	.word	MAX_PATH
	.word	KEY_QUERY_VALUE
	.word	HKEY_CURRENT_USER
	.word	.LC1
	.word	.LC0
	.word	ERROR_SUCCESS
	.size	GetLayoutCount, .-GetLayoutCount
	.comm	MAX_PATH,4,4
	.comm	KEY_QUERY_VALUE,4,4
	.comm	HKEY_CURRENT_USER,4,4
	.comm	ERROR_SUCCESS,4,4
	.comm	CCH_LAYOUT_ID,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
