	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function azx_stream_reset
_azx_stream_reset:                      ## @azx_stream_reset
	.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	%rsi, %r13
	callq	_azx_stream_clear
	movq	_SD_CTL@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_azx_sd_readb
	movq	_SD_CTL_STREAM_RESET@GOTPCREL(%rip), %r12
	orb	(%r12), %al
	movzbl	%al, %edx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_azx_sd_writeb
	movl	$3, %edi
	callq	_udelay
	movl	$-299, %ebx                     ## imm = 0xFED5
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_azx_sd_readb
	movzbl	(%r12), %ecx
	testb	%al, %cl
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%rbx), %edx
	testl	%ebx, %ebx
	movl	%edx, %ebx
	jne	LBB0_1
LBB0_3:
	notb	%cl
	andb	%cl, %al
	movl	(%r15), %esi
	movzbl	%al, %edx
	movq	%r13, %rdi
	callq	_azx_sd_writeb
	movl	$3, %edi
	callq	_udelay
	movl	$-299, %ebx                     ## imm = 0xFED5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_azx_sd_readb
	testb	%al, (%r12)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_4
LBB0_6:
	movq	(%r13), %rax
	movq	$0, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_CTL,4,2                     ## @SD_CTL
	.comm	_SD_CTL_STREAM_RESET,1,0        ## @SD_CTL_STREAM_RESET
	.no_dead_strip	_azx_stream_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function azx_stream_reset
_azx_stream_reset:                      ; @azx_stream_reset
	.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	x19, x1
	bl	_azx_stream_clear
Lloh0:
	adrp	x21, _SD_CTL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SD_CTL@GOTPAGEOFF]
	ldr	w20, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_azx_sd_readb
Lloh2:
	adrp	x22, _SD_CTL_STREAM_RESET@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SD_CTL_STREAM_RESET@GOTPAGEOFF]
	ldrb	w8, [x22]
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x20
	bl	_azx_sd_writeb
	mov	w0, #3
	bl	_udelay
	mov	w20, #-299
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_azx_sd_readb
	ldrb	w8, [x22]
	and	w9, w8, w0
	cmp	w9, #0
	ccmp	w20, #0, #4, eq
	add	w20, w20, #1
	b.ne	LBB0_1
; %bb.2:
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_azx_sd_writeb
	mov	w0, #3
	bl	_udelay
	mov	w20, #-299
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_azx_sd_readb
	ldrb	w8, [x22]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w20, #0, #4, ne
	add	w20, w20, #1
	b.ne	LBB0_3
; %bb.4:
	ldr	x8, [x19]
	str	xzr, [x8]
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_CTL,4,2                     ; @SD_CTL
	.comm	_SD_CTL_STREAM_RESET,1,0        ; @SD_CTL_STREAM_RESET
	.no_dead_strip	_azx_stream_reset
.subsections_via_symbols
