	.file	"extr_window-copy.c_window_copy_adjust_selection.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	window_copy_adjust_selection, @function
window_copy_adjust_selection:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r15, QWORD PTR [rdi]
	mov	ebx, DWORD PTR [rdx]
	mov	r13d, DWORD PTR [rsi]
	mov	edi, DWORD PTR 8[r15]
	call	screen_hsize@PLT
	sub	eax, DWORD PTR [r15]
	cmp	ebx, eax
	jge	.L2
	mov	eax, DWORD PTR 4[r15]
	mov	r8d, DWORD PTR WINDOW_COPY_REL_POS_ABOVE[rip]
	test	eax, eax
	je	.L9
	xor	eax, eax
.L3:
	mov	DWORD PTR [r12], r13d
	mov	DWORD PTR 0[rbp], eax
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	xor	r13d, r13d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	lea	rdi, 12[r15]
	mov	r14d, eax
	mov	QWORD PTR [rsp], rdi
	call	screen_size_y@PLT
	add	eax, r14d
	cmp	eax, ebx
	jg	.L4
	mov	eax, DWORD PTR 4[r15]
	mov	r8d, DWORD PTR WINDOW_COPY_REL_POS_BELOW[rip]
	mov	rdi, QWORD PTR [rsp]
	test	eax, eax
	je	.L10
.L5:
	mov	DWORD PTR [rsp], r8d
	call	screen_size_y@PLT
	mov	r8d, DWORD PTR [rsp]
	sub	eax, 1
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, ebx
	mov	r8d, DWORD PTR WINDOW_COPY_REL_POS_ON_SCREEN[rip]
	sub	eax, r14d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	mov	DWORD PTR 12[rsp], r8d
	call	screen_size_x@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	rdi, QWORD PTR [rsp]
	lea	r13d, -1[rax]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	window_copy_adjust_selection, .-window_copy_adjust_selection
	.comm	WINDOW_COPY_REL_POS_ON_SCREEN,4,4
	.comm	WINDOW_COPY_REL_POS_BELOW,4,4
	.comm	WINDOW_COPY_REL_POS_ABOVE,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_window-copy.c_window_copy_adjust_selection.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	window_copy_adjust_selection, %function
window_copy_adjust_selection:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r9, [r0]
	ldr	r4, [r2]
	ldr	r0, [r9, #8]
	mov	r6, r1
	mov	r5, r2
	ldr	r8, [r1]
	bl	screen_hsize
	ldr	r3, [r9]
	sub	r7, r0, r3
	cmp	r4, r7
	bge	.L2
	ldr	r3, [r9, #4]
	ldr	r2, .L10
	cmp	r3, #0
	moveq	r8, r3
	ldr	r4, [r2]
	movne	r3, #0
.L3:
	str	r8, [r6]
	mov	r0, r4
	str	r3, [r5]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	add	r10, r9, #12
	mov	r0, r10
	bl	screen_size_y
	add	r0, r0, r7
	cmp	r0, r4
	bgt	.L4
	ldr	r2, [r9, #4]
	ldr	r3, .L10+4
	cmp	r2, #0
	ldr	r4, [r3]
	beq	.L9
.L5:
	mov	r0, r10
	bl	screen_size_y
	sub	r3, r0, #1
	b	.L3
.L4:
	ldr	r2, .L10+8
	sub	r3, r4, r7
	ldr	r4, [r2]
	b	.L3
.L9:
	mov	r0, r10
	bl	screen_size_x
	sub	r8, r0, #1
	b	.L5
.L11:
	.align	2
.L10:
	.word	WINDOW_COPY_REL_POS_ABOVE
	.word	WINDOW_COPY_REL_POS_BELOW
	.word	WINDOW_COPY_REL_POS_ON_SCREEN
	.size	window_copy_adjust_selection, .-window_copy_adjust_selection
	.comm	WINDOW_COPY_REL_POS_ON_SCREEN,4,4
	.comm	WINDOW_COPY_REL_POS_BELOW,4,4
	.comm	WINDOW_COPY_REL_POS_ABOVE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
