	.file	"196454.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Select mode, 1: input binary, 2: input decimal"
.LC1:
	.string	"Error!"
.LC2:
	.string	"Input x in binary"
.LC3:
	.string	"Input p"
.LC4:
	.string	"%d"
.LC5:
	.string	"Input n"
.LC6:
	.string	"Input x in decimal"
.LC7:
	.string	"%u"
.LC8:
	.string	"Result in binary: "
.LC9:
	.string	"\nResult in decimal :%u\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	call	getchar@PLT
	mov	DWORD PTR -16[rbp], eax
	call	getchar@PLT
	cmp	eax, 10
	je	.L2
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L9
.L2:
	cmp	DWORD PTR -16[rbp], 49
	jne	.L4
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, [rax+rax]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	sub	eax, 48
	mov	DWORD PTR -20[rbp], eax
.L5:
	call	getchar@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 10
	jne	.L6
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	jmp	.L7
.L4:
	cmp	DWORD PTR -16[rbp], 50
	jne	.L8
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	jmp	.L7
.L8:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L9
.L7:
	mov	edx, DWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	invert
	mov	DWORD PTR -12[rbp], eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	printDecToBin
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L9:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	invert
	.type	invert, @function
invert:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	DWORD PTR -12[rbp], edx
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, -1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	not	eax
	mov	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	sub	eax, DWORD PTR -12[rbp]
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	xor	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	invert, .-invert
	.globl	printDecToBin
	.type	printDecToBin, @function
printDecToBin:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 0
	je	.L14
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	_printDecToBin
	jmp	.L13
.L14:
	mov	edi, 48
	call	putchar@PLT
	nop
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	printDecToBin, .-printDecToBin
	.globl	_printDecToBin
	.type	_printDecToBin, @function
_printDecToBin:
.LFB3:
	.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
	cmp	DWORD PTR -4[rbp], 0
	je	.L20
	mov	eax, DWORD PTR -4[rbp]
	shr	eax
	mov	edi, eax
	call	_printDecToBin
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 1
	add	eax, 48
	mov	edi, eax
	call	putchar@PLT
	nop
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	_printDecToBin, .-_printDecToBin
	.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	"196454.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Select mode, 1: input binary, 2: input decimal\000"
	.align	2
.LC1:
	.ascii	"Error!\000"
	.align	2
.LC2:
	.ascii	"Input x in binary\000"
	.align	2
.LC3:
	.ascii	"Input p\000"
	.align	2
.LC4:
	.ascii	"%d\000"
	.align	2
.LC5:
	.ascii	"Input n\000"
	.align	2
.LC6:
	.ascii	"Input x in decimal\000"
	.align	2
.LC7:
	.ascii	"%u\000"
	.align	2
.LC8:
	.ascii	"Result in binary: \000"
	.align	2
.LC9:
	.ascii	"\012Result in decimal :%u\012\000"
	.align	2
.LC10:
	.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, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L11+4
	bl	puts
	bl	getchar
	str	r0, [fp, #-16]
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	beq	.L2
	ldr	r0, .L11+8
	bl	puts
	mov	r3, #1
	b	.L9
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #49
	bne	.L4
	ldr	r0, .L11+12
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L5
.L6:
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #1
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	sub	r3, r3, #48
	str	r3, [fp, #-20]
.L5:
	bl	getchar
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #10
	bne	.L6
	ldr	r0, .L11+16
	bl	puts
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L11+20
	bl	__isoc99_scanf
	bl	getchar
	ldr	r0, .L11+24
	bl	puts
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L11+20
	bl	__isoc99_scanf
	bl	getchar
	b	.L7
.L4:
	ldr	r3, [fp, #-16]
	cmp	r3, #50
	bne	.L8
	ldr	r0, .L11+28
	bl	puts
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L11+32
	bl	__isoc99_scanf
	bl	getchar
	ldr	r0, .L11+16
	bl	puts
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L11+20
	bl	__isoc99_scanf
	bl	getchar
	ldr	r0, .L11+24
	bl	puts
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L11+20
	bl	__isoc99_scanf
	bl	getchar
	b	.L7
.L8:
	ldr	r0, .L11+8
	bl	puts
	mov	r3, #1
	b	.L9
.L7:
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-24]
	mov	r0, r3
	bl	invert
	str	r0, [fp, #-12]
	ldr	r0, .L11+36
	bl	printf
	ldr	r0, [fp, #-12]
	bl	printDecToBin
	ldr	r1, [fp, #-12]
	ldr	r0, .L11+40
	bl	printf
	mov	r3, #0
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC10
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.align	2
	.global	invert
	.syntax unified
	.arm
	.fpu softvfp
	.type	invert, %function
invert:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	mvn	r2, #0
	ldr	r3, [fp, #-16]
	lsl	r3, r2, r3
	mvn	r2, r3
	ldr	r3, [fp, #-12]
	add	r1, r3, #1
	ldr	r3, [fp, #-16]
	sub	r3, r1, r3
	lsl	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-8]
	eor	r3, r3, r2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	invert, .-invert
	.align	2
	.global	printDecToBin
	.syntax unified
	.arm
	.fpu softvfp
	.type	printDecToBin, %function
printDecToBin:
	@ 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]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L16
	ldr	r0, [fp, #-8]
	bl	_printDecToBin
	b	.L15
.L16:
	mov	r0, #48
	bl	putchar
	nop
.L15:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	printDecToBin, .-printDecToBin
	.align	2
	.global	_printDecToBin
	.syntax unified
	.arm
	.fpu softvfp
	.type	_printDecToBin, %function
_printDecToBin:
	@ 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]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #1
	mov	r0, r3
	bl	_printDecToBin
	ldr	r3, [fp, #-8]
	and	r3, r3, #1
	add	r3, r3, #48
	mov	r0, r3
	bl	putchar
	nop
.L22:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	_printDecToBin, .-_printDecToBin
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
