	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_bt87x_create_risc
_snd_bt87x_create_risc:                 ## @snd_bt87x_create_risc
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	16(%rdi), %r14
	testq	%r14, %r14
	jne	LBB0_3
## %bb.1:
	leaq	8(%r12), %r13
	movq	_SNDRV_DMA_TYPE_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	24(%r12), %edi
	callq	_snd_dma_pci_data
	movl	%eax, %r15d
	movq	_MAX_RISC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PAGE_ALIGN
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	movq	%r13, %rcx
	callq	_snd_dma_alloc_pages
	testq	%rax, %rax
	js	LBB0_12
## %bb.2:
	movq	16(%r12), %r14
LBB0_3:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	_RISC_SYNC@GOTPCREL(%rip), %rcx
	movq	_RISC_SYNC_FM1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%rcx), %edi
	callq	_cpu_to_le32
	movl	%eax, (%r14)
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%r14)
	addq	$8, %r14
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.4:
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%ebx, %eax
	je	LBB0_10
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	shll	$4, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	_RISC_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RISC_EOL@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	cmpl	%esi, %r12d
	movl	$0, %eax
	cmoval	%eax, %edi
	orl	%ebx, %edi
	callq	_cpu_to_le32
	movl	%eax, (%r14)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_snd_pcm_sgbuf_get_addr
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%r14)
	addq	$8, %r14
	addl	%r13d, %r15d
	subl	%r13d, %r12d
	je	LBB0_9
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%esi
	subl	%edx, %esi
	cmpl	%r12d, %esi
	movl	%r12d, %r13d
	cmovbl	%esi, %r13d
	movq	_RISC_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	%r13d, %ebx
	cmpl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	xorl	%edx, %edx
	divl	-48(%rbp)                       ## 4-byte Folded Reload
	movl	%eax, %edx
	movq	_RISC_SOL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movq	_RISC_SET_STATUS_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %eax
	notl	%edx
	orl	%ebx, %eax
	andl	$15, %edx
	movq	_RISC_RESET_STATUS_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %edx
	orl	%eax, %edx
	movl	%edx, %ebx
	jmp	LBB0_8
LBB0_10:
	movq	_RISC_SYNC_VRO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RISC_SYNC@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, (%r14)
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%r14)
	movq	_RISC_JUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, 8(%r14)
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	8(%r12), %edi
	callq	_cpu_to_le32
	movl	%eax, 12(%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12)
	movl	%ebx, 4(%r12)
LBB0_11:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_DMA_TYPE_DEV,4,2         ## @SNDRV_DMA_TYPE_DEV
	.comm	_MAX_RISC_SIZE,4,2              ## @MAX_RISC_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RISC_SYNC,4,2                  ## @RISC_SYNC
	.comm	_RISC_SYNC_FM1,4,2              ## @RISC_SYNC_FM1
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_RISC_WRITE,4,2                 ## @RISC_WRITE
	.comm	_RISC_SOL,4,2                   ## @RISC_SOL
	.comm	_RISC_SET_STATUS_SHIFT,4,2      ## @RISC_SET_STATUS_SHIFT
	.comm	_RISC_RESET_STATUS_SHIFT,4,2    ## @RISC_RESET_STATUS_SHIFT
	.comm	_RISC_EOL,4,2                   ## @RISC_EOL
	.comm	_RISC_IRQ,4,2                   ## @RISC_IRQ
	.comm	_RISC_SYNC_VRO,4,2              ## @RISC_SYNC_VRO
	.comm	_RISC_JUMP,4,2                  ## @RISC_JUMP
	.no_dead_strip	_snd_bt87x_create_risc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_bt87x_create_risc
_snd_bt87x_create_risc:                 ; @snd_bt87x_create_risc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x28, x2
	mov	x22, x1
	mov	x26, x0
	ldr	x20, [x0, #16]
	cbnz	x20, LBB0_3
; %bb.1:
	add	x23, x26, #8
Lloh0:
	adrp	x8, _SNDRV_DMA_TYPE_DEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNDRV_DMA_TYPE_DEV@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	ldr	w0, [x26, #24]
	bl	_snd_dma_pci_data
	mov	x25, x0
Lloh3:
	adrp	x8, _MAX_RISC_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_RISC_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_PAGE_ALIGN
	mov	x2, x0
	mov	x0, x24
	mov	x1, x25
	mov	x3, x23
	bl	_snd_dma_alloc_pages
	tbnz	x0, #63, LBB0_13
; %bb.2:
	ldr	x20, [x26, #16]
LBB0_3:
	str	x26, [sp]                       ; 8-byte Folded Spill
Lloh6:
	adrp	x8, _RISC_SYNC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RISC_SYNC@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _RISC_SYNC_FM1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RISC_SYNC_FM1@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_le32
	str	w0, [x20]
	mov	w0, #0
	bl	_cpu_to_le32
	add	x25, x20, #8
	str	w0, [x20, #4]
	cbz	w28, LBB0_10
; %bb.4:
	mov	w8, #0
	mov	w23, #0
Lloh12:
	adrp	x24, _RISC_IRQ@GOTPAGE
Lloh13:
	ldr	x24, [x24, _RISC_IRQ@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	add	w8, w8, #1
	mov	x25, x26
	cmp	w8, w28
	b.eq	LBB0_11
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	lsl	w21, w8, #4
	mov	x20, x19
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
Lloh14:
	adrp	x10, _RISC_EOL@GOTPAGE
Lloh15:
	ldr	x10, [x10, _RISC_EOL@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	ldr	w11, [x24]
	orr	w10, w11, w10
	cmp	w20, w8
	csel	w8, wzr, w10, hi
	orr	w0, w8, w9
	bl	_cpu_to_le32
	str	w0, [x25]
	mov	x0, x22
	mov	x1, x23
	bl	_snd_pcm_sgbuf_get_addr
	bl	_cpu_to_le32
	add	x26, x25, #8
	str	w0, [x25, #4]
	add	w23, w27, w23
	mov	x25, x26
	subs	w20, w20, w27
	b.eq	LBB0_5
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
Lloh17:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	udiv	w9, w23, w8
	neg	w10, w23
	madd	w9, w9, w8, w10
	add	w8, w8, w9
	cmp	w8, w20
	csel	w27, w8, w20, lo
Lloh20:
	adrp	x9, _RISC_WRITE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _RISC_WRITE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w9, w27, w9
	cmp	w20, w19
	b.ne	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	udiv	w10, w21, w28
	mvn	w11, w10
Lloh23:
	adrp	x12, _RISC_SOL@GOTPAGE
Lloh24:
	ldr	x12, [x12, _RISC_SOL@GOTPAGEOFF]
Lloh25:
	ldr	w12, [x12]
	orr	w9, w12, w9
Lloh26:
	adrp	x12, _RISC_SET_STATUS_SHIFT@GOTPAGE
Lloh27:
	ldr	x12, [x12, _RISC_SET_STATUS_SHIFT@GOTPAGEOFF]
Lloh28:
	ldr	w12, [x12]
	lsl	w10, w10, w12
	orr	w9, w9, w10
	and	w10, w11, #0xf
Lloh29:
	adrp	x11, _RISC_RESET_STATUS_SHIFT@GOTPAGE
Lloh30:
	ldr	x11, [x11, _RISC_RESET_STATUS_SHIFT@GOTPAGEOFF]
Lloh31:
	ldr	w11, [x11]
	lsl	w10, w10, w11
	orr	w9, w9, w10
	b	LBB0_7
LBB0_10:
	mov	x26, x25
LBB0_11:
Lloh32:
	adrp	x8, _RISC_SYNC@GOTPAGE
Lloh33:
	ldr	x8, [x8, _RISC_SYNC@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _RISC_SYNC_VRO@GOTPAGE
Lloh36:
	ldr	x9, [x9, _RISC_SYNC_VRO@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_le32
	str	w0, [x26]
	mov	w0, #0
	bl	_cpu_to_le32
	str	w0, [x26, #4]
Lloh38:
	adrp	x8, _RISC_JUMP@GOTPAGE
Lloh39:
	ldr	x8, [x8, _RISC_JUMP@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	w0, [x26, #8]
	ldr	x20, [sp]                       ; 8-byte Folded Reload
	ldr	w0, [x20, #8]
	bl	_cpu_to_le32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x26, #12]
	stp	w19, w28, [x20]
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
Lloh41:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_DMA_TYPE_DEV,4,2         ; @SNDRV_DMA_TYPE_DEV
	.comm	_MAX_RISC_SIZE,4,2              ; @MAX_RISC_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RISC_SYNC,4,2                  ; @RISC_SYNC
	.comm	_RISC_SYNC_FM1,4,2              ; @RISC_SYNC_FM1
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_RISC_WRITE,4,2                 ; @RISC_WRITE
	.comm	_RISC_SOL,4,2                   ; @RISC_SOL
	.comm	_RISC_SET_STATUS_SHIFT,4,2      ; @RISC_SET_STATUS_SHIFT
	.comm	_RISC_RESET_STATUS_SHIFT,4,2    ; @RISC_RESET_STATUS_SHIFT
	.comm	_RISC_EOL,4,2                   ; @RISC_EOL
	.comm	_RISC_IRQ,4,2                   ; @RISC_IRQ
	.comm	_RISC_SYNC_VRO,4,2              ; @RISC_SYNC_VRO
	.comm	_RISC_JUMP,4,2                  ; @RISC_JUMP
	.no_dead_strip	_snd_bt87x_create_risc
.subsections_via_symbols
