	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_next_l2cap_opt
_get_next_l2cap_opt:                    ## @get_next_l2cap_opt
	.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, %r14
	movl	(%rdi), %ebx
	movl	(%rsi), %esi
	xorl	%eax, %eax
	subl	%esi, %ebx
	je	LBB0_18
## %bb.1:
	movl	$-1, %eax
	cmpl	$8, %ebx
	jl	LBB0_18
## %bb.2:
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rdi, %r13
	movl	$8, %edx
	movl	%r12d, %ecx
	callq	_m_copydata
	addl	$8, (%r14)
	addl	$-8, %ebx
	movl	(%r12), %edi
	callq	_NG_L2CAP_OPT_HINT
	movq	_NG_L2CAP_OPT_HINT_MASK@GOTPCREL(%rip), %rdx
	movl	(%r12), %ecx
	andl	(%rdx), %ecx
	movl	%ecx, (%r12)
	cmpl	$128, %ecx
	je	LBB0_11
## %bb.3:
	cmpl	$130, %ecx
	je	LBB0_8
## %bb.4:
	cmpl	$129, %ecx
	jne	LBB0_14
## %bb.5:
	movl	4(%r12), %edx
	movq	_NG_L2CAP_OPT_MTU_SIZE@GOTPCREL(%rip), %r12
	movl	$-2, %eax
	cmpl	(%r12), %edx
	jne	LBB0_18
## %bb.6:
	cmpl	%edx, %ebx
	jl	LBB0_18
## %bb.7:
	movl	(%r14), %esi
	movq	%r13, %rdi
	movl	%r15d, %ecx
	callq	_m_copydata
	movq	48(%r15), %rdi
	callq	_le16toh
	movq	%rax, 48(%r15)
	jmp	LBB0_17
LBB0_11:
	movl	4(%r12), %edx
	movq	_NG_L2CAP_OPT_QOS_SIZE@GOTPCREL(%rip), %r12
	movl	$-2, %eax
	cmpl	(%r12), %edx
	jne	LBB0_18
## %bb.12:
	cmpl	%edx, %ebx
	jl	LBB0_18
## %bb.13:
	movl	(%r14), %esi
	movq	%r13, %rdi
	movl	%r15d, %ecx
	callq	_m_copydata
	movq	32(%r15), %rdi
	callq	_le32toh
	movq	%rax, 32(%r15)
	movq	24(%r15), %rdi
	callq	_le32toh
	movq	%rax, 24(%r15)
	movq	16(%r15), %rdi
	callq	_le32toh
	movq	%rax, 16(%r15)
	movq	8(%r15), %rdi
	callq	_le32toh
	movq	%rax, 8(%r15)
	movq	(%r15), %rdi
	callq	_le32toh
	movq	%rax, (%r15)
	jmp	LBB0_17
LBB0_8:
	movl	4(%r12), %edx
	movq	_NG_L2CAP_OPT_FLUSH_TIMO_SIZE@GOTPCREL(%rip), %r12
	movl	$-2, %eax
	cmpl	(%r12), %edx
	jne	LBB0_18
## %bb.9:
	cmpl	%edx, %ebx
	jl	LBB0_18
## %bb.10:
	movl	(%r14), %esi
	movq	%r13, %rdi
	movl	%r15d, %ecx
	callq	_m_copydata
	movq	40(%r15), %rdi
	callq	_le16toh
	movq	%rax, 40(%r15)
	jmp	LBB0_17
LBB0_14:
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:
	addq	$4, %r12
LBB0_17:
	movl	(%r12), %eax
	addl	%eax, (%r14)
	movl	$1, %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	$-3, %eax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_NG_L2CAP_OPT_HINT_MASK,4,2     ## @NG_L2CAP_OPT_HINT_MASK
	.comm	_NG_L2CAP_OPT_MTU_SIZE,4,2      ## @NG_L2CAP_OPT_MTU_SIZE
	.comm	_NG_L2CAP_OPT_FLUSH_TIMO_SIZE,4,2 ## @NG_L2CAP_OPT_FLUSH_TIMO_SIZE
	.comm	_NG_L2CAP_OPT_QOS_SIZE,4,2      ## @NG_L2CAP_OPT_QOS_SIZE
	.no_dead_strip	_get_next_l2cap_opt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_next_l2cap_opt
_get_next_l2cap_opt:                    ; @get_next_l2cap_opt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	ldr	w8, [x0]
	ldr	w1, [x1]
	subs	w8, w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_17
LBB0_2:
	subs	w23, w8, #8
	b.ge	LBB0_4
; %bb.3:
	mov	w0, #-1
	b	LBB0_17
LBB0_4:
	mov	x20, x3
	mov	x22, x2
	mov	x21, x0
	mov	w2, #8
	mov	x3, x22
	bl	_m_copydata
	ldr	w8, [x19]
	add	w8, w8, #8
	str	w8, [x19]
	ldr	w0, [x22]
	bl	_NG_L2CAP_OPT_HINT
Lloh0:
	adrp	x8, _NG_L2CAP_OPT_HINT_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NG_L2CAP_OPT_HINT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x22]
	and	w8, w9, w8
	str	w8, [x22]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.5:
	cmp	w8, #130
	b.eq	LBB0_11
; %bb.6:
	cmp	w8, #129
	b.ne	LBB0_13
; %bb.7:
	ldr	w2, [x22, #4]
Lloh3:
	adrp	x8, _NG_L2CAP_OPT_MTU_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NG_L2CAP_OPT_MTU_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w2, w8
	ccmp	w23, w2, #8, eq
	b.lt	LBB0_12
; %bb.8:
	ldr	w1, [x19]
	mov	x0, x21
	mov	x3, x20
	bl	_m_copydata
	ldr	x0, [x20, #48]
	bl	_le16toh
	str	x0, [x20, #48]
Lloh6:
	adrp	x8, _NG_L2CAP_OPT_MTU_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NG_L2CAP_OPT_MTU_SIZE@GOTPAGEOFF]
	b	LBB0_16
LBB0_9:
	ldr	w2, [x22, #4]
Lloh8:
	adrp	x8, _NG_L2CAP_OPT_QOS_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NG_L2CAP_OPT_QOS_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w2, w8
	ccmp	w23, w2, #8, eq
	b.lt	LBB0_12
; %bb.10:
	ldr	w1, [x19]
	mov	x0, x21
	mov	x3, x20
	bl	_m_copydata
	ldr	x0, [x20, #32]
	bl	_le32toh
	str	x0, [x20, #32]
	ldr	x0, [x20, #24]
	bl	_le32toh
	str	x0, [x20, #24]
	ldr	x0, [x20, #16]
	bl	_le32toh
	str	x0, [x20, #16]
	ldr	x0, [x20, #8]
	bl	_le32toh
	str	x0, [x20, #8]
	ldr	x0, [x20]
	bl	_le32toh
	str	x0, [x20]
Lloh11:
	adrp	x8, _NG_L2CAP_OPT_QOS_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NG_L2CAP_OPT_QOS_SIZE@GOTPAGEOFF]
	b	LBB0_16
LBB0_11:
	ldr	w2, [x22, #4]
Lloh13:
	adrp	x8, _NG_L2CAP_OPT_FLUSH_TIMO_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NG_L2CAP_OPT_FLUSH_TIMO_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w2, w8
	ccmp	w23, w2, #8, eq
	b.ge	LBB0_15
LBB0_12:
	mov	w0, #-2
	b	LBB0_17
LBB0_13:
	cbz	w0, LBB0_18
; %bb.14:
	add	x8, x22, #4
	b	LBB0_16
LBB0_15:
	ldr	w1, [x19]
	mov	x0, x21
	mov	x3, x20
	bl	_m_copydata
	ldr	x0, [x20, #40]
	bl	_le16toh
	str	x0, [x20, #40]
Lloh16:
	adrp	x8, _NG_L2CAP_OPT_FLUSH_TIMO_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NG_L2CAP_OPT_FLUSH_TIMO_SIZE@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	ldr	w9, [x19]
	add	w8, w9, w8
	str	w8, [x19]
	mov	w0, #1
LBB0_17:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_18:
	mov	w0, #-3
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_NG_L2CAP_OPT_HINT_MASK,4,2     ; @NG_L2CAP_OPT_HINT_MASK
	.comm	_NG_L2CAP_OPT_MTU_SIZE,4,2      ; @NG_L2CAP_OPT_MTU_SIZE
	.comm	_NG_L2CAP_OPT_FLUSH_TIMO_SIZE,4,2 ; @NG_L2CAP_OPT_FLUSH_TIMO_SIZE
	.comm	_NG_L2CAP_OPT_QOS_SIZE,4,2      ; @NG_L2CAP_OPT_QOS_SIZE
	.no_dead_strip	_get_next_l2cap_opt
.subsections_via_symbols
