	.file	"47032.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Invalid hexadecimal input: %c\n"
	.text
	.globl	hex_to_oct
	.type	hex_to_oct, @function
hex_to_oct:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	edx, 23
	mov	esi, 0
	lea	rdi, octal.0[rip]
	call	memset@PLT
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	cmp	QWORD PTR -40[rbp], 0
	jne	.L4
	lea	rax, octal.0[rip]
	jmp	.L3
.L10:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -18[rbp], al
	cmp	BYTE PTR -18[rbp], 47
	jle	.L5
	cmp	BYTE PTR -18[rbp], 57
	jg	.L5
	movzx	eax, BYTE PTR -18[rbp]
	sub	eax, 48
	mov	BYTE PTR -18[rbp], al
	jmp	.L6
.L5:
	cmp	BYTE PTR -18[rbp], 96
	jle	.L7
	cmp	BYTE PTR -18[rbp], 102
	jg	.L7
	movzx	eax, BYTE PTR -18[rbp]
	sub	eax, 87
	mov	BYTE PTR -18[rbp], al
	jmp	.L6
.L7:
	cmp	BYTE PTR -18[rbp], 64
	jle	.L8
	cmp	BYTE PTR -18[rbp], 70
	jg	.L8
	movzx	eax, BYTE PTR -18[rbp]
	sub	eax, 55
	mov	BYTE PTR -18[rbp], al
	jmp	.L6
.L8:
	movsx	eax, BYTE PTR -18[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L6:
	sal	QWORD PTR -8[rbp], 4
	movsx	rax, BYTE PTR -18[rbp]
	add	QWORD PTR -8[rbp], rax
	add	QWORD PTR -40[rbp], 1
.L4:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	je	.L9
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L10
.L9:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L11
	mov	BYTE PTR octal.0[rip], 48
	mov	DWORD PTR -12[rbp], 1
	jmp	.L12
.L11:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -8[rbp]
	and	eax, 7
	add	eax, 48
	mov	ecx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, octal.0[rip]
	mov	BYTE PTR [rax+rdx], cl
	add	DWORD PTR -16[rbp], 1
	mov	rax, QWORD PTR -8[rbp]
	shr	rax, 3
	mov	QWORD PTR -8[rbp], rax
.L13:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L14
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -12[rbp], eax
.L12:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, octal.0[rip]
	mov	BYTE PTR [rax+rdx], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, octal.0[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	mov	BYTE PTR -17[rbp], al
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	cdqe
	lea	rdx, octal.0[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rcx, octal.0[rip]
	mov	BYTE PTR [rax+rcx], dl
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	cdqe
	lea	rcx, octal.0[rip]
	movzx	edx, BYTE PTR -17[rbp]
	mov	BYTE PTR [rax+rcx], dl
	add	DWORD PTR -16[rbp], 1
.L15:
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR -16[rbp], eax
	jl	.L16
	lea	rax, octal.0[rip]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	hex_to_oct, .-hex_to_oct
	.section	.rodata
	.align 8
.LC1:
	.string	"Enter any hexadecimal number: "
.LC2:
	.string	"Hexadecimal number = %s\n"
.LC3:
	.string	"Octal number = %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -32[rbp]
	mov	esi, 17
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	hex_to_oct
	mov	QWORD PTR -40[rbp], rax
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.local	octal.0
	.comm	octal.0,23,16
	.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	"47032.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Invalid hexadecimal input: %c\012\000"
	.text
	.align	2
	.global	hex_to_oct
	.syntax unified
	.arm
	.fpu softvfp
	.type	hex_to_oct, %function
hex_to_oct:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	str	r0, [fp, #-40]
	mov	r2, #23
	mov	r1, #0
	ldr	r0, .L17
	bl	memset
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L17
	b	.L3
.L10:
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]
	strb	r3, [fp, #-30]
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L5
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L5
	ldrb	r3, [fp, #-30]
	sub	r3, r3, #48
	strb	r3, [fp, #-30]
	b	.L6
.L5:
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L7
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	cmp	r3, #102
	bhi	.L7
	ldrb	r3, [fp, #-30]
	sub	r3, r3, #87
	strb	r3, [fp, #-30]
	b	.L6
.L7:
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L8
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	cmp	r3, #70
	bhi	.L8
	ldrb	r3, [fp, #-30]
	sub	r3, r3, #55
	strb	r3, [fp, #-30]
	b	.L6
.L8:
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L17+4
	bl	printf
	b	.L9
.L6:
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #4
	orr	r3, r3, r0, lsr #28
	lsl	r2, r0, #4
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	ldrb	r2, [fp, #-30]	@ zero_extendqisi2
	mov	r3, #0
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	adds	r4, r0, r2
	adc	r5, r1, r3
	str	r4, [fp, #-20]
	str	r5, [fp, #-16]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L4:
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L9
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L10
.L9:
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L11
	ldr	r3, .L17
	mov	r2, #48
	strb	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L12
.L11:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L13
.L14:
	ldrb	r3, [fp, #-20]	@ zero_extendqisi2
	and	r3, r3, #7
	and	r3, r3, #255
	add	r3, r3, #48
	and	r1, r3, #255
	ldr	r2, .L17
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	mov	r2, #0
	mov	r3, #0
	lsr	r2, r0, #3
	orr	r2, r2, r1, lsl #29
	lsr	r3, r1, #3
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
.L13:
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L14
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-24]
.L12:
	ldr	r2, .L17
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L15
.L16:
	ldr	r2, .L17
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-29]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, .L17
	ldrb	r1, [r2, r3]	@ zero_extendqisi2
	ldr	r2, .L17
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	sub	r3, r3, #1
	ldr	r1, .L17
	ldrb	r2, [fp, #-29]
	strb	r2, [r1, r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L15:
	ldr	r3, [fp, #-24]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-28]
	cmp	r3, r2
	blt	.L16
	ldr	r3, .L17
.L3:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L18:
	.align	2
.L17:
	.word	octal.4781
	.word	.LC0
	.size	hex_to_oct, .-hex_to_oct
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Enter any hexadecimal number: \000"
	.align	2
.LC2:
	.ascii	"Hexadecimal number = %s\012\000"
	.align	2
.LC3:
	.ascii	"Octal number = %s\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L22+4
	bl	printf
	ldr	r3, .L22+8
	ldr	r2, [r3]
	sub	r3, fp, #28
	mov	r1, #17
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #28
	mov	r0, r3
	bl	hex_to_oct
	str	r0, [fp, #-32]
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L22+12
	bl	printf
	ldr	r1, [fp, #-32]
	ldr	r0, .L22+16
	bl	printf
	mov	r3, #0
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC4
	.word	.LC1
	.word	stdin
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.local	octal.4781
	.comm	octal.4781,23,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
