Program: boyer-moore-search

x86 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_badCharHeuristic               ## -- Begin function badCharHeuristic
	.p2align	4, 0x90
_badCharHeuristic:                      ## @badCharHeuristic
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	%rdx, -24(%rbp)
	movl	$0, -28(%rbp)
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$256, -28(%rbp)                 ## imm = 0x100
	jge	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-24(%rbp), %rax
	movslq	-28(%rbp), %rcx
	movl	$-1, (%rax,%rcx,4)
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
	jmp	LBB0_1
LBB0_4:
	movl	$0, -32(%rbp)
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-32(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jge	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rcx
	movslq	-32(%rbp), %rsi
	movsbl	(%rcx,%rsi), %ecx
	movslq	%ecx, %rcx
	movl	%edx, (%rax,%rcx,4)
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	LBB0_5
LBB0_8:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.globl	_search                         ## -- Begin function search
	.p2align	4, 0x90
_search:                                ## @search
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$1120, %rsp                     ## imm = 0x460
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	%rdi, -1048(%rbp)
	movl	%esi, -1052(%rbp)
	movq	%rdx, -1064(%rbp)
	movl	%ecx, -1068(%rbp)
	movq	%r8, -1080(%rbp)
	movq	-1064(%rbp), %rdi
	movl	-1068(%rbp), %esi
	leaq	-1040(%rbp), %rdx
	callq	_badCharHeuristic
	movl	$0, -1084(%rbp)
	movl	$0, -1088(%rbp)
LBB1_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB1_5 Depth 2
	movl	-1088(%rbp), %eax
	movl	-1052(%rbp), %ecx
	subl	-1068(%rbp), %ecx
	cmpl	%ecx, %eax
	jg	LBB1_20
## %bb.2:                               ##   in Loop: Header=BB1_1 Depth=1
	movl	-1084(%rbp), %eax
	movl	-1052(%rbp), %ecx
	subl	-1068(%rbp), %ecx
	cmpl	%ecx, %eax
	jle	LBB1_4
## %bb.3:
	jmp	LBB1_20
LBB1_4:                                 ##   in Loop: Header=BB1_1 Depth=1
	movl	-1068(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -1092(%rbp)
LBB1_5:                                 ##   Parent Loop BB1_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
                                        ## kill: def $al killed $al killed $eax
	cmpl	$0, -1092(%rbp)
	movb	%al, -1101(%rbp)                ## 1-byte Spill
	jl	LBB1_7
## %bb.6:                               ##   in Loop: Header=BB1_5 Depth=2
	movq	-1064(%rbp), %rax
	movslq	-1092(%rbp), %rcx
	movsbl	(%rax,%rcx), %eax
	movq	-1048(%rbp), %rcx
	movl	-1084(%rbp), %edx
	addl	-1092(%rbp), %edx
	movslq	%edx, %rdx
	movsbl	(%rcx,%rdx), %ecx
	cmpl	%ecx, %eax
	sete	%al
	movb	%al, -1101(%rbp)                ## 1-byte Spill
LBB1_7:                                 ##   in Loop: Header=BB1_5 Depth=2
	movb	-1101(%rbp), %al                ## 1-byte Reload
	testb	$1, %al
	jne	LBB1_8
	jmp	LBB1_9
LBB1_8:                                 ##   in Loop: Header=BB1_5 Depth=2
	movl	-1092(%rbp), %eax
	addl	$-1, %eax
	movl	%eax, -1092(%rbp)
	jmp	LBB1_5
LBB1_9:                                 ##   in Loop: Header=BB1_1 Depth=1
	cmpl	$0, -1092(%rbp)
	setl	%al
	andb	$1, %al
	movzbl	%al, %eax
	movl	%eax, -1096(%rbp)
	cmpl	$0, -1096(%rbp)
	je	LBB1_14
## %bb.10:                              ##   in Loop: Header=BB1_1 Depth=1
	movq	-1080(%rbp), %rax
	movslq	-1084(%rbp), %rcx
	movl	$1, (%rax,%rcx,4)
	movl	-1084(%rbp), %eax
	addl	-1068(%rbp), %eax
	cmpl	-1052(%rbp), %eax
	jge	LBB1_12
## %bb.11:                              ##   in Loop: Header=BB1_1 Depth=1
	movl	-1068(%rbp), %eax
	movq	-1048(%rbp), %rcx
	movl	-1084(%rbp), %edx
	addl	-1068(%rbp), %edx
	movslq	%edx, %rdx
	movsbl	(%rcx,%rdx), %ecx
	movslq	%ecx, %rcx
	subl	-1040(%rbp,%rcx,4), %eax
	movl	%eax, -1108(%rbp)               ## 4-byte Spill
	jmp	LBB1_13
LBB1_12:                                ##   in Loop: Header=BB1_1 Depth=1
	movl	$1, %eax
	movl	%eax, -1108(%rbp)               ## 4-byte Spill
	jmp	LBB1_13
LBB1_13:                                ##   in Loop: Header=BB1_1 Depth=1
	movl	-1108(%rbp), %eax               ## 4-byte Reload
	addl	-1084(%rbp), %eax
	movl	%eax, -1084(%rbp)
	jmp	LBB1_18
LBB1_14:                                ##   in Loop: Header=BB1_1 Depth=1
	movl	-1092(%rbp), %eax
	movq	-1048(%rbp), %rcx
	movl	-1084(%rbp), %edx
	addl	-1092(%rbp), %edx
	movslq	%edx, %rdx
	movsbl	(%rcx,%rdx), %ecx
	movslq	%ecx, %rcx
	subl	-1040(%rbp,%rcx,4), %eax
	movl	%eax, -1100(%rbp)
	movl	$1, %eax
	cmpl	-1100(%rbp), %eax
	jle	LBB1_16
## %bb.15:                              ##   in Loop: Header=BB1_1 Depth=1
	movl	$1, %eax
	movl	%eax, -1112(%rbp)               ## 4-byte Spill
	jmp	LBB1_17
LBB1_16:                                ##   in Loop: Header=BB1_1 Depth=1
	movl	-1100(%rbp), %eax
	movl	%eax, -1112(%rbp)               ## 4-byte Spill
LBB1_17:                                ##   in Loop: Header=BB1_1 Depth=1
	movl	-1112(%rbp), %eax               ## 4-byte Reload
	addl	-1084(%rbp), %eax
	movl	%eax, -1084(%rbp)
LBB1_18:                                ##   in Loop: Header=BB1_1 Depth=1
	jmp	LBB1_19
LBB1_19:                                ##   in Loop: Header=BB1_1 Depth=1
	movl	-1088(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -1088(%rbp)
	jmp	LBB1_1
LBB1_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rcx
	cmpq	%rcx, %rax
	jne	LBB1_22
## %bb.21:
	addq	$1120, %rsp                     ## imm = 0x460
	popq	%rbp
	retq
LBB1_22:
	callq	___stack_chk_fail
	ud2
	.cfi_endproc
                                        ## -- End function
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$144, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	$0, -12(%rbp)
	leaq	_inp_txt(%rip), %rdi
	callq	_libmin_strlen
                                        ## kill: def $eax killed $eax killed $rax
	movl	%eax, -16(%rbp)
	leaq	_inp_pat(%rip), %rdi
	callq	_libmin_strlen
                                        ## kill: def $eax killed $eax killed $rax
	movl	%eax, -20(%rbp)
	movl	-16(%rbp), %esi
	movl	-20(%rbp), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
                                        ## kill: def $al killed $al killed $eax
	callq	_libmin_printf
	movl	-16(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rsp, %rcx
	movq	%rcx, -32(%rbp)
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%rsp, %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rax, -40(%rbp)
	movl	$0, -44(%rbp)
LBB2_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jge	LBB2_4
## %bb.2:                               ##   in Loop: Header=BB2_1 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movslq	-44(%rbp), %rdx
	leaq	_inp_txt(%rip), %rcx
	movb	(%rcx,%rdx), %dl
	movslq	-44(%rbp), %rcx
	movb	%dl, (%rax,%rcx)
## %bb.3:                               ##   in Loop: Header=BB2_1 Depth=1
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -44(%rbp)
	jmp	LBB2_1
LBB2_4:
	movl	-20(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	%rsp, %rcx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%rax, -56(%rbp)
	movl	$0, -60(%rbp)
LBB2_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-60(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jge	LBB2_8
## %bb.6:                               ##   in Loop: Header=BB2_5 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movslq	-60(%rbp), %rdx
	leaq	_inp_pat(%rip), %rcx
	movb	(%rcx,%rdx), %dl
	movslq	-60(%rbp), %rcx
	movb	%dl, (%rax,%rcx)
## %bb.7:                               ##   in Loop: Header=BB2_5 Depth=1
	movl	-60(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -60(%rbp)
	jmp	LBB2_5
LBB2_8:
	movl	-16(%rbp), %eax
                                        ## kill: def $rax killed $eax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	%rsp, %rcx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movq	%rax, -72(%rbp)
	movl	$0, -76(%rbp)
LBB2_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	-76(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jge	LBB2_12
## %bb.10:                              ##   in Loop: Header=BB2_9 Depth=1
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movslq	-76(%rbp), %rcx
	movl	$0, (%rax,%rcx,4)
## %bb.11:                              ##   in Loop: Header=BB2_9 Depth=1
	movl	-76(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -76(%rbp)
	jmp	LBB2_9
LBB2_12:
	movq	-120(%rbp), %r8                 ## 8-byte Reload
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	-16(%rbp), %esi
	movl	-20(%rbp), %ecx
	callq	_search
	movl	$0, -80(%rbp)
LBB2_13:                                ## =>This Inner Loop Header: Depth=1
	movl	-80(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jge	LBB2_18
## %bb.14:                              ##   in Loop: Header=BB2_13 Depth=1
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movslq	-80(%rbp), %rcx
	cmpl	$0, (%rax,%rcx,4)
	je	LBB2_16
## %bb.15:                              ##   in Loop: Header=BB2_13 Depth=1
	movl	-80(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
LBB2_16:                                ##   in Loop: Header=BB2_13 Depth=1
	jmp	LBB2_17
LBB2_17:                                ##   in Loop: Header=BB2_13 Depth=1
	movl	-80(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -80(%rbp)
	jmp	LBB2_13
LBB2_18:
	callq	_libmin_success
	movl	$0, -12(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rsp
	movl	-12(%rbp), %eax
	movl	%eax, -132(%rbp)                ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rcx
	cmpq	%rcx, %rax
	jne	LBB2_20
## %bb.19:
	movl	-132(%rbp), %eax                ## 4-byte Reload
	movq	%rbp, %rsp
	popq	%rbp
	retq
LBB2_20:
	callq	___stack_chk_fail
	ud2
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.globl	_inp_pat                        ## @inp_pat
	.p2align	4
_inp_pat:
	.asciz	"NzZVOzZXNoGXMl8yxesyY"

	.globl	_inp_txt                        ## @inp_txt
	.p2align	4
_inp_txt:
	.asciz	"zJfMus2WzLnMr82T4bmuzKTNjcylzYfNiGjMssyBZc2PzZPMvMyXzJnMvMyjzZQgzYfMnMyxzKDNk82NzZVOzZXNoGXMl8yxesyYzJ3MnMy6zZlwzKTMusy5zY3Mr82aZcygzLvMoM2ccsyozKTNjcy6zJbNlMyWzJZkzKDMn8ytzKzMnc2facymzZbMqc2TzZTMpGHMoMyXzKzNicyZbs2azZwgzLvMnsywzZrNhWjMtc2JacyzzJ52zKLNh+G4mc2OzZ8t0onMrcypzLzNlG3MpMytzKtpzZXNh8ydzKZuzJfNmeG4jcyfIMyvzLLNlc2ex6vMn8yvzLDMss2ZzLvMnWYgzKrMsMywzJfMlsytzJjNmGPMps2NzLLMns2NzKnMmeG4pc2aYcyuzY7Mn8yZzZzGocypzLnNjnPMpC7MncydINKJWsyhzJbMnM2WzLDMo82JzJxhzqwerty42ZbMsM2ZzKzNoWzMssyrzLPNjcypZ8yhzJ/MvMyxzZrMnsyszYVvzJfNnC7Mnw==zKZIzKzMpMyXzKTNnWXNnCDMnMylzJ3Mu82NzJ/MgXfMlWjMlsyvzZNvzJ3NmcyWzY7MscyuINKJzLrMmcyezJ/NiFfMt8y8zK1hzLrMqs2NxK/NiM2VzK3NmcyvzJx0zLbMvMyuc8yYzZnNlsyVIMygnMyWIMywzYnMqc2HzZnMss2ezYVUzZbMvM2TzKrNomjNj82TzK7Mu2XMrMydzJ/NhSDMpMy5zJ1X"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"n = %d, m = %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"pattern occurs at shift = %d\n"

.subsections_via_symbols


ARM64 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_badCharHeuristic               ; -- Begin function badCharHeuristic
	.p2align	2
_badCharHeuristic:                      ; @badCharHeuristic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	str	x0, [sp, #24]
	str	w1, [sp, #20]
	str	x2, [sp, #8]
	str	wzr, [sp, #4]
	b	LBB0_1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #4]
	subs	w8, w8, #256
	cset	w8, ge
	tbnz	w8, #0, LBB0_4
	b	LBB0_2
LBB0_2:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [sp, #8]
	ldrsw	x10, [sp, #4]
	mov	w8, #-1
	str	w8, [x9, x10, lsl #2]
	b	LBB0_3
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #4]
	add	w8, w8, #1
	str	w8, [sp, #4]
	b	LBB0_1
LBB0_4:
	str	wzr, [sp]
	b	LBB0_5
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp]
	ldr	w9, [sp, #20]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB0_8
	b	LBB0_6
LBB0_6:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp]
	ldr	x9, [sp, #8]
	ldr	x10, [sp, #24]
	ldrsw	x11, [sp]
	ldrsb	x10, [x10, x11]
	str	w8, [x9, x10, lsl #2]
	b	LBB0_7
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp]
	add	w8, w8, #1
	str	w8, [sp]
	b	LBB0_5
LBB0_8:
	add	sp, sp, #32
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_search                         ; -- Begin function search
	.p2align	2
_search:                                ; @search
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w27, -24
	.cfi_offset w28, -32
	sub	sp, sp, #1104
	adrp	x8, ___stack_chk_guard@GOTPAGE
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	str	x0, [sp, #64]
	str	w1, [sp, #60]
	str	x2, [sp, #48]
	str	w3, [sp, #44]
	str	x4, [sp, #32]
	ldr	x0, [sp, #48]
	ldr	w1, [sp, #44]
	add	x2, sp, #72
	bl	_badCharHeuristic
	str	wzr, [sp, #28]
	str	wzr, [sp, #24]
	b	LBB1_1
LBB1_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB1_5 Depth 2
	ldr	w8, [sp, #24]
	ldr	w9, [sp, #60]
	ldr	w10, [sp, #44]
	subs	w9, w9, w10
	subs	w8, w8, w9
	cset	w8, gt
	tbnz	w8, #0, LBB1_20
	b	LBB1_2
LBB1_2:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #28]
	ldr	w9, [sp, #60]
	ldr	w10, [sp, #44]
	subs	w9, w9, w10
	subs	w8, w8, w9
	cset	w8, le
	tbnz	w8, #0, LBB1_4
	b	LBB1_3
LBB1_3:
	b	LBB1_20
LBB1_4:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #44]
	subs	w8, w8, #1
	str	w8, [sp, #20]
	b	LBB1_5
LBB1_5:                                 ;   Parent Loop BB1_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [sp, #20]
	subs	w8, w8, #0
	cset	w8, lt
	mov	w9, #0
	str	w9, [sp, #8]                    ; 4-byte Folded Spill
	tbnz	w8, #0, LBB1_7
	b	LBB1_6
LBB1_6:                                 ;   in Loop: Header=BB1_5 Depth=2
	ldr	x8, [sp, #48]
	ldrsw	x9, [sp, #20]
	ldrsb	w8, [x8, x9]
	ldr	x9, [sp, #64]
	ldr	w10, [sp, #28]
	ldr	w11, [sp, #20]
	add	w10, w10, w11
	ldrsb	w9, [x9, w10, sxtw]
	subs	w8, w8, w9
	cset	w8, eq
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	b	LBB1_7
LBB1_7:                                 ;   in Loop: Header=BB1_5 Depth=2
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	tbz	w8, #0, LBB1_9
	b	LBB1_8
LBB1_8:                                 ;   in Loop: Header=BB1_5 Depth=2
	ldr	w8, [sp, #20]
	subs	w8, w8, #1
	str	w8, [sp, #20]
	b	LBB1_5
LBB1_9:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #20]
	subs	w8, w8, #0
	cset	w8, lt
	and	w8, w8, #0x1
	str	w8, [sp, #16]
	ldr	w8, [sp, #16]
	subs	w8, w8, #0
	cset	w8, eq
	tbnz	w8, #0, LBB1_14
	b	LBB1_10
LBB1_10:                                ;   in Loop: Header=BB1_1 Depth=1
	ldr	x9, [sp, #32]
	ldrsw	x10, [sp, #28]
	mov	w8, #1
	str	w8, [x9, x10, lsl #2]
	ldr	w8, [sp, #28]
	ldr	w9, [sp, #44]
	add	w8, w8, w9
	ldr	w9, [sp, #60]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB1_12
	b	LBB1_11
LBB1_11:                                ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #44]
	ldr	x9, [sp, #64]
	ldr	w10, [sp, #28]
	ldr	w11, [sp, #44]
	add	w10, w10, w11
	ldrsb	x10, [x9, w10, sxtw]
	add	x9, sp, #72
	ldr	w9, [x9, x10, lsl #2]
	subs	w8, w8, w9
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	b	LBB1_13
LBB1_12:                                ;   in Loop: Header=BB1_1 Depth=1
	mov	w8, #1
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	b	LBB1_13
LBB1_13:                                ;   in Loop: Header=BB1_1 Depth=1
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	ldr	w8, [sp, #28]
	add	w8, w8, w9
	str	w8, [sp, #28]
	b	LBB1_18
LBB1_14:                                ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #20]
	ldr	x9, [sp, #64]
	ldr	w10, [sp, #28]
	ldr	w11, [sp, #20]
	add	w10, w10, w11
	ldrsb	x10, [x9, w10, sxtw]
	add	x9, sp, #72
	ldr	w9, [x9, x10, lsl #2]
	subs	w8, w8, w9
	str	w8, [sp, #12]
	ldr	w9, [sp, #12]
	mov	w8, #1
	subs	w8, w8, w9
	cset	w8, le
	tbnz	w8, #0, LBB1_16
	b	LBB1_15
LBB1_15:                                ;   in Loop: Header=BB1_1 Depth=1
	mov	w8, #1
	str	w8, [sp]                        ; 4-byte Folded Spill
	b	LBB1_17
LBB1_16:                                ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #12]
	str	w8, [sp]                        ; 4-byte Folded Spill
	b	LBB1_17
LBB1_17:                                ;   in Loop: Header=BB1_1 Depth=1
	ldr	w9, [sp]                        ; 4-byte Folded Reload
	ldr	w8, [sp, #28]
	add	w8, w8, w9
	str	w8, [sp, #28]
	b	LBB1_18
LBB1_18:                                ;   in Loop: Header=BB1_1 Depth=1
	b	LBB1_19
LBB1_19:                                ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #24]
	add	w8, w8, #1
	str	w8, [sp, #24]
	b	LBB1_1
LBB1_20:
	ldur	x9, [x29, #-24]
	adrp	x8, ___stack_chk_guard@GOTPAGE
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
	ldr	x8, [x8]
	subs	x8, x8, x9
	cset	w8, eq
	tbnz	w8, #0, LBB1_22
	b	LBB1_21
LBB1_21:
	bl	___stack_chk_fail
LBB1_22:
	add	sp, sp, #1104
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	sub	sp, sp, #144
	adrp	x8, ___stack_chk_guard@GOTPAGE
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
	stur	wzr, [x29, #-12]
	adrp	x0, _inp_txt@PAGE
	add	x0, x0, _inp_txt@PAGEOFF
	bl	_libmin_strlen
	mov	x8, x0
	stur	w8, [x29, #-16]
	adrp	x0, _inp_pat@PAGE
	add	x0, x0, _inp_pat@PAGEOFF
	bl	_libmin_strlen
	mov	x8, x0
	stur	w8, [x29, #-20]
	ldur	w8, [x29, #-16]
                                        ; implicit-def: $x10
	mov	x10, x8
	ldur	w9, [x29, #-20]
                                        ; implicit-def: $x8
	mov	x8, x9
	sub	sp, sp, #16
	mov	x9, sp
	str	x10, [x9]
	str	x8, [x9, #8]
	adrp	x0, l_.str@PAGE
	add	x0, x0, l_.str@PAGEOFF
	bl	_libmin_printf
	add	sp, sp, #16
	ldur	w8, [x29, #-16]
                                        ; kill: def $x8 killed $w8
	mov	x9, sp
	stur	x9, [x29, #-32]
	lsr	x9, x8, #0
	add	x9, x9, #15
	and	x9, x9, #0xfffffffffffffff0
	stur	x9, [x29, #-96]                 ; 8-byte Folded Spill
	adrp	x16, ___chkstk_darwin@GOTPAGE
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	ldur	x10, [x29, #-96]                ; 8-byte Folded Reload
	mov	x9, sp
	subs	x9, x9, x10
	mov	sp, x9
	stur	x9, [x29, #-88]                 ; 8-byte Folded Spill
	stur	x8, [x29, #-40]
	stur	wzr, [x29, #-44]
	b	LBB2_1
LBB2_1:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x29, #-44]
	ldur	w9, [x29, #-16]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB2_4
	b	LBB2_2
LBB2_2:                                 ;   in Loop: Header=BB2_1 Depth=1
	ldur	x9, [x29, #-88]                 ; 8-byte Folded Reload
	ldursw	x10, [x29, #-44]
	adrp	x8, _inp_txt@PAGE
	add	x8, x8, _inp_txt@PAGEOFF
	add	x8, x8, x10
	ldrb	w8, [x8]
	ldursw	x10, [x29, #-44]
	add	x9, x9, x10
	strb	w8, [x9]
	b	LBB2_3
LBB2_3:                                 ;   in Loop: Header=BB2_1 Depth=1
	ldur	w8, [x29, #-44]
	add	w8, w8, #1
	stur	w8, [x29, #-44]
	b	LBB2_1
LBB2_4:
	ldur	w8, [x29, #-20]
                                        ; kill: def $x8 killed $w8
	lsr	x9, x8, #0
	add	x9, x9, #15
	and	x9, x9, #0xfffffffffffffff0
	stur	x9, [x29, #-112]                ; 8-byte Folded Spill
	adrp	x16, ___chkstk_darwin@GOTPAGE
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	ldur	x10, [x29, #-112]               ; 8-byte Folded Reload
	mov	x9, sp
	subs	x9, x9, x10
	mov	sp, x9
	stur	x9, [x29, #-104]                ; 8-byte Folded Spill
	stur	x8, [x29, #-56]
	stur	wzr, [x29, #-60]
	b	LBB2_5
LBB2_5:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x29, #-60]
	ldur	w9, [x29, #-20]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB2_8
	b	LBB2_6
LBB2_6:                                 ;   in Loop: Header=BB2_5 Depth=1
	ldur	x9, [x29, #-104]                ; 8-byte Folded Reload
	ldursw	x10, [x29, #-60]
	adrp	x8, _inp_pat@PAGE
	add	x8, x8, _inp_pat@PAGEOFF
	add	x8, x8, x10
	ldrb	w8, [x8]
	ldursw	x10, [x29, #-60]
	add	x9, x9, x10
	strb	w8, [x9]
	b	LBB2_7
LBB2_7:                                 ;   in Loop: Header=BB2_5 Depth=1
	ldur	w8, [x29, #-60]
	add	w8, w8, #1
	stur	w8, [x29, #-60]
	b	LBB2_5
LBB2_8:
	ldur	w8, [x29, #-16]
                                        ; kill: def $x8 killed $w8
	lsl	x9, x8, #2
	add	x9, x9, #15
	and	x9, x9, #0xfffffffffffffff0
	stur	x9, [x29, #-128]                ; 8-byte Folded Spill
	adrp	x16, ___chkstk_darwin@GOTPAGE
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	ldur	x10, [x29, #-128]               ; 8-byte Folded Reload
	mov	x9, sp
	subs	x9, x9, x10
	mov	sp, x9
	stur	x9, [x29, #-120]                ; 8-byte Folded Spill
	stur	x8, [x29, #-72]
	stur	wzr, [x29, #-76]
	b	LBB2_9
LBB2_9:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x29, #-76]
	ldur	w9, [x29, #-16]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB2_12
	b	LBB2_10
LBB2_10:                                ;   in Loop: Header=BB2_9 Depth=1
	ldur	x9, [x29, #-120]                ; 8-byte Folded Reload
	ldursw	x10, [x29, #-76]
	mov	w8, #0
	str	w8, [x9, x10, lsl #2]
	b	LBB2_11
LBB2_11:                                ;   in Loop: Header=BB2_9 Depth=1
	ldur	w8, [x29, #-76]
	add	w8, w8, #1
	stur	w8, [x29, #-76]
	b	LBB2_9
LBB2_12:
	ldur	x4, [x29, #-120]                ; 8-byte Folded Reload
	ldur	x2, [x29, #-104]                ; 8-byte Folded Reload
	ldur	x0, [x29, #-88]                 ; 8-byte Folded Reload
	ldur	w1, [x29, #-16]
	ldur	w3, [x29, #-20]
	bl	_search
	stur	wzr, [x29, #-80]
	b	LBB2_13
LBB2_13:                                ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x29, #-80]
	ldur	w9, [x29, #-16]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB2_18
	b	LBB2_14
LBB2_14:                                ;   in Loop: Header=BB2_13 Depth=1
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	ldursw	x9, [x29, #-80]
	ldr	w8, [x8, x9, lsl #2]
	subs	w8, w8, #0
	cset	w8, eq
	tbnz	w8, #0, LBB2_16
	b	LBB2_15
LBB2_15:                                ;   in Loop: Header=BB2_13 Depth=1
	ldur	w9, [x29, #-80]
                                        ; implicit-def: $x8
	mov	x8, x9
	sub	sp, sp, #16
	mov	x9, sp
	str	x8, [x9]
	adrp	x0, l_.str.1@PAGE
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_libmin_printf
	add	sp, sp, #16
	b	LBB2_16
LBB2_16:                                ;   in Loop: Header=BB2_13 Depth=1
	b	LBB2_17
LBB2_17:                                ;   in Loop: Header=BB2_13 Depth=1
	ldur	w8, [x29, #-80]
	add	w8, w8, #1
	stur	w8, [x29, #-80]
	b	LBB2_13
LBB2_18:
	bl	_libmin_success
	stur	wzr, [x29, #-12]
	ldur	x8, [x29, #-32]
	mov	sp, x8
	ldur	w8, [x29, #-12]
	stur	w8, [x29, #-132]                ; 4-byte Folded Spill
	ldur	x9, [x29, #-8]
	adrp	x8, ___stack_chk_guard@GOTPAGE
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
	ldr	x8, [x8]
	subs	x8, x8, x9
	cset	w8, eq
	tbnz	w8, #0, LBB2_20
	b	LBB2_19
LBB2_19:
	bl	___stack_chk_fail
LBB2_20:
	ldur	w0, [x29, #-132]                ; 4-byte Folded Reload
	mov	sp, x29
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.globl	_inp_pat                        ; @inp_pat
_inp_pat:
	.asciz	"NzZVOzZXNoGXMl8yxesyY"

	.globl	_inp_txt                        ; @inp_txt
_inp_txt:
	.asciz	"zJfMus2WzLnMr82T4bmuzKTNjcylzYfNiGjMssyBZc2PzZPMvMyXzJnMvMyjzZQgzYfMnMyxzKDNk82NzZVOzZXNoGXMl8yxesyYzJ3MnMy6zZlwzKTMusy5zY3Mr82aZcygzLvMoM2ccsyozKTNjcy6zJbNlMyWzJZkzKDMn8ytzKzMnc2facymzZbMqc2TzZTMpGHMoMyXzKzNicyZbs2azZwgzLvMnsywzZrNhWjMtc2JacyzzJ52zKLNh+G4mc2OzZ8t0onMrcypzLzNlG3MpMytzKtpzZXNh8ydzKZuzJfNmeG4jcyfIMyvzLLNlc2ex6vMn8yvzLDMss2ZzLvMnWYgzKrMsMywzJfMlsytzJjNmGPMps2NzLLMns2NzKnMmeG4pc2aYcyuzY7Mn8yZzZzGocypzLnNjnPMpC7MncydINKJWsyhzJbMnM2WzLDMo82JzJxhzqwerty42ZbMsM2ZzKzNoWzMssyrzLPNjcypZ8yhzJ/MvMyxzZrMnsyszYVvzJfNnC7Mnw==zKZIzKzMpMyXzKTNnWXNnCDMnMylzJ3Mu82NzJ/MgXfMlWjMlsyvzZNvzJ3NmcyWzY7MscyuINKJzLrMmcyezJ/NiFfMt8y8zK1hzLrMqs2NxK/NiM2VzK3NmcyvzJx0zLbMvMyuc8yYzZnNlsyVIMygnMyWIMywzYnMqc2HzZnMss2ezYVUzZbMvM2TzKrNomjNj82TzK7Mu2XMrMydzJ/NhSDMpMy5zJ1X"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"n = %d, m = %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"pattern occurs at shift = %d\n"

.subsections_via_symbols