	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_bit_flips                   ## -- Begin function do_bit_flips
	.p2align	4, 0x90
_do_bit_flips:                          ## @do_bit_flips
	.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	_bitflips@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	je	LBB0_6
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_random32
	cmpl	$4194303, %eax                  ## imm = 0x3FFFFF
	jg	LBB0_6
## %bb.2:
	movl	$1, %ebx
	cmpl	$2, (%r12)
	jl	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_random32
	cltd
	idivl	(%r12)
	movl	%edx, %ebx
	incl	%ebx
	je	LBB0_6
LBB0_4:
	shll	$3, %r14d
	movq	_nsmtd@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_random32
	cltd
	idivl	%r14d
                                        ## kill: def $edx killed $edx def $rdx
	movl	%edx, %ecx
	andb	$7, %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	24(%r15), %rcx
	leal	7(%rdx), %esi
	testl	%edx, %edx
	cmovnsl	%edx, %esi
	sarl	$3, %esi
	movslq	%esi, %rsi
	xorl	%eax, (%rcx,%rsi,4)
	movq	(%r15), %rcx
	addq	8(%r15), %rcx
	movl	16(%r15), %eax
	movq	(%r13), %rsi
	movl	(%rsi), %r9d
	movl	4(%rsi), %r8d
	movq	%r12, %rdi
	movl	%edx, %esi
	movl	%eax, %edx
	callq	_NS_WARN
	decl	%ebx
	jne	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bitflips,4,2                   ## @bitflips
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read_page: flipping bit %d in page %d reading from %d ecc: corrected=%u failed=%u\n"

	.comm	_nsmtd,8,3                      ## @nsmtd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_bit_flips                   ; -- Begin function do_bit_flips
	.p2align	2
_do_bit_flips:                          ; @do_bit_flips
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x23, _bitflips@GOTPAGE
Lloh1:
	ldr	x23, [x23, _bitflips@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	bl	_random32
	cmp	w0, #1024, lsl #12              ; =4194304
	b.ge	LBB0_6
; %bb.2:
	ldr	w8, [x23]
	mov	w21, #1
	mov	w22, #1
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.3:
	bl	_random32
	ldr	w8, [x23]
	sdiv	w9, w0, w8
	msub	w8, w9, w8, w0
	adds	w22, w8, #1
	b.hs	LBB0_6
LBB0_4:
	lsl	w23, w20, #3
Lloh2:
	adrp	x24, _nsmtd@GOTPAGE
Lloh3:
	ldr	x24, [x24, _nsmtd@GOTPAGEOFF]
Lloh4:
	adrp	x20, l_.str@PAGE
Lloh5:
	add	x20, x20, l_.str@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	w22, w22, #1
	bl	_random32
	sdiv	w8, w0, w23
	msub	w1, w8, w23, w0
	and	w8, w1, #0x7
	lsl	w8, w21, w8
	ldr	x9, [x19, #24]
	add	w10, w1, #7
	cmp	w1, #0
	csel	w10, w10, w1, lt
	asr	w10, w10, #3
	sbfiz	x10, x10, #2, #32
	ldr	w11, [x9, x10]
	eor	w8, w11, w8
	str	w8, [x9, x10]
	ldr	w2, [x19, #16]
	ldp	x9, x8, [x19]
	add	x3, x9, x8
	ldr	x8, [x24]
	ldp	w5, w4, [x8]
	mov	x0, x20
	bl	_NS_WARN
	cbnz	w22, LBB0_5
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_bitflips,4,2                   ; @bitflips
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read_page: flipping bit %d in page %d reading from %d ecc: corrected=%u failed=%u\n"

	.comm	_nsmtd,8,3                      ; @nsmtd
.subsections_via_symbols
