	.file	"163890.c"
	.intel_syntax noprefix
	.text
	.globl	largestPalindrome
	.type	largestPalindrome, @function
largestPalindrome:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR .LC0[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	movq	rax, xmm0
	movsd	xmm0, QWORD PTR .LC1[rip]
	movq	xmm1, rax
	subsd	xmm1, xmm0
	cvttsd2si	rax, xmm1
	mov	QWORD PTR -48[rbp], rax
	jmp	.L2
.L9:
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	QWORD PTR -32[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L3
.L4:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	mov	rdi, rax
	mov	rcx, QWORD PTR -24[rbp]
	movabs	rdx, 7378697629483820647
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 2
	mov	rsi, rcx
	sar	rsi, 63
	sub	rax, rsi
	mov	rdx, rax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	lea	rax, [rdi+rdx]
	mov	QWORD PTR -32[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	mov	QWORD PTR -40[rbp], rax
	mov	rcx, QWORD PTR -24[rbp]
	movabs	rdx, 7378697629483820647
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 2
	sar	rcx, 63
	mov	rdx, rcx
	sub	rax, rdx
	mov	QWORD PTR -24[rbp], rax
.L3:
	cmp	QWORD PTR -24[rbp], 0
	jg	.L4
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR .LC0[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	movq	rax, xmm0
	movsd	xmm0, QWORD PTR .LC1[rip]
	movq	xmm1, rax
	subsd	xmm1, xmm0
	cvttsd2si	rax, xmm1
	mov	QWORD PTR -16[rbp], rax
	jmp	.L5
.L8:
	mov	rax, QWORD PTR -8[rbp]
	cqo
	idiv	QWORD PTR -16[rbp]
	mov	rax, rdx
	test	rax, rax
	jne	.L6
	mov	eax, DWORD PTR MOD.0[rip]
	movsx	rcx, eax
	mov	rax, QWORD PTR -8[rbp]
	cqo
	idiv	rcx
	mov	rax, rdx
	jmp	.L7
.L6:
	sub	QWORD PTR -16[rbp], 1
.L5:
	mov	rax, QWORD PTR -16[rbp]
	imul	rax, rax
	cmp	QWORD PTR -8[rbp], rax
	jle	.L8
	sub	QWORD PTR -48[rbp], 1
.L2:
	cmp	QWORD PTR -48[rbp], 0
	jg	.L9
	mov	eax, 9
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	largestPalindrome, .-largestPalindrome
	.section	.rodata
	.align 4
	.type	MOD.0, @object
	.size	MOD.0, 4
MOD.0:
	.long	1337
	.align 8
.LC0:
	.long	0
	.long	1076101120
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"163890.c"
	.text
	.global	__aeabi_i2d
	.global	__aeabi_dsub
	.global	__aeabi_d2iz
	.global	__aeabi_idivmod
	.align	2
	.global	largestPalindrome
	.syntax unified
	.arm
	.fpu softvfp
	.type	largestPalindrome, %function
largestPalindrome:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L10
	bl	pow
	mov	r2, #0
	ldr	r3, .L10+4
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-28]
	b	.L2
.L9:
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-16]
	b	.L3
.L4:
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r0, r3
	ldr	r1, [fp, #-16]
	ldr	r3, .L10+8
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	add	r3, r0, r2
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-16]
	ldr	r2, .L10+8
	smull	r1, r2, r3, r2
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-16]
.L3:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bgt	.L4
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L10
	bl	pow
	mov	r2, #0
	ldr	r3, .L10+4
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-12]
	b	.L5
.L8:
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L10+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	b	.L7
.L6:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L5:
	ldr	r3, [fp, #-12]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L8
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
.L2:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bgt	.L9
	mov	r3, #9
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	1076101120
	.word	1072693248
	.word	1717986919
	.word	MOD.5300
	.size	largestPalindrome, .-largestPalindrome
	.section	.rodata
	.align	2
	.type	MOD.5300, %object
	.size	MOD.5300, 4
MOD.5300:
	.word	1337
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
