	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wbsd_fill_fifo
_wbsd_fill_fifo:                        ## @wbsd_fill_fifo
	.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
	cmpq	$0, (%rdi)
	je	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	movq	40(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	callq	_wbsd_sg_to_buffer
	movq	%rax, %r14
	movslq	8(%rbx), %r12
	movq	_WBSD_FSR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%rbx), %rdi
	callq	_inb
	movq	_WBSD_FIFO_FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
LBB0_10:
	addq	$24, %rbx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tasklet_schedule               ## TAILCALL
LBB0_2:
	addq	%r12, %r14
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_WBSD_FSR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%rbx), %rdi
	callq	_inb
	movq	_WBSD_FIFO_FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_10
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	_WBSD_FIFO_EMTHRE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movl	$8, %r13d
	movl	$15, %ecx
	cmovel	%ecx, %r13d
	movq	_WBSD_FIFO_EMPTY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movl	$0, %eax
	cmovnel	%eax, %r13d
	movl	$16, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=2
	incq	%r14
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	decl	%r12d
	cmpl	%r13d, %r12d
	jbe	LBB0_3
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsbl	(%r14), %edi
	movq	_WBSD_DFR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%rbx), %rsi
	callq	_outb
	incl	8(%rbx)
	decq	16(%rbx)
	sete	%al
	incl	(%r15)
	testb	%al, %al
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%rbx, %rdi
	callq	_wbsd_next_sg
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%rbx, %rdi
	callq	_wbsd_sg_to_buffer
	movq	%rax, %r14
	jmp	LBB0_9
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WBSD_FSR,8,3                   ## @WBSD_FSR
	.comm	_WBSD_FIFO_FULL,4,2             ## @WBSD_FIFO_FULL
	.comm	_WBSD_FIFO_EMPTY,4,2            ## @WBSD_FIFO_EMPTY
	.comm	_WBSD_FIFO_EMTHRE,4,2           ## @WBSD_FIFO_EMTHRE
	.comm	_WBSD_DFR,8,3                   ## @WBSD_DFR
	.no_dead_strip	_wbsd_fill_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wbsd_fill_fifo
_wbsd_fill_fifo:                        ; @wbsd_fill_fifo
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x0]
	cbz	x8, LBB0_10
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #40]
	ldr	x8, [x8]
	ldr	x21, [x8]
	bl	_wbsd_sg_to_buffer
	mov	x20, x0
	ldrsw	x24, [x19, #8]
	ldr	x8, [x19, #32]
Lloh0:
	adrp	x22, _WBSD_FSR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _WBSD_FSR@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_inb
Lloh2:
	adrp	x23, _WBSD_FIFO_FULL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _WBSD_FIFO_FULL@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_3
LBB0_2:
	add	x0, x19, #24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_tasklet_schedule
LBB0_3:
	add	x20, x20, x24
	mov	w26, #8
	mov	w27, #15
Lloh4:
	adrp	x28, _WBSD_DFR@GOTPAGE
Lloh5:
	ldr	x28, [x28, _WBSD_DFR@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #32]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_inb
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_2
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
Lloh6:
	adrp	x8, _WBSD_FIFO_EMPTY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WBSD_FIFO_EMPTY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _WBSD_FIFO_EMTHRE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WBSD_FIFO_EMTHRE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w0
	csel	w9, w27, w26, eq
	tst	w8, w0
	csel	w24, w9, wzr, eq
	mov	w25, #16
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x19
	bl	_wbsd_sg_to_buffer
	mov	x20, x0
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	sub	w25, w25, #1
	cmp	w25, w24
	b.ls	LBB0_4
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsb	w0, [x20], #1
	ldr	x8, [x19, #32]
	ldr	x9, [x28]
	add	x1, x9, x8
	bl	_outb
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	ldr	x8, [x19, #16]
	ldr	w9, [x21]
	add	w9, w9, #1
	str	w9, [x21]
	subs	x8, x8, #1
	str	x8, [x19, #16]
	b.ne	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x19
	bl	_wbsd_next_sg
	cbnz	w0, LBB0_6
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_WBSD_FSR,8,3                   ; @WBSD_FSR
	.comm	_WBSD_FIFO_FULL,4,2             ; @WBSD_FIFO_FULL
	.comm	_WBSD_FIFO_EMPTY,4,2            ; @WBSD_FIFO_EMPTY
	.comm	_WBSD_FIFO_EMTHRE,4,2           ; @WBSD_FIFO_EMTHRE
	.comm	_WBSD_DFR,8,3                   ; @WBSD_DFR
	.no_dead_strip	_wbsd_fill_fifo
.subsections_via_symbols
