	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atmel_pmecc_create_user        ## -- Begin function atmel_pmecc_create_user
	.p2align	4, 0x90
_atmel_pmecc_create_user:               ## @atmel_pmecc_create_user
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_atmel_pmecc_prepare_user_req
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %edi
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movl	$112, %edi
	movl	$4, %esi
	callq	_ALIGN
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r14), %ecx
	leal	4(,%rcx,8), %edx
	leal	(%rax,%rcx,4), %eax
                                        ## kill: def $ecx killed $ecx killed $rcx def $rcx
	addl	$4, %ecx
	imull	%edx, %ecx
	leal	(%rcx,%rax), %edi
	addl	$4, %edi
	movl	$4, %esi
	callq	_ALIGN
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r14), %ecx
	leal	(%rcx,%rcx,2), %ecx
	leal	(%rax,%rcx,4), %edi
	addl	$12, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%r15, 104(%rax)
	movq	%rax, %rdi
	addq	$112, %rdi
	movl	$4, %esi
	callq	_PTR_ALIGN
	movq	%rax, 96(%rbx)
	movslq	(%r14), %rcx
	leaq	(%rcx,%rcx), %rdx
	incq	%rdx
	imulq	$112, %rdx, %rsi
	addq	%rsi, %rax
	movq	%rax, 88(%rbx)
	addq	%rsi, %rax
	movq	%rax, 80(%rbx)
	imulq	$112, %rcx, %rsi
	leaq	(%rsi,%rax), %rdi
	addq	%rsi, %rax
	addq	$112, %rax
	movq	%rax, 72(%rbx)
	addq	$2, %rcx
	movslq	%edx, %rax
	imulq	%rcx, %rax
	imulq	$112, %rax, %rax
	addq	%rax, %rdi
	addq	$112, %rdi
	movl	$4, %esi
	callq	_PTR_ALIGN
	movq	%rax, 64(%rbx)
	movslq	(%r14), %rcx
	leaq	(%rax,%rcx,4), %rdx
	leaq	(%rax,%rcx,4), %rax
	addq	$4, %rax
	movq	%rax, 48(%rbx)
	leaq	(%rdx,%rcx,4), %rax
	addq	$8, %rax
	movq	%rax, 56(%rbx)
	movq	%r14, %rdi
	callq	_atmel_pmecc_get_gf_tables
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.15:
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_2
LBB0_6:
	movq	%r12, 40(%rbx)
	movl	4(%r14), %eax
	cltd
	idivl	8(%r14)
	movl	%eax, (%rbx)
	movq	(%r15), %rcx
	movl	(%rcx), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.8:
	movq	8(%rcx), %rcx
	movl	(%r14), %edx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%edx, (%rcx,%rdi,4)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rdi
	cmpq	%rdi, %rax
	jne	LBB0_9
## %bb.11:
	movl	%eax, %edi
	jmp	LBB0_12
LBB0_7:
	xorl	%edi, %edi
LBB0_12:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_PMECC_CFG_BCH_STRENGTH
	movl	%eax, %r15d
	movl	8(%r14), %edi
	callq	_PMECC_CFG_NSECTORS
	orl	%r15d, %eax
	movl	%eax, 8(%rbx)
	cmpl	$1024, 12(%r14)                 ## imm = 0x400
	jne	LBB0_14
## %bb.13:
	movq	_PMECC_CFG_SECTOR1024@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 8(%rbx)
LBB0_14:
	movq	24(%r14), %rax
	decq	%rax
	movq	%rax, 32(%rbx)
	movq	16(%r14), %rax
	movq	%rax, 24(%rbx)
	movslq	4(%r14), %rcx
	leaq	-1(%rax,%rcx), %rax
	movq	%rax, 16(%rbx)
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PMECC_CFG_SECTOR1024,4,2       ## @PMECC_CFG_SECTOR1024
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atmel_pmecc_create_user        ; -- Begin function atmel_pmecc_create_user
	.p2align	2
_atmel_pmecc_create_user:               ; @atmel_pmecc_create_user
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_atmel_pmecc_prepare_user_req
	cbz	w0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_2:
	mov	w22, #112
	mov	w20, #4
	mov	w0, #112
	mov	w1, #4
	bl	_ALIGN
	ldr	w8, [x19]
	bfi	w20, w8, #3, #29
	add	w9, w8, #4
	add	w8, w0, w8, lsl #2
	madd	w8, w20, w9, w8
	add	w0, w8, #4
	mov	w1, #4
	bl	_ALIGN
	ldr	w8, [x19]
	mov	w9, #12
	madd	w8, w8, w9, w0
	add	w0, w8, #12
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	str	x21, [x0, #104]
	add	x0, x0, #112
	mov	w1, #4
	bl	_PTR_ALIGN
	ldr	w8, [x19]
	mov	w9, #1
	bfi	w9, w8, #1, #31
	smaddl	x10, w9, w22, x0
	stp	x10, x0, [x20, #88]
	smaddl	x10, w9, w22, x10
	add	w11, w8, #1
	smaddl	x11, w11, w22, x10
	stp	x11, x10, [x20, #72]
	add	w8, w8, #2
	mul	w8, w9, w8
	smaddl	x0, w8, w22, x11
	mov	w1, #4
	bl	_PTR_ALIGN
	str	x0, [x20, #64]
	ldrsw	x8, [x19]
	lsl	x8, x8, #2
	add	x9, x0, x8
	add	x9, x9, #4
	add	x8, x9, x8
	add	x8, x8, #4
	stp	x9, x8, [x20, #48]
	mov	x0, x19
	bl	_atmel_pmecc_get_gf_tables
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_kfree
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_CAST
LBB0_5:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_1
LBB0_6:
	str	x22, [x20, #40]
	ldp	w8, w9, [x19, #4]
	sdiv	w8, w8, w9
	str	w8, [x20]
	ldr	x9, [x21]
	ldr	w8, [x9]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x0, #0
	ldr	x9, [x9, #8]
	ldr	w10, [x19]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9, x0, lsl #2]
	cmp	w11, w10
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x0, x0, #1
	cmp	x8, x0
	b.ne	LBB0_8
; %bb.10:
	mov	x0, x8
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_PMECC_CFG_BCH_STRENGTH
	mov	x21, x0
	ldr	w0, [x19, #8]
	bl	_PMECC_CFG_NSECTORS
	orr	w8, w0, w21
	str	w8, [x20, #8]
	ldr	w9, [x19, #12]
	cmp	w9, #1024
	b.ne	LBB0_14
; %bb.13:
Lloh6:
	adrp	x9, _PMECC_CFG_SECTOR1024@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PMECC_CFG_SECTOR1024@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x20, #8]
LBB0_14:
	ldp	x9, x8, [x19, #16]
	sub	x8, x8, #1
	str	x8, [x20, #32]
	ldrsw	x8, [x19, #4]
	add	x8, x9, x8
	sub	x8, x8, #1
	stp	x8, x9, [x20, #16]
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PMECC_CFG_SECTOR1024,4,2       ; @PMECC_CFG_SECTOR1024
.subsections_via_symbols
