	.file	"8805.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%u"
.LC1:
	.string	""
	.text
	.globl	print_bits
	.type	print_bits, @function
print_bits:
.LFB6:
	.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	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	sub	eax, 1
	mov	DWORD PTR -16[rbp], eax
	jmp	.L2
.L5:
	mov	DWORD PTR -12[rbp], 7
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	eax, DWORD PTR -12[rbp]
	mov	ecx, eax
	sar	edx, cl
	mov	eax, edx
	and	eax, 1
	mov	BYTE PTR -17[rbp], al
	movzx	eax, BYTE PTR -17[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	sub	DWORD PTR -12[rbp], 1
.L3:
	cmp	DWORD PTR -12[rbp], 0
	jns	.L4
	sub	DWORD PTR -16[rbp], 1
.L2:
	cmp	DWORD PTR -16[rbp], 0
	jns	.L5
	lea	rdi, .LC1[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_bits, .-print_bits
	.section	.rodata
.LC2:
	.string	"The pattern is too long!"
.LC3:
	.string	"=====R===== "
.LC4:
	.string	"%s\n%x "
	.align 8
.LC5:
	.string	"=====pattern_mask of each char of the pattern====="
.LC6:
	.string	"%x\t"
.LC7:
	.string	"=====finding a match====="
.LC8:
	.string	"\n%s\n"
.LC9:
	.string	"pattern_mask of the text  "
.LC10:
	.string	"\n%s"
.LC11:
	.string	"R                         "
.LC12:
	.string	"%s"
	.align 8
.LC13:
	.string	"R & (1UL << pattern_len)            "
	.text
	.globl	bitap_bitwise_search
	.type	bitap_bitwise_search, @function
bitap_bitwise_search:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1088
	mov	QWORD PTR -1080[rbp], rdi
	mov	QWORD PTR -1088[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1088[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1052[rbp], eax
	mov	rax, QWORD PTR -1088[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L7
	mov	rax, QWORD PTR -1080[rbp]
	jmp	.L17
.L7:
	cmp	DWORD PTR -1052[rbp], 31
	jle	.L9
	lea	rax, .LC2[rip]
	jmp	.L17
.L9:
	mov	QWORD PTR -1048[rbp], -2
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdx, rax
	lea	rsi, .LC3[rip]
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1048[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	print_bits
	mov	DWORD PTR -1056[rbp], 0
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -1056[rbp]
	cdqe
	mov	QWORD PTR -1040[rbp+rax*8], -1
	add	DWORD PTR -1056[rbp], 1
.L10:
	cmp	DWORD PTR -1056[rbp], 127
	jle	.L11
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	DWORD PTR -1056[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -1056[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1088[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cdqe
	mov	rdx, QWORD PTR -1040[rbp+rax*8]
	mov	eax, DWORD PTR -1056[rbp]
	mov	esi, 1
	mov	ecx, eax
	sal	rsi, cl
	mov	rax, rsi
	not	rax
	mov	rsi, rax
	mov	eax, DWORD PTR -1056[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -1088[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	and	rdx, rsi
	cdqe
	mov	QWORD PTR -1040[rbp+rax*8], rdx
	mov	eax, DWORD PTR -1056[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1088[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cdqe
	mov	rax, QWORD PTR -1040[rbp+rax*8]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1056[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1088[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	rdx, -1040[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rsi, rax
	mov	edi, 1
	call	print_bits
	add	DWORD PTR -1056[rbp], 1
.L12:
	mov	eax, DWORD PTR -1056[rbp]
	cmp	eax, DWORD PTR -1052[rbp]
	jl	.L13
	lea	rsi, .LC7[rip]
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -1056[rbp], 0
	jmp	.L14
.L16:
	lea	rsi, .LC9[rip]
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1056[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1080[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	rdx, -1040[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rsi, rax
	mov	edi, 1
	call	print_bits
	mov	eax, DWORD PTR -1056[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1080[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cdqe
	mov	rdx, QWORD PTR -1040[rbp+rax*8]
	mov	rax, QWORD PTR -1048[rbp]
	or	rax, rdx
	mov	QWORD PTR -1048[rbp], rax
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rax
	mov	QWORD PTR -1048[rbp], rax
	lea	rsi, .LC11[rip]
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1048[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	print_bits
	mov	eax, DWORD PTR -1052[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	mov	edx, eax
	mov	rax, QWORD PTR -1048[rbp]
	and	eax, edx
	mov	DWORD PTR -1060[rbp], eax
	lea	rsi, .LC13[rip]
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1060[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	print_bits
	mov	rdx, QWORD PTR -1048[rbp]
	mov	eax, DWORD PTR -1052[rbp]
	mov	ecx, eax
	shr	rdx, cl
	mov	rax, rdx
	and	eax, 1
	test	rax, rax
	jne	.L15
	mov	eax, DWORD PTR -1056[rbp]
	cdqe
	mov	edx, DWORD PTR -1052[rbp]
	movsx	rdx, edx
	sub	rax, rdx
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -1080[rbp]
	add	rax, rdx
	jmp	.L17
.L15:
	add	DWORD PTR -1056[rbp], 1
.L14:
	mov	eax, DWORD PTR -1056[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1080[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L16
	mov	eax, 0
.L17:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	bitap_bitwise_search, .-bitap_bitwise_search
	.section	.rodata
.LC14:
	.string	"enter: text pattern "
.LC15:
	.string	"%s %s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 640
	mov	DWORD PTR -628[rbp], edi
	mov	QWORD PTR -640[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdx, -624[rbp]
	lea	rax, -512[rbp]
	mov	rsi, rax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -624[rbp]
	lea	rax, -512[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	bitap_bitwise_search
	mov	rdi, rax
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"8805.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%u\000"
	.align	2
.LC1:
	.ascii	"\000"
	.text
	.align	2
	.global	print_bits
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_bits, %function
print_bits:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L2
.L5:
	mov	r3, #7
	str	r3, [fp, #-12]
	b	.L3
.L4:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-12]
	asr	r3, r2, r3
	and	r3, r3, #255
	and	r3, r3, #1
	strb	r3, [fp, #-17]
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L6
	bl	printf
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L3:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L4
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L6+4
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	.LC1
	.size	print_bits, .-print_bits
	.section	.rodata
	.align	2
.LC2:
	.ascii	"The pattern is too long!\000"
	.align	2
.LC3:
	.ascii	"=====R===== \000"
	.align	2
.LC4:
	.ascii	"%s\012%x \000"
	.align	2
.LC5:
	.ascii	"=====pattern_mask of each char of the pattern=====\000"
	.align	2
.LC6:
	.ascii	"%x\011\000"
	.align	2
.LC7:
	.ascii	"=====finding a match=====\000"
	.align	2
.LC8:
	.ascii	"\012%s\012\000"
	.align	2
.LC9:
	.ascii	"pattern_mask of the text  \000"
	.align	2
.LC10:
	.ascii	"\012%s\000"
	.align	2
.LC11:
	.ascii	"R                         \000"
	.align	2
.LC12:
	.ascii	"%s\000"
	.align	2
.LC13:
	.ascii	"R & (1UL << pattern_len)            \000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bitap_bitwise_search
	.syntax unified
	.arm
	.fpu softvfp
	.type	bitap_bitwise_search, %function
bitap_bitwise_search:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	str	r0, [fp, #-1056]
	str	r1, [fp, #-1060]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-1060]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1036]
	ldr	r3, [fp, #-1060]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L9
	ldr	r3, [fp, #-1056]
	b	.L19
.L9:
	ldr	r3, [fp, #-1036]
	cmp	r3, #31
	ble	.L11
	ldr	r3, .L21+4
	b	.L19
.L11:
	mvn	r3, #1
	str	r3, [fp, #-1048]
	ldr	r3, [fp, #-1048]
	mov	r2, r3
	ldr	r1, .L21+8
	ldr	r0, .L21+12
	bl	printf
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	print_bits
	mov	r3, #0
	str	r3, [fp, #-1040]
	b	.L12
.L13:
	ldr	r3, [fp, #-1040]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-1028]
	ldr	r3, [fp, #-1040]
	add	r3, r3, #1
	str	r3, [fp, #-1040]
.L12:
	ldr	r3, [fp, #-1040]
	cmp	r3, #255
	ble	.L13
	ldr	r0, .L21+16
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-1040]
	b	.L14
.L15:
	ldr	r3, [fp, #-1040]
	ldr	r2, [fp, #-1060]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-1028]
	mov	r1, #1
	ldr	r3, [fp, #-1040]
	lsl	r3, r1, r3
	mvn	r3, r3
	ldr	r1, [fp, #-1040]
	ldr	r0, [fp, #-1060]
	add	r1, r0, r1
	ldrb	r1, [r1]	@ zero_extendqisi2
	and	r2, r2, r3
	lsl	r3, r1, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-1028]
	ldr	r3, [fp, #-1040]
	ldr	r2, [fp, #-1060]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1028]
	mov	r1, r3
	ldr	r0, .L21+20
	bl	printf
	ldr	r3, [fp, #-1040]
	ldr	r2, [fp, #-1060]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	lsl	r2, r2, #2
	add	r3, r3, r2
	mov	r1, r3
	mov	r0, #1
	bl	print_bits
	ldr	r3, [fp, #-1040]
	add	r3, r3, #1
	str	r3, [fp, #-1040]
.L14:
	ldr	r2, [fp, #-1040]
	ldr	r3, [fp, #-1036]
	cmp	r2, r3
	blt	.L15
	ldr	r1, .L21+24
	ldr	r0, .L21+28
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-1040]
	b	.L16
.L18:
	ldr	r1, .L21+32
	ldr	r0, .L21+36
	bl	printf
	ldr	r3, [fp, #-1040]
	ldr	r2, [fp, #-1056]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	lsl	r2, r2, #2
	add	r3, r3, r2
	mov	r1, r3
	mov	r0, #1
	bl	print_bits
	ldr	r3, [fp, #-1040]
	ldr	r2, [fp, #-1056]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-1028]
	ldr	r3, [fp, #-1048]
	orr	r3, r2, r3
	str	r3, [fp, #-1048]
	ldr	r3, [fp, #-1048]
	lsl	r3, r3, #1
	str	r3, [fp, #-1048]
	ldr	r1, .L21+40
	ldr	r0, .L21+44
	bl	printf
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	print_bits
	mov	r2, #1
	ldr	r3, [fp, #-1036]
	lsl	r2, r2, r3
	ldr	r3, [fp, #-1048]
	and	r3, r3, r2
	str	r3, [fp, #-1044]
	ldr	r1, .L21+48
	ldr	r0, .L21+44
	bl	printf
	sub	r3, fp, #1040
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	print_bits
	ldr	r2, [fp, #-1048]
	ldr	r3, [fp, #-1036]
	lsr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L17
	ldr	r2, [fp, #-1040]
	ldr	r3, [fp, #-1036]
	sub	r3, r2, r3
	add	r3, r3, #1
	ldr	r2, [fp, #-1056]
	add	r3, r2, r3
	b	.L19
.L17:
	ldr	r3, [fp, #-1040]
	add	r3, r3, #1
	str	r3, [fp, #-1040]
.L16:
	ldr	r3, [fp, #-1040]
	ldr	r2, [fp, #-1056]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L18
	mov	r3, #0
.L19:
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC14
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	bitap_bitwise_search, .-bitap_bitwise_search
	.section	.rodata
	.align	2
.LC15:
	.ascii	"enter: text pattern \000"
	.align	2
.LC16:
	.ascii	"%s %s\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 616
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #616
	str	r0, [fp, #-616]
	str	r1, [fp, #-620]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L26+4
	bl	puts
	sub	r2, fp, #608
	sub	r3, fp, #508
	mov	r1, r3
	ldr	r0, .L26+8
	bl	__isoc99_scanf
	sub	r2, fp, #608
	sub	r3, fp, #508
	mov	r1, r2
	mov	r0, r3
	bl	bitap_bitwise_search
	mov	r3, r0
	mov	r0, r3
	bl	puts
	mov	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC17
	.word	.LC15
	.word	.LC16
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
