	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DMAbuf_activate_recording      ## -- Begin function DMAbuf_activate_recording
	.p2align	4, 0x90
_DMAbuf_activate_recording:             ## @DMAbuf_activate_recording
	.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	_audio_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %r15
	movq	_OPEN_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	testl	%eax, (%r15)
	je	LBB0_13
## %bb.1:
	movq	_PCM_ENABLE_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_13
## %bb.2:
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	(%rsi), %rax
	movq	_DMODE_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	52(%rbx), %r13
	movq	%r13, %rdi
	callq	_spin_unlock_irq
	movl	%r14d, %edi
	callq	_DMAbuf_sync
	movl	%r14d, %edi
	callq	_DMAbuf_reset
	movq	%r13, %rdi
	callq	_spin_lock_irq
	movq	_DMODE_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_4:
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_reorganize_buffers
	movq	16(%r15), %rax
	movl	8(%rbx), %esi
	movl	48(%rbx), %edx
	movl	%r14d, %edi
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	_DMODE_INPUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_8:
	movq	_DMA_ACTIVE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, 12(%rbx)
	jne	LBB0_13
## %bb.9:
	cmpq	$0, 40(%rbx)
	je	LBB0_11
## %bb.10:
	movl	%r14d, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_reorganize_buffers
LBB0_11:
	movq	24(%rbx), %rsi
	movl	32(%rbx), %edx
	movq	_DMA_MODE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_local_start_dma
	movq	16(%r15), %rax
	movslq	16(%rbx), %rsi
	movslq	8(%rbx), %rdx
	imulq	%rdx, %rsi
	addq	24(%rbx), %rsi
	xorl	%r12d, %r12d
	movl	%r14d, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	callq	*16(%rax)
	movl	(%r13), %eax
	orl	%eax, 12(%rbx)
	movq	16(%r15), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.12:
	movl	8(%r15), %esi
	imull	4(%r15), %esi
	movl	%r14d, %edi
	callq	*%rcx
	jmp	LBB0_13
LBB0_6:
	movl	%eax, %r12d
LBB0_13:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_OPEN_READ,4,2                  ## @OPEN_READ
	.comm	_PCM_ENABLE_INPUT,4,2           ## @PCM_ENABLE_INPUT
	.comm	_DMODE_OUTPUT,8,3               ## @DMODE_OUTPUT
	.comm	_DMODE_NONE,8,3                 ## @DMODE_NONE
	.comm	_DMODE_INPUT,8,3                ## @DMODE_INPUT
	.comm	_DMA_ACTIVE,4,2                 ## @DMA_ACTIVE
	.comm	_DMA_MODE_READ,4,2              ## @DMA_MODE_READ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DMAbuf_activate_recording      ; -- Begin function DMAbuf_activate_recording
	.p2align	2
_DMAbuf_activate_recording:             ; @DMAbuf_activate_recording
	.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
Lloh0:
	adrp	x8, _audio_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _audio_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x20, [x8, w0, sxtw #3]
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _OPEN_READ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OPEN_READ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.1:
	ldr	w8, [x20, #4]
Lloh6:
	adrp	x9, _PCM_ENABLE_INPUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCM_ENABLE_INPUT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.2:
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x1]
Lloh9:
	adrp	x9, _DMODE_OUTPUT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMODE_OUTPUT@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	add	x22, x21, #52
	mov	x0, x22
	bl	_spin_unlock_irq
	mov	x0, x19
	bl	_DMAbuf_sync
	mov	x0, x19
	bl	_DMAbuf_reset
	mov	x0, x22
	bl	_spin_lock_irq
Lloh12:
	adrp	x8, _DMODE_NONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DMODE_NONE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_4:
	cbnz	x8, LBB0_7
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_reorganize_buffers
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	ldr	w1, [x21, #8]
	ldr	w2, [x21, #48]
	mov	x0, x19
	blr	x8
	tbnz	w0, #31, LBB0_13
; %bb.6:
Lloh15:
	adrp	x8, _DMODE_INPUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DMODE_INPUT@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_7:
	ldr	w8, [x21, #12]
Lloh18:
	adrp	x22, _DMA_ACTIVE@GOTPAGE
Lloh19:
	ldr	x22, [x22, _DMA_ACTIVE@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.8:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_reorganize_buffers
LBB0_10:
	ldr	x1, [x21, #24]
	ldr	w2, [x21, #32]
Lloh20:
	adrp	x8, _DMA_MODE_READ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DMA_MODE_READ@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_local_start_dma
	ldr	x8, [x20, #16]
	ldr	x8, [x8, #16]
	ldr	x9, [x21, #24]
	ldrsw	x10, [x21, #16]
	ldrsw	x2, [x21, #8]
	madd	x1, x2, x10, x9
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w3, #0
	blr	x8
	ldr	w8, [x22]
	ldr	w9, [x21, #12]
	orr	w8, w9, w8
	str	w8, [x21, #12]
	ldr	x8, [x20, #16]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_12
; %bb.11:
	ldp	w9, w10, [x20, #4]
	mul	w1, w10, w9
	mov	x0, x19
	blr	x8
LBB0_12:
	mov	w0, #0
LBB0_13:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_OPEN_READ,4,2                  ; @OPEN_READ
	.comm	_PCM_ENABLE_INPUT,4,2           ; @PCM_ENABLE_INPUT
	.comm	_DMODE_OUTPUT,8,3               ; @DMODE_OUTPUT
	.comm	_DMODE_NONE,8,3                 ; @DMODE_NONE
	.comm	_DMODE_INPUT,8,3                ; @DMODE_INPUT
	.comm	_DMA_ACTIVE,4,2                 ; @DMA_ACTIVE
	.comm	_DMA_MODE_READ,4,2              ; @DMA_MODE_READ
.subsections_via_symbols
