	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_sdio_config
_ath10k_sdio_config:                    ## @ath10k_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_ath10k_sdio_priv
	movq	%rax, %r15
	movq	8(%rax), %r12
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_ath10k_dbg
	movq	%r12, %rdi
	callq	_sdio_claim_host
	movb	$0, -41(%rbp)
	movl	4(%r12), %edi
	movq	_SDIO_CCCR_DRIVE_STRENGTH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-41(%rbp), %r13
	movq	%r13, %rdx
	callq	_ath10k_sdio_func0_cmd52_rd_byte
	movq	_ATH10K_SDIO_DRIVE_DTSX_MASK@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edi
	movl	%edi, %eax
	notb	%al
	andb	%al, -41(%rbp)
	movq	_ATH10K_SDIO_DRIVE_DTSX_TYPE_D@GOTPCREL(%rip), %rax
	movzbl	(%rax), %esi
	callq	_FIELD_PREP
	orb	-41(%rbp), %al
	movb	%al, -41(%rbp)
	movl	4(%r12), %edi
	movl	(%rbx), %esi
	movzbl	%al, %edx
	callq	_ath10k_sdio_func0_cmd52_wr_byte
	movb	$0, -41(%rbp)
	movl	4(%r12), %edi
	movq	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdx
	callq	_ath10k_sdio_func0_cmd52_rd_byte
	movq	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_A@GOTPCREL(%rip), %rax
	movq	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_C@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	orb	(%rax), %cl
	movq	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_D@GOTPCREL(%rip), %rax
	orb	(%rax), %cl
	orb	-41(%rbp), %cl
	movb	%cl, -41(%rbp)
	movl	4(%r12), %edi
	movl	(%rbx), %esi
	movzbl	%cl, %edx
	callq	_ath10k_sdio_func0_cmd52_wr_byte
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movb	$0, -41(%rbp)
	movl	4(%r12), %edi
	movq	_CCCR_SDIO_IRQ_MODE_REG_SDIO3@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-41(%rbp), %rdx
	callq	_ath10k_sdio_func0_cmd52_rd_byte
	movq	_SDIO_IRQ_MODE_ASYNC_4BIT_IRQ_SDIO3@GOTPCREL(%rip), %rax
	movb	-41(%rbp), %cl
	orb	(%rax), %cl
	movb	%cl, -41(%rbp)
	movl	4(%r12), %edi
	movl	(%rbx), %esi
	movzbl	%cl, %edx
	callq	_ath10k_sdio_func0_cmd52_wr_byte
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_ath10k_warn
LBB0_8:
	movq	%r12, %rdi
	callq	_sdio_release_host
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movb	$0, -41(%rbp)
	movl	4(%r12), %edi
	movq	_CCCR_SDIO_ASYNC_INT_DELAY_ADDRESS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-41(%rbp), %rdx
	callq	_ath10k_sdio_func0_cmd52_rd_byte
	movq	_CCCR_SDIO_ASYNC_INT_DELAY_MASK@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edi
	movl	%edi, %eax
	notb	%al
	andb	%al, -41(%rbp)
	movl	$2, %esi
	callq	_FIELD_PREP
	orb	-41(%rbp), %al
	movb	%al, -41(%rbp)
	movl	4(%r12), %edi
	movl	(%rbx), %esi
	movzbl	%al, %edx
	callq	_ath10k_sdio_func0_cmd52_wr_byte
	movl	$100, (%r12)
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_sdio_set_block_size
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_ath10k_warn
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH10K_DBG_BOOT,4,2            ## @ATH10K_DBG_BOOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sdio configuration\n"

	.comm	_SDIO_CCCR_DRIVE_STRENGTH,4,2   ## @SDIO_CCCR_DRIVE_STRENGTH
	.comm	_ATH10K_SDIO_DRIVE_DTSX_MASK,1,0 ## @ATH10K_SDIO_DRIVE_DTSX_MASK
	.comm	_ATH10K_SDIO_DRIVE_DTSX_TYPE_D,1,0 ## @ATH10K_SDIO_DRIVE_DTSX_TYPE_D
	.comm	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR,4,2 ## @CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR
	.comm	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_A,1,0 ## @CCCR_SDIO_DRIVER_STRENGTH_ENABLE_A
	.comm	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_C,1,0 ## @CCCR_SDIO_DRIVER_STRENGTH_ENABLE_C
	.comm	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_D,1,0 ## @CCCR_SDIO_DRIVER_STRENGTH_ENABLE_D
L_.str.1:                               ## @.str.1
	.asciz	"failed to enable driver strength: %d\n"

	.comm	_CCCR_SDIO_IRQ_MODE_REG_SDIO3,4,2 ## @CCCR_SDIO_IRQ_MODE_REG_SDIO3
	.comm	_SDIO_IRQ_MODE_ASYNC_4BIT_IRQ_SDIO3,1,0 ## @SDIO_IRQ_MODE_ASYNC_4BIT_IRQ_SDIO3
L_.str.2:                               ## @.str.2
	.asciz	"failed to enable 4-bit async irq mode: %d\n"

	.comm	_CCCR_SDIO_ASYNC_INT_DELAY_ADDRESS,4,2 ## @CCCR_SDIO_ASYNC_INT_DELAY_ADDRESS
	.comm	_CCCR_SDIO_ASYNC_INT_DELAY_MASK,1,0 ## @CCCR_SDIO_ASYNC_INT_DELAY_MASK
L_.str.3:                               ## @.str.3
	.asciz	"failed to set sdio block size to %d: %d\n"

	.no_dead_strip	_ath10k_sdio_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_sdio_config
_ath10k_sdio_config:                    ; @ath10k_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
	mov	x20, x0
	bl	_ath10k_sdio_priv
	mov	x21, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _ATH10K_DBG_BOOT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH10K_DBG_BOOT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ath10k_dbg
	mov	x0, x19
	bl	_sdio_claim_host
	strb	wzr, [sp, #15]
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x22, _SDIO_CCCR_DRIVE_STRENGTH@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SDIO_CCCR_DRIVE_STRENGTH@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #15
	bl	_ath10k_sdio_func0_cmd52_rd_byte
Lloh7:
	adrp	x8, _ATH10K_SDIO_DRIVE_DTSX_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ATH10K_SDIO_DRIVE_DTSX_MASK@GOTPAGEOFF]
	ldrb	w0, [x8]
	ldrb	w8, [sp, #15]
	bic	w8, w8, w0
	strb	w8, [sp, #15]
Lloh9:
	adrp	x8, _ATH10K_SDIO_DRIVE_DTSX_TYPE_D@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATH10K_SDIO_DRIVE_DTSX_TYPE_D@GOTPAGEOFF]
	ldrb	w1, [x8]
	bl	_FIELD_PREP
	ldrb	w8, [sp, #15]
	orr	w8, w8, w0
	strb	w8, [sp, #15]
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	and	w2, w8, #0xff
	bl	_ath10k_sdio_func0_cmd52_wr_byte
	strb	wzr, [sp, #15]
	ldr	w0, [x19, #4]
Lloh11:
	adrp	x22, _CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR@GOTPAGE
Lloh12:
	ldr	x22, [x22, _CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #15
	bl	_ath10k_sdio_func0_cmd52_rd_byte
Lloh13:
	adrp	x8, _CCCR_SDIO_DRIVER_STRENGTH_ENABLE_A@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CCCR_SDIO_DRIVER_STRENGTH_ENABLE_A@GOTPAGEOFF]
	ldrb	w8, [x8]
Lloh15:
	adrp	x9, _CCCR_SDIO_DRIVER_STRENGTH_ENABLE_C@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CCCR_SDIO_DRIVER_STRENGTH_ENABLE_C@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _CCCR_SDIO_DRIVER_STRENGTH_ENABLE_D@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CCCR_SDIO_DRIVER_STRENGTH_ENABLE_D@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w8, w8, w9
	ldrb	w9, [sp, #15]
	orr	w8, w8, w9
	strb	w8, [sp, #15]
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	and	w2, w8, #0xff
	bl	_ath10k_sdio_func0_cmd52_wr_byte
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:
	strb	wzr, [sp, #15]
	ldr	w0, [x19, #4]
Lloh21:
	adrp	x22, _CCCR_SDIO_IRQ_MODE_REG_SDIO3@GOTPAGE
Lloh22:
	ldr	x22, [x22, _CCCR_SDIO_IRQ_MODE_REG_SDIO3@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #15
	bl	_ath10k_sdio_func0_cmd52_rd_byte
Lloh23:
	adrp	x8, _SDIO_IRQ_MODE_ASYNC_4BIT_IRQ_SDIO3@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SDIO_IRQ_MODE_ASYNC_4BIT_IRQ_SDIO3@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldrb	w9, [sp, #15]
	orr	w8, w9, w8
	strb	w8, [sp, #15]
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	and	w2, w8, #0xff
	bl	_ath10k_sdio_func0_cmd52_wr_byte
	cbz	w0, LBB0_7
; %bb.3:
	mov	x22, x0
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_4:
	mov	x0, x20
	mov	x2, x22
LBB0_5:
	bl	_ath10k_warn
LBB0_6:
	mov	x0, x19
	bl	_sdio_release_host
	mov	x0, x22
	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
LBB0_7:
	strb	wzr, [sp, #15]
	ldr	w0, [x19, #4]
Lloh27:
	adrp	x22, _CCCR_SDIO_ASYNC_INT_DELAY_ADDRESS@GOTPAGE
Lloh28:
	ldr	x22, [x22, _CCCR_SDIO_ASYNC_INT_DELAY_ADDRESS@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #15
	bl	_ath10k_sdio_func0_cmd52_rd_byte
Lloh29:
	adrp	x8, _CCCR_SDIO_ASYNC_INT_DELAY_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CCCR_SDIO_ASYNC_INT_DELAY_MASK@GOTPAGEOFF]
	ldrb	w0, [x8]
	ldrb	w8, [sp, #15]
	bic	w8, w8, w0
	strb	w8, [sp, #15]
	mov	w1, #2
	bl	_FIELD_PREP
	ldrb	w8, [sp, #15]
	orr	w8, w8, w0
	strb	w8, [sp, #15]
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	and	w2, w8, #0xff
	bl	_ath10k_sdio_func0_cmd52_wr_byte
	mov	w8, #100
	str	w8, [x19]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sdio_set_block_size
	mov	x22, x0
	cbz	w0, LBB0_6
; %bb.8:
	ldr	w2, [x21]
	str	x22, [sp]
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	b	LBB0_5
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH10K_DBG_BOOT,4,2            ; @ATH10K_DBG_BOOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sdio configuration\n"

	.comm	_SDIO_CCCR_DRIVE_STRENGTH,4,2   ; @SDIO_CCCR_DRIVE_STRENGTH
	.comm	_ATH10K_SDIO_DRIVE_DTSX_MASK,1,0 ; @ATH10K_SDIO_DRIVE_DTSX_MASK
	.comm	_ATH10K_SDIO_DRIVE_DTSX_TYPE_D,1,0 ; @ATH10K_SDIO_DRIVE_DTSX_TYPE_D
	.comm	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR,4,2 ; @CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR
	.comm	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_A,1,0 ; @CCCR_SDIO_DRIVER_STRENGTH_ENABLE_A
	.comm	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_C,1,0 ; @CCCR_SDIO_DRIVER_STRENGTH_ENABLE_C
	.comm	_CCCR_SDIO_DRIVER_STRENGTH_ENABLE_D,1,0 ; @CCCR_SDIO_DRIVER_STRENGTH_ENABLE_D
l_.str.1:                               ; @.str.1
	.asciz	"failed to enable driver strength: %d\n"

	.comm	_CCCR_SDIO_IRQ_MODE_REG_SDIO3,4,2 ; @CCCR_SDIO_IRQ_MODE_REG_SDIO3
	.comm	_SDIO_IRQ_MODE_ASYNC_4BIT_IRQ_SDIO3,1,0 ; @SDIO_IRQ_MODE_ASYNC_4BIT_IRQ_SDIO3
l_.str.2:                               ; @.str.2
	.asciz	"failed to enable 4-bit async irq mode: %d\n"

	.comm	_CCCR_SDIO_ASYNC_INT_DELAY_ADDRESS,4,2 ; @CCCR_SDIO_ASYNC_INT_DELAY_ADDRESS
	.comm	_CCCR_SDIO_ASYNC_INT_DELAY_MASK,1,0 ; @CCCR_SDIO_ASYNC_INT_DELAY_MASK
l_.str.3:                               ; @.str.3
	.asciz	"failed to set sdio block size to %d: %d\n"

	.no_dead_strip	_ath10k_sdio_config
.subsections_via_symbols
