	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_sdio_config
_ath6kl_sdio_config:                    ## @ath6kl_sdio_config
	.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
	callq	_ath6kl_sdio_priv
	movq	%rax, %rbx
	movq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_sdio_claim_host
	movq	(%rbx), %rax
	movq	_MANUFACTURER_ID_ATH6KL_BASE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	movq	_MANUFACTURER_ID_AR6003_BASE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jl	LBB0_4
## %bb.1:
	movl	4(%r14), %edi
	movq	_CCCR_SDIO_IRQ_MODE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SDIO_IRQ_MODE_ASYNC_4BIT_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ath6kl_sdio_func0_cmd52_wr_byte
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ath6kl_err
	jmp	LBB0_7
LBB0_3:
	movq	_ATH6KL_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_ath6kl_dbg
LBB0_4:
	movl	$100, (%r14)
	movq	_HIF_MBOX_BLOCK_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_sdio_set_block_size
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	movl	(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_ath6kl_err
	jmp	LBB0_7
LBB0_5:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_sdio_release_host
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MANUFACTURER_ID_ATH6KL_BASE_MASK,4,2 ## @MANUFACTURER_ID_ATH6KL_BASE_MASK
	.comm	_MANUFACTURER_ID_AR6003_BASE,4,2 ## @MANUFACTURER_ID_AR6003_BASE
	.comm	_CCCR_SDIO_IRQ_MODE_REG,4,2     ## @CCCR_SDIO_IRQ_MODE_REG
	.comm	_SDIO_IRQ_MODE_ASYNC_4BIT_IRQ,4,2 ## @SDIO_IRQ_MODE_ASYNC_4BIT_IRQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to enable 4-bit async irq mode %d\n"

	.comm	_ATH6KL_DBG_BOOT,4,2            ## @ATH6KL_DBG_BOOT
L_.str.1:                               ## @.str.1
	.asciz	"4-bit async irq mode enabled\n"

	.comm	_HIF_MBOX_BLOCK_SIZE,4,2        ## @HIF_MBOX_BLOCK_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Set sdio block size %d failed: %d)\n"

	.no_dead_strip	_ath6kl_sdio_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_sdio_config
_ath6kl_sdio_config:                    ; @ath6kl_sdio_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	bl	_ath6kl_sdio_priv
	mov	x20, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_sdio_claim_host
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MANUFACTURER_ID_ATH6KL_BASE_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MANUFACTURER_ID_ATH6KL_BASE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh3:
	adrp	x9, _MANUFACTURER_ID_AR6003_BASE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MANUFACTURER_ID_AR6003_BASE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_4
; %bb.1:
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x8, _CCCR_SDIO_IRQ_MODE_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CCCR_SDIO_IRQ_MODE_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _SDIO_IRQ_MODE_ASYNC_4BIT_IRQ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDIO_IRQ_MODE_ASYNC_4BIT_IRQ@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	bl	_ath6kl_sdio_func0_cmd52_wr_byte
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	b	LBB0_6
LBB0_3:
Lloh14:
	adrp	x8, _ATH6KL_DBG_BOOT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATH6KL_DBG_BOOT@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ath6kl_dbg
LBB0_4:
	mov	w8, #100
	str	w8, [x19]
Lloh19:
	adrp	x21, _HIF_MBOX_BLOCK_SIZE@GOTPAGE
Lloh20:
	ldr	x21, [x21, _HIF_MBOX_BLOCK_SIZE@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sdio_set_block_size
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
	ldr	w1, [x21]
	str	x20, [sp]
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_6:
	bl	_ath6kl_err
LBB0_7:
	mov	x0, x19
	bl	_sdio_release_host
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MANUFACTURER_ID_ATH6KL_BASE_MASK,4,2 ; @MANUFACTURER_ID_ATH6KL_BASE_MASK
	.comm	_MANUFACTURER_ID_AR6003_BASE,4,2 ; @MANUFACTURER_ID_AR6003_BASE
	.comm	_CCCR_SDIO_IRQ_MODE_REG,4,2     ; @CCCR_SDIO_IRQ_MODE_REG
	.comm	_SDIO_IRQ_MODE_ASYNC_4BIT_IRQ,4,2 ; @SDIO_IRQ_MODE_ASYNC_4BIT_IRQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to enable 4-bit async irq mode %d\n"

	.comm	_ATH6KL_DBG_BOOT,4,2            ; @ATH6KL_DBG_BOOT
l_.str.1:                               ; @.str.1
	.asciz	"4-bit async irq mode enabled\n"

	.comm	_HIF_MBOX_BLOCK_SIZE,4,2        ; @HIF_MBOX_BLOCK_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Set sdio block size %d failed: %d)\n"

	.no_dead_strip	_ath6kl_sdio_config
.subsections_via_symbols
