	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fifo_txwait
_fifo_txwait:                           ## @fifo_txwait
	.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	%esi, %r15d
	movq	%rdi, %r13
	movq	_REG_FIFOCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rdi), %rdx
	movq	_FIFO_REGS_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	callq	_read_reg
	movl	%eax, %r14d
	xorl	%edi, %edi
	cmpl	(%rbx), %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
LBB0_18:
	movq	16(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_warn
LBB0_20:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$8191, %r15d                    ## imm = 0x1FFF
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	divq	%rcx
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_FIFO_REGS_SIZE@GOTPCREL(%rip), %r15
	movq	%rax, %rdi
	callq	_msleep
	movq	_REG_FIFOCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r13), %rdx
	movl	(%r15), %ecx
	movq	%r13, %rdi
	callq	_read_reg
	movl	%eax, %r12d
	xorl	%edi, %edi
	cmpl	(%r15), %eax
	setne	%dil
	callq	_unlikely
	movq	%rbx, %r15
	testq	%rax, %rax
	jne	LBB0_17
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax), %r12
	movl	16(%rax), %ebx
	andl	$31, %ebx
	shlq	$8, %rbx
	orq	8(%rax), %rbx
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_pr_debug
	movq	_FIFOCTL_DIR@GOTPCREL(%rip), %rax
	testq	%r12, (%rax)
	je	LBB0_20
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_FIFOCTL_EMPTY@GOTPCREL(%rip), %rax
	testq	%r12, (%rax)
	jne	LBB0_20
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r13), %rdi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r13), %rdi
	callq	_netif_device_present
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	js	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_STIR_FIFO_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$-4, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	%rbx, %rcx
	cmpq	%rax, %rcx
	jb	LBB0_20
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rbx, %r15
	jb	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	imulq	$8000, %rbx, %rax               ## imm = 0x1F40
	movq	8(%r13), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_16
LBB0_9:
	movq	_ESHUTDOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_EINTR@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_20
LBB0_19:
	movq	_REG_FIFOCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_FIFOCTL_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_write_reg
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.21:
	movl	(%rbx), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_write_reg                      ## TAILCALL
LBB0_17:
	movl	%r12d, %r14d
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_FIFOCTL,4,2                ## @REG_FIFOCTL
	.comm	_FIFO_REGS_SIZE,4,2             ## @FIFO_REGS_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FIFO register read error: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"fifo status 0x%lx count %lu\n"

	.comm	_FIFOCTL_DIR,8,3                ## @FIFOCTL_DIR
	.comm	_FIFOCTL_EMPTY,8,3              ## @FIFOCTL_EMPTY
	.comm	_current,4,2                    ## @current
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ESHUTDOWN,4,2                  ## @ESHUTDOWN
	.comm	_STIR_FIFO_SIZE,4,2             ## @STIR_FIFO_SIZE
	.comm	_FIFOCTL_CLR,4,2                ## @FIFOCTL_CLR
	.no_dead_strip	_fifo_txwait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fifo_txwait
_fifo_txwait:                           ; @fifo_txwait
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _REG_FIFOCTL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _REG_FIFOCTL@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	x2, [x0]
Lloh2:
	adrp	x25, _FIFO_REGS_SIZE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _FIFO_REGS_SIZE@GOTPAGEOFF]
	ldr	w3, [x25]
	bl	_read_reg
	mov	x23, x0
	ldr	w8, [x25]
	cmp	w0, w8
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_3
LBB0_1:
	ldr	x0, [x19, #16]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_dev_warn
LBB0_2:
	mov	x0, x23
	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
LBB0_3:
	mov	w26, w20
Lloh6:
	adrp	x27, _FIFOCTL_DIR@GOTPAGE
Lloh7:
	ldr	x27, [x27, _FIFOCTL_DIR@GOTPAGEOFF]
	mov	w28, #8191
Lloh8:
	adrp	x21, l_.str.1@PAGE
Lloh9:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w9, [x8, #16]
	lsl	w9, w9, #8
	and	x9, x9, #0x1f00
	ldp	x23, x8, [x8]
	orr	x22, x9, x8
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	bl	_pr_debug
	ldr	x8, [x27]
	tst	x8, x23
	b.eq	LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh10:
	adrp	x8, _FIFOCTL_EMPTY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FIFOCTL_EMPTY@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	tst	x8, x23
	b.ne	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh13:
	adrp	x8, _current@GOTPAGE
Lloh14:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_signal_pending
	cbnz	x0, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #16]
	bl	_netif_running
	cbz	w0, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #16]
	bl	_netif_device_present
	cbz	w0, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	tbnz	w20, #31, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh16:
	adrp	x8, _STIR_FIFO_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _STIR_FIFO_SIZE@GOTPAGEOFF]
Lloh18:
	ldrsw	x8, [x8]
	sub	x8, x8, #4
	add	x9, x22, x26
	cmp	x9, x8
	b.lo	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x28, x22
	b.lo	LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #8000
	mul	x8, x22, x8
	ldr	x9, [x19, #8]
	udiv	x0, x8, x9
	bl	_msleep
	ldr	w1, [x24]
	ldr	x2, [x19]
	ldr	w3, [x25]
	mov	x0, x19
	bl	_read_reg
	mov	x23, x0
	ldr	w8, [x25]
	cmp	w0, w8
	cset	w0, ne
	bl	_unlikely
	mov	x28, x22
	cbz	x0, LBB0_4
	b	LBB0_1
LBB0_13:
	mov	w23, #0
	b	LBB0_2
LBB0_14:
Lloh19:
	adrp	x8, _ESHUTDOWN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ESHUTDOWN@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh21:
	adrp	x8, _EINTR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_2
LBB0_17:
	ldr	w1, [x24]
Lloh23:
	adrp	x8, _FIFOCTL_CLR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FIFOCTL_CLR@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_write_reg
	mov	x23, x0
	cbnz	w0, LBB0_2
; %bb.18:
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #0
	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	_write_reg
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_FIFOCTL,4,2                ; @REG_FIFOCTL
	.comm	_FIFO_REGS_SIZE,4,2             ; @FIFO_REGS_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FIFO register read error: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"fifo status 0x%lx count %lu\n"

	.comm	_FIFOCTL_DIR,8,3                ; @FIFOCTL_DIR
	.comm	_FIFOCTL_EMPTY,8,3              ; @FIFOCTL_EMPTY
	.comm	_current,4,2                    ; @current
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ESHUTDOWN,4,2                  ; @ESHUTDOWN
	.comm	_STIR_FIFO_SIZE,4,2             ; @STIR_FIFO_SIZE
	.comm	_FIFOCTL_CLR,4,2                ; @FIFOCTL_CLR
	.no_dead_strip	_fifo_txwait
.subsections_via_symbols
