	.file	"extr_qcom.c_qcom_convert.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	qcom_convert
	.type	qcom_convert, @function
qcom_convert:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	edx, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 184
	.cfi_def_cfa_offset 240
	mov	rax, QWORD PTR [rsi]
	mov	rcx, QWORD PTR 8[rsi]
	mov	rbx, QWORD PTR 16[rsi]
	mov	QWORD PTR 136[rsp], rdi
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 168[rsp], rcx
	mov	QWORD PTR 56[rsp], rbx
	mov	QWORD PTR 88[rsp], rax
	lea	rax, -1[rcx]
	div	QWORD PTR TILE_WIDTH[rip]
	xor	edx, edx
	lea	rcx, 1[rax]
	mov	QWORD PTR 144[rsp], rax
	add	rax, 2
	and	rax, -2
	mov	QWORD PTR 152[rsp], rcx
	mov	rcx, QWORD PTR TILE_HEIGHT[rip]
	mov	rsi, rax
	mov	QWORD PTR 120[rsp], rax
	lea	rax, -1[rbx]
	shr	rbx
	div	rcx
	xor	edx, edx
	lea	rdi, 1[rax]
	mov	QWORD PTR 160[rsp], rax
	mov	rax, rbx
	mov	rbx, QWORD PTR TILE_SIZE[rip]
	sub	rax, 1
	mov	QWORD PTR 96[rsp], rdi
	div	rcx
	sal	rbx, 2
	xor	edx, edx
	mov	QWORD PTR 104[rsp], rbx
	add	rax, 1
	mov	QWORD PTR 128[rsp], rax
	mov	rax, QWORD PTR TILE_SIZE[rip]
	imul	rax, rdi
	imul	rax, rsi
	mov	QWORD PTR 80[rsp], rax
	mov	rcx, rax
	div	rbx
	test	rdx, rdx
	je	.L2
	mov	rax, rcx
	xor	edx, edx
	sub	rax, 1
	div	rbx
	add	rax, 1
	imul	rax, rbx
	mov	QWORD PTR 80[rsp], rax
.L2:
	cmp	QWORD PTR 96[rsp], 0
	je	.L1
	mov	QWORD PTR 48[rsp], 0
	mov	rax, QWORD PTR TILE_SIZE[rip]
	shr	rax
	sal	rax, 2
	mov	QWORD PTR 112[rsp], rax
	mov	rax, QWORD PTR 88[rsp]
	lea	rbx, 0[0+rax*8]
	mov	QWORD PTR 16[rsp], rbx
	lea	rbx, 0[0+rax*4]
	neg	rax
	sal	rax, 2
	mov	QWORD PTR 8[rsp], rbx
	mov	QWORD PTR 24[rsp], rax
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	QWORD PTR 152[rsp], 0
	je	.L10
	mov	QWORD PTR 32[rsp], 0
	mov	rax, QWORD PTR 48[rsp]
	mov	rbx, rax
	and	eax, 1
	mov	QWORD PTR 72[rsp], rax
	mov	rax, QWORD PTR 168[rsp]
	shr	rbx
	mov	QWORD PTR 64[rsp], rbx
	mov	QWORD PTR 40[rsp], rax
	.p2align 4,,10
	.p2align 3
.L8:
	mov	r13, QWORD PTR 120[rsp]
	mov	rbx, QWORD PTR 32[rsp]
	mov	rbp, QWORD PTR 48[rsp]
	mov	rcx, QWORD PTR 96[rsp]
	mov	rdx, r13
	mov	rdi, rbx
	mov	rsi, rbp
	call	tile_pos@PLT
	mov	rsi, QWORD PTR 64[rsp]
	mov	rdx, r13
	mov	rdi, rbx
	imul	rax, QWORD PTR 104[rsp]
	mov	r15, QWORD PTR 136[rsp]
	mov	rcx, QWORD PTR 128[rsp]
	lea	r12, [r15+rax]
	call	tile_pos@PLT
	mov	rdx, QWORD PTR 56[rsp]
	mov	rcx, QWORD PTR 88[rsp]
	imul	rax, QWORD PTR TILE_SIZE[rip]
	add	rax, QWORD PTR 80[rsp]
	lea	r15, [r15+rax*4]
	mov	rax, QWORD PTR 112[rsp]
	mov	rsi, QWORD PTR TILE_WIDTH[rip]
	mov	rdi, rdx
	add	rax, r15
	cmp	QWORD PTR 72[rsp], 0
	cmovne	r15, rax
	mov	rax, QWORD PTR 40[rsp]
	cmp	rsi, rax
	mov	r13, rax
	mov	rax, QWORD PTR TILE_HEIGHT[rip]
	cmovbe	r13, rsi
	cmp	rax, rdx
	cmovbe	rdi, rax
	imul	rax, rcx
	xor	edx, edx
	imul	rbx, rsi
	imul	rax, rbp
	add	rbx, rax
	mov	rax, rbx
	div	rcx
	imul	rax, rcx
	shr	rax
	add	rax, rdx
	shr	rdi
	lea	r8, -1[rdi]
	je	.L6
	add	rbx, rcx
	lea	rbp, 0[0+rax*4]
	mov	rcx, r8
	sal	rbx, 2
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdx, QWORD PTR 24[rsp]
	mov	rax, QWORD PTR [r14]
	mov	rsi, r12
	mov	QWORD PTR [rsp], rcx
	lea	rdi, [rdx+rbx]
	mov	rdx, r13
	add	rdi, QWORD PTR 8[rax]
	call	memcpy@PLT
	mov	rax, QWORD PTR TILE_WIDTH[rip]
	mov	rdx, r13
	lea	r12, [r12+rax*4]
	mov	rax, QWORD PTR [r14]
	mov	rsi, r12
	mov	rdi, QWORD PTR 8[rax]
	add	rdi, rbx
	call	memcpy@PLT
	mov	rax, QWORD PTR TILE_WIDTH[rip]
	mov	rsi, r15
	mov	rdx, r13
	lea	r12, [r12+rax*4]
	mov	rax, QWORD PTR [r14]
	mov	rdi, QWORD PTR 24[rax]
	add	rdi, rbp
	call	memcpy@PLT
	mov	rcx, QWORD PTR [rsp]
	add	rbx, QWORD PTR 16[rsp]
	mov	rsi, QWORD PTR TILE_WIDTH[rip]
	add	rbp, QWORD PTR 8[rsp]
	sub	rcx, 1
	lea	r15, [r15+rsi*4]
	cmp	rcx, -1
	jne	.L7
.L6:
	mov	rbx, QWORD PTR 32[rsp]
	sub	QWORD PTR 40[rsp], rsi
	lea	rax, 1[rbx]
	cmp	QWORD PTR 144[rsp], rbx
	je	.L10
	mov	QWORD PTR 32[rsp], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rbx, QWORD PTR TILE_HEIGHT[rip]
	sub	QWORD PTR 56[rsp], rbx
	mov	rbx, QWORD PTR 48[rsp]
	lea	rax, 1[rbx]
	cmp	QWORD PTR 160[rsp], rbx
	je	.L1
	mov	QWORD PTR 48[rsp], rax
	jmp	.L4
.L1:
	add	rsp, 184
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE0:
	.size	qcom_convert, .-qcom_convert
	.comm	TILE_WIDTH,8,8
	.comm	TILE_SIZE,8,8
	.comm	TILE_HEIGHT,8,8
	.comm	TILE_GROUP_SIZE,8,8
	.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_qcom.c_qcom_convert.c"
	.text
	.global	__aeabi_uidiv
	.global	__aeabi_uidivmod
	.align	2
	.global	qcom_convert
	.syntax unified
	.arm
	.fpu softvfp
	.type	qcom_convert, %function
qcom_convert:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r1
	ldr	r3, [r1, #4]
	mov	r2, r0
	mov	r1, r3
	sub	sp, sp, #84
	str	r3, [sp, #76]
	ldr	r3, [r10]
	ldr	fp, .L27
	ldr	r3, [r3]
	sub	r0, r1, #1
	ldr	r1, [fp]
	str	r2, [sp, #60]
	str	r3, [sp]
	bl	__aeabi_uidiv
	mov	r7, r0
	ldr	r3, .L27+4
	ldr	r6, [r10, #8]
	ldr	r4, [r3]
	add	r3, r7, #2
	bic	r5, r3, #1
	mov	r1, r4
	str	r0, [sp, #44]
	sub	r0, r6, #1
	str	r5, [sp, #52]
	str	r6, [sp, #20]
	bl	__aeabi_uidiv
	mov	r8, r0
	str	r0, [sp, #68]
	lsr	r0, r6, #1
	mov	r1, r4
	sub	r0, r0, #1
	bl	__aeabi_uidiv
	ldr	r3, .L27+8
	add	r2, r8, #1
	ldr	r1, [r3]
	add	r3, r0, #1
	str	r3, [sp, #56]
	mov	r3, r2
	mul	r3, r1, r3
	mul	r5, r3, r5
	lsl	r4, r1, #2
	str	r1, [sp, #32]
	mov	r0, r5
	mov	r1, r4
	str	r2, [sp, #40]
	str	r5, [sp, #36]
	str	r4, [sp, #48]
	bl	__aeabi_uidivmod
	add	r3, r7, #1
	cmp	r1, #0
	str	r3, [sp, #72]
	beq	.L2
	mov	r1, r4
	sub	r0, r5, #1
	bl	__aeabi_uidiv
	add	r3, r0, #1
	mul	r4, r3, r4
	str	r4, [sp, #36]
.L2:
	ldr	r3, [sp, #40]
	cmp	r3, #0
	beq	.L1
	ldr	r3, [sp, #32]
	lsr	r3, r3, #1
	lsl	r3, r3, #2
	str	r3, [sp, #64]
	mov	r3, #0
	str	r3, [sp, #16]
.L4:
	ldr	r3, [sp, #72]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [sp, #16]
	lsr	r2, r3, #1
	and	r3, r3, #1
	str	r3, [sp, #28]
	ldr	r3, [sp, #76]
	str	r2, [sp, #24]
	str	r3, [sp, #12]
	mov	r3, #0
	str	r3, [sp, #8]
.L8:
	ldr	r6, [sp, #52]
	ldr	r5, [sp, #8]
	mov	r2, r6
	mov	r0, r5
	ldr	r3, [sp, #40]
	ldr	r1, [sp, #16]
	bl	tile_pos
	mov	r4, r0
	ldr	ip, [sp, #48]
	mov	r0, r5
	ldr	r5, [sp, #60]
	mov	r2, r6
	mla	ip, r4, ip, r5
	ldr	r3, [sp, #56]
	ldr	r1, [sp, #24]
	mov	r4, ip
	bl	tile_pos
	ldr	r3, [sp, #36]
	ldr	r7, [sp, #32]
	ldr	r2, .L27+4
	mla	r7, r0, r7, r3
	add	r7, r5, r7, lsl #2
	ldr	r5, [sp]
	ldr	r3, [sp, #28]
	mov	r9, r5
	cmp	r3, #0
	ldrne	r3, [sp, #64]
	ldr	r6, [r2]
	addne	r7, r7, r3
	ldr	r2, [sp, #8]
	ldr	r3, [fp]
	mul	r9, r6, r9
	mul	r2, r3, r2
	ldr	r0, [sp, #16]
	str	r3, [sp, #4]
	mla	r0, r9, r0, r2
	ldr	r2, [sp, #12]
	mov	r1, r5
	cmp	r3, r2
	movcc	r8, r3
	ldr	r3, [sp, #20]
	movcs	r8, r2
	cmp	r6, r3
	movcs	r6, r3
	mov	r9, r0
	bl	__aeabi_uidivmod
	mov	r3, r5
	mul	r3, r0, r3
	lsr	r6, r6, #1
	cmp	r6, #0
	mov	r2, r5
	sub	r6, r6, #1
	add	r5, r1, r3, lsr #1
	ldr	r3, [sp, #4]
	beq	.L6
	add	r3, r2, r9
	sub	r3, r3, r5, lsl #1
	lsl	r3, r3, #2
	str	r3, [sp, #4]
	mov	r3, r10
	mov	r10, r8
	mov	r8, r3
	sub	r9, r9, r5, lsl #1
	lsl	r9, r9, #2
.L7:
	ldr	r0, [r8]
	add	r1, r9, r5, lsl #3
	ldr	r0, [r0, #4]
	mov	r2, r10
	add	r0, r0, r1
	mov	r1, r4
	bl	memcpy
	ldr	r1, [r8]
	ldr	r3, [sp, #4]
	ldr	ip, [fp]
	ldr	r0, [r1, #4]
	lsl	r1, r5, #3
	add	r1, r3, r1
	add	r4, r4, ip, lsl #2
	mov	r2, r10
	add	r0, r0, r1
	mov	r1, r4
	bl	memcpy
	ldr	r1, [r8]
	ldr	ip, [fp]
	ldr	r0, [r1, #12]
	mov	r2, r10
	mov	r1, r7
	add	r0, r0, r5, lsl #2
	sub	r6, r6, #1
	add	r4, r4, ip, lsl #2
	bl	memcpy
	ldr	r1, [fp]
	ldr	r3, [sp]
	cmn	r6, #1
	add	r5, r5, r3
	add	r7, r7, r1, lsl #2
	bne	.L7
	mov	r3, r1
	mov	r10, r8
.L6:
	ldr	r1, [sp, #44]
	ldr	r2, [sp, #8]
	cmp	r1, r2
	ldr	r1, [sp, #12]
	sub	r3, r1, r3
	str	r3, [sp, #12]
	add	r3, r2, #1
	strne	r3, [sp, #8]
	bne	.L8
.L10:
	ldr	r1, [sp, #68]
	ldr	r2, [sp, #16]
	ldr	r3, .L27+4
	cmp	r1, r2
	ldr	r3, [r3]
	ldr	r1, [sp, #20]
	add	r2, r2, #1
	sub	r3, r1, r3
	str	r3, [sp, #20]
	strne	r2, [sp, #16]
	bne	.L4
.L1:
	add	sp, sp, #84
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	.align	2
.L27:
	.word	TILE_WIDTH
	.word	TILE_HEIGHT
	.word	TILE_SIZE
	.size	qcom_convert, .-qcom_convert
	.comm	TILE_WIDTH,4,4
	.comm	TILE_SIZE,4,4
	.comm	TILE_HEIGHT,4,4
	.comm	TILE_GROUP_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
