	.file	"extr_xwin.c_translate_image.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	translate_image, @function
translate_image:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	QWORD PTR 16[rdi], 0
	je	.L2
	mov	eax, DWORD PTR 8[rdi]
	cmp	eax, 15
	je	.L29
	cmp	eax, 16
	jne	.L5
	cmp	DWORD PTR [rdi], 16
	mov	r12, rcx
	je	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	ebx, DWORD PTR 12[rbp]
	test	ebx, ebx
	lea	eax, 7[rbx]
	cmovs	ebx, eax
	imul	esi, edx
	sar	ebx, 3
	imul	ebx, esi
	mov	edi, ebx
	movsx	rbx, ebx
	call	xmalloc@PLT
	mov	r12, rax
	lea	rcx, [rax+rbx*4]
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 16
	je	.L6
	jg	.L7
	cmp	eax, 8
	je	.L8
	cmp	eax, 15
	jne	.L1
	mov	eax, DWORD PTR 12[rbp]
	cmp	eax, 24
	je	.L16
	cmp	eax, 32
	je	.L17
	cmp	eax, 16
	jne	.L1
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate15to16@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	cmp	eax, 24
	jne	.L1
	mov	eax, DWORD PTR 12[rbp]
	cmp	eax, 24
	je	.L10
	cmp	eax, 32
	je	.L11
	cmp	eax, 16
	jne	.L1
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate24to16@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L29:
	cmp	DWORD PTR [rdi], 15
	mov	r12, rcx
	jne	.L2
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	eax, 24
	jne	.L2
	cmp	DWORD PTR [rdi], 24
	mov	r12, rcx
	jne	.L2
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR 12[rbp]
	cmp	eax, 24
	je	.L13
	cmp	eax, 32
	je	.L14
	cmp	eax, 16
	jne	.L1
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate16to16@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, DWORD PTR 12[rbp]
	cmp	eax, 24
	je	.L19
	jg	.L20
	cmp	eax, 8
	je	.L21
	cmp	eax, 16
	jne	.L1
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate8to16@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	cmp	eax, 32
	jne	.L1
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate8to32@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate24to24@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate15to24@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate16to32@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate24to32@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate16to24@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate15to32@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate8to8@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	translate8to24@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	translate_image, .-translate_image
	.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_xwin.c_translate_image.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	translate_image, %function
translate_image:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r0, [r0, #12]
	mov	r4, r1
	cmp	r0, #0
	mov	r7, r3
	beq	.L2
	ldr	r3, [r5, #4]
	cmp	r3, #15
	beq	.L33
	cmp	r3, #16
	bne	.L5
	ldr	r3, [r5]
	cmp	r3, #16
	beq	.L27
.L2:
	ldr	ip, [r5, #8]
	mul	r2, r4, r2
	cmp	ip, #0
	add	r4, ip, #7
	movlt	ip, r4
	asr	r4, ip, #3
	mul	r4, r2, r4
	mov	r0, r4
	bl	xmalloc
	ldr	r2, [r5]
	mov	r6, r0
	sub	r2, r2, #8
	add	r3, r0, r4, lsl #2
	cmp	r2, #16
	ldrls	pc, [pc, r2, asl #2]
	b	.L1
.L7:
	.word	.L10
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L9
	.word	.L8
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L6
.L6:
	ldr	r2, [r5, #8]
	cmp	r2, #24
	beq	.L11
	cmp	r2, #32
	beq	.L12
	cmp	r2, #16
	bne	.L1
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate24to16
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L33:
	ldr	r3, [r5]
	cmp	r3, #15
	bne	.L2
.L27:
	mov	r6, r7
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	cmp	r3, #24
	bne	.L2
	ldr	r3, [r5]
	cmp	r3, #24
	bne	.L2
	b	.L27
.L10:
	ldr	r2, [r5, #8]
	sub	r2, r2, #8
	cmp	r2, #24
	ldrls	pc, [pc, r2, asl #2]
	b	.L1
.L21:
	.word	.L24
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L23
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L22
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L20
.L9:
	ldr	r2, [r5, #8]
	cmp	r2, #24
	beq	.L17
	cmp	r2, #32
	beq	.L18
	cmp	r2, #16
	bne	.L1
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate15to16
	b	.L1
.L8:
	ldr	r2, [r5, #8]
	cmp	r2, #24
	beq	.L14
	cmp	r2, #32
	beq	.L15
	cmp	r2, #16
	bne	.L1
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate16to16
	b	.L1
.L20:
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate8to32
	b	.L1
.L22:
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate8to24
	b	.L1
.L23:
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate8to16
	b	.L1
.L24:
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate8to8
	b	.L1
.L12:
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate24to32
	b	.L1
.L15:
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate16to32
	b	.L1
.L18:
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate15to32
	b	.L1
.L11:
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate24to24
	b	.L1
.L14:
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate16to24
	b	.L1
.L17:
	mov	r1, r7
	mov	r0, r5
	mov	r2, r6
	bl	translate15to24
	b	.L1
	.size	translate_image, .-translate_image
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
