	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function packet_length
_packet_length:                         ## @packet_length
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	(%rdi), %rbx
	movq	_DMA_CTX_ASYNC_REQ@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_3
## %bb.1:
	movq	_DMA_CTX_ASYNC_RESP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_3
## %bb.2:
	movq	_DMA_CTX_ISO@GOTPCREL(%rip), %rcx
	movl	$-1, %eax
	movl	$8, %r14d
	cmpq	(%rcx), %rbx
	je	LBB0_8
	jmp	LBB0_12
LBB0_3:
	movq	_TCODE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movzbl	%r8b, %ebx
	movl	(%rax,%rbx,4), %eax
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	leal	12(%rcx), %eax
	movl	8(%rdi), %ebx
	cmpl	%ebx, %eax
	jge	LBB0_6
## %bb.5:
	addq	$12, %rdx
	jmp	LBB0_7
LBB0_6:
	movq	16(%rdi), %r8
	incl	%esi
	movl	%esi, %eax
	cltd
	idivl	12(%rdi)
	movslq	%edx, %rax
	subl	%ecx, %ebx
	sarl	$2, %ebx
	movl	$3, %ecx
	subl	%ebx, %ecx
	movslq	%ecx, %rdx
	shlq	$2, %rdx
	addq	(%r8,%rax,8), %rdx
LBB0_7:
	movl	$20, %r14d
LBB0_8:
	movl	(%rdx), %edi
	movl	%r9d, %esi
	callq	_cond_le32_to_cpu
	sarl	$16, %eax
	addl	%r14d, %eax
LBB0_9:
	testl	%eax, %eax
	jle	LBB0_12
## %bb.10:
	movl	%eax, %ecx
	andl	$3, %ecx
	je	LBB0_12
## %bb.11:
	addl	$4, %eax
	andl	$-4, %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_CTX_ASYNC_REQ,8,3          ## @DMA_CTX_ASYNC_REQ
	.comm	_DMA_CTX_ASYNC_RESP,8,3         ## @DMA_CTX_ASYNC_RESP
	.comm	_TCODE_SIZE,8,3                 ## @TCODE_SIZE
	.comm	_DMA_CTX_ISO,8,3                ## @DMA_CTX_ISO
	.no_dead_strip	_packet_length
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function packet_length
_packet_length:                         ; @packet_length
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _DMA_CTX_ASYNC_REQ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMA_CTX_ASYNC_REQ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _DMA_CTX_ASYNC_RESP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DMA_CTX_ASYNC_RESP@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _TCODE_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TCODE_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w8, [x8, w4, uxtw #2]
	cbnz	w8, LBB0_10
; %bb.2:
	add	w9, w3, #12
	ldr	w8, [x0, #8]
	cmp	w9, w8
	b.ge	LBB0_7
; %bb.3:
	add	x2, x2, #12
	b	LBB0_8
LBB0_4:
Lloh9:
	adrp	x9, _DMA_CTX_ISO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMA_CTX_ISO@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	w19, #8
	b	LBB0_9
LBB0_6:
	mov	w8, #-1
	b	LBB0_12
LBB0_7:
	ldr	x9, [x0, #16]
	add	w10, w1, #1
	ldr	w11, [x0, #12]
	sdiv	w12, w10, w11
	msub	w10, w12, w11, w10
	ldr	x9, [x9, w10, sxtw #3]
	sub	w8, w8, w3
	mov	w10, #3
	sub	w8, w10, w8, asr #2
	add	x2, x9, w8, sxtw #2
LBB0_8:
	mov	w19, #20
LBB0_9:
	ldr	w0, [x2]
	mov	x1, x5
	bl	_cond_le32_to_cpu
	add	w8, w19, w0, asr #16
LBB0_10:
	and	w9, w8, #0x3
	cmp	w8, #1
	ccmp	w9, #0, #4, ge
	b.eq	LBB0_12
; %bb.11:
	add	w8, w8, #4
	and	w8, w8, #0xfffffffc
LBB0_12:
	mov	x0, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 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
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_CTX_ASYNC_REQ,8,3          ; @DMA_CTX_ASYNC_REQ
	.comm	_DMA_CTX_ASYNC_RESP,8,3         ; @DMA_CTX_ASYNC_RESP
	.comm	_TCODE_SIZE,8,3                 ; @TCODE_SIZE
	.comm	_DMA_CTX_ISO,8,3                ; @DMA_CTX_ISO
	.no_dead_strip	_packet_length
.subsections_via_symbols
