	.file	"390199.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Enter integers and see them in binary."
	.align 8
.LC1:
	.string	"Non-numeric input terminates program."
.LC2:
	.string	"%d is \n0"
	.align 8
.LC3:
	.string	"Inverting the last 3 bits gives"
.LC4:
	.string	"%d"
.LC5:
	.string	"Bye!"
	.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	itobs
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	show_bstr
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, 4
	mov	edi, eax
	call	invert_end
	mov	DWORD PTR -52[rbp], eax
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	itobs
	mov	rdi, rax
	call	show_bstr
	mov	edi, 10
	call	putchar@PLT
.L2:
	lea	rax, -52[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 1
	je	.L3
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	itobs
	.type	itobs, @function
itobs:
.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 -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, DWORD PTR size.0[rip]
	sub	eax, 1
	mov	DWORD PTR -4[rbp], eax
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -20[rbp]
	and	eax, 1
	lea	ecx, 48[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	sub	DWORD PTR -4[rbp], 1
	sar	DWORD PTR -20[rbp]
.L7:
	cmp	DWORD PTR -4[rbp], 0
	jns	.L8
	mov	eax, DWORD PTR size.0[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -32[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	itobs, .-itobs
	.globl	show_bstr
	.type	show_bstr, @function
show_bstr:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 3
	test	eax, eax
	jne	.L11
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L11
	mov	edi, 32
	call	putchar@PLT
.L11:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L12
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	show_bstr, .-show_bstr
	.globl	invert_end
	.type	invert_end, @function
invert_end:
.LFB3:
	.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 -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 1
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -4[rbp]
	or	DWORD PTR -8[rbp], eax
	sal	DWORD PTR -4[rbp]
.L14:
	mov	eax, DWORD PTR -24[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -24[rbp], edx
	test	eax, eax
	jg	.L15
	mov	eax, DWORD PTR -20[rbp]
	xor	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	invert_end, .-invert_end
	.section	.rodata
	.align 4
	.type	size.0, @object
	.size	size.0, 4
size.0:
	.long	32
	.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	"390199.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter integers and see them in binary.\000"
	.align	2
.LC1:
	.ascii	"Non-numeric input terminates program.\000"
	.align	2
.LC2:
	.ascii	"%d is \0120\000"
	.align	2
.LC3:
	.ascii	"Inverting the last 3 bits gives\000"
	.align	2
.LC4:
	.ascii	"%d\000"
	.align	2
.LC5:
	.ascii	"Bye!\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L6+4
	bl	puts
	ldr	r0, .L6+8
	bl	puts
	b	.L2
.L3:
	ldr	r3, [fp, #-48]
	sub	r2, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	itobs
	ldr	r3, [fp, #-48]
	mov	r1, r3
	ldr	r0, .L6+12
	bl	printf
	sub	r3, fp, #44
	mov	r0, r3
	bl	show_bstr
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-48]
	mov	r1, #4
	mov	r0, r3
	bl	invert_end
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r0, .L6+16
	bl	puts
	ldr	r3, [fp, #-48]
	sub	r2, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	itobs
	mov	r3, r0
	mov	r0, r3
	bl	show_bstr
	mov	r0, #10
	bl	putchar
.L2:
	sub	r3, fp, #48
	mov	r1, r3
	ldr	r0, .L6+20
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #1
	beq	.L3
	ldr	r0, .L6+24
	bl	puts
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.align	2
	.global	itobs
	.syntax unified
	.arm
	.fpu softvfp
	.type	itobs, %function
itobs:
	@ 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, #-16]
	str	r1, [fp, #-20]
	ldr	r3, .L12
	ldr	r3, [r3]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L9
.L10:
	ldr	r3, [fp, #-16]
	and	r3, r3, #255
	and	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	add	r2, r2, #48
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	asr	r3, r3, #1
	str	r3, [fp, #-16]
.L9:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L10
	ldr	r3, .L12
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-20]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L13:
	.align	2
.L12:
	.word	size.4619
	.size	itobs, .-itobs
	.align	2
	.global	show_bstr
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_bstr, %function
show_bstr:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L15
.L16:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	and	r3, r3, #3
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L15
	mov	r0, #32
	bl	putchar
.L15:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L16
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	show_bstr, .-show_bstr
	.align	2
	.global	invert_end
	.syntax unified
	.arm
	.fpu softvfp
	.type	invert_end, %function
invert_end:
	@ 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, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L18
.L19:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	orr	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #1
	str	r3, [fp, #-8]
.L18:
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	str	r2, [fp, #-20]
	cmp	r3, #0
	bgt	.L19
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	eor	r3, r3, r2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	invert_end, .-invert_end
	.section	.rodata
	.align	2
	.type	size.4619, %object
	.size	size.4619, 4
size.4619:
	.word	32
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
