	.file	"extr_directory.c_test_GetSystemDirectoryW.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"GetSystemDirectoryW is not available\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"should fit into MAX_PATH\n"
.LC2:
	.string	"should not touch the buffer\n"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"GetSystemDirectoryW returned %d, expected %d\n"
	.section	.rodata.str1.1
.LC4:
	.string	"should touch the buffer\n"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"returned length should be equal to the length of string\n"
	.text
	.p2align 4
	.type	test_GetSystemDirectoryW, @function
test_GetSystemDirectoryW:
.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, 24
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_PATH[rip]
	mov	rcx, rsp
	mov	rbx, rsp
	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
.L13:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L13
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L14
.L4:
	xor	esi, esi
	xor	edi, edi
	mov	r12, rsp
	call	GetSystemDirectoryW@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L15
.L5:
	xor	edi, edi
	cmp	DWORD PTR MAX_PATH[rip], r13d
	lea	rsi, .LC1[rip]
	setge	dil
	xor	eax, eax
	lea	r15d, -1[r13]
	call	ok@PLT
	lea	rsi, fooW.1942[rip]
	mov	rdi, r12
	call	lstrcpyW@PLT
	mov	esi, 1
	mov	rdi, r12
	call	GetSystemDirectoryW@PLT
	lea	rsi, fooW.1942[rip]
	mov	rdi, r12
	mov	r14d, eax
	call	lstrcmpW@PLT
	xor	edi, edi
	lea	rsi, .LC2[rip]
	test	rax, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	xor	edi, edi
	cmp	r13d, r14d
	mov	ecx, r13d
	sete	dil
	mov	edx, r14d
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	ok@PLT
	lea	rsi, fooW.1942[rip]
	mov	rdi, r12
	call	lstrcpyW@PLT
	mov	esi, r15d
	mov	rdi, r12
	call	GetSystemDirectoryW@PLT
	lea	rsi, fooW.1942[rip]
	mov	rdi, r12
	mov	r14d, eax
	call	lstrcmpW@PLT
	xor	edi, edi
	lea	rsi, .LC2[rip]
	test	rax, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	xor	edi, edi
	cmp	r13d, r14d
	mov	ecx, r13d
	sete	dil
	mov	edx, r14d
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	ok@PLT
	lea	rsi, fooW.1942[rip]
	mov	rdi, r12
	call	lstrcpyW@PLT
	mov	esi, r13d
	mov	rdi, r12
	call	GetSystemDirectoryW@PLT
	lea	rsi, fooW.1942[rip]
	mov	rdi, r12
	mov	r13d, eax
	call	lstrcmpW@PLT
	xor	edi, edi
	lea	rsi, .LC4[rip]
	test	rax, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, r12
	call	lstrlenW@PLT
	xor	edi, edi
	lea	rsi, .LC5[rip]
	cmp	eax, r13d
	sete	dil
	xor	eax, eax
	call	ok@PLT
	xor	edi, edi
	cmp	r15d, r13d
	mov	ecx, r15d
	sete	dil
	mov	edx, r13d
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	ok@PLT
	mov	rsp, rbx
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	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
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	xor	eax, eax
	call	GetLastError@PLT
	cmp	rax, QWORD PTR ERROR_CALL_NOT_IMPLEMENTED[rip]
	jne	.L5
	lea	rdi, .LC0[rip]
	call	win_skip@PLT
	mov	rsp, rbx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_GetSystemDirectoryW, .-test_GetSystemDirectoryW
	.section	.rodata
	.align 16
	.type	fooW.1942, @object
	.size	fooW.1942, 16
fooW.1942:
	.long	1120665600
	.long	1121845248
	.long	1121845248
	.long	0
	.comm	MAX_PATH,4,4
	.comm	ERROR_CALL_NOT_IMPLEMENTED,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_directory.c_test_GetSystemDirectoryW.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"GetSystemDirectoryW is not available\012\000"
	.align	2
.LC1:
	.ascii	"should fit into MAX_PATH\012\000"
	.align	2
.LC2:
	.ascii	"should not touch the buffer\012\000"
	.align	2
.LC3:
	.ascii	"GetSystemDirectoryW returned %d, expected %d\012\000"
	.align	2
.LC4:
	.ascii	"should touch the buffer\012\000"
	.align	2
.LC5:
	.ascii	"returned length should be equal to the length of st"
	.ascii	"ring\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_GetSystemDirectoryW, %function
test_GetSystemDirectoryW:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #12
	mov	r1, #0
	ldr	r7, .L9
	mov	r6, sp
	ldr	r3, [r7]
	mov	r0, r1
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L9+4
	mov	r5, sp
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	GetSystemDirectoryW
	subs	r4, r0, #0
	bne	.L2
	bl	GetLastError
	ldr	r3, .L9+8
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L7
.L2:
	ldr	r0, [r7]
	ldr	r1, .L9+12
	cmp	r0, r4
	movlt	r0, #0
	movge	r0, #1
	bl	ok
	ldr	r1, .L9+16
	mov	r0, r5
	bl	lstrcpyW
	mov	r1, #1
	mov	r0, r5
	bl	GetSystemDirectoryW
	ldr	r1, .L9+16
	mov	r7, r0
	mov	r0, r5
	bl	lstrcmpW
	clz	r0, r0
	ldr	r1, .L9+20
	lsr	r0, r0, #5
	bl	ok
	sub	r0, r4, r7
	clz	r0, r0
	mov	r3, r4
	mov	r2, r7
	ldr	r1, .L9+24
	lsr	r0, r0, #5
	bl	ok
	sub	r8, r4, #1
	ldr	r1, .L9+16
	mov	r0, r5
	bl	lstrcpyW
	mov	r1, r8
	mov	r0, r5
	bl	GetSystemDirectoryW
	ldr	r1, .L9+16
	mov	r7, r0
	mov	r0, r5
	bl	lstrcmpW
	clz	r0, r0
	ldr	r1, .L9+20
	lsr	r0, r0, #5
	bl	ok
	sub	r0, r4, r7
	clz	r0, r0
	mov	r3, r4
	mov	r2, r7
	ldr	r1, .L9+24
	lsr	r0, r0, #5
	bl	ok
	ldr	r1, .L9+16
	mov	r0, r5
	bl	lstrcpyW
	mov	r1, r4
	mov	r0, r5
	bl	GetSystemDirectoryW
	ldr	r1, .L9+16
	mov	r4, r0
	mov	r0, r5
	bl	lstrcmpW
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r1, .L9+28
	bl	ok
	mov	r0, r5
	bl	lstrlenW
	sub	r0, r0, r4
	clz	r0, r0
	ldr	r1, .L9+32
	lsr	r0, r0, #5
	bl	ok
	sub	r0, r8, r4
	clz	r0, r0
	mov	r3, r8
	mov	r2, r4
	ldr	r1, .L9+24
	lsr	r0, r0, #5
	bl	ok
	mov	sp, r6
.L1:
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L7:
	ldr	r0, .L9+36
	bl	win_skip
	mov	sp, r6
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	MAX_PATH
	.word	.LC6
	.word	ERROR_CALL_NOT_IMPLEMENTED
	.word	.LC1
	.word	.LANCHOR0
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC0
	.size	test_GetSystemDirectoryW, .-test_GetSystemDirectoryW
	.comm	MAX_PATH,4,4
	.comm	ERROR_CALL_NOT_IMPLEMENTED,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	fooW.4226, %object
	.size	fooW.4226, 16
fooW.4226:
	.word	1120665600
	.word	1121845248
	.word	1121845248
	.word	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
