	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btmrvl_prepare_command         ## -- Begin function btmrvl_prepare_command
	.p2align	4, 0x90
_btmrvl_prepare_command:                ## @btmrvl_prepare_command
	.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	%rdi, %rbx
	cmpq	$0, 64(%rdi)
	je	LBB0_4
## %bb.1:
	movq	$0, 64(%rbx)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_bt_skb_alloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	$24, %esi
	callq	_skb_put
	movq	%rax, %r15
	movq	_OGF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BT_CMD_HOST_SLEEP_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hci_opcode_pack
	movl	%eax, %edi
	callq	_cpu_to_le16
	movq	%rax, 16(%r15)
	movl	$2, (%r15)
	movzbl	17(%rbx), %eax
	movq	8(%r15), %rcx
	movl	%eax, (%rcx)
	movzbl	16(%rbx), %eax
	movl	%eax, 4(%rcx)
	movq	_MRVL_VENDOR_PKT@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%r14, %rdi
	callq	_bt_cb
	movq	%r12, (%rax)
	movq	40(%rbx), %rax
	movq	%rax, (%r14)
	movq	8(%rbx), %rdi
	addq	$4, %rdi
	movq	%r14, %rsi
	callq	_skb_queue_head
	movq	8(%r15), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_BT_DBG
LBB0_4:
	cmpq	$0, 56(%rbx)
	je	LBB0_10
## %bb.5:
	movq	$0, 56(%rbx)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_bt_skb_alloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	$24, %esi
	callq	_skb_put
	movq	%rax, %r15
	movq	_OGF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BT_CMD_AUTO_SLEEP_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hci_opcode_pack
	movl	%eax, %edi
	callq	_cpu_to_le16
	movq	%rax, 16(%r15)
	movl	$1, (%r15)
	cmpq	$0, 48(%rbx)
	jne	LBB0_7
## %bb.8:
	movq	_BT_PS_DISABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_BT_ERR
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_7:
	movq	_BT_PS_ENABLE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movq	8(%r15), %rcx
	movl	%eax, (%rcx)
	movq	_MRVL_VENDOR_PKT@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%r14, %rdi
	callq	_bt_cb
	movq	%r12, (%rax)
	movq	40(%rbx), %rax
	movq	%rax, (%r14)
	movq	8(%rbx), %rdi
	addq	$4, %rdi
	movq	%r14, %rsi
	callq	_skb_queue_head
	movq	8(%r15), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_BT_DBG
LBB0_10:
	cmpq	$0, 32(%rbx)
	je	LBB0_11
## %bb.12:
	movq	$0, 32(%rbx)
	cmpq	$0, 24(%rbx)
	je	LBB0_13
## %bb.15:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_btmrvl_enable_hs               ## TAILCALL
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_13:
	movq	%rbx, %rdi
	callq	*(%rbx)
	movq	_HS_DEACTIVATED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	8(%rbx), %rdx
	movl	%ecx, (%rdx)
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No free skb"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OGF,4,2                        ## @OGF
	.comm	_BT_CMD_HOST_SLEEP_CONFIG,4,2   ## @BT_CMD_HOST_SLEEP_CONFIG
	.comm	_MRVL_VENDOR_PKT,8,3            ## @MRVL_VENDOR_PKT
L_.str.1:                               ## @.str.1
	.asciz	"Queue HSCFG Command, gpio=0x%x, gap=0x%x"

	.comm	_BT_CMD_AUTO_SLEEP_MODE,4,2     ## @BT_CMD_AUTO_SLEEP_MODE
	.comm	_BT_PS_ENABLE,4,2               ## @BT_PS_ENABLE
	.comm	_BT_PS_DISABLE,4,2              ## @BT_PS_DISABLE
L_.str.2:                               ## @.str.2
	.asciz	"Queue PSMODE Command:%d"

	.comm	_HS_DEACTIVATED,4,2             ## @HS_DEACTIVATED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btmrvl_prepare_command         ; -- Begin function btmrvl_prepare_command
	.p2align	2
_btmrvl_prepare_command:                ; @btmrvl_prepare_command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	ldr	x8, [x0, #64]
Lloh0:
	adrp	x22, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_ATOMIC@GOTPAGEOFF]
	cbz	x8, LBB0_3
; %bb.1:
	str	xzr, [x19, #64]
	ldr	w1, [x22]
	mov	w0, #24
	bl	_bt_skb_alloc
	cbz	x0, LBB0_9
; %bb.2:
	mov	x20, x0
	mov	w1, #24
	bl	_skb_put
	mov	x21, x0
Lloh2:
	adrp	x8, _OGF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OGF@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _BT_CMD_HOST_SLEEP_CONFIG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BT_CMD_HOST_SLEEP_CONFIG@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_hci_opcode_pack
	bl	_cpu_to_le16
	str	x0, [x21, #16]
	mov	w8, #2
	str	w8, [x21]
	ldrb	w8, [x19, #17]
	ldr	x9, [x21, #8]
	str	w8, [x9]
	ldrb	w8, [x19, #16]
	str	w8, [x9, #4]
Lloh8:
	adrp	x8, _MRVL_VENDOR_PKT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MRVL_VENDOR_PKT@GOTPAGEOFF]
Lloh10:
	ldr	x23, [x8]
	mov	x0, x20
	bl	_bt_cb
	str	x23, [x0]
	ldr	x8, [x19, #40]
	str	x8, [x20]
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	mov	x1, x20
	bl	_skb_queue_head
	ldr	x8, [x21, #8]
	ldp	w1, w8, [x8]
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_BT_DBG
LBB0_3:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_6
; %bb.4:
	str	xzr, [x19, #56]
	ldr	w1, [x22]
	mov	w0, #24
	bl	_bt_skb_alloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x20, x0
	mov	w1, #24
	bl	_skb_put
	mov	x21, x0
Lloh13:
	adrp	x8, _OGF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _OGF@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x8, _BT_CMD_AUTO_SLEEP_MODE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BT_CMD_AUTO_SLEEP_MODE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_hci_opcode_pack
	bl	_cpu_to_le16
	str	x0, [x21, #16]
	mov	w8, #1
	str	w8, [x21]
	ldr	x8, [x19, #48]
Lloh19:
	adrp	x9, _BT_PS_DISABLE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _BT_PS_DISABLE@GOTPAGEOFF]
Lloh21:
	adrp	x10, _BT_PS_ENABLE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _BT_PS_ENABLE@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	ldr	x9, [x21, #8]
	str	w8, [x9]
Lloh23:
	adrp	x8, _MRVL_VENDOR_PKT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MRVL_VENDOR_PKT@GOTPAGEOFF]
Lloh25:
	ldr	x22, [x8]
	mov	x0, x20
	bl	_bt_cb
	str	x22, [x0]
	ldr	x8, [x19, #40]
	str	x8, [x20]
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	mov	x1, x20
	bl	_skb_queue_head
	ldr	x8, [x21, #8]
	ldr	w1, [x8]
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_BT_DBG
LBB0_6:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.7:
	str	xzr, [x19, #32]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_11
; %bb.8:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_btmrvl_enable_hs
LBB0_9:
Lloh28:
	adrp	x0, l_.str@PAGE
Lloh29:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_ERR
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
	ldr	x8, [x19]
	mov	x0, x19
	blr	x8
Lloh33:
	adrp	x8, _HS_DEACTIVATED@GOTPAGE
Lloh34:
	ldr	x8, [x8, _HS_DEACTIVATED@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9]
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No free skb"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OGF,4,2                        ; @OGF
	.comm	_BT_CMD_HOST_SLEEP_CONFIG,4,2   ; @BT_CMD_HOST_SLEEP_CONFIG
	.comm	_MRVL_VENDOR_PKT,8,3            ; @MRVL_VENDOR_PKT
l_.str.1:                               ; @.str.1
	.asciz	"Queue HSCFG Command, gpio=0x%x, gap=0x%x"

	.comm	_BT_CMD_AUTO_SLEEP_MODE,4,2     ; @BT_CMD_AUTO_SLEEP_MODE
	.comm	_BT_PS_ENABLE,4,2               ; @BT_PS_ENABLE
	.comm	_BT_PS_DISABLE,4,2              ; @BT_PS_DISABLE
l_.str.2:                               ; @.str.2
	.asciz	"Queue PSMODE Command:%d"

	.comm	_HS_DEACTIVATED,4,2             ; @HS_DEACTIVATED
.subsections_via_symbols
