	.file	"173579214.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	""
	.text
	.globl	shortestPalindrome
	.type	shortestPalindrome, @function
shortestPalindrome:
.LFB6:
	.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	QWORD PTR -56[rbp], rdi
	cmp	QWORD PTR -56[rbp], 0
	jne	.L2
	lea	rdi, .LC0[rip]
	call	strdup@PLT
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 1
	jne	.L4
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strdup@PLT
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	sub	eax, 1
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	and	eax, 1
	test	eax, eax
	je	.L5
	add	DWORD PTR -44[rbp], 1
.L5:
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -40[rbp], 0
	jmp	.L6
.L20:
	mov	DWORD PTR -24[rbp], 1
	mov	DWORD PTR -36[rbp], -1
	mov	DWORD PTR -32[rbp], 1
	jmp	.L7
.L11:
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	ecx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, ecx
	movsx	rcx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L27
	add	DWORD PTR -24[rbp], 2
	sub	DWORD PTR -36[rbp], 1
	add	DWORD PTR -32[rbp], 1
.L7:
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	test	eax, eax
	jns	.L11
	jmp	.L10
.L27:
	nop
.L10:
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	test	eax, eax
	jns	.L12
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jle	.L12
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR -28[rbp], eax
	mov	DWORD PTR -20[rbp], 0
.L12:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jne	.L13
	mov	eax, DWORD PTR -12[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L28
.L13:
	mov	DWORD PTR -24[rbp], 0
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	add	eax, 1
	mov	DWORD PTR -32[rbp], eax
	jmp	.L15
.L19:
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L29
	add	DWORD PTR -24[rbp], 2
	sub	DWORD PTR -36[rbp], 1
	add	DWORD PTR -32[rbp], 1
.L15:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L19
	jmp	.L18
.L29:
	nop
.L18:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L14
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jle	.L14
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR -28[rbp], eax
	mov	DWORD PTR -20[rbp], 1
	jmp	.L14
.L28:
	nop
.L14:
	add	DWORD PTR -40[rbp], 1
.L6:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jle	.L20
	mov	eax, DWORD PTR -12[rbp]
	add	eax, eax
	sub	eax, DWORD PTR -16[rbp]
	add	eax, 8
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -32[rbp], 0
	cmp	DWORD PTR -20[rbp], 0
	je	.L21
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 1
	mov	DWORD PTR -36[rbp], eax
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -32[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -32[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
	sub	DWORD PTR -36[rbp], 1
.L22:
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	add	eax, 1
	cmp	DWORD PTR -36[rbp], eax
	jg	.L23
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	jmp	.L24
.L21:
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 1
	mov	DWORD PTR -36[rbp], eax
	jmp	.L25
.L26:
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -32[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -32[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
	sub	DWORD PTR -36[rbp], 1
.L25:
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	cmp	DWORD PTR -36[rbp], eax
	jg	.L26
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
.L24:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	rax, QWORD PTR -8[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	shortestPalindrome, .-shortestPalindrome
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	shortestPalindrome
	mov	rdi, rax
	call	puts@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.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	"173579214.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\000"
	.text
	.align	2
	.global	shortestPalindrome
	.syntax unified
	.arm
	.fpu softvfp
	.type	shortestPalindrome, %function
shortestPalindrome:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L30
	bl	strdup
	mov	r3, r0
	b	.L3
.L2:
	ldr	r0, [fp, #-48]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bne	.L4
	ldr	r0, [fp, #-48]
	bl	strdup
	mov	r3, r0
	b	.L3
.L4:
	ldr	r3, [fp, #-12]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	sub	r3, r3, #1
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-12]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L5
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L5:
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L6
.L20:
	mov	r3, #1
	str	r3, [fp, #-24]
	mvn	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L7
.L11:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-48]
	add	r3, r3, r2
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, [fp, #-40]
	ldr	r3, [fp, #-32]
	add	r3, r1, r3
	mov	r1, r3
	ldr	r3, [fp, #-48]
	add	r3, r3, r1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L27
	ldr	r3, [fp, #-24]
	add	r3, r3, #2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L7:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	cmp	r3, #0
	bge	.L11
	b	.L10
.L27:
	nop
.L10:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	cmp	r3, #0
	bge	.L12
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L12
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-20]
.L12:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	bne	.L13
	ldr	r3, [fp, #-12]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L28
.L13:
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L15
.L19:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-32]
	ldr	r1, [fp, #-48]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L29
	ldr	r3, [fp, #-24]
	add	r3, r3, #2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L15:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bge	.L19
	b	.L18
.L29:
	nop
.L18:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bge	.L14
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L14
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L14
.L28:
	nop
.L14:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L6:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	ble	.L20
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #1
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	add	r3, r3, #8
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L21
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-36]
	b	.L22
.L23:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-48]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	add	r1, r3, #1
	str	r1, [fp, #-32]
	mov	r1, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r1
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	str	r3, [fp, #-36]
.L22:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	add	r3, r3, #1
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bgt	.L23
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	b	.L24
.L21:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-36]
	b	.L25
.L26:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-48]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	add	r1, r3, #1
	str	r1, [fp, #-32]
	mov	r1, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r1
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	str	r3, [fp, #-36]
.L25:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bgt	.L26
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
.L24:
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-8]
	bl	strcat
	ldr	r3, [fp, #-8]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC0
	.size	shortestPalindrome, .-shortestPalindrome
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	shortestPalindrome
	mov	r3, r0
	mov	r0, r3
	bl	puts
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
