	.file	"extr_bsops.c_bs_screenblt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	bs_screenblt
	.type	bs_screenblt, @function
bs_screenblt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	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
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	DWORD PTR 28[rsp], esi
	lea	rdi, 28[rsp]
	lea	rsi, 24[rsp]
	mov	DWORD PTR 24[rsp], edx
	lea	rdx, 20[rsp]
	mov	DWORD PTR 20[rsp], ecx
	lea	rcx, 16[rsp]
	mov	DWORD PTR 16[rsp], r8d
	lea	r8, 12[rsp]
	mov	DWORD PTR 12[rsp], r9d
	lea	r9, 64[rsp]
	call	bs_warp_coords@PLT
	test	rax, rax
	je	.L1
	mov	esi, DWORD PTR 64[rsp]
	mov	eax, DWORD PTR 24[rsp]
	mov	ebx, DWORD PTR 16[rsp]
	cmp	ebp, 12
	je	.L71
	cmp	esi, eax
	jge	.L14
	sub	ebx, 1
	mov	r12d, ebx
	js	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edx, DWORD PTR 20[rsp]
	xor	ebx, ebx
	test	edx, edx
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L16:
	mov	esi, DWORD PTR 64[rsp]
	mov	edi, DWORD PTR 12[rsp]
	add	esi, r12d
	add	edi, ebx
	call	bs_get_pixel@PLT
	mov	esi, DWORD PTR 24[rsp]
	mov	edi, DWORD PTR 28[rsp]
	xor	r8d, r8d
	mov	edx, eax
	mov	ecx, ebp
	add	edi, ebx
	add	esi, r12d
	add	ebx, 1
	call	bs_set_pixel@PLT
	cmp	DWORD PTR 20[rsp], ebx
	jg	.L16
.L17:
	sub	r12d, 1
	cmp	r12d, -1
	jne	.L15
.L1:
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.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
.L71:
	.cfi_restore_state
	cmp	esi, eax
	jge	.L4
	sub	ebx, 1
	jns	.L7
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L72:
	mov	esi, DWORD PTR 64[rsp]
.L7:
	mov	edi, DWORD PTR 12[rsp]
	add	esi, ebx
	call	get_bs_ptr@PLT
	mov	esi, DWORD PTR 24[rsp]
	mov	edi, DWORD PTR 28[rsp]
	mov	rbp, rax
	add	esi, ebx
	call	get_bs_ptr@PLT
	test	rbp, rbp
	je	.L6
	test	rax, rax
	je	.L6
	mov	edx, DWORD PTR 20[rsp]
	imul	edx, DWORD PTR g_Bpp[rip]
	mov	rsi, rbp
	mov	rdi, rax
	call	bs_copy_mem@PLT
.L6:
	sub	ebx, 1
	cmp	ebx, -1
	jne	.L72
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	r12d, 0
	jg	.L20
	mov	eax, DWORD PTR 28[rsp]
	cmp	DWORD PTR 12[rsp], eax
	jle	.L73
.L20:
	test	ebx, ebx
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	eax, DWORD PTR 20[rsp]
	xor	ebx, ebx
	test	eax, eax
	jle	.L23
	.p2align 4,,10
	.p2align 3
.L22:
	mov	esi, DWORD PTR 64[rsp]
	mov	edi, DWORD PTR 12[rsp]
	add	esi, r12d
	add	edi, ebx
	call	bs_get_pixel@PLT
	mov	esi, DWORD PTR 24[rsp]
	mov	edi, DWORD PTR 28[rsp]
	xor	r8d, r8d
	mov	edx, eax
	mov	ecx, ebp
	add	edi, ebx
	add	esi, r12d
	add	ebx, 1
	call	bs_set_pixel@PLT
	cmp	DWORD PTR 20[rsp], ebx
	jg	.L22
.L23:
	add	r12d, 1
	cmp	DWORD PTR 16[rsp], r12d
	jg	.L19
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	mov	ebp, 0
	jg	.L10
	mov	edi, DWORD PTR 12[rsp]
	cmp	edi, DWORD PTR 28[rsp]
	jg	.L10
	test	ebx, ebx
	jg	.L11
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L74:
	mov	esi, DWORD PTR 64[rsp]
	mov	edi, DWORD PTR 12[rsp]
.L11:
	add	esi, ebp
	call	get_bs_ptr@PLT
	mov	esi, DWORD PTR 24[rsp]
	mov	edi, DWORD PTR 28[rsp]
	mov	r12, rax
	add	esi, ebp
	call	get_bs_ptr@PLT
	test	r12, r12
	je	.L13
	test	rax, rax
	je	.L13
	mov	edx, DWORD PTR 20[rsp]
	imul	edx, DWORD PTR g_Bpp[rip]
	mov	rsi, r12
	mov	rdi, rax
	call	bs_copy_memb@PLT
.L13:
	add	ebp, 1
	cmp	DWORD PTR 16[rsp], ebp
	jg	.L74
	jmp	.L1
.L10:
	test	ebx, ebx
	jg	.L9
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L75:
	mov	esi, DWORD PTR 64[rsp]
.L9:
	mov	edi, DWORD PTR 12[rsp]
	add	esi, ebp
	call	get_bs_ptr@PLT
	mov	esi, DWORD PTR 24[rsp]
	mov	edi, DWORD PTR 28[rsp]
	mov	r12, rax
	add	esi, ebp
	call	get_bs_ptr@PLT
	test	r12, r12
	je	.L12
	test	rax, rax
	je	.L12
	mov	edx, DWORD PTR 20[rsp]
	imul	edx, DWORD PTR g_Bpp[rip]
	mov	rsi, r12
	mov	rdi, rax
	call	bs_copy_mem@PLT
.L12:
	add	ebp, 1
	cmp	DWORD PTR 16[rsp], ebp
	jg	.L75
	jmp	.L1
.L73:
	test	ebx, ebx
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	ebx, DWORD PTR 20[rsp]
	sub	ebx, 1
	js	.L25
	.p2align 4,,10
	.p2align 3
.L24:
	mov	esi, DWORD PTR 64[rsp]
	mov	edi, DWORD PTR 12[rsp]
	add	esi, r12d
	add	edi, ebx
	call	bs_get_pixel@PLT
	mov	esi, DWORD PTR 24[rsp]
	mov	edi, DWORD PTR 28[rsp]
	xor	r8d, r8d
	mov	edx, eax
	mov	ecx, ebp
	add	edi, ebx
	add	esi, r12d
	sub	ebx, 1
	call	bs_set_pixel@PLT
	cmp	ebx, -1
	jne	.L24
.L25:
	add	r12d, 1
	cmp	DWORD PTR 16[rsp], r12d
	jg	.L21
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	bs_screenblt, .-bs_screenblt
	.comm	g_Bpp,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_bsops.c_bs_screenblt.c"
	.text
	.align	2
	.global	bs_screenblt
	.syntax unified
	.arm
	.fpu softvfp
	.type	bs_screenblt, %function
bs_screenblt:
	@ args = 12, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, r3
	push	{r4, r5, r6, r7, r8, lr}
	sub	sp, sp, #24
	add	r3, sp, #52
	mov	r6, r0
	add	r0, sp, #56
	str	r1, [sp, #20]
	str	r2, [sp, #16]
	str	r0, [sp, #4]
	str	r3, [sp]
	add	r2, sp, #12
	add	r3, sp, #48
	add	r1, sp, #16
	add	r0, sp, #20
	str	ip, [sp, #12]
	bl	bs_warp_coords
	cmp	r0, #0
	beq	.L1
	cmp	r6, #12
	ldr	r1, [sp, #56]
	ldr	r3, [sp, #16]
	ldr	r5, [sp, #48]
	beq	.L55
	cmp	r1, r3
	bge	.L14
	subs	r5, r5, #1
	bmi	.L1
	mov	r7, #0
	ldr	r3, [sp, #12]
.L15:
	cmp	r3, #0
	movgt	r4, #0
	ble	.L17
.L16:
	ldr	r1, [sp, #56]
	ldr	r0, [sp, #52]
	add	r1, r5, r1
	add	r0, r4, r0
	bl	bs_get_pixel
	ldr	r1, [sp, #16]
	mov	r2, r0
	ldr	r0, [sp, #20]
	mov	r3, r6
	add	r0, r4, r0
	str	r7, [sp]
	add	r1, r5, r1
	bl	bs_set_pixel
	ldr	r3, [sp, #12]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L16
.L17:
	subs	r5, r5, #1
	bcs	.L15
.L1:
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L55:
	cmp	r1, r3
	bge	.L4
	subs	r5, r5, #1
	bmi	.L1
	ldr	r6, .L57
	b	.L7
.L6:
	cmn	r5, #1
	beq	.L1
	ldr	r1, [sp, #56]
.L7:
	add	r1, r1, r5
	ldr	r0, [sp, #52]
	bl	get_bs_ptr
	ldr	r1, [sp, #16]
	mov	r4, r0
	add	r1, r5, r1
	ldr	r0, [sp, #20]
	bl	get_bs_ptr
	cmp	r4, #0
	cmpne	r0, #0
	sub	r5, r5, #1
	beq	.L6
	ldr	r3, [sp, #12]
	ldr	r2, [r6]
	mov	r1, r4
	mul	r2, r3, r2
	bl	bs_copy_mem
	b	.L6
.L14:
	bgt	.L20
	ldr	r2, [sp, #52]
	ldr	r3, [sp, #20]
	cmp	r2, r3
	ble	.L56
.L20:
	cmp	r5, #0
	ble	.L1
	mov	r7, #0
	mov	r8, r7
	ldr	r3, [sp, #12]
.L19:
	cmp	r3, #0
	movgt	r4, #0
	ble	.L23
.L22:
	ldr	r1, [sp, #56]
	ldr	r0, [sp, #52]
	add	r1, r7, r1
	add	r0, r4, r0
	bl	bs_get_pixel
	ldr	r1, [sp, #16]
	mov	r2, r0
	ldr	r0, [sp, #20]
	mov	r3, r6
	add	r0, r4, r0
	str	r8, [sp]
	add	r1, r7, r1
	bl	bs_set_pixel
	ldr	r3, [sp, #12]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L22
	ldr	r5, [sp, #48]
.L23:
	add	r7, r7, #1
	cmp	r5, r7
	bgt	.L19
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	bgt	.L10
	ldr	r0, [sp, #52]
	ldr	r3, [sp, #20]
	cmp	r0, r3
	bgt	.L10
	cmp	r5, #0
	movgt	r4, #0
	ldrgt	r6, .L57
	bgt	.L11
	b	.L1
.L13:
	ldr	r3, [sp, #48]
	cmp	r3, r4
	ble	.L1
	ldr	r0, [sp, #52]
	ldr	r1, [sp, #56]
.L11:
	add	r1, r1, r4
	bl	get_bs_ptr
	ldr	r1, [sp, #16]
	mov	r5, r0
	add	r1, r4, r1
	ldr	r0, [sp, #20]
	bl	get_bs_ptr
	cmp	r5, #0
	cmpne	r0, #0
	add	r4, r4, #1
	beq	.L13
	ldr	r3, [sp, #12]
	ldr	r2, [r6]
	mov	r1, r5
	mul	r2, r3, r2
	bl	bs_copy_memb
	b	.L13
.L10:
	cmp	r5, #0
	movgt	r4, #0
	ldrgt	r6, .L57
	bgt	.L9
	b	.L1
.L12:
	ldr	r3, [sp, #48]
	cmp	r3, r4
	ble	.L1
	ldr	r1, [sp, #56]
.L9:
	add	r1, r1, r4
	ldr	r0, [sp, #52]
	bl	get_bs_ptr
	ldr	r1, [sp, #16]
	mov	r5, r0
	add	r1, r4, r1
	ldr	r0, [sp, #20]
	bl	get_bs_ptr
	cmp	r5, #0
	cmpne	r0, #0
	add	r4, r4, #1
	beq	.L12
	ldr	r3, [sp, #12]
	ldr	r2, [r6]
	mov	r1, r5
	mul	r2, r3, r2
	bl	bs_copy_mem
	b	.L12
.L56:
	cmp	r5, #0
	movgt	r7, #0
	movgt	r8, r7
	ble	.L1
.L21:
	ldr	r4, [sp, #12]
	subs	r4, r4, #1
	bmi	.L25
.L24:
	ldr	r1, [sp, #56]
	ldr	r0, [sp, #52]
	add	r1, r7, r1
	add	r0, r4, r0
	bl	bs_get_pixel
	ldr	r1, [sp, #16]
	mov	r2, r0
	ldr	r0, [sp, #20]
	mov	r3, r6
	add	r0, r4, r0
	str	r8, [sp]
	add	r1, r7, r1
	sub	r4, r4, #1
	bl	bs_set_pixel
	cmn	r4, #1
	bne	.L24
	ldr	r5, [sp, #48]
.L25:
	add	r7, r7, #1
	cmp	r5, r7
	bgt	.L21
	b	.L1
.L58:
	.align	2
.L57:
	.word	g_Bpp
	.size	bs_screenblt, .-bs_screenblt
	.comm	g_Bpp,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
