	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btmrvl_sdio_probe
_btmrvl_sdio_probe:                     ## @btmrvl_sdio_probe
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	16(%rsi), %esi
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	movl	(%rdi), %r8d
	leaq	L_.str(%rip), %rdi
	callq	_BT_INFO
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%r15, 16(%rax)
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	4(%rax), %ecx
	movl	%ecx, 12(%r14)
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
LBB0_4:
	movq	%r14, %rdi
	callq	_btmrvl_sdio_register_dev
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	callq	_btmrvl_sdio_disable_host_int
	movq	%r14, %rdi
	callq	_btmrvl_sdio_download_fw
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	_BT_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_10:
	movq	%r14, %rdi
	callq	_btmrvl_sdio_unregister_dev
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_BT_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
LBB0_12:
	negl	%ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	$100, %edi
	callq	_msleep
	movq	%r14, %rdi
	callq	_btmrvl_sdio_enable_host_int
	movq	%r14, %rdi
	callq	_btmrvl_add_card
	testq	%rax, %rax
	je	LBB0_9
## %bb.14:
	movq	%rax, (%r14)
	movq	_btmrvl_sdio_host_to_card@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movq	_btmrvl_sdio_wakeup_fw@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	_MODULE_BRINGUP_REQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_btmrvl_send_module_cfg_cmd
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	callq	_BT_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_btmrvl_sdio_disable_host_int
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vendor=0x%x, device=0x%x, class=%d, fn=%d"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to register BT device!"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"Downloading firmware failed!"

L_.str.3:                               ## @.str.3
	.asciz	"Initializing card failed!"

	.comm	_btmrvl_sdio_host_to_card,4,2   ## @btmrvl_sdio_host_to_card
	.comm	_btmrvl_sdio_wakeup_fw,4,2      ## @btmrvl_sdio_wakeup_fw
	.comm	_MODULE_BRINGUP_REQ,4,2         ## @MODULE_BRINGUP_REQ
	.no_dead_strip	_btmrvl_sdio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btmrvl_sdio_probe
_btmrvl_sdio_probe:                     ; @btmrvl_sdio_probe
	.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	x20, x1
	mov	x21, x0
	ldr	w1, [x1, #16]
	ldp	w3, w2, [x20, #8]
	ldr	w4, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_INFO
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	str	x21, [x0, #16]
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	d0, [x8]
	str	d0, [x19, #8]
LBB0_3:
	mov	x0, x19
	bl	_btmrvl_sdio_register_dev
	tbnz	x0, #63, LBB0_8
; %bb.4:
	mov	x0, x19
	bl	_btmrvl_sdio_disable_host_int
	mov	x0, x19
	bl	_btmrvl_sdio_download_fw
	cbz	x0, LBB0_12
; %bb.5:
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_BT_ERR
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh9:
	ldr	w20, [x8]
LBB0_6:
	mov	x0, x19
	bl	_btmrvl_sdio_unregister_dev
	b	LBB0_9
LBB0_7:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_8:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_BT_ERR
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
LBB0_9:
	mov	x0, x19
	bl	_kfree
LBB0_10:
	neg	w0, w20
LBB0_11:
	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
LBB0_12:
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_btmrvl_sdio_enable_host_int
	mov	x0, x19
	bl	_btmrvl_add_card
	cbz	x0, LBB0_14
; %bb.13:
	str	x0, [x19]
Lloh18:
	adrp	x8, _btmrvl_sdio_host_to_card@GOTPAGE
Lloh19:
	ldr	x8, [x8, _btmrvl_sdio_host_to_card@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _btmrvl_sdio_wakeup_fw@GOTPAGE
Lloh22:
	ldr	x9, [x9, _btmrvl_sdio_wakeup_fw@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [x0]
Lloh24:
	adrp	x8, _MODULE_BRINGUP_REQ@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MODULE_BRINGUP_REQ@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_btmrvl_send_module_cfg_cmd
	mov	w0, #0
	b	LBB0_11
LBB0_14:
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_BT_ERR
Lloh29:
	adrp	x8, _ENODEV@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh31:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_btmrvl_sdio_disable_host_int
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vendor=0x%x, device=0x%x, class=%d, fn=%d"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to register BT device!"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"Downloading firmware failed!"

l_.str.3:                               ; @.str.3
	.asciz	"Initializing card failed!"

	.comm	_btmrvl_sdio_host_to_card,4,2   ; @btmrvl_sdio_host_to_card
	.comm	_btmrvl_sdio_wakeup_fw,4,2      ; @btmrvl_sdio_wakeup_fw
	.comm	_MODULE_BRINGUP_REQ,4,2         ; @MODULE_BRINGUP_REQ
	.no_dead_strip	_btmrvl_sdio_probe
.subsections_via_symbols
