	.file	"826980.c"
	.intel_syntax noprefix
	.text
	.globl	reverse_high4bits
	.type	reverse_high4bits, @function
reverse_high4bits:
.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	eax, edi
	mov	BYTE PTR -20[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -15[rbp], 0
	mov	DWORD PTR -12[rbp], 50397696
	movzx	eax, BYTE PTR -20[rbp]
	shr	al, 4
	and	eax, 3
	mov	BYTE PTR -14[rbp], al
	movzx	eax, BYTE PTR -14[rbp]
	cdqe
	movzx	eax, BYTE PTR -12[rbp+rax]
	mov	BYTE PTR -14[rbp], al
	movzx	eax, BYTE PTR -20[rbp]
	shr	al, 6
	mov	BYTE PTR -13[rbp], al
	movzx	eax, BYTE PTR -13[rbp]
	cdqe
	movzx	eax, BYTE PTR -12[rbp+rax]
	mov	BYTE PTR -13[rbp], al
	movzx	eax, BYTE PTR -14[rbp]
	sal	eax, 6
	mov	edx, eax
	movzx	eax, BYTE PTR -13[rbp]
	sal	eax, 4
	or	eax, edx
	mov	BYTE PTR -15[rbp], al
	movzx	eax, BYTE PTR -15[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	reverse_high4bits, .-reverse_high4bits
	.globl	to_bits
	.type	to_bits, @function
to_bits:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -28[rbp], al
	mov	DWORD PTR -4[rbp], 0
	jmp	.L5
.L6:
	movzx	edx, BYTE PTR -28[rbp]
	mov	eax, 7
	sub	eax, DWORD PTR -4[rbp]
	mov	ecx, eax
	sar	edx, cl
	mov	eax, edx
	and	eax, 1
	lea	ecx, 48[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -4[rbp], 1
.L5:
	cmp	DWORD PTR -4[rbp], 7
	jle	.L6
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	to_bits, .-to_bits
	.section	.rodata
.LC0:
	.string	"d[%2d]=0b%s, r[%2d]=0b%s\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 224
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -212[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -212[rbp]
	sal	eax, 4
	mov	edx, eax
	mov	eax, DWORD PTR -212[rbp]
	cdqe
	mov	BYTE PTR -208[rbp+rax], dl
	add	DWORD PTR -212[rbp], 1
.L8:
	cmp	DWORD PTR -212[rbp], 15
	jle	.L9
	mov	DWORD PTR -212[rbp], 0
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -212[rbp]
	cdqe
	movzx	eax, BYTE PTR -208[rbp+rax]
	movzx	eax, al
	mov	edi, eax
	call	reverse_high4bits
	mov	edx, DWORD PTR -212[rbp]
	movsx	rdx, edx
	mov	BYTE PTR -192[rbp+rdx], al
	add	DWORD PTR -212[rbp], 1
.L10:
	cmp	DWORD PTR -212[rbp], 15
	jle	.L11
	mov	DWORD PTR -212[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -212[rbp]
	cdqe
	movzx	eax, BYTE PTR -208[rbp+rax]
	movzx	edx, al
	lea	rax, -176[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	to_bits
	mov	eax, DWORD PTR -212[rbp]
	cdqe
	movzx	eax, BYTE PTR -192[rbp+rax]
	movzx	edx, al
	lea	rax, -96[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	to_bits
	mov	rax, QWORD PTR stdout[rip]
	lea	rdi, -96[rbp]
	mov	esi, DWORD PTR -212[rbp]
	lea	rcx, -176[rbp]
	mov	edx, DWORD PTR -212[rbp]
	mov	r9, rdi
	mov	r8d, esi
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -212[rbp], 1
.L12:
	cmp	DWORD PTR -212[rbp], 15
	jle	.L13
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"826980.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	reverse_high4bits
	.syntax unified
	.arm
	.fpu softvfp
	.type	reverse_high4bits, %function
reverse_high4bits:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, r0
	strb	r3, [fp, #-21]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strb	r3, [fp, #-15]
	ldr	r3, .L4+4
	str	r3, [fp, #-12]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	lsr	r3, r3, #4
	and	r3, r3, #255
	and	r3, r3, #3
	strb	r3, [fp, #-14]
	ldrb	r3, [fp, #-14]	@ zero_extendqisi2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-8]
	strb	r3, [fp, #-14]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	lsr	r3, r3, #6
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-8]
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-14]	@ zero_extendqisi2
	lsl	r3, r3, #6
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	lsl	r3, r3, #4
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	strb	r3, [fp, #-15]
	ldrb	r3, [fp, #-15]	@ zero_extendqisi2
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	50397696
	.size	reverse_high4bits, .-reverse_high4bits
	.align	2
	.global	to_bits
	.syntax unified
	.arm
	.fpu softvfp
	.type	to_bits, %function
to_bits:
	@ 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]
	mov	r3, r1
	strb	r3, [fp, #-17]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L7
.L8:
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	rsb	r3, r3, #7
	asr	r3, r2, r3
	and	r3, r3, #255
	and	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	add	r2, r2, #48
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r3, [fp, #-8]
	cmp	r3, #7
	ble	.L8
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	to_bits, .-to_bits
	.section	.rodata
	.align	2
.LC1:
	.ascii	"d[%2d]=0b%s, r[%2d]=0b%s\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 200
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #208
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-204]
	b	.L10
.L11:
	ldr	r3, [fp, #-204]
	and	r3, r3, #255
	lsl	r3, r3, #4
	and	r1, r3, #255
	sub	r2, fp, #200
	ldr	r3, [fp, #-204]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-204]
	add	r3, r3, #1
	str	r3, [fp, #-204]
.L10:
	ldr	r3, [fp, #-204]
	cmp	r3, #15
	ble	.L11
	mov	r3, #0
	str	r3, [fp, #-204]
	b	.L12
.L13:
	sub	r2, fp, #200
	ldr	r3, [fp, #-204]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	reverse_high4bits
	mov	r3, r0
	mov	r1, r3
	sub	r2, fp, #184
	ldr	r3, [fp, #-204]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-204]
	add	r3, r3, #1
	str	r3, [fp, #-204]
.L12:
	ldr	r3, [fp, #-204]
	cmp	r3, #15
	ble	.L13
	mov	r3, #0
	str	r3, [fp, #-204]
	b	.L14
.L15:
	sub	r2, fp, #200
	ldr	r3, [fp, #-204]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	sub	r3, fp, #168
	mov	r1, r2
	mov	r0, r3
	bl	to_bits
	sub	r2, fp, #184
	ldr	r3, [fp, #-204]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	sub	r3, fp, #88
	mov	r1, r2
	mov	r0, r3
	bl	to_bits
	ldr	r3, .L18+4
	ldr	r0, [r3]
	sub	r2, fp, #168
	sub	r3, fp, #88
	str	r3, [sp, #4]
	ldr	r3, [fp, #-204]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-204]
	ldr	r1, .L18+8
	bl	fprintf
	ldr	r3, [fp, #-204]
	add	r3, r3, #1
	str	r3, [fp, #-204]
.L14:
	ldr	r3, [fp, #-204]
	cmp	r3, #15
	ble	.L15
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC2
	.word	stdout
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
