	.file	"133942.c"
	.intel_syntax noprefix
	.text
	.globl	convertedNumber
	.bss
	.align 32
	.type	convertedNumber, @object
	.size	convertedNumber, 256
convertedNumber:
	.zero	256
	.globl	numberToConvert
	.align 8
	.type	numberToConvert, @object
	.size	numberToConvert, 8
numberToConvert:
	.zero	8
	.globl	base
	.align 4
	.type	base, @object
	.size	base, 4
base:
	.zero	4
	.globl	digit
	.align 4
	.type	digit, @object
	.size	digit, 4
digit:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Number to be converted? "
.LC1:
	.string	"%li"
.LC2:
	.string	"Base? "
.LC3:
	.string	"%i"
	.align 8
.LC4:
	.string	"Bad base - must be between 2 and 16"
	.text
	.globl	getNumberAndBase
	.type	getNumberAndBase, @function
getNumberAndBase:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, numberToConvert[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L2
.L4:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, base[rip]
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR base[rip]
	cmp	eax, 1
	jle	.L3
	mov	eax, DWORD PTR base[rip]
	cmp	eax, 16
	jle	.L2
.L3:
	lea	rdi, .LC4[rip]
	call	puts@PLT
.L2:
	mov	eax, DWORD PTR base[rip]
	cmp	eax, 1
	jle	.L4
	mov	eax, DWORD PTR base[rip]
	cmp	eax, 16
	jg	.L4
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getNumberAndBase, .-getNumberAndBase
	.globl	convertNumber
	.type	convertNumber, @function
convertNumber:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
.L6:
	mov	rax, QWORD PTR numberToConvert[rip]
	mov	edx, DWORD PTR base[rip]
	movsx	rcx, edx
	cqo
	idiv	rcx
	mov	eax, DWORD PTR digit[rip]
	mov	ecx, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, convertedNumber[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR digit[rip]
	add	eax, 1
	mov	DWORD PTR digit[rip], eax
	mov	rax, QWORD PTR numberToConvert[rip]
	mov	edx, DWORD PTR base[rip]
	movsx	rsi, edx
	cqo
	idiv	rsi
	mov	QWORD PTR numberToConvert[rip], rax
	mov	rax, QWORD PTR numberToConvert[rip]
	test	rax, rax
	jne	.L6
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	convertNumber, .-convertNumber
	.section	.rodata
.LC5:
	.string	"Converted number = "
	.text
	.globl	displayConvertedNumber
	.type	displayConvertedNumber, @function
displayConvertedNumber:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 3978425819141910832
	movabs	rdx, 5063528411713059128
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR digit[rip]
	sub	eax, 1
	mov	DWORD PTR digit[rip], eax
	jmp	.L8
.L9:
	mov	eax, DWORD PTR digit[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, convertedNumber[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	eax, BYTE PTR -32[rbp+rax]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	mov	eax, DWORD PTR digit[rip]
	sub	eax, 1
	mov	DWORD PTR digit[rip], eax
.L8:
	mov	eax, DWORD PTR digit[rip]
	test	eax, eax
	jns	.L9
	mov	edi, 10
	call	putchar@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	displayConvertedNumber, .-displayConvertedNumber
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	getNumberAndBase
	call	convertNumber
	call	displayConvertedNumber
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	"133942.c"
	.text
	.comm	convertedNumber,256,4
	.comm	numberToConvert,4,4
	.global	base
	.bss
	.align	2
	.type	base, %object
	.size	base, 4
base:
	.space	4
	.global	digit
	.align	2
	.type	digit, %object
	.size	digit, 4
digit:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Number to be converted? \000"
	.align	2
.LC1:
	.ascii	"%li\000"
	.align	2
.LC2:
	.ascii	"Base? \000"
	.align	2
.LC3:
	.ascii	"%i\000"
	.align	2
.LC4:
	.ascii	"Bad base - must be between 2 and 16\000"
	.text
	.align	2
	.global	getNumberAndBase
	.syntax unified
	.arm
	.fpu softvfp
	.type	getNumberAndBase, %function
getNumberAndBase:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L5
	bl	printf
	ldr	r1, .L5+4
	ldr	r0, .L5+8
	bl	__isoc99_scanf
	b	.L2
.L4:
	ldr	r0, .L5+12
	bl	printf
	ldr	r1, .L5+16
	ldr	r0, .L5+20
	bl	__isoc99_scanf
	ldr	r3, .L5+16
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L3
	ldr	r3, .L5+16
	ldr	r3, [r3]
	cmp	r3, #16
	ble	.L2
.L3:
	ldr	r0, .L5+24
	bl	puts
.L2:
	ldr	r3, .L5+16
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L4
	ldr	r3, .L5+16
	ldr	r3, [r3]
	cmp	r3, #16
	bgt	.L4
	nop
	nop
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	numberToConvert
	.word	.LC1
	.word	.LC2
	.word	base
	.word	.LC3
	.word	.LC4
	.size	getNumberAndBase, .-getNumberAndBase
	.global	__aeabi_idivmod
	.global	__aeabi_idiv
	.align	2
	.global	convertNumber
	.syntax unified
	.arm
	.fpu softvfp
	.type	convertNumber, %function
convertNumber:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
.L8:
	ldr	r3, .L9
	ldr	r3, [r3]
	ldr	r2, .L9+4
	ldr	r2, [r2]
	ldr	r1, .L9+8
	ldr	r4, [r1]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L9+12
	str	r2, [r3, r4, lsl #2]
	ldr	r3, .L9+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9+8
	str	r3, [r2]
	ldr	r3, .L9
	ldr	r3, [r3]
	ldr	r2, .L9+4
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L9
	str	r2, [r3]
	ldr	r3, .L9
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	nop
	nop
	pop	{r4, r5, fp, pc}
.L10:
	.align	2
.L9:
	.word	numberToConvert
	.word	base
	.word	digit
	.word	convertedNumber
	.size	convertNumber, .-convertNumber
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Converted number = \000"
	.align	2
.LC5:
	.ascii	"0123456789ABCDEF"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	displayConvertedNumber
	.syntax unified
	.arm
	.fpu softvfp
	.type	displayConvertedNumber, %function
displayConvertedNumber:
	@ 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, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L15+4
	sub	ip, fp, #24
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r0, .L15+8
	bl	printf
	ldr	r3, .L15+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L15+12
	str	r3, [r2]
	b	.L12
.L13:
	ldr	r3, .L15+12
	ldr	r3, [r3]
	ldr	r2, .L15+16
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-28]
	sub	r2, fp, #24
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, .L15+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L15+12
	str	r3, [r2]
.L12:
	ldr	r3, .L15+12
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L13
	mov	r0, #10
	bl	putchar
	nop
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC7
	.word	.LC5
	.word	.LC6
	.word	digit
	.word	convertedNumber
	.size	displayConvertedNumber, .-displayConvertedNumber
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	getNumberAndBase
	bl	convertNumber
	bl	displayConvertedNumber
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
