	.file	"extr_wfdrop.c_StreamToFile.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	StreamToFile, @function
StreamToFile:
.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
	.cfi_offset 15, -24
	mov	r15, rdi
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 40
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -72[rbp], rsi
	mov	rcx, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR BLOCK_SIZE[rip]
	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:
	mov	rbx, rsp
	sub	rsp, 8
	mov	r9d, DWORD PTR FILE_ATTRIBUTE_TEMPORARY[rip]
	xor	ecx, ecx
	mov	r8d, DWORD PTR CREATE_ALWAYS[rip]
	mov	rdi, QWORD PTR -72[rbp]
	push	0
	mov	edx, DWORD PTR FILE_SHARE_READ[rip]
	mov	esi, DWORD PTR FILE_READ_DATA[rip]
	or	edx, DWORD PTR FILE_SHARE_WRITE[rip]
	or	esi, DWORD PTR FILE_WRITE_DATA[rip]
	call	CreateFile@PLT
	cmp	QWORD PTR INVALID_HANDLE_VALUE[rip], rax
	pop	rdx
	mov	r14, rax
	pop	rcx
	je	.L5
	lea	rax, -60[rbp]
	lea	r12, -64[rbp]
	mov	QWORD PTR -80[rbp], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	cmp	QWORD PTR S_OK[rip], r13
	jne	.L7
	mov	eax, DWORD PTR -60[rbp]
	test	eax, eax
	je	.L7
.L8:
	mov	rax, QWORD PTR [r15]
	mov	rdi, r15
	mov	edx, DWORD PTR BLOCK_SIZE[rip]
	mov	rcx, r12
	mov	rsi, rbx
	call	[QWORD PTR [rax]]
	mov	DWORD PTR -60[rbp], 0
	mov	rdi, rax
	mov	r13, rax
	call	SUCCEEDED@PLT
	test	rax, rax
	je	.L6
	mov	edx, DWORD PTR -64[rbp]
	test	edx, edx
	je	.L6
	mov	rcx, QWORD PTR -80[rbp]
	xor	r8d, r8d
	mov	rsi, rbx
	mov	rdi, r14
	call	WriteFile@PLT
	test	eax, eax
	jne	.L6
	call	GetLastError@PLT
	mov	edi, eax
	call	HRESULT_FROM_WIN32@PLT
	mov	DWORD PTR -60[rbp], 0
	mov	r13, rax
.L7:
	mov	rdi, r14
	call	CloseHandle@PLT
	mov	rdi, r13
	call	FAILED@PLT
	test	rax, rax
	jne	.L26
	mov	r13, QWORD PTR S_OK[rip]
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	lea	rsp, -40[rbp]
	mov	rax, r13
	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
.L26:
	.cfi_restore_state
	mov	rdi, QWORD PTR -72[rbp]
	call	DeleteFile@PLT
	jmp	.L1
.L5:
	xor	eax, eax
	call	GetLastError@PLT
	mov	edi, eax
	call	HRESULT_FROM_WIN32@PLT
	mov	r13, rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	StreamToFile, .-StreamToFile
	.comm	S_OK,8,8
	.comm	INVALID_HANDLE_VALUE,8,8
	.comm	FILE_WRITE_DATA,4,4
	.comm	FILE_SHARE_WRITE,4,4
	.comm	FILE_SHARE_READ,4,4
	.comm	FILE_READ_DATA,4,4
	.comm	FILE_ATTRIBUTE_TEMPORARY,4,4
	.comm	CREATE_ALWAYS,4,4
	.comm	BLOCK_SIZE,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_wfdrop.c_StreamToFile.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	StreamToFile, %function
StreamToFile:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #44
	mov	r6, #0
	mov	r8, r1
	ldr	r7, .L20
	mov	r5, r0
	ldr	r0, [r7]
	ldr	lr, .L20+4
	lsl	r0, r0, #2
	str	r1, [fp, #-56]
	ldr	ip, .L20+8
	ldr	r1, .L20+12
	ldr	r3, .L20+16
	add	r0, r0, #7
	ldr	r4, [lr]
	bic	r0, r0, #7
	ldr	r2, .L20+20
	ldr	lr, [ip]
	sub	sp, sp, r0
	ldr	ip, [r1]
	ldr	r1, [r3]
	ldr	r3, .L20+24
	ldr	r2, [r2]
	str	r4, [sp, #4]
	ldr	r3, [r3]
	orr	r2, ip, r2
	ldr	ip, .L20+28
	str	lr, [sp]
	str	r6, [sp, #8]
	orr	r1, r1, r3
	mov	r0, r8
	mov	r3, r6
	ldr	ip, [ip]
	str	ip, [fp, #-40]
	mov	ip,#0
	bl	CreateFile
	ldr	r3, .L20+32
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L2
	mov	r9, r0
	ldr	r8, .L20+36
	add	r10, sp, #16
	b	.L5
.L3:
	ldr	r3, [r8]
	cmp	r3, r4
	bne	.L4
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L4
.L5:
	ldr	r2, [r5]
	mov	r1, r10
	ldr	r4, [r2]
	sub	r3, fp, #48
	ldr	r2, [r7]
	mov	r0, r5
	blx	r4
	str	r6, [fp, #-44]
	mov	r4, r0
	bl	SUCCEEDED
	cmp	r0, #0
	beq	.L3
	ldr	r2, [fp, #-48]
	cmp	r2, #0
	beq	.L3
	sub	r3, fp, #44
	mov	r1, r10
	mov	r0, r9
	str	r6, [sp]
	bl	WriteFile
	subs	r3, r0, #0
	bne	.L3
	str	r3, [fp, #-60]
	bl	GetLastError
	bl	HRESULT_FROM_WIN32
	mov	r4, r0
	ldr	r3, [fp, #-60]
	str	r3, [fp, #-44]
.L4:
	mov	r0, r9
	bl	CloseHandle
	mov	r0, r4
	bl	FAILED
	cmp	r0, #0
	bne	.L18
	ldr	r3, .L20+36
	ldr	r4, [r3]
.L1:
	ldr	r3, .L20+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r4
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	ldr	r0, [fp, #-56]
	bl	DeleteFile
	b	.L1
.L2:
	bl	GetLastError
	bl	HRESULT_FROM_WIN32
	mov	r4, r0
	b	.L1
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	BLOCK_SIZE
	.word	FILE_ATTRIBUTE_TEMPORARY
	.word	CREATE_ALWAYS
	.word	FILE_SHARE_READ
	.word	FILE_READ_DATA
	.word	FILE_SHARE_WRITE
	.word	FILE_WRITE_DATA
	.word	.LC0
	.word	INVALID_HANDLE_VALUE
	.word	S_OK
	.size	StreamToFile, .-StreamToFile
	.comm	S_OK,4,4
	.comm	INVALID_HANDLE_VALUE,4,4
	.comm	FILE_WRITE_DATA,4,4
	.comm	FILE_SHARE_WRITE,4,4
	.comm	FILE_SHARE_READ,4,4
	.comm	FILE_READ_DATA,4,4
	.comm	FILE_ATTRIBUTE_TEMPORARY,4,4
	.comm	CREATE_ALWAYS,4,4
	.comm	BLOCK_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
