	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kmemmem                        ## -- Begin function kmemmem
	.p2align	4, 0x90
_kmemmem:                               ## @kmemmem
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movl	%ecx, %r13d
	movq	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r15
	testq	%r8, %r8
	je	LBB0_1
## %bb.2:
	movq	(%r14), %rax
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_ksBM_prep
	cmpq	$0, (%r14)
	jne	LBB0_5
## %bb.4:
	movq	%rax, (%r14)
	jmp	LBB0_5
LBB0_1:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_ksBM_prep
LBB0_5:
	subl	%r13d, %r12d
	js	LBB0_11
## %bb.6:
	movslq	%r13d, %r10
	leaq	(%rax,%r10,4), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	-8(%r15), %r9
	xorl	%r13d, %r13d
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movslq	%r13d, %r11
	leaq	(%r9,%r11,8), %rcx
	movl	$1, %edx
	movq	%r10, %rsi
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%rsi, %rsi
	jle	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	(%rcx,%rsi,8), %r8
	decq	%rsi
	movl	%esi, %edi
	decl	%edx
	cmpq	%r8, (%rbx,%rdi,8)
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	(%rcx,%r8,4), %edx
	movl	(%rax,%rdi,4), %ecx
	cmpl	%ecx, %edx
	cmovlel	%ecx, %edx
	addl	%edx, %r13d
	cmpl	%r12d, %r13d
	jle	LBB0_7
LBB0_11:
	testq	%r14, %r14
	jne	LBB0_13
## %bb.12:
	movq	%rax, %rdi
	callq	_free
LBB0_13:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_15:
	leaq	(%r15,%r11,8), %rax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kmemmem                        ; -- Begin function kmemmem
	.p2align	2
_kmemmem:                               ; @kmemmem
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x21, x0
	cbz	x4, LBB0_4
; %bb.1:
	ldr	x0, [x19]
	cbnz	x0, LBB0_5
; %bb.2:
	mov	x0, x20
	mov	x1, x22
	bl	_ksBM_prep
	ldr	x8, [x19]
	cbnz	x8, LBB0_5
; %bb.3:
	str	x0, [x19]
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	mov	x1, x22
	bl	_ksBM_prep
LBB0_5:
	subs	w8, w23, w22
	b.mi	LBB0_11
; %bb.6:
	mov	w12, #0
	sxtw	x9, w22
	sub	x10, x21, #8
	add	x11, x0, w22, sxtw #2
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mov	x13, #0
	sxtw	x12, w12
	add	x14, x9, x12
	add	x14, x10, x14, lsl #3
LBB0_8:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x15, x9, x13
	cmp	x15, #1
	b.lt	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	add	w15, w9, w13
	sub	w15, w15, #1
	ldr	x17, [x20, w15, uxtw #3]
	ldr	x16, [x14, x13, lsl #3]
	sub	x13, x13, #1
	cmp	x17, x16
	b.eq	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w14, [x11, x16, lsl #2]
	add	w13, w14, w13
	add	w14, w13, #1
	ldr	w15, [x0, x15, lsl #2]
	cmp	w14, w15
	csinc	w13, w15, w13, le
	add	w12, w13, w12
	cmp	w12, w8
	b.le	LBB0_7
LBB0_11:
	cbnz	x19, LBB0_13
; %bb.12:
	bl	_free
LBB0_13:
	mov	x0, #0
	b	LBB0_15
LBB0_14:
	add	x0, x21, x12, lsl #3
LBB0_15:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
