	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function l2cap_build_conf_req
_l2cap_build_conf_req:                  ## @l2cap_build_conf_req
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_l2cap_pi
	movq	%rax, %r15
	movups	l___const.l2cap_build_conf_req.rfc+16(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movups	l___const.l2cap_build_conf_req.rfc(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	16(%r14), %rax
	movq	%rax, -32(%rbp)
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_BT_DBG
	cmpq	$0, 48(%r15)
	jne	LBB0_6
## %bb.1:
	cmpq	$0, 40(%r15)
	jne	LBB0_6
## %bb.2:
	movl	(%r15), %edi
	movl	%edi, %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.3:
	movq	_L2CAP_CONF_STATE2_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r15)
	movq	32(%r15), %rax
	movl	(%rax), %esi
	callq	_l2cap_mode_supported
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	32(%r15), %rdi
	movq	%rbx, %rsi
	callq	_l2cap_send_disconn_req
	jmp	LBB0_6
LBB0_5:
	movq	32(%r15), %rax
	movl	(%rax), %esi
	movl	$130, %edi
	callq	_l2cap_select_mode
	movl	%eax, (%r15)
LBB0_6:
	movl	(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_12
## %bb.7:
	cmpl	$129, %eax
	je	LBB0_11
## %bb.8:
	cmpl	$130, %eax
	jne	LBB0_18
## %bb.9:
	movq	8(%r15), %rcx
	movq	_L2CAP_DEFAULT_MTU@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_18
## %bb.10:
	movq	_L2CAP_CONF_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdi
	movl	$2, %edx
	jmp	LBB0_17
LBB0_12:
	movl	$128, -64(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	jmp	LBB0_13
LBB0_11:
	movl	$129, -64(%rbp)
	movq	_L2CAP_DEFAULT_TX_WINDOW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_L2CAP_DEFAULT_MAX_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	$0, -48(%rbp)
LBB0_13:
	movq	_L2CAP_DEFAULT_MAX_PDU_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movq	_L2CAP_CONF_RFC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdi
	leaq	-64(%rbp), %rcx
	movl	$32, %edx
	callq	_l2cap_add_conf_opt
	movq	32(%r15), %rax
	movq	_L2CAP_FEAT_FCS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_18
## %bb.14:
	movq	_L2CAP_FCS_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, 16(%r15)
	je	LBB0_16
## %bb.15:
	movq	_L2CAP_CONF_NO_FCS_RECV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_18
LBB0_16:
	movq	%rcx, 16(%r15)
	movq	_L2CAP_CONF_FCS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdi
	movl	$1, %edx
LBB0_17:
	callq	_l2cap_add_conf_opt
LBB0_18:
	movl	24(%r15), %edi
	callq	_cpu_to_le16
	movq	%rax, 8(%r14)
	xorl	%edi, %edi
	callq	_cpu_to_le16
	movq	%rax, (%r14)
	movl	-32(%rbp), %eax
	subl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	3                               ## @__const.l2cap_build_conf_req.rfc
l___const.l2cap_build_conf_req.rfc:
	.long	130                             ## 0x82
	.space	4
	.quad	0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sk %p"

	.comm	_L2CAP_CONF_STATE2_DEVICE,4,2   ## @L2CAP_CONF_STATE2_DEVICE
	.comm	_L2CAP_DEFAULT_MTU,8,3          ## @L2CAP_DEFAULT_MTU
	.comm	_L2CAP_CONF_MTU,4,2             ## @L2CAP_CONF_MTU
	.comm	_L2CAP_DEFAULT_TX_WINDOW,4,2    ## @L2CAP_DEFAULT_TX_WINDOW
	.comm	_L2CAP_DEFAULT_MAX_TX,4,2       ## @L2CAP_DEFAULT_MAX_TX
	.comm	_L2CAP_DEFAULT_MAX_PDU_SIZE,4,2 ## @L2CAP_DEFAULT_MAX_PDU_SIZE
	.comm	_L2CAP_CONF_RFC,4,2             ## @L2CAP_CONF_RFC
	.comm	_L2CAP_FEAT_FCS,4,2             ## @L2CAP_FEAT_FCS
	.comm	_L2CAP_FCS_NONE,8,3             ## @L2CAP_FCS_NONE
	.comm	_L2CAP_CONF_NO_FCS_RECV,4,2     ## @L2CAP_CONF_NO_FCS_RECV
	.comm	_L2CAP_CONF_FCS,4,2             ## @L2CAP_CONF_FCS
	.no_dead_strip	_l2cap_build_conf_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function l2cap_build_conf_req
_l2cap_build_conf_req:                  ; @l2cap_build_conf_req
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x0
	bl	_l2cap_pi
	mov	x20, x0
Lloh0:
	adrp	x8, l___const.l2cap_build_conf_req.rfc@PAGE
Lloh1:
	add	x8, x8, l___const.l2cap_build_conf_req.rfc@PAGEOFF
	ldp	q0, q1, [x8]
	stp	q0, q1, [sp, #16]
	ldr	x8, [x19, #16]
	str	x8, [sp, #8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_BT_DBG
	ldr	x8, [x20, #48]
	cbnz	x8, LBB0_6
; %bb.1:
	ldr	x8, [x20, #40]
	cbnz	x8, LBB0_6
; %bb.2:
	ldr	w0, [x20]
	and	w8, w0, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.3:
Lloh4:
	adrp	x8, _L2CAP_CONF_STATE2_DEVICE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _L2CAP_CONF_STATE2_DEVICE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	ldr	x8, [x20, #32]
	ldr	w1, [x8]
	bl	_l2cap_mode_supported
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	x0, [x20, #32]
	mov	x1, x21
	bl	_l2cap_send_disconn_req
	b	LBB0_6
LBB0_5:
	ldr	x8, [x20, #32]
	ldr	w1, [x8]
	mov	w0, #130
	bl	_l2cap_select_mode
	str	w0, [x20]
LBB0_6:
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_11
; %bb.7:
	cmp	w8, #129
	b.eq	LBB0_12
; %bb.8:
	cmp	w8, #130
	b.ne	LBB0_18
; %bb.9:
	ldr	x3, [x20, #8]
Lloh7:
	adrp	x8, _L2CAP_DEFAULT_MTU@GOTPAGE
Lloh8:
	ldr	x8, [x8, _L2CAP_DEFAULT_MTU@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x3, x8
	b.eq	LBB0_18
; %bb.10:
Lloh10:
	adrp	x8, _L2CAP_CONF_MTU@GOTPAGE
Lloh11:
	ldr	x8, [x8, _L2CAP_CONF_MTU@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #2
	b	LBB0_17
LBB0_11:
	str	w8, [sp, #16]
	stp	xzr, xzr, [sp, #32]
	b	LBB0_13
LBB0_12:
Lloh13:
	adrp	x9, _L2CAP_DEFAULT_TX_WINDOW@GOTPAGE
Lloh14:
	ldr	x9, [x9, _L2CAP_DEFAULT_TX_WINDOW@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	str	w9, [sp, #44]
Lloh16:
	adrp	x9, _L2CAP_DEFAULT_MAX_TX@GOTPAGE
Lloh17:
	ldr	x9, [x9, _L2CAP_DEFAULT_MAX_TX@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	str	w9, [sp, #40]
	str	xzr, [sp, #32]
	str	w8, [sp, #16]
LBB0_13:
Lloh19:
	adrp	x8, _L2CAP_DEFAULT_MAX_PDU_SIZE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _L2CAP_DEFAULT_MAX_PDU_SIZE@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [sp, #24]
Lloh22:
	adrp	x8, _L2CAP_CONF_RFC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _L2CAP_CONF_RFC@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	add	x0, sp, #8
	add	x3, sp, #16
	mov	w2, #32
	bl	_l2cap_add_conf_opt
	ldr	x8, [x20, #32]
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _L2CAP_FEAT_FCS@GOTPAGE
Lloh26:
	ldr	x9, [x9, _L2CAP_FEAT_FCS@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.14:
	ldr	x8, [x20, #16]
Lloh28:
	adrp	x9, _L2CAP_FCS_NONE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _L2CAP_FCS_NONE@GOTPAGEOFF]
Lloh30:
	ldr	x3, [x9]
	cmp	x8, x3
	b.eq	LBB0_16
; %bb.15:
	ldr	w8, [x20, #4]
Lloh31:
	adrp	x9, _L2CAP_CONF_NO_FCS_RECV@GOTPAGE
Lloh32:
	ldr	x9, [x9, _L2CAP_CONF_NO_FCS_RECV@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
LBB0_16:
	str	x3, [x20, #16]
Lloh34:
	adrp	x8, _L2CAP_CONF_FCS@GOTPAGE
Lloh35:
	ldr	x8, [x8, _L2CAP_CONF_FCS@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #1
LBB0_17:
	bl	_l2cap_add_conf_opt
LBB0_18:
	ldr	w0, [x20, #24]
	bl	_cpu_to_le16
	str	x0, [x19, #8]
	mov	w0, #0
	bl	_cpu_to_le16
	str	x0, [x19]
	ldr	w8, [sp, #8]
	sub	w0, w8, w19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	3                               ; @__const.l2cap_build_conf_req.rfc
l___const.l2cap_build_conf_req.rfc:
	.long	130                             ; 0x82
	.space	4
	.quad	0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sk %p"

	.comm	_L2CAP_CONF_STATE2_DEVICE,4,2   ; @L2CAP_CONF_STATE2_DEVICE
	.comm	_L2CAP_DEFAULT_MTU,8,3          ; @L2CAP_DEFAULT_MTU
	.comm	_L2CAP_CONF_MTU,4,2             ; @L2CAP_CONF_MTU
	.comm	_L2CAP_DEFAULT_TX_WINDOW,4,2    ; @L2CAP_DEFAULT_TX_WINDOW
	.comm	_L2CAP_DEFAULT_MAX_TX,4,2       ; @L2CAP_DEFAULT_MAX_TX
	.comm	_L2CAP_DEFAULT_MAX_PDU_SIZE,4,2 ; @L2CAP_DEFAULT_MAX_PDU_SIZE
	.comm	_L2CAP_CONF_RFC,4,2             ; @L2CAP_CONF_RFC
	.comm	_L2CAP_FEAT_FCS,4,2             ; @L2CAP_FEAT_FCS
	.comm	_L2CAP_FCS_NONE,8,3             ; @L2CAP_FCS_NONE
	.comm	_L2CAP_CONF_NO_FCS_RECV,4,2     ; @L2CAP_CONF_NO_FCS_RECV
	.comm	_L2CAP_CONF_FCS,4,2             ; @L2CAP_CONF_FCS
	.no_dead_strip	_l2cap_build_conf_req
.subsections_via_symbols
