	.file	"extr_dscan.c_set_bkg_attr.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	set_bkg_attr
	.type	set_bkg_attr, @function
set_bkg_attr:
.LFB0:
	.cfi_startproc
	endbr64
	mov	DWORD PTR VBK_REG[rip], 1
	test	rcx, rcx
	jle	.L10
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	lea	rbp, [rcx+rsi]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdx
	.p2align 4,,10
	.p2align 3
.L3:
	mov	r8, QWORD PTR msg_tile[rip]
	mov	rdx, QWORD PTR bkgCGB[rip]
	xor	eax, eax
	test	rbx, rbx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	movzx	ecx, BYTE PTR 0[r13+rax]
	mov	ecx, DWORD PTR [rdx+rcx*4]
	mov	DWORD PTR [r8+rax*4], ecx
	add	rax, 1
	cmp	rbx, rax
	jne	.L4
	add	r13, rbx
.L6:
	mov	rsi, r14
	mov	ecx, 1
	mov	rdx, rbx
	mov	rdi, r12
	call	set_bkg_tiles@PLT
	add	r14, 1
	cmp	rbp, r14
	jne	.L3
	mov	DWORD PTR VBK_REG[rip], 0
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	mov	DWORD PTR VBK_REG[rip], 0
	ret
	.cfi_endproc
.LFE0:
	.size	set_bkg_attr, .-set_bkg_attr
	.comm	msg_tile,8,8
	.comm	bkgCGB,8,8
	.comm	VBK_REG,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_dscan.c_set_bkg_attr.c"
	.text
	.align	2
	.global	set_bkg_attr
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_bkg_attr, %function
set_bkg_attr:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #1
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r2
	ldr	r2, .L10
	sub	sp, sp, #12
	cmp	r3, #0
	ldr	r5, [sp, #48]
	str	ip, [r2]
	ble	.L2
	mov	r7, r0
	mov	r4, r1
	ldr	r8, .L10+4
	ldr	r10, .L10+8
	add	r6, r3, r1
	sub	r9, fp, #1
.L3:
	cmp	fp, #0
	ldr	lr, [r8]
	ble	.L6
	ldr	ip, [r10]
	sub	r3, r5, #1
	sub	r2, lr, #4
	add	r0, r5, r9
.L4:
	ldrb	r1, [r3, #1]!	@ zero_extendqisi2
	ldr	r1, [ip, r1, lsl #2]
	cmp	r3, r0
	str	r1, [r2, #4]!
	bne	.L4
	add	r5, r5, fp
.L6:
	mov	r3, #1
	mov	r1, r4
	mov	r2, fp
	add	r4, r4, r3
	mov	r0, r7
	str	lr, [sp]
	bl	set_bkg_tiles
	cmp	r4, r6
	bne	.L3
.L2:
	mov	r3, #0
	ldr	r2, .L10
	str	r3, [r2]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	.align	2
.L10:
	.word	VBK_REG
	.word	msg_tile
	.word	bkgCGB
	.size	set_bkg_attr, .-set_bkg_attr
	.comm	msg_tile,4,4
	.comm	bkgCGB,4,4
	.comm	VBK_REG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
