	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_nand_select_chip
_atmel_nand_select_chip:                ## @atmel_nand_select_chip
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_to_atmel_nand
	testl	%ebx, %ebx
	js	LBB0_2
## %bb.1:
	cmpl	%ebx, (%rax)
	jle	LBB0_2
## %bb.3:
	movq	16(%rax), %rcx
	movl	%ebx, %edx
	leaq	(%rcx,%rdx,8), %rsi
	movq	%rsi, 8(%rax)
	movq	(%rcx,%rdx,8), %rax
	movq	_ATMEL_NAND_GPIO_RB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movq	_atmel_nand_dev_ready@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_5
LBB0_2:
	movq	$0, 8(%rax)
	xorl	%eax, %eax
LBB0_5:
	movq	%rax, (%r14)
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATMEL_NAND_GPIO_RB,8,3         ## @ATMEL_NAND_GPIO_RB
	.comm	_atmel_nand_dev_ready,8,3       ## @atmel_nand_dev_ready
	.no_dead_strip	_atmel_nand_select_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_nand_select_chip
_atmel_nand_select_chip:                ; @atmel_nand_select_chip
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_to_atmel_nand
	tbnz	w20, #31, LBB0_4
; %bb.1:
	ldr	w8, [x0]
	cmp	w8, w20
	b.le	LBB0_4
; %bb.2:
	ldr	x8, [x0, #16]
	mov	w9, w20
	lsl	x9, x9, #3
	add	x10, x8, x9
	str	x10, [x0, #8]
	ldr	x8, [x8, x9]
Lloh0:
	adrp	x9, _ATMEL_NAND_GPIO_RB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATMEL_NAND_GPIO_RB@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, _atmel_nand_dev_ready@GOTPAGE
Lloh4:
	ldr	x8, [x8, _atmel_nand_dev_ready@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	b	LBB0_5
LBB0_4:
	mov	x8, #0
	str	xzr, [x0, #8]
LBB0_5:
	str	x8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ATMEL_NAND_GPIO_RB,8,3         ; @ATMEL_NAND_GPIO_RB
	.comm	_atmel_nand_dev_ready,8,3       ; @atmel_nand_dev_ready
	.no_dead_strip	_atmel_nand_select_chip
.subsections_via_symbols
