	.file	"extr_mksercommfw.c_writeFile.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Invalid pointer provided!\n"
.LC1:
	.string	"Opening file: %s\n"
.LC2:
	.string	"w"
.LC3:
	.string	"Error opening file: %s\n"
.LC4:
	.string	"Writing file: %s\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC5:
	.string	"Wanted to write, but something went wrong!\n"
	.text
	.p2align 4
	.type	writeFile, @function
writeFile:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	test	rdi, rdi
	je	.L2
	mov	esi, DWORD PTR 12[rdi]
	mov	rbx, rdi
	test	esi, esi
	je	.L2
	lea	rdi, .LC1[rip]
	call	DBG@PLT
	mov	edi, DWORD PTR 12[rbx]
	lea	rsi, .LC2[rip]
	call	fopen@PLT
	mov	esi, DWORD PTR 12[rbx]
	mov	rbp, rax
	test	rax, rax
	je	.L12
	lea	rdi, .LC4[rip]
	call	DBG@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	rdx, QWORD PTR [rbx]
	mov	rcx, rbp
	mov	esi, 1
	call	fwrite@PLT
	cmp	rax, QWORD PTR [rbx]
	jne	.L13
	mov	rdi, rbp
	call	fclose@PLT
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	ERR@PLT
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	ERR@PLT
	mov	rdi, rbp
	call	fclose@PLT
	mov	eax, -1
	jmp	.L1
.L12:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	ERR@PLT
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	writeFile, .-writeFile
	.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_mksercommfw.c_writeFile.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Invalid pointer provided!\012\000"
	.align	2
.LC1:
	.ascii	"Opening file: %s\012\000"
	.align	2
.LC2:
	.ascii	"w\000"
	.align	2
.LC3:
	.ascii	"Error opening file: %s\012\000"
	.align	2
.LC4:
	.ascii	"Writing file: %s\012\000"
	.align	2
.LC5:
	.ascii	"Wanted to write, but something went wrong!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	writeFile, %function
writeFile:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r0, #0
	beq	.L2
	ldr	r1, [r4, #8]
	cmp	r1, #0
	beq	.L2
	ldr	r0, .L14
	bl	DBG
	ldr	r1, .L14+4
	ldr	r0, [r4, #8]
	bl	fopen
	subs	r5, r0, #0
	ldr	r1, [r4, #8]
	beq	.L12
	ldr	r0, .L14+8
	bl	DBG
	mov	r3, r5
	mov	r1, #1
	ldr	r2, [r4]
	ldr	r0, [r4, #4]
	bl	fwrite
	ldr	r3, [r4]
	cmp	r0, r3
	bne	.L13
	mov	r0, r5
	bl	fclose
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r0, .L14+12
	bl	ERR
	mvn	r0, #0
	pop	{r4, r5, r6, pc}
.L13:
	ldr	r0, .L14+16
	bl	ERR
	mov	r0, r5
	bl	fclose
	mvn	r0, #0
	pop	{r4, r5, r6, pc}
.L12:
	ldr	r0, .L14+20
	bl	ERR
	mvn	r0, #0
	pop	{r4, r5, r6, pc}
.L15:
	.align	2
.L14:
	.word	.LC1
	.word	.LC2
	.word	.LC4
	.word	.LC0
	.word	.LC5
	.word	.LC3
	.size	writeFile, .-writeFile
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
