	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmtp_send_message
_cmtp_send_message:                     ## @cmtp_send_message
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %rsi
	movq	(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rdx
	callq	_BT_DBG
	movl	(%rbx), %edi
	callq	_CAPIMSG_APPID
	movl	%eax, %r12d
	movl	(%rbx), %edi
	callq	_CAPIMSG_CONTROL
	movl	%eax, %r15d
	movq	_CMTP_APPLID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_cmtp_application_get
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rax), %rcx
	movq	_BT_CONNECTED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.3:
	movl	(%rbx), %edi
	movl	8(%rax), %esi
	callq	_CAPIMSG_SETAPPID
	movl	%r15d, %eax
	andl	$127, %eax
	cmpl	(%r14), %eax
	jne	LBB0_5
## %bb.4:
	andl	$-128, %r15d
	orl	$1, %r15d
	movl	(%rbx), %edi
	movl	%r15d, %esi
	callq	_CAPIMSG_SETCONTROL
LBB0_5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cmtp_send_capimsg
	movq	_CAPI_NOERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	callq	_BT_ERR
	movq	_CAPI_ILLAPPNR@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ctrl %p skb %p"

	.comm	_CMTP_APPLID,4,2                ## @CMTP_APPLID
	.comm	_BT_CONNECTED,8,3               ## @BT_CONNECTED
L_.str.1:                               ## @.str.1
	.asciz	"Can't find application with id %d"

	.comm	_CAPI_ILLAPPNR,4,2              ## @CAPI_ILLAPPNR
	.comm	_CAPI_NOERROR,4,2               ## @CAPI_NOERROR
	.no_dead_strip	_cmtp_send_message
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmtp_send_message
_cmtp_send_message:                     ; @cmtp_send_message
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x1, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_BT_DBG
	ldr	w0, [x19]
	bl	_CAPIMSG_APPID
	mov	x22, x0
	ldr	w0, [x19]
	bl	_CAPIMSG_CONTROL
	mov	x21, x0
Lloh2:
	adrp	x8, _CMTP_APPLID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMTP_APPLID@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_cmtp_application_get
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x0]
Lloh5:
	adrp	x9, _BT_CONNECTED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BT_CONNECTED@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x19]
	ldr	w1, [x0, #8]
	mov	x0, x8
	bl	_CAPIMSG_SETAPPID
	and	w8, w21, #0x7f
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	and	w8, w21, #0xffffff80
	orr	w1, w8, #0x1
	ldr	w0, [x19]
	bl	_CAPIMSG_SETCONTROL
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	bl	_cmtp_send_capimsg
Lloh8:
	adrp	x8, _CAPI_NOERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CAPI_NOERROR@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_BT_ERR
Lloh12:
	adrp	x8, _CAPI_ILLAPPNR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CAPI_ILLAPPNR@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ctrl %p skb %p"

	.comm	_CMTP_APPLID,4,2                ; @CMTP_APPLID
	.comm	_BT_CONNECTED,8,3               ; @BT_CONNECTED
l_.str.1:                               ; @.str.1
	.asciz	"Can't find application with id %d"

	.comm	_CAPI_ILLAPPNR,4,2              ; @CAPI_ILLAPPNR
	.comm	_CAPI_NOERROR,4,2               ; @CAPI_NOERROR
	.no_dead_strip	_cmtp_send_message
.subsections_via_symbols
