	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_bdle
_setup_bdle:                            ## @setup_bdle
	.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
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %r12
	testl	%r9d, %r9d
	jle	LBB0_9
## %bb.1:
	movl	%r9d, %ebx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %rax
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, 12(%r12)
	addq	$16, %r12
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rax
	incq	%rax
	movq	%rax, (%rdx)
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	addl	%r14d, %r8d
	testl	%ebx, %ebx
	jle	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_AZX_MAX_BDL_ENTRIES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movslq	%r8d, %r15
	movl	%ebx, %r14d
	movq	(%r13), %rbx
	addq	%r15, %rbx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movl	%eax, (%r12)
	movq	%rbx, %rdi
	movl	%r14d, %ebx
	callq	_upper_32_bits
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%r12)
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_snd_sgbuf_get_chunk_size
	movq	_AZX_DCAPS_4K_BDLE_BOUNDARY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	andl	(%rdx), %ecx
	andl	$4095, %r15d                    ## imm = 0xFFF
	movl	$4096, %r14d                    ## imm = 0x1000
	subl	%r15d, %r14d
	cmpl	%r14d, %eax
	cmovll	%eax, %r14d
	testl	%ecx, %ecx
	cmovel	%eax, %r14d
	movl	%r14d, %edi
	callq	_cpu_to_le32
	subl	%r14d, %ebx
	movl	%eax, 8(%r12)
	cmpl	$0, 16(%rbp)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.6:
	movl	$1, %edi
	callq	_cpu_to_le32
	movl	%eax, 12(%r12)
	addq	$16, %r12
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incq	(%rax)
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	addl	%r14d, %r8d
LBB0_8:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
LBB0_9:
	movq	%r12, (%rcx)
	jmp	LBB0_10
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r8d, %r8d
	subl	(%rax), %r8d
LBB0_10:
	movl	%r8d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AZX_MAX_BDL_ENTRIES,8,3        ## @AZX_MAX_BDL_ENTRIES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AZX_DCAPS_4K_BDLE_BOUNDARY,4,2 ## @AZX_DCAPS_4K_BDLE_BOUNDARY
	.no_dead_strip	_setup_bdle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_bdle
_setup_bdle:                            ; @setup_bdle
	.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, x4
	ldr	x27, [x3]
	cmp	w5, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x22, x6
	mov	x23, x5
	mov	x21, x2
	mov	x24, x1
	mov	x25, x0
	str	x3, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x8, [x2]
Lloh0:
	adrp	x28, _AZX_MAX_BDL_ENTRIES@GOTPAGE
Lloh1:
	ldr	x28, [x28, _AZX_MAX_BDL_ENTRIES@GOTPAGEOFF]
Lloh2:
	adrp	x20, _AZX_DCAPS_4K_BDLE_BOUNDARY@GOTPAGE
Lloh3:
	ldr	x20, [x20, _AZX_DCAPS_4K_BDLE_BOUNDARY@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x27, #12]
	add	x27, x27, #16
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	add	w19, w26, w19
	cmp	w23, #0
	b.le	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x28]
	cmp	x8, x9
	b.ge	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24]
	add	x26, x8, w19, sxtw
	mov	x0, x26
	bl	_cpu_to_le32
	str	w0, [x27]
	mov	x0, x26
	bl	_upper_32_bits
	bl	_cpu_to_le32
	str	w0, [x27, #4]
	mov	x0, x24
	mov	x1, x19
	mov	x2, x23
	bl	_snd_sgbuf_get_chunk_size
	ldr	w8, [x25]
	ldr	w9, [x20]
	and	w10, w19, #0xfff
	mov	w11, #4096
	sub	w10, w11, w10
	cmp	w0, w10
	csel	w10, w0, w10, lt
	tst	w9, w8
	csel	w26, w0, w10, eq
	mov	x0, x26
	bl	_cpu_to_le32
	str	w0, [x27, #8]
	sub	w23, w23, w26
	cbz	w22, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w23, LBB0_2
; %bb.6:
	mov	w0, #1
	bl	_cpu_to_le32
	str	w0, [x27, #12]
	add	x27, x27, #16
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	add	w19, w26, w19
LBB0_7:
	ldr	x3, [sp, #8]                    ; 8-byte Folded Reload
LBB0_8:
	str	x27, [x3]
	b	LBB0_10
LBB0_9:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_10:
	mov	x0, x19
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_AZX_MAX_BDL_ENTRIES,8,3        ; @AZX_MAX_BDL_ENTRIES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AZX_DCAPS_4K_BDLE_BOUNDARY,4,2 ; @AZX_DCAPS_4K_BDLE_BOUNDARY
	.no_dead_strip	_setup_bdle
.subsections_via_symbols
