	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_davinci_correct_1bit
_nand_davinci_correct_1bit:             ## @nand_davinci_correct_1bit
	.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
	movq	%rsi, %r14
	movl	4(%rdx), %eax
	movl	8(%rdx), %esi
	shll	$8, %eax
	orl	(%rdx), %eax
	shll	$16, %esi
	orl	%eax, %esi
	movl	4(%rcx), %eax
	shll	$8, %eax
	orl	(%rcx), %eax
	movl	8(%rcx), %ebx
	shll	$16, %ebx
	orl	%eax, %ebx
	xorl	%esi, %ebx
	je	LBB0_1
## %bb.2:
	movl	%ebx, %ecx
	sarl	$12, %ecx
	movl	%ecx, %eax
	xorl	%ebx, %eax
	notl	%eax
	testl	$4095, %eax                     ## imm = 0xFFF
	jne	LBB0_5
## %bb.3:
	movq	(%rdi), %rdx
	sarl	$15, %ebx
	movl	$-1, %eax
	cmpl	(%rdx), %ebx
	jge	LBB0_6
## %bb.4:
	andl	$7, %ecx
	movl	%ecx, %edi
	callq	_BIT
	movslq	%ebx, %rcx
	xorl	%eax, (%r14,%rcx,4)
	movl	$1, %eax
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	leal	-1(%rbx), %eax
	xorl	%ecx, %ecx
	testl	%eax, %ebx
	sete	%cl
	leal	(%rcx,%rcx), %eax
	decl	%eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nand_davinci_correct_1bit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_davinci_correct_1bit
_nand_davinci_correct_1bit:             ; @nand_davinci_correct_1bit
	.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
	ldp	w8, w9, [x2]
	orr	w8, w8, w9, lsl #8
	ldr	w9, [x2, #8]
	orr	w8, w8, w9, lsl #16
	ldp	w9, w10, [x3]
	orr	w9, w9, w10, lsl #8
	ldr	w10, [x3, #8]
	orr	w9, w9, w10, lsl #16
	eor	w8, w9, w8
	cbz	w8, LBB0_4
; %bb.1:
	eon	w9, w8, w8, lsr #12
	tst	w9, #0xfff
	b.ne	LBB0_5
; %bb.2:
	ldr	x9, [x0]
	asr	w20, w8, #15
	ldr	w9, [x9]
	cmp	w20, w9
	b.ge	LBB0_6
; %bb.3:
	mov	x19, x1
	ubfx	w0, w8, #12, #3
	bl	_BIT
	sbfiz	x8, x20, #2, #32
	ldr	w9, [x19, x8]
	eor	w9, w9, w0
	str	w9, [x19, x8]
	mov	w0, #1
	b	LBB0_7
LBB0_4:
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	sub	w9, w8, #1
	tst	w8, w9
	mov	w8, #-1
	cneg	w0, w8, eq
	b	LBB0_7
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nand_davinci_correct_1bit
.subsections_via_symbols
