	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function client_query
_client_query:                          ## @client_query
	.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
	subq	$2128, %rsp                     ## imm = 0x850
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_SDP_ATTR_INVALID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -2152(%rbp)
	movq	$0, -2144(%rbp)
	movl	$2048, -2136(%rbp)              ## imm = 0x800
	leaq	-2096(%rbp), %rax
	movq	%rax, -2128(%rbp)
	movq	_SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	%rdi, %rsi
	callq	_SDP_ATTR_RANGE
	movl	%eax, -2116(%rbp)
	movq	_local_bdaddr@GOTPCREL(%rip), %rdi
	movq	_remote_bdaddr@GOTPCREL(%rip), %rsi
	callq	_sdp_open
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_sdp_error
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	jne	LBB0_2
## %bb.3:
	movq	_service_name@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movq	_remote_bdaddr@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	callq	_bt_ntoa
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_log_info
	leaq	-2152(%rbp), %rax
	movq	%rax, (%rsp)
	movq	_service_class@GOTPCREL(%rip), %rdx
	leaq	-2116(%rbp), %r8
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	movl	$1, %r9d
	callq	_sdp_search
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_sdp_close
	movq	-2152(%rbp), %rax
	movq	_SDP_ATTR_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	-2144(%rbp), %rax
	cmpq	(%r12), %rax
	jne	LBB0_7
## %bb.10:
	leaq	-2128(%rbp), %rdi
	movslq	-2136(%rbp), %rsi
	shlq	$2, %rsi
	addq	-2128(%rbp), %rsi
	leaq	-2104(%rbp), %rdx
	callq	__sdp_get_seq
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:
	movq	-2128(%rbp), %rsi
	leaq	-2104(%rbp), %rdi
	leaq	-2112(%rbp), %rdx
	callq	__sdp_get_seq
	testq	%rax, %rax
	je	LBB0_18
## %bb.12:
	movq	-2104(%rbp), %rsi
	movq	_SDP_UUID_PROTOCOL_L2CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-2112(%rbp), %rdi
	callq	__sdp_match_uuid16
	testq	%rax, %rax
	je	LBB0_18
## %bb.13:
	movq	-2104(%rbp), %rsi
	movq	_l2cap_psm@GOTPCREL(%rip), %rbx
	leaq	-2112(%rbp), %rdi
	movq	%rbx, %rdx
	callq	__sdp_get_uint16
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:
	movq	-2128(%rbp), %rsi
	leaq	-2104(%rbp), %rdi
	leaq	-2112(%rbp), %rdx
	callq	__sdp_get_seq
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:
	movq	-2104(%rbp), %rsi
	movq	_SDP_UUID_PROTOCOL_BNEP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-2112(%rbp), %rdi
	callq	__sdp_match_uuid16
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movl	(%rbx), %esi
	movl	(%r15), %edx
	leaq	L_.str.4(%rip), %rdi
	callq	_log_info
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_19
## %bb.17:
	addq	$2128, %rsp                     ## imm = 0x850
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	(%r15), %esi
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_8
LBB0_2:
	movq	_service_name@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_7:
	movl	(%r15), %esi
	leaq	L_.str.3(%rip), %rdi
LBB0_8:
	xorl	%eax, %eax
	callq	_log_err
LBB0_9:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
LBB0_4:
	movl	(%r15), %r14d
	movq	%rbx, %rdi
	callq	_sdp_error
	movl	%eax, %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_log_err
	jmp	LBB0_9
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SDP_ATTR_INVALID,8,3           ## @SDP_ATTR_INVALID
	.comm	_SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST,8,3 ## @SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST
	.comm	_local_bdaddr,4,2               ## @local_bdaddr
	.comm	_remote_bdaddr,4,2              ## @remote_bdaddr
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %m"

	.comm	_service_name,4,2               ## @service_name
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
L_.str.1:                               ## @.str.1
	.asciz	"Searching for %s service at %s"

	.comm	_service_class,4,2              ## @service_class
L_.str.2:                               ## @.str.2
	.asciz	"%s: %s"

	.comm	_SDP_ATTR_OK,8,3                ## @SDP_ATTR_OK
L_.str.3:                               ## @.str.3
	.asciz	"%s service not found"

	.comm	_SDP_UUID_PROTOCOL_L2CAP,4,2    ## @SDP_UUID_PROTOCOL_L2CAP
	.comm	_l2cap_psm,4,2                  ## @l2cap_psm
	.comm	_SDP_UUID_PROTOCOL_BNEP,4,2     ## @SDP_UUID_PROTOCOL_BNEP
L_.str.4:                               ## @.str.4
	.asciz	"Found PSM %d for service %s"

L_.str.5:                               ## @.str.5
	.asciz	"%s query failed"

	.no_dead_strip	_client_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function client_query
_client_query:                          ; @client_query
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #2128
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _SDP_ATTR_INVALID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDP_ATTR_INVALID@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	stp	x8, xzr, [sp, #40]
	mov	w8, #2048
	str	w8, [sp, #56]
	add	x8, sp, #72
	str	x8, [sp, #64]
Lloh6:
	adrp	x22, _SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST@GOTPAGEOFF]
	ldr	x0, [x22]
	mov	x1, x0
	bl	_SDP_ATTR_RANGE
	str	w0, [sp, #36]
Lloh8:
	adrp	x0, _local_bdaddr@GOTPAGE
Lloh9:
	ldr	x0, [x0, _local_bdaddr@GOTPAGEOFF]
Lloh10:
	adrp	x1, _remote_bdaddr@GOTPAGE
Lloh11:
	ldr	x1, [x1, _remote_bdaddr@GOTPAGEOFF]
	bl	_sdp_open
	cbz	x0, LBB0_14
; %bb.1:
	mov	x19, x0
	bl	_sdp_error
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	str	w0, [x8]
	cbnz	w0, LBB0_14
; %bb.2:
Lloh15:
	adrp	x21, _service_name@GOTPAGE
Lloh16:
	ldr	x21, [x21, _service_name@GOTPAGEOFF]
	ldr	w20, [x21]
Lloh17:
	adrp	x0, _remote_bdaddr@GOTPAGE
Lloh18:
	ldr	x0, [x0, _remote_bdaddr@GOTPAGEOFF]
	mov	x1, #0
	bl	_bt_ntoa
	mov	x2, x0
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_log_info
Lloh21:
	adrp	x2, _service_class@GOTPAGE
Lloh22:
	ldr	x2, [x2, _service_class@GOTPAGEOFF]
	add	x4, sp, #36
	add	x6, sp, #40
	mov	x0, x19
	mov	w1, #1
	mov	w3, #1
	mov	w5, #1
	bl	_sdp_search
	cbnz	w0, LBB0_16
; %bb.3:
	mov	x0, x19
	bl	_sdp_close
	ldr	x8, [sp, #40]
Lloh23:
	adrp	x9, _SDP_ATTR_OK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SDP_ATTR_OK@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.4:
	ldr	x8, [sp, #48]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.5:
	add	x8, sp, #40
	add	x0, x8, #24
	ldr	x8, [sp, #64]
	ldrsw	x9, [sp, #56]
	add	x1, x8, x9, lsl #2
	add	x2, sp, #24
	bl	__sdp_get_seq
	cbz	x0, LBB0_13
; %bb.6:
	ldr	x1, [sp, #64]
	add	x0, sp, #24
	add	x2, sp, #16
	bl	__sdp_get_seq
	cbz	x0, LBB0_13
; %bb.7:
	ldr	x1, [sp, #24]
Lloh26:
	adrp	x8, _SDP_UUID_PROTOCOL_L2CAP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SDP_UUID_PROTOCOL_L2CAP@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	add	x0, sp, #16
	bl	__sdp_match_uuid16
	cbz	x0, LBB0_13
; %bb.8:
	ldr	x1, [sp, #24]
Lloh29:
	adrp	x19, _l2cap_psm@GOTPAGE
Lloh30:
	ldr	x19, [x19, _l2cap_psm@GOTPAGEOFF]
	add	x0, sp, #16
	mov	x2, x19
	bl	__sdp_get_uint16
	cbz	x0, LBB0_13
; %bb.9:
	ldr	x1, [sp, #64]
	add	x0, sp, #24
	add	x2, sp, #16
	bl	__sdp_get_seq
	cbz	x0, LBB0_13
; %bb.10:
	ldr	x1, [sp, #24]
Lloh31:
	adrp	x8, _SDP_UUID_PROTOCOL_BNEP@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SDP_UUID_PROTOCOL_BNEP@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	add	x0, sp, #16
	bl	__sdp_match_uuid16
	cbz	x0, LBB0_13
; %bb.11:
	ldr	w1, [x19]
	ldr	w2, [x21]
Lloh34:
	adrp	x0, l_.str.4@PAGE
Lloh35:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_log_info
	ldur	x8, [x29, #-56]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.12:
	add	sp, sp, #2128
	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	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	w1, [x21]
Lloh39:
	adrp	x0, l_.str.5@PAGE
Lloh40:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_17
LBB0_14:
Lloh41:
	adrp	x8, _service_name@GOTPAGE
Lloh42:
	ldr	x8, [x8, _service_name@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
Lloh44:
	adrp	x0, l_.str@PAGE
Lloh45:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_17
LBB0_15:
	ldr	w1, [x21]
Lloh46:
	adrp	x0, l_.str.3@PAGE
Lloh47:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_16:
	ldr	w20, [x21]
	mov	x0, x19
	bl	_sdp_error
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh48:
	adrp	x0, l_.str.2@PAGE
Lloh49:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
LBB0_17:
	bl	_log_err
Lloh50:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh51:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh52:
	ldr	w0, [x8]
	bl	_exit
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_SDP_ATTR_INVALID,8,3           ; @SDP_ATTR_INVALID
	.comm	_SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST,8,3 ; @SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST
	.comm	_local_bdaddr,4,2               ; @local_bdaddr
	.comm	_remote_bdaddr,4,2              ; @remote_bdaddr
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %m"

	.comm	_service_name,4,2               ; @service_name
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
l_.str.1:                               ; @.str.1
	.asciz	"Searching for %s service at %s"

	.comm	_service_class,4,2              ; @service_class
l_.str.2:                               ; @.str.2
	.asciz	"%s: %s"

	.comm	_SDP_ATTR_OK,8,3                ; @SDP_ATTR_OK
l_.str.3:                               ; @.str.3
	.asciz	"%s service not found"

	.comm	_SDP_UUID_PROTOCOL_L2CAP,4,2    ; @SDP_UUID_PROTOCOL_L2CAP
	.comm	_l2cap_psm,4,2                  ; @l2cap_psm
	.comm	_SDP_UUID_PROTOCOL_BNEP,4,2     ; @SDP_UUID_PROTOCOL_BNEP
l_.str.4:                               ; @.str.4
	.asciz	"Found PSM %d for service %s"

l_.str.5:                               ; @.str.5
	.asciz	"%s query failed"

	.no_dead_strip	_client_query
.subsections_via_symbols
