	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_sdio_read_write_sync
_ath6kl_sdio_read_write_sync:           ## @ath6kl_sdio_read_write_sync
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	callq	_ath6kl_sdio_priv
	movq	%rax, %rbx
	movq	_HIF_BLOCK_BASIS@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_HIF_MBOX_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_round_down
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
LBB0_1:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
LBB0_3:
	movq	%r14, %rdi
	callq	_buf_needs_bounce
	movq	%rax, %r13
	movq	%r14, %r15
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	8(%rbx), %r15
	movq	_HIF_WRITE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
LBB0_8:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %edi
	movl	%r12d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%r15, %rcx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_ath6kl_sdio_io
	movl	%eax, %r14d
	movq	_HIF_READ@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_11
## %bb.9:
	testq	%r13, %r13
	je	LBB0_11
## %bb.10:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
LBB0_11:
	testq	%r13, %r13
	je	LBB0_13
## %bb.12:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_13
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HIF_BLOCK_BASIS,4,2            ## @HIF_BLOCK_BASIS
	.comm	_HIF_MBOX_BLOCK_SIZE,4,2        ## @HIF_MBOX_BLOCK_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HIF_WRITE,4,2                  ## @HIF_WRITE
	.comm	_HIF_READ,4,2                   ## @HIF_READ
	.no_dead_strip	_ath6kl_sdio_read_write_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_sdio_read_write_sync
_ath6kl_sdio_read_write_sync:           ; @ath6kl_sdio_read_write_sync
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x4
	mov	x21, x3
	mov	x20, x2
	mov	x23, x1
	bl	_ath6kl_sdio_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _HIF_BLOCK_BASIS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HIF_BLOCK_BASIS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _HIF_MBOX_BLOCK_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HIF_MBOX_BLOCK_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_round_down
	mov	x21, x0
LBB0_2:
	mov	x0, x20
	bl	_buf_needs_bounce
	mov	x24, x0
	mov	x25, x20
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.4:
	mov	x0, x19
	bl	_mutex_lock
	ldr	x25, [x19, #8]
Lloh6:
	adrp	x8, _HIF_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HIF_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x25
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
LBB0_6:
	ldr	w0, [x19, #4]
	mov	x1, x22
	mov	x2, x23
	mov	x3, x25
	mov	x4, x21
	bl	_ath6kl_sdio_io
	mov	x23, x0
Lloh9:
	adrp	x8, _HIF_READ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HIF_READ@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w8, w8, w22
	cmp	w8, #0
	ccmp	x24, #0, #4, ne
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x25
	mov	x2, x21
	bl	_memcpy
LBB0_8:
	cbz	x24, LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_11
LBB0_10:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_11:
	mov	x0, x23
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_HIF_BLOCK_BASIS,4,2            ; @HIF_BLOCK_BASIS
	.comm	_HIF_MBOX_BLOCK_SIZE,4,2        ; @HIF_MBOX_BLOCK_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HIF_WRITE,4,2                  ; @HIF_WRITE
	.comm	_HIF_READ,4,2                   ; @HIF_READ
	.no_dead_strip	_ath6kl_sdio_read_write_sync
.subsections_via_symbols
