	.file	"extr_modpost.c_write_if_changed.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"r"
.LC1:
	.string	"w"
	.text
	.p2align 4
	.type	write_if_changed, @function
write_if_changed:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	lea	rsi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	rdi, r12
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	fopen@PLT
	test	rax, rax
	je	.L2
	mov	rdi, rax
	mov	rbp, rax
	call	fileno@PLT
	lea	rsi, 4[rsp]
	mov	edi, eax
	call	fstat@PLT
	test	rax, rax
	js	.L3
	mov	edi, DWORD PTR [rbx]
	cmp	DWORD PTR 4[rsp], edi
	je	.L14
.L3:
	mov	rdi, rbp
	call	fclose@PLT
.L2:
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	call	fopen@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L15
.L6:
	mov	edi, DWORD PTR 4[rbx]
	mov	edx, DWORD PTR [rbx]
	mov	rcx, rbp
	mov	esi, 1
	call	fwrite@PLT
	cmp	eax, DWORD PTR [rbx]
	jne	.L16
.L7:
	mov	rdi, rbp
	call	fclose@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rdi, r12
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	call	malloc@PLT
	mov	edi, eax
	call	NOFAIL@PLT
	mov	edx, DWORD PTR [rbx]
	mov	rcx, rbp
	mov	esi, 1
	mov	rdi, rax
	mov	r13, rax
	call	fread@PLT
	cmp	eax, DWORD PTR [rbx]
	je	.L18
.L4:
	mov	rdi, r13
	call	free@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, r12
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, DWORD PTR 4[rbx]
	mov	edx, eax
	mov	rdi, r13
	call	memcmp@PLT
	test	rax, rax
	jne	.L4
	mov	rdi, r13
	call	free@PLT
	mov	rdi, rbp
	call	fclose@PLT
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	write_if_changed, .-write_if_changed
	.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_modpost.c_write_if_changed.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"w\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_if_changed, %function
write_if_changed:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r6, r1
	ldr	r3, .L19
	sub	sp, sp, #12
	mov	r4, r0
	ldr	r1, .L19+4
	mov	r0, r6
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	fopen
	subs	r5, r0, #0
	beq	.L2
	bl	fileno
	mov	r1, sp
	bl	fstat
	cmp	r0, #0
	blt	.L3
	ldr	r3, [r4]
	ldr	r0, [sp]
	cmp	r0, r3
	beq	.L14
.L3:
	mov	r0, r5
	bl	fclose
.L2:
	mov	r0, r6
	ldr	r1, .L19+8
	bl	fopen
	subs	r5, r0, #0
	beq	.L15
.L6:
	mov	r3, r5
	mov	r1, #1
	ldr	r2, [r4]
	ldr	r0, [r4, #4]
	bl	fwrite
	ldr	r3, [r4]
	cmp	r0, r3
	bne	.L16
.L7:
	mov	r0, r5
	bl	fclose
.L1:
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L16:
	mov	r0, r6
	bl	perror
	mov	r0, #1
	bl	exit
	b	.L7
.L14:
	bl	malloc
	bl	NOFAIL
	mov	r3, r5
	mov	r1, #1
	ldr	r2, [r4]
	mov	r7, r0
	bl	fread
	ldr	r3, [r4]
	cmp	r0, r3
	beq	.L18
.L4:
	mov	r0, r7
	bl	free
	b	.L3
.L15:
	mov	r0, r6
	bl	perror
	mov	r0, #1
	bl	exit
	b	.L6
.L18:
	mov	r2, r0
	ldr	r1, [r4, #4]
	mov	r0, r7
	bl	memcmp
	cmp	r0, #0
	bne	.L4
	mov	r0, r7
	bl	free
	mov	r0, r5
	bl	fclose
	b	.L1
.L17:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	write_if_changed, .-write_if_changed
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
