	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wbcir_irq_tx
_wbcir_irq_tx:                          ## @wbcir_irq_tx
	.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	%r12
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_25
## %bb.1:
	movq	%rdi, %r14
	movl	8(%rdi), %ecx
	cmpl	$128, %ecx
	je	LBB0_2
## %bb.3:
	cmpl	$129, %ecx
	je	LBB0_27
## %bb.4:
	cmpl	$130, %ecx
	jne	LBB0_25
## %bb.5:
	movl	$13, %ecx
	jmp	LBB0_6
LBB0_2:
	movl	$16, %ecx
LBB0_6:
	movl	%ecx, %r12d
	leaq	16(%r14), %r15
	movq	16(%r14), %rcx
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%rcx
	movq	%rcx, (%r15)
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	24(%r14), %rcx
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rax,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	$128, %edi
	callq	_min
	movslq	%eax, %rdx
	movq	(%r14), %rax
	movq	16(%r14), %rcx
	subq	%rdx, (%rax,%rcx,8)
	decl	%edx
	movq	16(%r14), %rcx
	movl	%ecx, %esi
	shll	$7, %esi
	movzbl	%sil, %esi
	orl	%edx, %esi
	movl	%esi, -112(%rbp,%rbx,4)
	jmp	LBB0_11
LBB0_27:
	leaq	16(%r14), %r15
	movq	16(%r14), %rcx
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_12:
	movl	%r12d, %ebx
LBB0_13:
	movq	24(%r14), %rdx
	cmpq	%rdx, %rcx
	je	LBB0_17
## %bb.14:
	negq	%rdx
	incq	%rcx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -8(%rax,%rcx,8)
	jne	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%rcx, (%r15)
	leaq	(%rdx,%rcx), %rsi
	incq	%rsi
	incq	%rcx
	cmpq	$1, %rsi
	jne	LBB0_15
LBB0_17:
	testl	%ebx, %ebx
	je	LBB0_20
## %bb.18:
	movq	_WBCIR_REG_SP3_TXDATA@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	32(%r14), %rdi
	decl	%ebx
	leaq	-112(%rbp), %rsi
	movl	%ebx, %edx
	callq	_outsb
	movq	_WBCIR_TX_EOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_WBCIR_REG_SP3_ASCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%r14), %rsi
	callq	_outb
	movl	-112(%rbp,%rbx,4), %edi
	movq	(%r15), %rsi
	addq	32(%r14), %rsi
	callq	_outb
	movq	_WBCIR_IRQ_RX@GOTPCREL(%rip), %rax
	movq	_WBCIR_IRQ_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_WBCIR_IRQ_TX_EMPTY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wbcir_set_irqmask
	jmp	LBB0_25
LBB0_19:
	testl	%ebx, %ebx
	je	LBB0_20
## %bb.23:
	movq	_WBCIR_REG_SP3_RXDATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%r14), %rdi
	leaq	-112(%rbp), %rsi
	movl	%ebx, %edx
	callq	_outsb
	cmpl	$128, 8(%r14)
	jne	LBB0_25
## %bb.24:
	movq	_WBCIR_IRQ_RX@GOTPCREL(%rip), %rax
	movq	_WBCIR_IRQ_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_WBCIR_IRQ_TX_LOW@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wbcir_set_irqmask
	movl	$130, 8(%r14)
	jmp	LBB0_25
LBB0_20:
	cmpl	$129, 8(%r14)
	jne	LBB0_22
## %bb.21:
	movq	_WBCIR_TX_UNDERRUN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_WBCIR_REG_SP3_ASCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%r14), %rsi
	callq	_outb
LBB0_22:
	movq	_WBCIR_IRQ_RX@GOTPCREL(%rip), %rax
	movq	_WBCIR_IRQ_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wbcir_set_irqmask
	movq	(%r14), %rdi
	callq	_kfree
	movq	$0, (%r14)
	movl	$128, 8(%r14)
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_28
## %bb.26:
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WBCIR_TX_UNDERRUN,4,2          ## @WBCIR_TX_UNDERRUN
	.comm	_WBCIR_REG_SP3_ASCR,8,3         ## @WBCIR_REG_SP3_ASCR
	.comm	_WBCIR_IRQ_RX,4,2               ## @WBCIR_IRQ_RX
	.comm	_WBCIR_IRQ_ERR,4,2              ## @WBCIR_IRQ_ERR
	.comm	_WBCIR_REG_SP3_TXDATA,8,3       ## @WBCIR_REG_SP3_TXDATA
	.comm	_WBCIR_TX_EOT,4,2               ## @WBCIR_TX_EOT
	.comm	_WBCIR_IRQ_TX_EMPTY,4,2         ## @WBCIR_IRQ_TX_EMPTY
	.comm	_WBCIR_REG_SP3_RXDATA,8,3       ## @WBCIR_REG_SP3_RXDATA
	.comm	_WBCIR_IRQ_TX_LOW,4,2           ## @WBCIR_IRQ_TX_LOW
	.no_dead_strip	_wbcir_irq_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wbcir_irq_tx
_wbcir_irq_tx:                          ; @wbcir_irq_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x8, [x0]
	cbz	x8, LBB0_26
; %bb.1:
	mov	x19, x0
	ldr	w9, [x0, #8]
	cmp	w9, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w9, #129
	b.eq	LBB0_12
; %bb.3:
	cmp	w9, #130
	b.ne	LBB0_26
; %bb.4:
	mov	w9, #13
	b	LBB0_6
LBB0_5:
	mov	w9, #16
LBB0_6:
	mov	x20, #0
	mov	w22, w9
	mov	x21, x19
	ldr	x9, [x21, #16]!
	add	x23, sp, #8
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x9, x9, #1
	str	x9, [x21]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x20, x20, #1
	cmp	x22, x20
	b.eq	LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #24]
	cmp	x9, x10
	b.eq	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x1, [x8, x9, lsl #3]
	cbz	x1, LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w0, #128
	bl	_min
	ldr	x8, [x19]
	ldr	x9, [x19, #16]
	lsl	x9, x9, #3
	ldr	x10, [x8, x9]
	sub	x10, x10, w0, sxtw
	str	x10, [x8, x9]
	sub	w10, w0, #1
	ldr	x9, [x19, #16]
	ubfiz	w11, w9, #7, #1
	orr	w10, w11, w10
	str	w10, [x23, x20, lsl #2]
	b	LBB0_8
LBB0_12:
	mov	w20, #0
	mov	x21, x19
	ldr	x9, [x21, #16]!
	b	LBB0_14
LBB0_13:
	mov	x20, x22
LBB0_14:
	ldr	x10, [x19, #24]
	cmp	x9, x10
	b.eq	LBB0_17
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8, x9, lsl #3]
	cbnz	x11, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x9, x9, #1
	str	x9, [x21]
	cmp	x10, x9
	b.ne	LBB0_15
LBB0_17:
	cbz	w20, LBB0_22
; %bb.18:
	ldr	x8, [x19, #32]
Lloh3:
	adrp	x21, _WBCIR_REG_SP3_TXDATA@GOTPAGE
Lloh4:
	ldr	x21, [x21, _WBCIR_REG_SP3_TXDATA@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	sub	w20, w20, #1
	add	x22, sp, #8
	add	x1, sp, #8
	mov	x2, x20
	bl	_outsb
Lloh5:
	adrp	x8, _WBCIR_TX_EOT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WBCIR_TX_EOT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	x8, [x19, #32]
Lloh8:
	adrp	x9, _WBCIR_REG_SP3_ASCR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WBCIR_REG_SP3_ASCR@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_outb
	ldr	w0, [x22, w20, uxtw #2]
	ldr	x8, [x19, #32]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_outb
Lloh11:
	adrp	x8, _WBCIR_IRQ_RX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WBCIR_IRQ_RX@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _WBCIR_IRQ_ERR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WBCIR_IRQ_ERR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _WBCIR_IRQ_TX_EMPTY@GOTPAGE
Lloh18:
	ldr	x9, [x9, _WBCIR_IRQ_TX_EMPTY@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x19
	bl	_wbcir_set_irqmask
	b	LBB0_26
LBB0_19:
	cbz	w20, LBB0_22
; %bb.20:
	ldr	x8, [x19, #32]
Lloh20:
	adrp	x9, _WBCIR_REG_SP3_RXDATA@GOTPAGE
Lloh21:
	ldr	x9, [x9, _WBCIR_REG_SP3_RXDATA@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x0, x9, x8
	add	x1, sp, #8
	mov	x2, x20
	bl	_outsb
	ldr	w8, [x19, #8]
	cmp	w8, #128
	b.ne	LBB0_26
; %bb.21:
Lloh23:
	adrp	x8, _WBCIR_IRQ_RX@GOTPAGE
Lloh24:
	ldr	x8, [x8, _WBCIR_IRQ_RX@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _WBCIR_IRQ_ERR@GOTPAGE
Lloh27:
	ldr	x9, [x9, _WBCIR_IRQ_ERR@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh29:
	adrp	x9, _WBCIR_IRQ_TX_LOW@GOTPAGE
Lloh30:
	ldr	x9, [x9, _WBCIR_IRQ_TX_LOW@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x19
	bl	_wbcir_set_irqmask
	mov	w8, #130
	b	LBB0_25
LBB0_22:
	ldr	w8, [x19, #8]
	cmp	w8, #129
	b.ne	LBB0_24
; %bb.23:
Lloh32:
	adrp	x8, _WBCIR_TX_UNDERRUN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _WBCIR_TX_UNDERRUN@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	ldr	x8, [x19, #32]
Lloh35:
	adrp	x9, _WBCIR_REG_SP3_ASCR@GOTPAGE
Lloh36:
	ldr	x9, [x9, _WBCIR_REG_SP3_ASCR@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_outb
LBB0_24:
Lloh38:
	adrp	x8, _WBCIR_IRQ_RX@GOTPAGE
Lloh39:
	ldr	x8, [x8, _WBCIR_IRQ_RX@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _WBCIR_IRQ_ERR@GOTPAGE
Lloh42:
	ldr	x9, [x9, _WBCIR_IRQ_ERR@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_wbcir_set_irqmask
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
	mov	w8, #128
LBB0_25:
	str	w8, [x19, #8]
LBB0_26:
	ldur	x8, [x29, #-56]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.27:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_WBCIR_TX_UNDERRUN,4,2          ; @WBCIR_TX_UNDERRUN
	.comm	_WBCIR_REG_SP3_ASCR,8,3         ; @WBCIR_REG_SP3_ASCR
	.comm	_WBCIR_IRQ_RX,4,2               ; @WBCIR_IRQ_RX
	.comm	_WBCIR_IRQ_ERR,4,2              ; @WBCIR_IRQ_ERR
	.comm	_WBCIR_REG_SP3_TXDATA,8,3       ; @WBCIR_REG_SP3_TXDATA
	.comm	_WBCIR_TX_EOT,4,2               ; @WBCIR_TX_EOT
	.comm	_WBCIR_IRQ_TX_EMPTY,4,2         ; @WBCIR_IRQ_TX_EMPTY
	.comm	_WBCIR_REG_SP3_RXDATA,8,3       ; @WBCIR_REG_SP3_RXDATA
	.comm	_WBCIR_IRQ_TX_LOW,4,2           ; @WBCIR_IRQ_TX_LOW
	.no_dead_strip	_wbcir_irq_tx
.subsections_via_symbols
