	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_nfc_set_op_addr
_atmel_nfc_set_op_addr:                 ## @atmel_nfc_set_op_addr
	.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
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_nand_to_mtd
	movq	%rax, %r12
	movl	4(%r14), %edi
	callq	_to_hsmc_nand_controller
	testl	%ebx, %ebx
	js	LBB0_3
## %bb.1:
	movq	(%rax), %rcx
	movslq	8(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 8(%rax)
	movl	%ebx, (%rcx,%rdx,4)
	cmpl	$513, (%r12)                    ## imm = 0x201
	jl	LBB0_3
## %bb.2:
	shrl	$8, %ebx
	movslq	8(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 8(%rax)
	movl	%ebx, (%rcx,%rdx,4)
LBB0_3:
	testl	%r15d, %r15d
	js	LBB0_6
## %bb.4:
	movq	(%rax), %rcx
	movslq	8(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 8(%rax)
	movl	%r15d, (%rcx,%rdx,4)
	movl	%r15d, %edx
	shrl	$8, %edx
	movslq	8(%rax), %rsi
	leal	1(%rsi), %edi
	movl	%edi, 8(%rax)
	movl	%edx, (%rcx,%rsi,4)
	movq	_NAND_ROW_ADDR_3@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%r14)
	je	LBB0_6
## %bb.5:
	shrl	$16, %r15d
	movslq	8(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 8(%rax)
	movl	%r15d, (%rcx,%rdx,4)
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_ROW_ADDR_3,4,2            ## @NAND_ROW_ADDR_3
	.no_dead_strip	_atmel_nfc_set_op_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_nfc_set_op_addr
_atmel_nfc_set_op_addr:                 ; @atmel_nfc_set_op_addr
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_nand_to_mtd
	mov	x22, x0
	ldr	w0, [x20, #4]
	bl	_to_hsmc_nand_controller
	tbnz	w21, #31, LBB0_3
; %bb.1:
	ldr	x8, [x0]
	ldrsw	x9, [x0, #8]
	add	w10, w9, #1
	str	w10, [x0, #8]
	str	w21, [x8, x9, lsl #2]
	ldr	w9, [x22]
	cmp	w9, #513
	b.lt	LBB0_3
; %bb.2:
	lsr	w9, w21, #8
	ldrsw	x10, [x0, #8]
	add	w11, w10, #1
	str	w11, [x0, #8]
	str	w9, [x8, x10, lsl #2]
LBB0_3:
	tbnz	w19, #31, LBB0_6
; %bb.4:
	ldr	x8, [x0]
	ldrsw	x9, [x0, #8]
	add	w10, w9, #1
	str	w10, [x0, #8]
	str	w19, [x8, x9, lsl #2]
	lsr	w9, w19, #8
	ldrsw	x10, [x0, #8]
	add	w11, w10, #1
	str	w11, [x0, #8]
	str	w9, [x8, x10, lsl #2]
	ldr	w9, [x20]
Lloh0:
	adrp	x10, _NAND_ROW_ADDR_3@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NAND_ROW_ADDR_3@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.5:
	lsr	w9, w19, #16
	ldrsw	x10, [x0, #8]
	add	w11, w10, #1
	str	w11, [x0, #8]
	str	w9, [x8, x10, lsl #2]
LBB0_6:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_ROW_ADDR_3,4,2            ; @NAND_ROW_ADDR_3
	.no_dead_strip	_atmel_nfc_set_op_addr
.subsections_via_symbols
