	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drain_dac
_drain_dac:                             ## @drain_dac
	.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
	xorl	%r15d, %r15d
	cmpq	$0, 32(%rdi)
	je	LBB0_1
LBB0_14:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	cmpl	$0, 24(%rdi)
	je	LBB0_14
## %bb.2:
	cmpq	$0, 16(%rbx)
	jne	LBB0_14
## %bb.3:
	movl	%esi, %r14d
	leaq	48(%rbx), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	cltd
	idivl	%ecx
	cltd
	idivl	12(%rbx)
	movl	%eax, %edi
	callq	_au1550_delay
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %r13d
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	cmpl	4(%rbx), %r13d
	jle	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	testl	%r14d, %r14d
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	imull	$1000, %r13d, %eax              ## imm = 0x3E8
	movl	$48000, %ecx                    ## imm = 0xBB80
	cmpq	$0, 40(%rbx)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rbx), %ecx
	jmp	LBB0_10
LBB0_11:
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_current,4,2                    ## @current
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.no_dead_strip	_drain_dac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drain_dac
_drain_dac:                             ; @drain_dac
	.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
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	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
LBB0_3:
	mov	x20, x0
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_1
; %bb.4:
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_1
; %bb.5:
	mov	x19, x1
	add	x21, x20, #48
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w23, [x20]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w8, [x20, #4]
Lloh0:
	adrp	x22, _current@GOTPAGE
Lloh1:
	ldr	x22, [x22, _current@GOTPAGEOFF]
	cmp	w23, w8
	b.le	LBB0_13
; %bb.6:
	mov	w24, #1000
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x20, #8]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mul	w9, w23, w24
	sdiv	w8, w9, w8
	ldr	w9, [x20, #12]
	sdiv	w0, w8, w9
	bl	_au1550_delay
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w23, [x20]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w8, [x20, #4]
	cmp	w23, w8
	b.le	LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_signal_pending
	cbnz	x0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cbnz	w19, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w8, #48000
	b	LBB0_8
LBB0_13:
	ldr	w0, [x22]
	bl	_signal_pending
	cbz	x0, LBB0_2
; %bb.14:
Lloh2:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_current,4,2                    ; @current
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.no_dead_strip	_drain_dac
.subsections_via_symbols
