	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hda_corb_run
_hda_corb_run:                          ## @hda_corb_run
	.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	%rdi, %rbx
	movq	_HDAC_CORBWP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hda_get_reg_by_offset
	movl	%eax, (%rbx)
	movl	4(%rbx), %ecx
	cmpl	%eax, %ecx
	je	LBB0_4
## %bb.1:
	movq	_HDA_CORB_ENTRY_LEN@GOTPCREL(%rip), %r14
	movl	%ecx, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 16(%rbx)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%eax
	cltd
	idivl	8(%rbx)
	movl	%edx, 4(%rbx)
	movslq	(%r14), %rax
	movslq	%edx, %rdi
	imulq	%rax, %rdi
	addq	24(%rbx), %rdi
	callq	_hda_dma_ld_dword
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_hda_send_command
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movl	4(%rbx), %eax
	cmpl	(%rbx), %eax
	jne	LBB0_2
LBB0_4:
	movq	_HDAC_CORBRP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_hda_set_reg_by_offset
	cmpq	$0, 16(%rbx)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_hda_response_interrupt
LBB0_6:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDAC_CORBWP,4,2                ## @HDAC_CORBWP
	.comm	_HDA_CORB_ENTRY_LEN,4,2         ## @HDA_CORB_ENTRY_LEN
	.comm	_HDAC_CORBRP,4,2                ## @HDAC_CORBRP
	.no_dead_strip	_hda_corb_run
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hda_corb_run
_hda_corb_run:                          ; @hda_corb_run
	.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	x19, x0
Lloh0:
	adrp	x8, _HDAC_CORBWP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDAC_CORBWP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_hda_get_reg_by_offset
	mov	x2, x0
	str	w0, [x19]
	ldr	w8, [x19, #4]
	cmp	w8, w0
	b.eq	LBB0_4
; %bb.1:
Lloh3:
	adrp	x20, _HDA_CORB_ENTRY_LEN@GOTPAGE
Lloh4:
	ldr	x20, [x20, _HDA_CORB_ENTRY_LEN@GOTPAGEOFF]
	mov	x2, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w2, #1
	ldr	w9, [x19, #8]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x19, #4]
	ldr	x9, [x19, #24]
	ldrsw	x10, [x20]
	sxtw	x8, w8
	madd	x0, x10, x8, x9
	bl	_hda_dma_ld_dword
	mov	x1, x0
	mov	x0, x19
	bl	_hda_send_command
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	ldp	w8, w2, [x19]
	cmp	w2, w8
	b.ne	LBB0_2
LBB0_4:
Lloh5:
	adrp	x8, _HDAC_CORBRP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDAC_CORBRP@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hda_set_reg_by_offset
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_hda_response_interrupt
LBB0_6:
	mov	w0, #0
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_HDAC_CORBWP,4,2                ; @HDAC_CORBWP
	.comm	_HDA_CORB_ENTRY_LEN,4,2         ; @HDA_CORB_ENTRY_LEN
	.comm	_HDAC_CORBRP,4,2                ; @HDAC_CORBRP
	.no_dead_strip	_hda_corb_run
.subsections_via_symbols
