	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_hsmc_nand_setup_data_interface
_atmel_hsmc_nand_setup_data_interface:  ## @atmel_hsmc_nand_setup_data_interface
	.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	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_to_hsmc_nand_controller
	movq	%rax, %r14
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_atmel_smc_nand_prepare_smcconf
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	_NAND_DATA_IFACE_CHECK_ONLY@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_5
## %bb.2:
	movq	(%rbx), %r13
	movslq	%r15d, %rax
	leaq	(%rax,%rax,2), %rbx
	leaq	(,%rbx,8), %r15
	addq	%r13, %r15
	movl	-48(%rbp), %eax
	movl	%eax, (%r13,%rbx,8)
	movq	8(%r13,%rbx,8), %rax
	movq	_ATMEL_NAND_NATIVE_RB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movl	16(%r13,%rbx,8), %edi
	callq	_ATMEL_HSMC_TIMINGS_RBNSEL
	orl	%eax, (%r15)
LBB0_4:
	movl	(%r14), %esi
	movl	4(%r14), %edi
	movl	4(%r13,%rbx,8), %edx
	movq	%r15, %rcx
	callq	_atmel_hsmc_cs_conf_apply
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_DATA_IFACE_CHECK_ONLY,4,2 ## @NAND_DATA_IFACE_CHECK_ONLY
	.comm	_ATMEL_NAND_NATIVE_RB,8,3       ## @ATMEL_NAND_NATIVE_RB
	.no_dead_strip	_atmel_hsmc_nand_setup_data_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_hsmc_nand_setup_data_interface
_atmel_hsmc_nand_setup_data_interface:  ; @atmel_hsmc_nand_setup_data_interface
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w0, [x0, #8]
	bl	_to_hsmc_nand_controller
	mov	x20, x0
	add	x2, sp, #8
	mov	x0, x22
	mov	x1, x19
	bl	_atmel_smc_nand_prepare_smcconf
	mov	x19, x0
	cbnz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _NAND_DATA_IFACE_CHECK_ONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_DATA_IFACE_CHECK_ONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_5
; %bb.2:
	ldr	x22, [x22]
	sxtw	x23, w21
	mov	w8, #24
	smaddl	x21, w21, w8, x22
	ldr	w8, [sp, #8]
	str	w8, [x21]
	ldr	x8, [x21, #8]
Lloh3:
	adrp	x9, _ATMEL_NAND_NATIVE_RB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATMEL_NAND_NATIVE_RB@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #24
	madd	x8, x23, x8, x22
	ldr	w0, [x8, #16]
	bl	_ATMEL_HSMC_TIMINGS_RBNSEL
	ldr	w8, [x21]
	orr	w8, w8, w0
	str	w8, [x21]
LBB0_4:
	ldp	w1, w0, [x20]
	mov	w8, #24
	madd	x8, x23, x8, x22
	ldr	w2, [x8, #4]
	mov	x3, x21
	bl	_atmel_hsmc_cs_conf_apply
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_DATA_IFACE_CHECK_ONLY,4,2 ; @NAND_DATA_IFACE_CHECK_ONLY
	.comm	_ATMEL_NAND_NATIVE_RB,8,3       ; @ATMEL_NAND_NATIVE_RB
	.no_dead_strip	_atmel_hsmc_nand_setup_data_interface
.subsections_via_symbols
