	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_qmi_cap_send_sync_msg
_ath10k_qmi_cap_send_sync_msg:          ## @ath10k_qmi_cap_send_sync_msg
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$0, -56(%rbp)
	movq	32(%rdi), %r14
	movq	%r14, %rdi
	callq	_ath10k_snoc_priv
	movq	%rax, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$96, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r13
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leaq	28(%r15), %r12
	movq	_wlfw_cap_resp_msg_v01_ei@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	movq	%r13, %rcx
	callq	_qmi_txn_init
	testl	%eax, %eax
	js	LBB0_10
## %bb.2:
	movq	_QMI_WLFW_CAP_REQ_V01@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_WLFW_CAP_REQ_MSG_V01_MAX_MSG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_wlfw_cap_req_msg_v01_ei@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-56(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_qmi_send_request
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:
	movq	_ATH10K_QMI_TIMEOUT@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	imull	(%rax), %esi
	leaq	-48(%rbp), %rdi
	callq	_qmi_txn_wait
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	movq	80(%r13), %rax
	movq	_QMI_RESULT_SUCCESS_V01@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.5:
	cmpq	$0, 72(%r13)
	je	LBB0_7
## %bb.6:
	movl	68(%r13), %eax
	movl	%eax, 24(%r15)
	movl	64(%r13), %eax
	movl	%eax, 20(%r15)
LBB0_7:
	cmpq	$0, 56(%r13)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_16
## %bb.8:
	movl	48(%r13), %eax
	jmp	LBB0_17
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_10:
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_11:
	movl	%eax, %ebx
	leaq	-48(%rbp), %rdi
	callq	_qmi_txn_cancel
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_ath10k_err
	jmp	LBB0_14
LBB0_13:
	movl	88(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_ath10k_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	%r13, %rdi
	callq	_kfree
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	$255, %eax
LBB0_17:
	movl	%eax, 16(%r15)
	cmpq	$0, 40(%r13)
	je	LBB0_19
## %bb.18:
	movl	32(%r13), %eax
	movl	%eax, 12(%r15)
LBB0_19:
	cmpq	$0, 24(%r13)
	je	LBB0_21
## %bb.20:
	movl	20(%r13), %eax
	movl	%eax, 8(%r15)
	movl	4(%r15), %edi
	movl	16(%r13), %esi
	movl	$4, %edx
	callq	_strlcpy
LBB0_21:
	cmpq	$0, 8(%r13)
	je	LBB0_23
## %bb.22:
	movl	(%r15), %edi
	movl	(%r13), %esi
	movq	_MAX_BUILD_ID_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	incl	%edx
	callq	_strlcpy
LBB0_23:
	movq	_ATH10K_SNOC_FLAG_REGISTERED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_25
## %bb.24:
	movl	24(%r15), %edx
	movl	20(%r15), %ecx
	movl	12(%r15), %r9d
	movl	16(%r15), %r8d
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ath10k_info
	movl	8(%r15), %edx
	movl	(%r15), %r8d
	movl	4(%r15), %ecx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ath10k_info
LBB0_25:
	movq	%r13, %rdi
	callq	_kfree
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_wlfw_cap_resp_msg_v01_ei,4,2   ## @wlfw_cap_resp_msg_v01_ei
	.comm	_QMI_WLFW_CAP_REQ_V01,4,2       ## @QMI_WLFW_CAP_REQ_V01
	.comm	_WLFW_CAP_REQ_MSG_V01_MAX_MSG_LEN,4,2 ## @WLFW_CAP_REQ_MSG_V01_MAX_MSG_LEN
	.comm	_wlfw_cap_req_msg_v01_ei,4,2    ## @wlfw_cap_req_msg_v01_ei
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to send capability request: %d\n"

	.comm	_ATH10K_QMI_TIMEOUT,4,2         ## @ATH10K_QMI_TIMEOUT
	.comm	_HZ,4,2                         ## @HZ
	.comm	_QMI_RESULT_SUCCESS_V01,8,3     ## @QMI_RESULT_SUCCESS_V01
L_.str.1:                               ## @.str.1
	.asciz	"capability req rejected: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAX_BUILD_ID_LEN,4,2           ## @MAX_BUILD_ID_LEN
	.comm	_ATH10K_SNOC_FLAG_REGISTERED,4,2 ## @ATH10K_SNOC_FLAG_REGISTERED
L_.str.2:                               ## @.str.2
	.asciz	"qmi chip_id 0x%x chip_family 0x%x board_id 0x%x soc_id 0x%x"

L_.str.3:                               ## @.str.3
	.asciz	"qmi fw_version 0x%x fw_build_timestamp %s fw_build_id %s"

	.no_dead_strip	_ath10k_qmi_cap_send_sync_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_qmi_cap_send_sync_msg
_ath10k_qmi_cap_send_sync_msg:          ; @ath10k_qmi_cap_send_sync_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	str	wzr, [sp, #24]
	ldr	x20, [x0, #32]
	mov	x0, x20
	bl	_ath10k_snoc_priv
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #96
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	add	x24, x21, #28
Lloh3:
	adrp	x8, _wlfw_cap_resp_msg_v01_ei@GOTPAGE
Lloh4:
	ldr	x8, [x8, _wlfw_cap_resp_msg_v01_ei@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x1, sp, #16
	mov	x0, x24
	mov	x3, x19
	bl	_qmi_txn_init
	tbnz	w0, #31, LBB0_10
; %bb.2:
Lloh6:
	adrp	x8, _QMI_WLFW_CAP_REQ_V01@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QMI_WLFW_CAP_REQ_V01@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x8, _WLFW_CAP_REQ_MSG_V01_MAX_MSG_LEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WLFW_CAP_REQ_MSG_V01_MAX_MSG_LEN@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
Lloh12:
	adrp	x8, _wlfw_cap_req_msg_v01_ei@GOTPAGE
Lloh13:
	ldr	x8, [x8, _wlfw_cap_req_msg_v01_ei@GOTPAGEOFF]
Lloh14:
	ldr	w5, [x8]
	add	x2, sp, #16
	add	x6, sp, #24
	mov	x0, x24
	mov	x1, #0
	bl	_qmi_send_request
	tbnz	w0, #31, LBB0_11
; %bb.3:
Lloh15:
	adrp	x8, _ATH10K_QMI_TIMEOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ATH10K_QMI_TIMEOUT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _HZ@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	mul	w1, w9, w8
	add	x0, sp, #16
	bl	_qmi_txn_wait
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	x8, [x19, #80]
Lloh21:
	adrp	x9, _QMI_RESULT_SUCCESS_V01@GOTPAGE
Lloh22:
	ldr	x9, [x9, _QMI_RESULT_SUCCESS_V01@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.5:
	ldr	x8, [x19, #72]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	d0, [x19, #64]
	stur	d0, [x21, #20]
LBB0_7:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_15
; %bb.8:
	ldr	w8, [x19, #48]
	b	LBB0_16
LBB0_9:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_10:
	mov	x23, x0
	b	LBB0_13
LBB0_11:
	mov	x23, x0
	add	x0, sp, #16
	bl	_qmi_txn_cancel
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	bl	_ath10k_err
	b	LBB0_13
LBB0_12:
	ldr	w2, [x19, #88]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_ath10k_err
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_13:
	mov	x0, x19
	bl	_kfree
LBB0_14:
	mov	x0, x23
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_15:
	mov	w8, #255
LBB0_16:
	str	w8, [x21, #16]
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_18
; %bb.17:
	ldr	w8, [x19, #32]
	str	w8, [x21, #12]
LBB0_18:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_20
; %bb.19:
	ldp	w1, w8, [x19, #16]
	str	w8, [x21, #8]
	ldr	w0, [x21, #4]
	mov	w2, #4
	bl	_strlcpy
LBB0_20:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_22
; %bb.21:
	ldr	w0, [x21]
	ldr	w1, [x19]
Lloh34:
	adrp	x8, _MAX_BUILD_ID_LEN@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MAX_BUILD_ID_LEN@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	add	w2, w8, #1
	bl	_strlcpy
LBB0_22:
Lloh37:
	adrp	x8, _ATH10K_SNOC_FLAG_REGISTERED@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ATH10K_SNOC_FLAG_REGISTERED@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_bit
	cbnz	w0, LBB0_24
; %bb.23:
	ldp	w3, w2, [x21, #20]
	ldp	w8, w4, [x21, #12]
Lloh40:
	adrp	x1, l_.str.2@PAGE
Lloh41:
	add	x1, x1, l_.str.2@PAGEOFF
	str	x8, [sp]
	mov	x0, x20
	bl	_ath10k_info
	ldp	w3, w2, [x21, #4]
	ldr	w4, [x21]
Lloh42:
	adrp	x1, l_.str.3@PAGE
Lloh43:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_ath10k_info
LBB0_24:
	mov	x0, x19
	bl	_kfree
	mov	w23, #0
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_wlfw_cap_resp_msg_v01_ei,4,2   ; @wlfw_cap_resp_msg_v01_ei
	.comm	_QMI_WLFW_CAP_REQ_V01,4,2       ; @QMI_WLFW_CAP_REQ_V01
	.comm	_WLFW_CAP_REQ_MSG_V01_MAX_MSG_LEN,4,2 ; @WLFW_CAP_REQ_MSG_V01_MAX_MSG_LEN
	.comm	_wlfw_cap_req_msg_v01_ei,4,2    ; @wlfw_cap_req_msg_v01_ei
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to send capability request: %d\n"

	.comm	_ATH10K_QMI_TIMEOUT,4,2         ; @ATH10K_QMI_TIMEOUT
	.comm	_HZ,4,2                         ; @HZ
	.comm	_QMI_RESULT_SUCCESS_V01,8,3     ; @QMI_RESULT_SUCCESS_V01
l_.str.1:                               ; @.str.1
	.asciz	"capability req rejected: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAX_BUILD_ID_LEN,4,2           ; @MAX_BUILD_ID_LEN
	.comm	_ATH10K_SNOC_FLAG_REGISTERED,4,2 ; @ATH10K_SNOC_FLAG_REGISTERED
l_.str.2:                               ; @.str.2
	.asciz	"qmi chip_id 0x%x chip_family 0x%x board_id 0x%x soc_id 0x%x"

l_.str.3:                               ; @.str.3
	.asciz	"qmi fw_version 0x%x fw_build_timestamp %s fw_build_id %s"

	.no_dead_strip	_ath10k_qmi_cap_send_sync_msg
.subsections_via_symbols
