	.file	"extr_vo_x11.c_getMyXImage.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Shared memory not supported\nReverting to normal Xlib\n"
	.align 8
.LC1:
	.string	"Shared memory error,disabling ( Ximage error )\n"
	.align 8
.LC2:
	.string	"Shared memory error,disabling ( seg id error )\n"
	.align 8
.LC3:
	.string	"Shared memory error,disabling ( address error )\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"Not using SHM.\n"
.LC5:
	.string	"could not allocate image"
	.text
	.p2align 4
	.type	getMyXImage, @function
getMyXImage:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movsx	rbp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r12, QWORD PTR 40[rdi]
	mov	rax, QWORD PTR [r12]
	cmp	QWORD PTR 16[rax], 0
	je	.L2
	mov	edi, DWORD PTR [rax]
	call	XShmQueryExtension@PLT
	test	rax, rax
	jne	.L15
.L2:
	mov	DWORD PTR [rbx], 0
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	call	MP_WARN@PLT
.L3:
	mov	esi, DWORD PTR [rbx]
	lea	r13, 0[0+rbp*8]
	test	esi, esi
	je	.L4
	mov	ecx, DWORD PTR 4[rbx]
	mov	rax, QWORD PTR [r12]
	lea	r14, 0[rbp+rbp*2]
	xor	r8d, r8d
	mov	r9, QWORD PTR 32[rbx]
	mov	r15, QWORD PTR 8[rbx]
	sal	r14, 3
	mov	edx, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR 24[rbx]
	push	rcx
	.cfi_def_cfa_offset 72
	mov	ecx, DWORD PTR 16[rbx]
	add	r9, r14
	add	r15, r13
	push	rcx
	.cfi_def_cfa_offset 80
	mov	ecx, DWORD PTR ZPixmap[rip]
	mov	edi, DWORD PTR [rax]
	call	XShmCreateImage@PLT
	mov	QWORD PTR [r15], rax
	mov	rax, QWORD PTR 8[rbx]
	pop	rdx
	.cfi_def_cfa_offset 72
	pop	rcx
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR [rax+rbp*8]
	test	rax, rax
	je	.L16
	mov	edx, DWORD PTR IPC_CREAT[rip]
	mov	esi, DWORD PTR [rax]
	imul	esi, DWORD PTR 4[rax]
	mov	r15, QWORD PTR 32[rbx]
	mov	edi, DWORD PTR IPC_PRIVATE[rip]
	or	edx, 511
	add	r15, r14
	call	shmget@PLT
	mov	QWORD PTR [r15], rax
	mov	rax, QWORD PTR 32[rbx]
	mov	rdi, QWORD PTR [rax+r14]
	test	rdi, rdi
	js	.L17
	xor	esi, esi
	xor	edx, edx
	call	shmat@PLT
	mov	rsi, QWORD PTR 32[rbx]
	add	rsi, r14
	mov	QWORD PTR 8[rsi], rax
	cmp	rax, -1
	je	.L18
	mov	rdx, QWORD PTR 8[rbx]
	mov	rdx, QWORD PTR [rdx+rbp*8]
	mov	QWORD PTR 8[rdx], rax
	mov	eax, DWORD PTR False[rip]
	mov	DWORD PTR 16[rsi], eax
	mov	rax, QWORD PTR [r12]
	mov	edi, DWORD PTR [rax]
	call	XShmAttach@PLT
	mov	rax, QWORD PTR [r12]
	mov	esi, DWORD PTR False[rip]
	mov	edi, DWORD PTR [rax]
	call	XSync@PLT
	mov	rax, QWORD PTR 32[rbx]
	mov	esi, DWORD PTR IPC_RMID[rip]
	xor	edx, edx
	mov	rdi, QWORD PTR [rax+r14]
	call	shmctl@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, 1
	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
.L17:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbx]
	mov	rdi, QWORD PTR [rax+rbp*8]
	call	XDestroyImage@PLT
	lea	rsi, .LC2[rip]
	mov	rdi, r12
	call	MP_WARN@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	mov	DWORD PTR [rbx], 0
	lea	rsi, .LC4[rip]
	mov	rdi, r12
	call	MP_VERBOSE@PLT
	mov	ecx, DWORD PTR 4[rbx]
	mov	rax, QWORD PTR [r12]
	push	0
	.cfi_def_cfa_offset 72
	push	8
	.cfi_def_cfa_offset 80
	mov	edx, DWORD PTR 20[rbx]
	xor	r9d, r9d
	xor	r8d, r8d
	mov	esi, DWORD PTR 24[rbx]
	add	r13, QWORD PTR 8[rbx]
	push	rcx
	.cfi_def_cfa_offset 88
	mov	ecx, DWORD PTR 16[rbx]
	push	rcx
	.cfi_def_cfa_offset 96
	mov	ecx, DWORD PTR ZPixmap[rip]
	mov	edi, DWORD PTR [rax]
	call	XCreateImage@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 64
	mov	QWORD PTR 0[r13], rax
	mov	rax, QWORD PTR 8[rbx]
	mov	rbp, QWORD PTR [rax+rbp*8]
	test	rbp, rbp
	je	.L19
	mov	esi, DWORD PTR 0[rbp]
	imul	esi, DWORD PTR 4[rbx]
	mov	edi, 1
	add	esi, 32
	call	calloc@PLT
	mov	QWORD PTR 8[rbp], rax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, 1
	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
.L15:
	.cfi_restore_state
	mov	rax, QWORD PTR [r12]
	mov	DWORD PTR [rbx], 1
	mov	edi, DWORD PTR [rax]
	call	XShmGetEventBase@PLT
	mov	rdx, QWORD PTR [r12]
	add	rax, QWORD PTR ShmCompletion[rip]
	mov	QWORD PTR 8[rdx], rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	call	MP_WARN@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, r12
	lea	rsi, .LC5[rip]
	call	MP_WARN@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L18:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbx]
	mov	rdi, QWORD PTR [rax+rbp*8]
	call	XDestroyImage@PLT
	lea	rsi, .LC3[rip]
	mov	rdi, r12
	call	MP_WARN@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	getMyXImage, .-getMyXImage
	.comm	ZPixmap,4,4
	.comm	ShmCompletion,8,8
	.comm	IPC_RMID,4,4
	.comm	IPC_PRIVATE,4,4
	.comm	IPC_CREAT,4,4
	.comm	False,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_vo_x11.c_getMyXImage.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Shared memory not supported\012Reverting to normal "
	.ascii	"Xlib\012\000"
	.align	2
.LC1:
	.ascii	"Shared memory error,disabling ( Ximage error )\012\000"
	.align	2
.LC2:
	.ascii	"Shared memory error,disabling ( seg id error )\012\000"
	.align	2
.LC3:
	.ascii	"Shared memory error,disabling ( address error )\012"
	.ascii	"\000"
	.align	2
.LC4:
	.ascii	"Not using SHM.\012\000"
	.align	2
.LC5:
	.ascii	"could not allocate image\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getMyXImage, %function
getMyXImage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r6, [r0, #28]
	mov	r4, r0
	ldr	r3, [r6]
	mov	r5, r1
	ldr	r2, [r3, #8]
	sub	sp, sp, #24
	cmp	r2, #0
	beq	.L2
	ldr	r0, [r3]
	bl	XShmQueryExtension
	cmp	r0, #0
	bne	.L21
.L2:
	mov	r3, #0
	mov	r0, r6
	ldr	r1, .L26
	str	r3, [r4]
	bl	MP_WARN
.L3:
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L18
	ldr	r8, .L26+4
.L4:
	mov	r7, #0
	ldr	r1, .L26+8
	str	r7, [r4]
	mov	r0, r6
	bl	MP_VERBOSE
	mov	ip, #8
	ldr	r3, [r6]
	ldr	r1, [r4, #4]
	ldr	r2, [r4, #12]
	ldr	r0, [r3]
	ldr	r3, [r8]
	str	r7, [sp, #20]
	str	r7, [sp, #4]
	str	r7, [sp]
	str	ip, [sp, #16]
	str	r1, [sp, #12]
	str	r2, [sp, #8]
	ldr	r2, [r4, #16]
	ldr	r1, [r4, #20]
	ldr	r7, [r4, #8]
	bl	XCreateImage
	ldr	r3, [r4, #8]
	str	r0, [r7, r5, lsl #2]
	ldr	r5, [r3, r5, lsl #2]
	cmp	r5, #0
	beq	.L22
	ldr	r3, [r4, #4]
	ldr	r1, [r5]
	mov	r0, #1
	mul	r1, r3, r1
	add	r1, r1, #32
	bl	calloc
	mov	r3, r0
	mov	r0, #1
	str	r3, [r5, #8]
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	mov	r9, #0
	ldr	r2, [r6]
	ldr	r3, [r4, #24]
	add	r7, r5, r5, lsl #1
	ldr	r0, [r2]
	ldr	r1, [r4, #4]
	ldr	r2, [r4, #12]
	add	r3, r3, r7, lsl #2
	ldr	r8, .L26+4
	str	r3, [sp, #4]
	str	r9, [sp]
	ldr	r3, [r8]
	str	r1, [sp, #12]
	str	r2, [sp, #8]
	ldr	r2, [r4, #16]
	ldr	r1, [r4, #20]
	ldr	r10, [r4, #8]
	bl	XShmCreateImage
	ldr	r3, [r4, #8]
	str	r0, [r10, r5, lsl #2]
	ldr	r3, [r3, r5, lsl #2]
	lsl	r7, r7, #2
	cmp	r3, r9
	beq	.L23
	ldr	r2, .L26+12
	ldr	r0, [r3, #4]
	ldr	r2, [r2]
	ldr	r1, [r3]
	mvn	r2, r2, lsr #9
	ldr	r3, .L26+16
	mul	r1, r0, r1
	mvn	r2, r2, lsl #9
	ldr	r0, [r3]
	ldr	r10, [r4, #24]
	bl	shmget
	ldr	r3, [r4, #24]
	str	r0, [r10, r7]
	ldr	r0, [r3, r7]
	cmp	r0, #0
	blt	.L24
	mov	r1, r9
	mov	r2, r9
	bl	shmat
	ldr	r1, [r4, #24]
	cmn	r0, #1
	add	r1, r1, r7
	ldr	r3, [r4, #8]
	str	r0, [r1, #4]
	beq	.L25
	ldr	r3, [r3, r5, lsl #2]
	ldr	r8, .L26+20
	str	r0, [r3, #8]
	ldr	r2, [r8]
	ldr	r3, [r6]
	str	r2, [r1, #8]
	ldr	r0, [r3]
	bl	XShmAttach
	ldr	r3, [r6]
	ldr	r1, [r8]
	ldr	r0, [r3]
	bl	XSync
	ldr	r2, [r4, #24]
	ldr	r3, .L26+24
	ldr	r0, [r2, r7]
	ldr	r1, [r3]
	mov	r2, r9
	bl	shmctl
	mov	r0, #1
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	mov	r2, #1
	ldr	r3, [r6]
	str	r2, [r4]
	ldr	r0, [r3]
	bl	XShmGetEventBase
	ldr	r3, .L26+28
	ldr	r2, [r6]
	ldr	r3, [r3]
	add	r3, r3, r0
	str	r3, [r2, #4]
	b	.L3
.L23:
	mov	r0, r6
	ldr	r1, .L26+32
	bl	MP_WARN
	b	.L4
.L22:
	mov	r0, r6
	ldr	r1, .L26+36
	bl	MP_WARN
	mov	r0, r5
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L24:
	ldr	r3, [r4, #8]
	ldr	r0, [r3, r5, lsl #2]
	bl	XDestroyImage
	mov	r0, r6
	ldr	r1, .L26+40
	bl	MP_WARN
	b	.L4
.L25:
	ldr	r0, [r3, r5, lsl #2]
	bl	XDestroyImage
	mov	r0, r6
	ldr	r1, .L26+44
	bl	MP_WARN
	b	.L4
.L27:
	.align	2
.L26:
	.word	.LC0
	.word	ZPixmap
	.word	.LC4
	.word	IPC_CREAT
	.word	IPC_PRIVATE
	.word	False
	.word	IPC_RMID
	.word	ShmCompletion
	.word	.LC1
	.word	.LC5
	.word	.LC2
	.word	.LC3
	.size	getMyXImage, .-getMyXImage
	.comm	ZPixmap,4,4
	.comm	ShmCompletion,4,4
	.comm	IPC_RMID,4,4
	.comm	IPC_PRIVATE,4,4
	.comm	IPC_CREAT,4,4
	.comm	False,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
