	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prog_dmabuf
_prog_dmabuf:                           ## @prog_dmabuf
	.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	%rsi, %r15
	movl	(%rsi), %r14d
	movq	72(%rsi), %rax
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	$0, 4(%r15)
	movl	$5, 12(%r15)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$5, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, 72(%r15)
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movl	20(%r15), %edx
	xorl	%esi, %esi
	cmpl	$8, %edx
	sete	%sil
	incl	%esi
	movl	24(%r15), %edi
	leal	(%rdi,%rdi), %ecx
	cmpl	$1, %edi
	movl	$4, %ebx
	cmovnel	%ecx, %ebx
	sete	%cl
	shll	%cl, %esi
	imull	28(%r15), %esi
	movl	%esi, 16(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 96(%r15)
	movq	%rax, 80(%r15)
	movq	%rax, 88(%r15)
	sarl	$3, %edx
	imull	%edi, %edx
	movl	%edx, 32(%r15)
	movl	%ebx, 36(%r15)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movb	12(%r15), %cl
	shll	%cl, %r13d
	imull	%r14d, %edx
	movl	40(%r15), %esi
	testl	%esi, %esi
	je	LBB0_6
## %bb.4:
	movl	$1000, %eax                     ## imm = 0x3E8
	movl	%esi, %ecx
	shll	%cl, %eax
	cmpl	%edx, %eax
	jae	LBB0_7
## %bb.5:
	movl	%edx, %eax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	shrq	$38, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ld2
	movq	%rax, %rsi
	jmp	LBB0_7
LBB0_6:
	movl	%edx, %eax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	shrq	$37, %rax
	movl	48(%r15), %ecx
	testl	%ecx, %ecx
	movl	$1, %esi
	cmovnel	%ecx, %esi
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %edi
	callq	_ld2
	cmpl	$4, %eax
	movl	$3, %esi
	cmovgel	%eax, %esi
LBB0_7:
	movl	%esi, 44(%r15)
	movl	$1, %eax
	movl	%esi, %ecx
	shll	%cl, %eax
	movl	%eax, 52(%r15)
	movl	16(%r15), %r8d
	movl	%r8d, %edi
	shll	%cl, %edi
	movl	%edi, 56(%r15)
	xorl	%r12d, %r12d
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%edi
	cmpl	$3, %eax
	ja	LBB0_12
## %bb.8:
	cmpl	$4, %esi
	jl	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%rsi), %ecx
	movl	$1, %ebx
	shll	%cl, %ebx
	movl	%r8d, %edi
	shll	%cl, %edi
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%edi
	cmpl	$3, %eax
	ja	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$4, %esi
	movl	%ecx, %esi
	jg	LBB0_9
LBB0_11:
	movl	%ecx, 44(%r15)
	movl	%ebx, 52(%r15)
	movl	%edi, 56(%r15)
LBB0_12:
	movl	64(%r15), %ecx
	cmpl	%eax, %ecx
	movl	%eax, %edx
	cmovbl	%ecx, %edx
	cmpl	$4, %ecx
	cmovll	%eax, %edx
	movl	%edx, 60(%r15)
	imull	%edi, %edx
	movl	%edx, 68(%r15)
	movq	72(%r15), %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
	movl	20(%r15), %edx
	movl	24(%r15), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	movl	16(%r15), %edx
	movl	52(%r15), %esi
	movl	56(%r15), %ecx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movl	60(%r15), %esi
	movl	68(%r15), %edx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movl	$1, 4(%r15)
LBB0_13:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"prog_dmabuf: rate=%d, samplesize=%d, channels=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"prog_dmabuf: fragsize=%d, cnt_factor=%d, dma_fragsize=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"prog_dmabuf: numfrag=%d, dmasize=%d\n"

	.no_dead_strip	_prog_dmabuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prog_dmabuf
_prog_dmabuf:                           ; @prog_dmabuf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	ldr	w20, [x1]
	ldr	x0, [x1, #72]
Lloh0:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	cbnz	x0, LBB0_2
; %bb.1:
	stp	wzr, wzr, [x19, #4]
	mov	w8, #5
	str	w8, [x19, #12]
	ldr	w8, [x21]
	lsl	w0, w8, #5
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x19, #72]
	cbz	x0, LBB0_11
LBB0_2:
	ldp	w8, w9, [x19, #20]
	cmp	w8, #8
	mov	w10, #1
	cinc	w10, w10, eq
	lsl	w11, w9, #1
	mov	w12, #4
	cmp	w9, #1
	csel	w11, w12, w11, eq
	cset	w12, eq
	lsl	w10, w10, w12
	ldr	w12, [x19, #28]
	mul	w10, w10, w12
	str	w10, [x19, #16]
	stp	xzr, xzr, [x19, #96]
	stp	x0, x0, [x19, #80]
	asr	w8, w8, #3
	mul	w8, w9, w8
	stp	w8, w11, [x19, #32]
	mul	w8, w8, w20
	ldr	w9, [x21]
	ldr	w10, [x19, #12]
	lsl	w21, w9, w10
	ldr	w0, [x19, #40]
	cbz	w0, LBB0_5
; %bb.3:
	mov	w9, #1000
	lsl	w9, w9, w0
	cmp	w9, w8
	b.hs	LBB0_6
; %bb.4:
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	umull	x8, w8, w9
	lsr	x0, x8, #38
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ld2
	b	LBB0_6
LBB0_5:
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #37
	ldr	w9, [x19, #48]
	cmp	w9, #0
	csinc	w9, w9, wzr, ne
	udiv	w0, w8, w9
	bl	_ld2
	mov	w8, #3
	cmp	w0, #3
	csel	w0, w0, w8, gt
LBB0_6:
	str	w0, [x19, #44]
	mov	w22, #1
	lsl	w9, w22, w0
	ldr	w10, [x19, #16]
	lsl	w8, w10, w0
	stp	w9, w8, [x19, #52]
	udiv	w9, w21, w8
	cmp	w9, #3
	ccmp	w0, #4, #8, ls
	b.lt	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x11, x0
	sub	w0, w0, #1
	lsl	w8, w10, w0
	udiv	w9, w21, w8
	cmp	w9, #3
	ccmp	w11, #4, #4, ls
	b.gt	LBB0_7
; %bb.8:
	str	w0, [x19, #44]
	lsl	w10, w22, w0
	stp	w10, w8, [x19, #52]
LBB0_9:
	ldr	w10, [x19, #64]
	cmp	w10, w9
	ccmp	w10, #3, #4, lo
	csel	w9, w10, w9, gt
	str	w9, [x19, #60]
	mul	w8, w9, w8
	str	w8, [x19, #68]
	ldr	x0, [x19, #72]
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	ldp	w2, w8, [x19, #20]
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
	ldr	w2, [x19, #16]
	ldp	w1, w8, [x19, #52]
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	ldr	w1, [x19, #60]
	ldr	w2, [x19, #68]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
	mov	w0, #0
	str	w22, [x19, #4]
LBB0_10:
	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
	add	sp, sp, #64
	ret
LBB0_11:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"prog_dmabuf: rate=%d, samplesize=%d, channels=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"prog_dmabuf: fragsize=%d, cnt_factor=%d, dma_fragsize=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"prog_dmabuf: numfrag=%d, dmasize=%d\n"

	.no_dead_strip	_prog_dmabuf
.subsections_via_symbols
