	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmtp_release_appl
_cmtp_release_appl:                     ## @cmtp_release_appl
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %rsi
	movq	(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_BT_DBG
	movq	_CMTP_APPLID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_cmtp_application_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_cmtp_msgnum_get
	movl	%eax, 8(%rbx)
	movq	_CAPI_REQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	12(%rbx), %edx
	movq	_CAPI_FUNCTION_RELEASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	$0, (%rsp)
	movq	%r14, %rdi
	movl	%eax, %ecx
	xorl	%r9d, %r9d
	callq	_cmtp_send_interopmsg
	movq	(%rbx), %rax
	movq	_BT_CLOSED@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	movl	(%r14), %edi
	sete	%sil
	movq	_CMTP_INTEROP_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_wait_event_interruptible_timeout
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_cmtp_application_del           ## TAILCALL
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_BT_ERR                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ctrl %p appl %d"

	.comm	_CMTP_APPLID,4,2                ## @CMTP_APPLID
L_.str.1:                               ## @.str.1
	.asciz	"Can't find application"

	.comm	_CAPI_REQ,4,2                   ## @CAPI_REQ
	.comm	_CAPI_FUNCTION_RELEASE,4,2      ## @CAPI_FUNCTION_RELEASE
	.comm	_BT_CLOSED,8,3                  ## @BT_CLOSED
	.comm	_CMTP_INTEROP_TIMEOUT,4,2       ## @CMTP_INTEROP_TIMEOUT
	.no_dead_strip	_cmtp_release_appl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmtp_release_appl
_cmtp_release_appl:                     ; @cmtp_release_appl
	.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
	mov	x20, x1
	mov	x1, x0
	ldr	x19, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_BT_DBG
Lloh2:
	adrp	x8, _CMTP_APPLID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMTP_APPLID@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_cmtp_application_get
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_cmtp_msgnum_get
	mov	x3, x0
Lloh5:
	adrp	x8, _CAPI_REQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CAPI_REQ@GOTPAGEOFF]
	str	w0, [x20, #8]
Lloh7:
	ldr	w1, [x8]
	ldr	w2, [x20, #12]
Lloh8:
	adrp	x8, _CAPI_FUNCTION_RELEASE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CAPI_FUNCTION_RELEASE@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x5, #0
	mov	w6, #0
	bl	_cmtp_send_interopmsg
	ldr	w0, [x19]
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _BT_CLOSED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BT_CLOSED@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w1, eq
Lloh14:
	adrp	x8, _CMTP_INTEROP_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CMTP_INTEROP_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_wait_event_interruptible_timeout
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_cmtp_application_del
LBB0_2:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_BT_ERR
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ctrl %p appl %d"

	.comm	_CMTP_APPLID,4,2                ; @CMTP_APPLID
l_.str.1:                               ; @.str.1
	.asciz	"Can't find application"

	.comm	_CAPI_REQ,4,2                   ; @CAPI_REQ
	.comm	_CAPI_FUNCTION_RELEASE,4,2      ; @CAPI_FUNCTION_RELEASE
	.comm	_BT_CLOSED,8,3                  ; @BT_CLOSED
	.comm	_CMTP_INTEROP_TIMEOUT,4,2       ; @CMTP_INTEROP_TIMEOUT
	.no_dead_strip	_cmtp_release_appl
.subsections_via_symbols
