	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gs_wait_tx_flushed
_gs_wait_tx_flushed:                    ## @gs_wait_tx_flushed
	.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	%rsi, %r13
	movq	%rdi, %r12
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_func_enter
	movq	_GS_DEBUG_FLUSH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_gs_dprintk
	testq	%r12, %r12
	je	LBB0_7
## %bb.1:
	movl	(%rbx), %edi
	movl	12(%r12), %edx
	movl	4(%r12), %r8d
	movl	8(%r12), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_gs_dprintk
	cmpl	$0, 12(%r12)
	js	LBB0_7
## %bb.2:
	cmpl	$0, 8(%r12)
	je	LBB0_7
## %bb.3:
	movl	4(%r12), %edi
	callq	_gs_real_chars_in_buffer
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.4:
	testq	%r13, %r13
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	cmoveq	%rdx, %r13
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, %r15
	cmpq	%rdx, %r13
	je	LBB0_11
## %bb.5:
	movl	(%r12), %esi
	testl	%esi, %esi
	je	LBB0_9
## %bb.6:
	movq	_HZ@GOTPCREL(%rip), %rdx
	imull	(%rdx), %eax
	shll	$2, %eax
	leal	(%rax,%rax,4), %eax
	cltd
	idivl	%esi
	movslq	%eax, %r15
	jmp	LBB0_10
LBB0_7:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_gs_dprintk
	xorl	%eax, %eax
	callq	_func_exit
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_24
LBB0_8:
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_gs_dprintk
	jmp	LBB0_23
LBB0_9:
	xorl	%r15d, %r15d
LBB0_10:
	addq	%rcx, %r15
LBB0_11:
	addq	%r13, %r15
	movl	(%rbx), %edi
	movq	%r15, %r8
	subq	%rcx, %r8
	leaq	L_.str.4(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rcx, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_gs_dprintk
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	$1, %r13d
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_GS_DEBUG_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_gs_dprintk
	movl	%r13d, %edi
	callq	_jiffies_to_msecs
	movl	%eax, %edi
	callq	_msleep_interruptible
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_21
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r12), %edi
	callq	_gs_real_chars_in_buffer
	testl	%eax, %eax
	je	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%eax, %ebx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	addl	$16, %ebx
	movl	(%r12), %ecx
	testl	%ecx, %ecx
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%ebx, %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	cltd
	idivl	%ecx
	movl	%eax, %r13d
	incl	%r13d
	cmpl	$2, %r13d
	jge	LBB0_12
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	xorl	%r13d, %r13d
	cmpl	$2, %r13d
	jge	LBB0_12
	jmp	LBB0_18
LBB0_19:
	xorl	%ebx, %ebx
LBB0_20:
	movq	_GS_DEBUG_FLUSH@GOTPCREL(%rip), %r15
	jmp	LBB0_22
LBB0_21:
	movq	_GS_DEBUG_FLUSH@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_gs_dprintk
	movq	_EINTR@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_22:
	movl	(%r15), %edi
	leaq	L_.str.7(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_gs_dprintk
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
LBB0_23:
	xorl	%eax, %eax
	callq	_func_exit
LBB0_24:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GS_DEBUG_FLUSH,4,2             ## @GS_DEBUG_FLUSH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"port=%p.\n"

L_.str.1:                               ## @.str.1
	.asciz	"xmit_cnt=%x, xmit_buf=%p, tty=%p.\n"

L_.str.2:                               ## @.str.2
	.asciz	"ERROR: !port, !port->xmit_buf or prot->xmit_cnt < 0.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"nothing to wait for.\n"

	.comm	_MAX_SCHEDULE_TIMEOUT,8,3       ## @MAX_SCHEDULE_TIMEOUT
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
L_.str.4:                               ## @.str.4
	.asciz	"now=%lx, end=%lx (%ld).\n"

L_.str.5:                               ## @.str.5
	.asciz	"Expect to finish in %d jiffies (%d chars).\n"

	.comm	_current,4,2                    ## @current
L_.str.6:                               ## @.str.6
	.asciz	"Signal pending. Bombing out: "

	.comm	_EINTR,4,2                      ## @EINTR
L_.str.7:                               ## @.str.7
	.asciz	"charsleft = %d.\n"

	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
	.no_dead_strip	_gs_wait_tx_flushed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gs_wait_tx_flushed
_gs_wait_tx_flushed:                    ; @gs_wait_tx_flushed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	bl	_func_enter
Lloh0:
	adrp	x23, _GS_DEBUG_FLUSH@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GS_DEBUG_FLUSH@GOTPAGEOFF]
	ldr	w0, [x23]
	str	x19, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_gs_dprintk
	cbz	x19, LBB0_7
; %bb.1:
	ldr	w0, [x23]
	ldp	w9, w8, [x19, #8]
	ldr	w10, [x19, #4]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_gs_dprintk
	ldr	w8, [x19, #12]
	tbnz	w8, #31, LBB0_7
; %bb.2:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_7
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_gs_real_chars_in_buffer
	cmp	w0, #0
	b.le	LBB0_9
; %bb.4:
Lloh6:
	adrp	x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x8]
Lloh9:
	adrp	x24, _jiffies@GOTPAGE
Lloh10:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
	cmp	x20, #0
	csel	x9, x11, x20, eq
	ldr	x8, [x24]
Lloh11:
	adrp	x25, _HZ@GOTPAGE
Lloh12:
	ldr	x25, [x25, _HZ@GOTPAGEOFF]
	mov	x10, x8
	cmp	x9, x11
	b.eq	LBB0_12
; %bb.5:
	ldr	w10, [x19]
	cbz	w10, LBB0_10
; %bb.6:
	ldr	w11, [x25]
	mul	w11, w0, w11
	add	w11, w11, w11, lsl #2
	lsl	w11, w11, #2
	sdiv	w10, w11, w10
	sxtw	x10, w10
	b	LBB0_11
LBB0_7:
	ldr	w0, [x23]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_gs_dprintk
	bl	_func_exit
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_9:
	ldr	w0, [x23]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_gs_dprintk
	bl	_func_exit
	mov	w19, #0
	b	LBB0_8
LBB0_10:
	mov	x10, #0
LBB0_11:
	add	x10, x10, x8
LBB0_12:
	ldr	w0, [x23]
	add	x20, x10, x9
	sub	x9, x20, x8
	stp	x20, x9, [sp, #8]
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_gs_dprintk
Lloh22:
	adrp	x21, l_.str.5@PAGE
Lloh23:
	add	x21, x21, l_.str.5@PAGEOFF
Lloh24:
	adrp	x26, _current@GOTPAGE
Lloh25:
	ldr	x26, [x26, _current@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	cmp	w8, #1
	csinc	w22, w8, wzr, gt
	ldr	w0, [x23]
	stp	x22, x27, [sp]
	mov	x1, x21
	bl	_gs_dprintk
	mov	x0, x22
	bl	_jiffies_to_msecs
	bl	_msleep_interruptible
	ldr	w0, [x26]
	bl	_signal_pending
	cbnz	x0, LBB0_19
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #4]
	bl	_gs_real_chars_in_buffer
	mov	x22, x0
	cbz	w0, LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x1, [x24]
	mov	x0, x20
	bl	_time_after
	cbz	x0, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	add	w27, w22, #16
	ldr	w8, [x19]
	cbz	w8, LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w9, [x25]
	mul	w9, w27, w9
	add	w9, w9, w9, lsl #2
	lsl	w9, w9, #1
	sdiv	w8, w9, w8
	add	w8, w8, #1
	b	LBB0_13
LBB0_18:
	mov	w19, #0
	b	LBB0_20
LBB0_19:
	ldr	w0, [x23]
Lloh26:
	adrp	x1, l_.str.6@PAGE
Lloh27:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_gs_dprintk
Lloh28:
	adrp	x8, _EINTR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w19, w8
	mov	x22, x27
LBB0_20:
	ldr	w0, [x23]
	str	x22, [sp]
Lloh31:
	adrp	x1, l_.str.7@PAGE
Lloh32:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_gs_dprintk
Lloh33:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh34:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_set_current_state
	bl	_func_exit
	b	LBB0_8
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_GS_DEBUG_FLUSH,4,2             ; @GS_DEBUG_FLUSH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"port=%p.\n"

l_.str.1:                               ; @.str.1
	.asciz	"xmit_cnt=%x, xmit_buf=%p, tty=%p.\n"

l_.str.2:                               ; @.str.2
	.asciz	"ERROR: !port, !port->xmit_buf or prot->xmit_cnt < 0.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"nothing to wait for.\n"

	.comm	_MAX_SCHEDULE_TIMEOUT,8,3       ; @MAX_SCHEDULE_TIMEOUT
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
l_.str.4:                               ; @.str.4
	.asciz	"now=%lx, end=%lx (%ld).\n"

l_.str.5:                               ; @.str.5
	.asciz	"Expect to finish in %d jiffies (%d chars).\n"

	.comm	_current,4,2                    ; @current
l_.str.6:                               ; @.str.6
	.asciz	"Signal pending. Bombing out: "

	.comm	_EINTR,4,2                      ; @EINTR
l_.str.7:                               ; @.str.7
	.asciz	"charsleft = %d.\n"

	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
	.no_dead_strip	_gs_wait_tx_flushed
.subsections_via_symbols
