	.file	"extr_vpe.c_apply_r_mips_gprel16.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"VPE loader: apply_r_mips_gprel16: relative address 0x%x out of range of gp register\n"
	.text
	.p2align 4
	.type	apply_r_mips_gprel16, @function
apply_r_mips_gprel16:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edi, DWORD PTR [rsi]
	mov	eax, DWORD PTR gp_addr[rip]
	test	di, di
	jne	.L2
	sub	edx, eax
	lea	ecx, 32768[rdx]
	mov	eax, edx
	cmp	ecx, 65536
	ja	.L11
	xor	di, di
	movzx	eax, ax
	or	eax, edi
	mov	DWORD PTR [rsi], eax
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	movzx	ecx, WORD PTR gp_offs[rip]
	sub	ecx, eax
	add	edx, ecx
	add	edx, edi
	xor	di, di
	movsx	eax, dx
	movzx	eax, ax
	or	eax, edi
	mov	DWORD PTR [rsi], eax
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	mov	esi, edx
	lea	rdi, .LC0[rip]
	call	pr_debug@PLT
	mov	eax, DWORD PTR ENOEXEC[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	apply_r_mips_gprel16, .-apply_r_mips_gprel16
	.comm	gp_offs,4,4
	.comm	gp_addr,4,4
	.comm	ENOEXEC,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_vpe.c_apply_r_mips_gprel16.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"VPE loader: apply_r_mips_gprel16: relative address "
	.ascii	"0x%x out of range of gp register\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	apply_r_mips_gprel16, %function
apply_r_mips_gprel16:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, [r1]
	push	{r4, lr}
	lsl	r3, ip, #16
	lsr	r3, r3, #16
	mov	lr, r1
	ldr	r1, .L9
	cmp	r3, #0
	ldr	r3, [r1]
	bne	.L2
	sub	r1, r2, r3
	add	r3, r1, #32768
	cmp	r3, #65536
	mov	r3, r1
	bhi	.L8
.L4:
	lsr	ip, ip, #16
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	ip, ip, #16
	orr	ip, ip, r3
	mov	r0, #0
	str	ip, [lr]
	pop	{r4, pc}
.L2:
	ldr	r1, .L9+4
	ldr	r0, [r1]
	sub	r3, r0, r3
	add	r3, r3, r2
	add	r3, r3, ip
	lsl	r3, r3, #16
	asr	r3, r3, #16
	b	.L4
.L8:
	ldr	r0, .L9+8
	bl	pr_debug
	ldr	r3, .L9+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, pc}
.L10:
	.align	2
.L9:
	.word	gp_addr
	.word	gp_offs
	.word	.LC0
	.word	ENOEXEC
	.size	apply_r_mips_gprel16, .-apply_r_mips_gprel16
	.comm	gp_offs,4,4
	.comm	gp_addr,4,4
	.comm	ENOEXEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
