	.file	"extr_writer.c_test_writeenddocument.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Expected S_OK, got %08x\n"
.LC1:
	.string	"got 0x%08x\n"
.LC2:
	.string	"got %p\n"
.LC3:
	.string	"<a><b /></a>"
	.text
	.p2align 4
	.type	test_writeenddocument, @function
test_writeenddocument:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	edx, edx
	lea	rdi, IID_IXmlWriter[rip]
	sub	rsp, 32
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	lea	rsi, 16[rsp]
	call	CreateXmlWriter@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC0[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	IXmlWriter_WriteEndDocument@PLT
	xor	edi, edi
	cmp	QWORD PTR E_UNEXPECTED[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	writer_set_output@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	rbp, rax
	call	IXmlWriter_WriteEndDocument@PLT
	xor	edi, edi
	cmp	QWORD PTR WR_E_INVALIDACTION[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	IXmlWriter_WriteEndDocument@PLT
	xor	edi, edi
	cmp	QWORD PTR WR_E_INVALIDACTION[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	mov	esi, DWORD PTR XmlStandalone_Omit[rip]
	mov	rdi, QWORD PTR 16[rsp]
	call	IXmlWriter_WriteStartDocument@PLT
	xor	edi, edi
	cmp	QWORD PTR WR_E_INVALIDACTION[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	xor	ecx, ecx
	xor	esi, esi
	lea	rdx, aW.1966[rip]
	call	IXmlWriter_WriteStartElement@PLT
	xor	edi, edi
	cmp	QWORD PTR WR_E_INVALIDACTION[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	rsi, rbp
	call	IXmlWriter_SetOutput@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	xor	ecx, ecx
	xor	esi, esi
	lea	rdx, aW.1966[rip]
	call	IXmlWriter_WriteStartElement@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	xor	ecx, ecx
	xor	esi, esi
	lea	rdx, bW.1967[rip]
	call	IXmlWriter_WriteStartElement@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	IXmlWriter_WriteEndDocument@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	lea	rsi, 12[rsp]
	mov	rdi, rbp
	call	GetHGlobalFromStream@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	mov	edi, DWORD PTR 12[rsp]
	call	GlobalLock@PLT
	xor	edi, edi
	lea	rsi, .LC2[rip]
	test	rax, rax
	mov	rdx, rax
	sete	dil
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	IXmlWriter_Flush@PLT
	xor	edi, edi
	cmp	QWORD PTR S_OK[rip], rax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	rdx, rax
	call	ok@PLT
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	call	CHECK_OUTPUT@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	IXmlWriter_Release@PLT
	mov	rdi, rbp
	call	IStream_Release@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L5
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_writeenddocument, .-test_writeenddocument
	.section	.rodata
	.type	bW.1967, @object
	.size	bW.1967, 2
bW.1967:
	.string	"b"
	.type	aW.1966, @object
	.size	aW.1966, 2
aW.1966:
	.string	"a"
	.comm	XmlStandalone_Omit,4,4
	.comm	WR_E_INVALIDACTION,8,8
	.comm	S_OK,8,8
	.comm	IID_IXmlWriter,4,4
	.comm	E_UNEXPECTED,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_writer.c_test_writeenddocument.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Expected S_OK, got %08x\012\000"
	.align	2
.LC1:
	.ascii	"got 0x%08x\012\000"
	.align	2
.LC2:
	.ascii	"got %p\012\000"
	.align	2
.LC3:
	.ascii	"<a><b /></a>\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_writeenddocument, %function
test_writeenddocument:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L6
	sub	sp, sp, #16
	mov	r2, #0
	add	r1, sp, #4
	ldr	r0, .L6+4
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	CreateXmlWriter
	mov	r2, r0
	ldr	r4, .L6+8
	ldr	r1, .L6+12
	ldr	r0, [r4]
	ldr	r6, .L6+16
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #4]
	bl	IXmlWriter_WriteEndDocument
	mov	r2, r0
	ldr	r3, .L6+20
	ldr	r1, .L6+24
	ldr	r0, [r3]
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #4]
	bl	writer_set_output
	mov	r5, r0
	ldr	r0, [sp, #4]
	bl	IXmlWriter_WriteEndDocument
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #4]
	bl	IXmlWriter_WriteEndDocument
	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, .L6+28
	ldr	r0, [sp, #4]
	ldr	r1, [r3]
	bl	IXmlWriter_WriteStartDocument
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	mov	r3, #0
	ldr	r2, .L6+32
	mov	r1, r3
	ldr	r0, [sp, #4]
	bl	IXmlWriter_WriteStartElement
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	mov	r1, r5
	ldr	r0, [sp, #4]
	bl	IXmlWriter_SetOutput
	mov	r2, r0
	ldr	r0, [r4]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	mov	r3, #0
	ldr	r2, .L6+32
	mov	r1, r3
	ldr	r0, [sp, #4]
	bl	IXmlWriter_WriteStartElement
	mov	r2, r0
	ldr	r0, [r4]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	mov	r3, #0
	ldr	r2, .L6+36
	mov	r1, r3
	ldr	r0, [sp, #4]
	bl	IXmlWriter_WriteStartElement
	mov	r2, r0
	ldr	r0, [r4]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #4]
	bl	IXmlWriter_WriteEndDocument
	mov	r2, r0
	ldr	r0, [r4]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	add	r1, sp, #8
	mov	r0, r5
	bl	GetHGlobalFromStream
	mov	r2, r0
	ldr	r0, [r4]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #8]
	bl	GlobalLock
	mov	r2, r0
	clz	r0, r0
	ldr	r1, .L6+40
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #4]
	bl	IXmlWriter_Flush
	mov	r2, r0
	ldr	r0, [r4]
	ldr	r1, .L6+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r1, .L6+44
	mov	r0, r5
	bl	CHECK_OUTPUT
	ldr	r0, [sp, #4]
	bl	IXmlWriter_Release
	mov	r0, r5
	bl	IStream_Release
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L5:
	bl	__stack_chk_fail
.L7:
	.align	2
.L6:
	.word	.LC4
	.word	IID_IXmlWriter
	.word	S_OK
	.word	.LC0
	.word	WR_E_INVALIDACTION
	.word	E_UNEXPECTED
	.word	.LC1
	.word	XmlStandalone_Omit
	.word	.LANCHOR0
	.word	.LANCHOR0+4
	.word	.LC2
	.word	.LC3
	.size	test_writeenddocument, .-test_writeenddocument
	.comm	XmlStandalone_Omit,4,4
	.comm	WR_E_INVALIDACTION,4,4
	.comm	S_OK,4,4
	.comm	IID_IXmlWriter,4,4
	.comm	E_UNEXPECTED,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	aW.4250, %object
	.size	aW.4250, 2
aW.4250:
	.ascii	"a\000"
	.space	2
	.type	bW.4251, %object
	.size	bW.4251, 2
bW.4251:
	.ascii	"b\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
