	.file	"extr_storage32.c_test_custom_lockbytes.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"StgCreateDocfileOnILockBytes failed %x\n"
	.align 8
.LC1:
	.string	"IStorage_CreateStream failed %x\n"
	.align 8
.LC2:
	.string	"unexpected call to LockRegion\n"
	.align 8
.LC3:
	.string	"expected LockRegion to be called\n"
	.text
	.p2align 4
	.type	test_custom_lockbytes, @function
test_custom_lockbytes:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rdi, rsp
	lea	r12, 8[rsp]
	lea	rbx, 16[rsp]
	call	CreateTestLockBytes@PLT
	mov	rax, QWORD PTR [rsp]
	mov	rcx, r12
	xor	edx, edx
	mov	esi, DWORD PTR STGM_CREATE[rip]
	or	esi, DWORD PTR STGM_READWRITE[rip]
	lea	rdi, 4[rax]
	or	esi, DWORD PTR STGM_TRANSACTED[rip]
	call	StgCreateDocfileOnILockBytes@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC0[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 8[rsp]
	xor	r8d, r8d
	mov	r9, rbx
	xor	ecx, ecx
	mov	edx, DWORD PTR STGM_SHARE_EXCLUSIVE[rip]
	lea	rsi, stmname.1964[rip]
	or	edx, DWORD PTR STGM_READWRITE[rip]
	call	IStorage_CreateStream@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	IStream_Release@PLT
	mov	rdi, QWORD PTR 8[rsp]
	xor	esi, esi
	call	IStorage_Commit@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	IStorage_Release@PLT
	mov	rax, QWORD PTR [rsp]
	xor	edi, edi
	lea	rsi, .LC2[rip]
	mov	eax, DWORD PTR 16[rax]
	test	eax, eax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR [rsp]
	mov	rcx, r12
	xor	edx, edx
	mov	eax, DWORD PTR LOCK_WRITE[rip]
	or	eax, DWORD PTR LOCK_EXCLUSIVE[rip]
	or	eax, DWORD PTR LOCK_ONLYONCE[rip]
	add	rdi, 4
	mov	esi, DWORD PTR STGM_CREATE[rip]
	mov	DWORD PTR -4[rdi], eax
	or	esi, DWORD PTR STGM_READWRITE[rip]
	or	esi, DWORD PTR STGM_TRANSACTED[rip]
	call	StgCreateDocfileOnILockBytes@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC0[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 8[rsp]
	xor	r8d, r8d
	mov	r9, rbx
	xor	ecx, ecx
	mov	edx, DWORD PTR STGM_SHARE_EXCLUSIVE[rip]
	lea	rsi, stmname.1964[rip]
	or	edx, DWORD PTR STGM_READWRITE[rip]
	call	IStorage_CreateStream@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	IStream_Release@PLT
	mov	rdi, QWORD PTR 8[rsp]
	xor	esi, esi
	call	IStorage_Commit@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	IStorage_Release@PLT
	mov	rax, QWORD PTR [rsp]
	lea	rsi, .LC3[rip]
	mov	edi, DWORD PTR 16[rax]
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR [rsp]
	mov	rcx, r12
	xor	edx, edx
	mov	rax, QWORD PTR STG_E_INVALIDFUNCTION[rip]
	mov	esi, DWORD PTR STGM_CREATE[rip]
	add	rdi, 4
	or	esi, DWORD PTR STGM_READWRITE[rip]
	or	esi, DWORD PTR STGM_TRANSACTED[rip]
	mov	QWORD PTR 4[rdi], rax
	call	StgCreateDocfileOnILockBytes@PLT
	xor	edi, edi
	cmp	QWORD PTR STG_E_INVALIDFUNCTION[rip], rax
	lea	rsi, .LC0[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR [rsp]
	call	DeleteTestLockBytes@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L5
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_custom_lockbytes, .-test_custom_lockbytes
	.section	.rodata
	.align 8
	.type	stmname.1964, @object
	.size	stmname.1964, 9
stmname.1964:
	.string	"CONTENTS"
	.comm	S_OK,8,8
	.comm	STG_E_INVALIDFUNCTION,8,8
	.comm	STGM_TRANSACTED,4,4
	.comm	STGM_SHARE_EXCLUSIVE,4,4
	.comm	STGM_READWRITE,4,4
	.comm	STGM_CREATE,4,4
	.comm	LOCK_WRITE,4,4
	.comm	LOCK_ONLYONCE,4,4
	.comm	LOCK_EXCLUSIVE,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_storage32.c_test_custom_lockbytes.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"StgCreateDocfileOnILockBytes failed %x\012\000"
	.align	2
.LC1:
	.ascii	"IStorage_CreateStream failed %x\012\000"
	.align	2
.LC2:
	.ascii	"unexpected call to LockRegion\012\000"
	.align	2
.LC3:
	.ascii	"expected LockRegion to be called\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_custom_lockbytes, %function
test_custom_lockbytes:
	@ 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, .L6
	sub	sp, sp, #28
	ldr	r5, .L6+4
	ldr	r8, .L6+8
	ldr	r7, .L6+12
	add	r0, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	CreateTestLockBytes
	ldr	r2, [r5]
	ldr	r3, [r8]
	ldr	r1, [r7]
	ldr	r0, [sp, #8]
	orr	r3, r3, r2
	orr	r1, r3, r1
	mov	r2, #0
	add	r3, sp, #12
	add	r0, r0, #4
	bl	StgCreateDocfileOnILockBytes
	mov	r2, r0
	ldr	r6, .L6+16
	mov	r4, #0
	ldr	r0, [r6]
	ldr	fp, .L6+20
	sub	r0, r0, r2
	clz	r0, r0
	ldr	r1, .L6+24
	lsr	r0, r0, #5
	bl	ok
	ldr	r3, [r5]
	ldr	r2, [fp]
	add	r10, sp, #16
	orr	r2, r2, r3
	ldr	r1, .L6+28
	mov	r3, r4
	ldr	r0, [sp, #12]
	str	r4, [sp]
	str	r10, [sp, #4]
	bl	IStorage_CreateStream
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L6+32
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #16]
	bl	IStream_Release
	mov	r1, r4
	ldr	r0, [sp, #12]
	bl	IStorage_Commit
	ldr	r0, [sp, #12]
	bl	IStorage_Release
	ldr	r3, [sp, #8]
	ldr	r1, .L6+36
	ldr	r0, [r3, #12]
	ldr	r9, .L6+40
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r3, .L6+44
	ldr	r2, .L6+48
	ldr	r1, .L6+52
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	ip, [r5]
	orr	r3, r3, r2
	ldr	r2, [r8]
	orr	r3, r3, r1
	ldr	r0, [sp, #8]
	ldr	r1, [r7]
	orr	r2, r2, ip
	orr	r1, r2, r1
	str	r3, [r0], #4
	mov	r2, r4
	add	r3, sp, #12
	bl	StgCreateDocfileOnILockBytes
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r3, [r5]
	ldr	r2, [fp]
	ldr	r1, .L6+28
	orr	r2, r2, r3
	stm	sp, {r4, r10}
	mov	r3, r4
	ldr	r0, [sp, #12]
	bl	IStorage_CreateStream
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L6+32
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #16]
	bl	IStream_Release
	mov	r1, r4
	ldr	r0, [sp, #12]
	bl	IStorage_Commit
	ldr	r0, [sp, #12]
	bl	IStorage_Release
	ldr	r3, [sp, #8]
	ldr	r1, .L6+56
	ldr	r0, [r3, #12]
	bl	ok
	ldr	r2, [r5]
	ldr	r3, [r8]
	ldr	ip, [r9]
	ldr	r0, [sp, #8]
	ldr	r1, [r7]
	orr	r3, r3, r2
	str	ip, [r0, #8]
	orr	r1, r3, r1
	mov	r2, r4
	add	r3, sp, #12
	add	r0, r0, #4
	bl	StgCreateDocfileOnILockBytes
	mov	r2, r0
	ldr	r0, [r9]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #8]
	bl	DeleteTestLockBytes
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	bl	__stack_chk_fail
.L7:
	.align	2
.L6:
	.word	.LC4
	.word	STGM_READWRITE
	.word	STGM_CREATE
	.word	STGM_TRANSACTED
	.word	S_OK
	.word	STGM_SHARE_EXCLUSIVE
	.word	.LC0
	.word	.LANCHOR0
	.word	.LC1
	.word	.LC2
	.word	STG_E_INVALIDFUNCTION
	.word	LOCK_WRITE
	.word	LOCK_EXCLUSIVE
	.word	LOCK_ONLYONCE
	.word	.LC3
	.size	test_custom_lockbytes, .-test_custom_lockbytes
	.comm	S_OK,4,4
	.comm	STG_E_INVALIDFUNCTION,4,4
	.comm	STGM_TRANSACTED,4,4
	.comm	STGM_SHARE_EXCLUSIVE,4,4
	.comm	STGM_READWRITE,4,4
	.comm	STGM_CREATE,4,4
	.comm	LOCK_WRITE,4,4
	.comm	LOCK_ONLYONCE,4,4
	.comm	LOCK_EXCLUSIVE,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	stmname.4248, %object
	.size	stmname.4248, 9
stmname.4248:
	.ascii	"CONTENTS\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
