	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_dq_callback
_sd_dq_callback:                        ## @sd_dq_callback
	.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	%rdi, %r14
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_sd_stopN
	movq	%r14, %rdi
	callq	_sd_start
	movq	$0, 16(%r14)
LBB0_2:
	movl	(%r14), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%r14)
	cmpl	$19, %eax
	jl	LBB0_18
## %bb.3:
	movq	_HV7131_REG_HIREFNOH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_se401_get_feature
	movq	_HV7131_REG_HIREFNOL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_se401_get_feature
	movq	_HV7131_REG_LOREFNOH@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_se401_get_feature
	movq	_HV7131_REG_LOREFNOL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_se401_get_feature
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_se401_get_feature
	movl	%eax, %r15d
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_se401_get_feature
	movl	%eax, %ebx
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_se401_get_feature
	movl	%eax, %r12d
	shll	$8, %r12d
	movq	_HV7131_REG_LOREFNOL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_se401_get_feature
	addl	%r12d, %eax
	movl	4(%r14), %ecx
	cmpl	$11, %eax
	jb	LBB0_8
## %bb.4:
	cmpl	$64, %ecx
	movl	$63, %esi
	cmovgel	%ecx, %esi
	movl	%ecx, %edx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%edx, %esi
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%edx
	movl	%edx, 4(%r14)
	movl	%eax, %edi
	shrl	%edi
	cmpl	$19, %eax
	movl	%edi, %eax
	ja	LBB0_5
	jmp	LBB0_12
LBB0_8:
	shll	$8, %r15d
	addl	%r15d, %ebx
	movl	%ecx, %edx
	cmpl	$21, %ebx
	jb	LBB0_12
## %bb.9:
	movl	%ecx, %edx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	testl	%edx, %edx
	jle	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	decl	%edx
	movl	%edx, 4(%r14)
	movl	%ebx, %eax
	shrl	%eax
	cmpl	$39, %ebx
	movl	%eax, %ebx
	ja	LBB0_10
	jmp	LBB0_12
LBB0_6:
	movl	%esi, %edx
LBB0_12:
	xorl	%eax, %eax
	movl	%edx, %esi
	subl	%ecx, %esi
	setg	%al
	addl	%eax, %eax
	decl	%eax
	movl	8(%r14), %edi
	testl	%edi, %edi
	je	LBB0_15
## %bb.13:
	cmpl	%eax, %edi
	je	LBB0_15
## %bb.14:
	movl	%esi, %edx
	shrl	$31, %edx
	addl	%esi, %edx
	sarl	%edx
	addl	%ecx, %edx
	movl	%edx, 4(%r14)
LBB0_15:
	cmpl	%ecx, %edx
	je	LBB0_17
## %bb.16:
	movl	%eax, 8(%r14)
	movq	_HV7131_REG_ARLV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_se401_set_feature
LBB0_17:
	movl	$0, (%r14)
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HV7131_REG_HIREFNOH,4,2        ## @HV7131_REG_HIREFNOH
	.comm	_HV7131_REG_HIREFNOL,4,2        ## @HV7131_REG_HIREFNOL
	.comm	_HV7131_REG_LOREFNOH,4,2        ## @HV7131_REG_LOREFNOH
	.comm	_HV7131_REG_LOREFNOL,4,2        ## @HV7131_REG_LOREFNOL
	.comm	_HV7131_REG_ARLV,4,2            ## @HV7131_REG_ARLV
	.no_dead_strip	_sd_dq_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_dq_callback
_sd_dq_callback:                        ; @sd_dq_callback
	.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
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_sd_stopN
	mov	x0, x19
	bl	_sd_start
	str	xzr, [x19, #16]
LBB0_2:
	ldr	w8, [x19]
	add	w9, w8, #1
	str	w9, [x19]
	cmp	w8, #19
	b.lt	LBB0_16
; %bb.3:
Lloh0:
	adrp	x20, _HV7131_REG_HIREFNOH@GOTPAGE
Lloh1:
	ldr	x20, [x20, _HV7131_REG_HIREFNOH@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_se401_get_feature
Lloh2:
	adrp	x21, _HV7131_REG_HIREFNOL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _HV7131_REG_HIREFNOL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_se401_get_feature
Lloh4:
	adrp	x22, _HV7131_REG_LOREFNOH@GOTPAGE
Lloh5:
	ldr	x22, [x22, _HV7131_REG_LOREFNOH@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_se401_get_feature
Lloh6:
	adrp	x23, _HV7131_REG_LOREFNOL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _HV7131_REG_LOREFNOL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_se401_get_feature
	ldr	w1, [x20]
	mov	x0, x19
	bl	_se401_get_feature
	mov	x20, x0
	ldr	w1, [x21]
	mov	x0, x19
	bl	_se401_get_feature
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_se401_get_feature
	mov	x22, x0
	ldr	w1, [x23]
	mov	x0, x19
	bl	_se401_get_feature
	add	w9, w0, w22, lsl #8
	ldr	w8, [x19, #4]
	cmp	w9, #11
	b.lo	LBB0_7
; %bb.4:
	mov	w10, #63
	cmp	w8, #63
	csel	w10, w8, w10, gt
	mov	x2, x8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w10, w2
	b.eq	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w2, w2, #1
	str	w2, [x19, #4]
	lsr	w11, w9, #1
	cmp	w9, #19
	mov	x9, x11
	b.hi	LBB0_5
	b	LBB0_11
LBB0_7:
	add	w9, w21, w20, lsl #8
	mov	x2, x8
	cmp	w9, #21
	b.lo	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	subs	w10, w2, #1
	b.lt	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	str	w10, [x19, #4]
	lsr	w11, w9, #1
	mov	x2, x10
	cmp	w9, #39
	mov	x9, x11
	b.hi	LBB0_8
	b	LBB0_11
LBB0_10:
	mov	x2, x10
LBB0_11:
	subs	w10, w2, w8
	mov	w9, #1
	cneg	w9, w9, le
	ldr	w11, [x19, #8]
	cmp	w11, #0
	ccmp	w11, w9, #4, ne
	b.eq	LBB0_13
; %bb.12:
	cmp	w10, #0
	cinc	w10, w10, lt
	add	w2, w8, w10, asr #1
	str	w2, [x19, #4]
LBB0_13:
	cmp	w2, w8
	b.eq	LBB0_15
; %bb.14:
	str	w9, [x19, #8]
Lloh8:
	adrp	x8, _HV7131_REG_ARLV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HV7131_REG_ARLV@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_se401_set_feature
LBB0_15:
	str	wzr, [x19]
LBB0_16:
	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	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_HV7131_REG_HIREFNOH,4,2        ; @HV7131_REG_HIREFNOH
	.comm	_HV7131_REG_HIREFNOL,4,2        ; @HV7131_REG_HIREFNOL
	.comm	_HV7131_REG_LOREFNOH,4,2        ; @HV7131_REG_LOREFNOH
	.comm	_HV7131_REG_LOREFNOL,4,2        ; @HV7131_REG_LOREFNOL
	.comm	_HV7131_REG_ARLV,4,2            ; @HV7131_REG_ARLV
	.no_dead_strip	_sd_dq_callback
.subsections_via_symbols
