	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_pmecc_substitute
_atmel_pmecc_substitute:                ## @atmel_pmecc_substitute
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_get_sectorsize
	xorl	%ecx, %ecx
	cmpl	$512, %eax                      ## imm = 0x200
	sete	%cl
	movl	$14, %r13d
	subl	%ecx, %r13d
	movl	%r13d, %edi
	callq	_BIT
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_get_strength
	movl	%eax, %r12d
	movq	16(%rbx), %rax
	movq	(%rax), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r15
	movq	(%rbx), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rbx
	leaq	4(%rbx), %rdi
	leal	-4(,%r12,8), %edx
	xorl	%esi, %esi
	callq	_memset
	testl	%r12d, %r12d
	jle	LBB0_13
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	decl	%r14d
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	leal	(%r12,%r12), %eax
	cltq
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%r13d, %r12d
	movl	$1, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$2, %r13
	cmpq	-88(%rbp), %r13                 ## 8-byte Folded Reload
	jge	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=2
	incq	%rbx
	addq	%r13, %r14
	cmpq	%rbx, %r12
	je	LBB0_6
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r13,4), %r15d
	movl	%ebx, %edi
	callq	_BIT
	testl	%r15d, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	%r14d, %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	xorl	%eax, (%rcx,%r13,4)
	jmp	LBB0_5
LBB0_7:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jle	LBB0_13
## %bb.8:
	movl	%eax, %eax
	leaq	(%rax,%rax), %rcx
	addq	$2, %rcx
	movl	$2, %esi
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	(%rbx,%rax,4), %eax
	addl	%eax, %eax
	cltd
	idivl	%r8d
	movslq	%edx, %rax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx,%rax,4), %eax
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movslq	%esi, %rdx
	movl	%eax, (%rdi,%rdx,4)
	addq	$2, %rsi
	cmpq	%rsi, %rcx
	je	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%rdi,%rsi,2), %rax
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_atmel_pmecc_substitute
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_pmecc_substitute
_atmel_pmecc_substitute:                ; @atmel_pmecc_substitute
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x0
	bl	_get_sectorsize
	cmp	w0, #512
	mov	w8, #13
	cinc	w19, w8, ne
	mov	x0, x19
	bl	_BIT
	mov	x21, x0
	mov	x0, x22
	bl	_get_strength
	mov	x24, x0
	ldr	x8, [x22, #16]
	ldp	x23, x20, [x8]
	ldp	x26, x22, [x22]
	add	x0, x22, #4
	lsl	w8, w24, #3
	sub	w2, w8, #4
	mov	w1, #0
	bl	_memset
	cmp	w24, #1
	b.lt	LBB0_12
; %bb.1:
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	sub	w25, w21, #1
	str	w24, [sp, #4]                   ; 4-byte Folded Spill
	lsl	w8, w24, #1
	sxtw	x27, w8
	mov	w28, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x28, x28, #2
	cmp	x28, x27
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	x20, #0
	mov	x21, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	x21, x21, #1
	add	x20, x20, x28
	cmp	x19, x21
	b.eq	LBB0_2
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w24, [x26, x28, lsl #2]
	mov	x0, x21
	bl	_BIT
	tst	w0, w24
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [x23, w20, uxtw #2]
	lsl	x9, x28, #2
	ldr	w10, [x22, x9]
	eor	w8, w10, w8
	str	w8, [x22, x9]
	b	LBB0_4
LBB0_7:
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	cmp	w8, #1
	ldr	x13, [sp, #8]                   ; 8-byte Folded Reload
	b.lt	LBB0_12
; %bb.8:
	add	w9, w8, #1
	add	x8, x22, #4
	lsl	x9, x9, #1
	mov	w10, #2
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	str	w11, [x22, w10, sxtw #2]
	add	x8, x8, #4
	add	x10, x10, #2
	cmp	x9, x10
	b.eq	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x11, [x8]
	cbz	w11, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w11, [x13, x11, lsl #2]
	lsl	w11, w11, #1
	sdiv	w12, w11, w25
	msub	w11, w12, w25, w11
	ldr	w11, [x23, w11, sxtw #2]
	b	LBB0_9
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_atmel_pmecc_substitute
.subsections_via_symbols
