	.file	"extr_main.c_rbcfg_update.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"unable to open %s for writing\n"
	.text
	.p2align 4
	.type	rbcfg_update, @function
rbcfg_update:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, DWORD PTR RB_MAGIC_SOFT[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, QWORD PTR rbcfg_ctx[rip]
	mov	rdi, QWORD PTR 24[rbx]
	call	put_u32@PLT
	mov	rax, QWORD PTR 24[rbx]
	xor	esi, esi
	lea	rdi, 4[rax]
	call	put_u32@PLT
	mov	rdi, QWORD PTR 24[rbx]
	mov	esi, DWORD PTR [rbx]
	call	cyg_ether_crc32@PLT
	mov	esi, eax
	mov	rax, QWORD PTR 24[rbx]
	lea	rdi, 4[rax]
	call	put_u32@PLT
	test	ebp, ebp
	mov	r12, QWORD PTR 16[rbx]
	cmovne	r12, QWORD PTR 8[rbx]
	mov	esi, DWORD PTR O_WRONLY[rip]
	or	esi, DWORD PTR O_CREAT[rip]
	mov	rdi, r12
	call	open@PLT
	test	eax, eax
	js	.L9
	mov	rsi, QWORD PTR 24[rbx]
	mov	edx, DWORD PTR [rbx]
	mov	edi, eax
	mov	ebp, eax
	call	write@PLT
	mov	r12d, DWORD PTR RB_ERR_IO[rip]
	cmp	DWORD PTR [rbx], eax
	je	.L10
.L6:
.L4:
	endbr64
	mov	edi, ebp
	call	close@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edi, ebp
	xor	r12d, r12d
	call	fsync@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR stderr[rip]
	mov	rdx, r12
	lea	rsi, .LC0[rip]
	call	fprintf@PLT
	mov	r12d, DWORD PTR RB_ERR_IO[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	rbcfg_update, .-rbcfg_update
	.comm	stderr,4,4
	.comm	rbcfg_ctx,8,8
	.comm	RB_MAGIC_SOFT,4,4
	.comm	RB_ERR_IO,4,4
	.comm	O_WRONLY,4,4
	.comm	O_CREAT,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_main.c_rbcfg_update.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unable to open %s for writing\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rbcfg_update, %function
rbcfg_update:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L10
	push	{r4, r5, r6, lr}
	ldr	r3, .L10+4
	ldr	r4, [r2]
	ldr	r1, [r3]
	mov	r5, r0
	ldr	r0, [r4, #12]
	bl	put_u32
	ldr	r0, [r4, #12]
	mov	r1, #0
	add	r0, r0, #4
	bl	put_u32
	ldr	r1, [r4]
	ldr	r0, [r4, #12]
	bl	cyg_ether_crc32
	mov	r1, r0
	ldr	r0, [r4, #12]
	add	r0, r0, #4
	bl	put_u32
	ldr	r3, [r4, #8]
	cmp	r5, #0
	ldr	r6, [r4, #4]
	moveq	r6, r3
	ldr	r2, .L10+8
	ldr	r3, .L10+12
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r0, r6
	orr	r1, r1, r3
	bl	open
	subs	r5, r0, #0
	blt	.L9
	ldr	r2, [r4]
	ldr	r1, [r4, #12]
	bl	write
	ldr	r3, [r4]
	cmp	r3, r0
	beq	.L5
	ldr	r3, .L10+16
	ldr	r4, [r3]
.L6:
.L4:
	mov	r0, r5
	bl	close
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L5:
	mov	r0, r5
	bl	fsync
	mov	r4, #0
	b	.L6
.L9:
	ldr	r3, .L10+20
	mov	r2, r6
	ldr	r0, [r3]
	ldr	r1, .L10+24
	bl	fprintf
	ldr	r3, .L10+16
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L11:
	.align	2
.L10:
	.word	rbcfg_ctx
	.word	RB_MAGIC_SOFT
	.word	O_WRONLY
	.word	O_CREAT
	.word	RB_ERR_IO
	.word	stderr
	.word	.LC0
	.size	rbcfg_update, .-rbcfg_update
	.comm	stderr,4,4
	.comm	rbcfg_ctx,4,4
	.comm	RB_MAGIC_SOFT,4,4
	.comm	RB_ERR_IO,4,4
	.comm	O_WRONLY,4,4
	.comm	O_CREAT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
