	.file	"446784.c"
	.intel_syntax noprefix
	.text
	.globl	strrev
	.type	strrev, @function
strrev:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L3
.L2:
	mov	rax, QWORD PTR -24[rbp]
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	jmp	.L5
.L6:
	mov	rax, QWORD PTR -16[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	xor	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -8[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	xor	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -16[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	xor	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -16[rbp], 1
	sub	QWORD PTR -8[rbp], 1
.L5:
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	ja	.L6
	mov	rax, QWORD PTR -24[rbp]
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	strrev, .-strrev
	.globl	to_base
	.type	to_base, @function
to_base:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	edi, 255
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	WORD PTR -14[rbp], 0
	jmp	.L8
.L11:
	mov	eax, DWORD PTR -20[rbp]
	cdq
	idiv	DWORD PTR -24[rbp]
	mov	DWORD PTR -12[rbp], edx
	cmp	DWORD PTR -12[rbp], 9
	jle	.L9
	mov	eax, DWORD PTR -12[rbp]
	lea	ecx, 55[rax]
	movzx	eax, WORD PTR -14[rbp]
	mov	edx, eax
	add	edx, 1
	mov	WORD PTR -14[rbp], dx
	movsx	rdx, ax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -12[rbp]
	lea	ecx, 48[rax]
	movzx	eax, WORD PTR -14[rbp]
	mov	edx, eax
	add	edx, 1
	mov	WORD PTR -14[rbp], dx
	movsx	rdx, ax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
.L10:
	mov	eax, DWORD PTR -20[rbp]
	cdq
	idiv	DWORD PTR -24[rbp]
	mov	DWORD PTR -20[rbp], eax
.L8:
	cmp	DWORD PTR -20[rbp], 0
	jg	.L11
	movzx	eax, WORD PTR -14[rbp]
	mov	edx, eax
	add	edx, 1
	mov	WORD PTR -14[rbp], dx
	movsx	rdx, ax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strrev
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	to_base, .-to_base
	.globl	from_base
	.type	from_base, @function
from_base:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L14
.L17:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 64
	jle	.L15
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 55
	mov	DWORD PTR -12[rbp], eax
	jmp	.L16
.L15:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -12[rbp], eax
.L16:
	mov	eax, DWORD PTR -16[rbp]
	imul	eax, DWORD PTR -28[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -16[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L14:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L17
	mov	eax, DWORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	from_base, .-from_base
	.section	.rodata
	.align 8
.LC0:
	.string	"1. from base to decimal / 2. from decimal to base"
.LC1:
	.string	"%d"
.LC2:
	.string	"%s%d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 1
	jne	.L20
	mov	edi, 255
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	lea	rdx, -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	from_base
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L21
.L20:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 2
	jne	.L21
	lea	rdx, -20[rbp]
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, edx
	mov	edi, eax
	call	to_base
	mov	rdi, rax
	call	puts@PLT
.L21:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"446784.c"
	.text
	.align	2
	.global	strrev
	.syntax unified
	.arm
	.fpu softvfp
	.type	strrev, %function
strrev:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L3
.L2:
	ldr	r3, [fp, #-16]
	b	.L4
.L3:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	b	.L5
.L6:
	ldr	r3, [fp, #-12]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r2, r3, #255
	ldr	r3, [fp, #-12]
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r2, r3, #255
	ldr	r3, [fp, #-12]
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L5:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bhi	.L6
	ldr	r3, [fp, #-16]
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	strrev, .-strrev
	.global	__aeabi_idivmod
	.global	__aeabi_idiv
	.align	2
	.global	to_base
	.syntax unified
	.arm
	.fpu softvfp
	.type	to_base, %function
to_base:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r0, #255
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r3, #0
	strh	r3, [fp, #-14]	@ movhi
	b	.L8
.L11:
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #9
	ble	.L9
	ldr	r3, [fp, #-8]
	and	r2, r3, #255
	ldrsh	r3, [fp, #-14]
	lsl	r1, r3, #16
	lsr	r1, r1, #16
	add	r1, r1, #1
	lsl	r1, r1, #16
	lsr	r1, r1, #16
	strh	r1, [fp, #-14]	@ movhi
	mov	r1, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, r1
	add	r2, r2, #55
	and	r2, r2, #255
	strb	r2, [r3]
	b	.L10
.L9:
	ldr	r3, [fp, #-8]
	and	r2, r3, #255
	ldrsh	r3, [fp, #-14]
	lsl	r1, r3, #16
	lsr	r1, r1, #16
	add	r1, r1, #1
	lsl	r1, r1, #16
	lsr	r1, r1, #16
	strh	r1, [fp, #-14]	@ movhi
	mov	r1, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, r1
	add	r2, r2, #48
	and	r2, r2, #255
	strb	r2, [r3]
.L10:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-24]
.L8:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bgt	.L11
	ldrsh	r3, [fp, #-14]
	lsl	r2, r3, #16
	lsr	r2, r2, #16
	add	r2, r2, #1
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	strh	r2, [fp, #-14]	@ movhi
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, [fp, #-12]
	bl	strrev
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	to_base, .-to_base
	.align	2
	.global	from_base
	.syntax unified
	.arm
	.fpu softvfp
	.type	from_base, %function
from_base:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L14
.L17:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L15
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #55
	str	r3, [fp, #-16]
	b	.L16
.L15:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-16]
.L16:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	mul	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L14:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L17
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	from_base, .-from_base
	.section	.rodata
	.align	2
.LC0:
	.ascii	"1. from base to decimal / 2. from decimal to base\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"%s%d\000"
	.align	2
.LC3:
	.ascii	"%d\012\000"
	.align	2
.LC4:
	.ascii	"%d%d\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L24+4
	bl	puts
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L24+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L20
	mov	r0, #255
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	sub	r3, fp, #16
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, .L24+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	from_base
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L24+16
	bl	printf
	b	.L21
.L20:
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bne	.L21
	sub	r2, fp, #16
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L24+20
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	to_base
	mov	r3, r0
	mov	r0, r3
	bl	puts
.L21:
	mov	r3, #0
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
