	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_irq_send_data
_do_irq_send_data:                      ## @do_irq_send_data
	.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	%rdi, %r13
	movq	_SAA7146_PSR_PIN1@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_SAA7146_IER@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_saawrite
	movq	(%r13), %rax
	movq	_VID_PLAY_NORMAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	8(%r13), %eax
	movl	12(%r13), %ecx
	jmp	LBB0_3
LBB0_2:
	movq	$0, 8(%r13)
	xorl	%eax, %eax
	xorl	%ecx, %ecx
LBB0_3:
	subl	%ecx, %eax
	leal	65536(%rax), %ecx
	cmovgel	%eax, %ecx
	movl	20(%r13), %eax
	subl	16(%r13), %eax
	leal	524288(%rax), %ebx
	cmovgel	%eax, %ebx
	movl	%ecx, %eax
	orl	%ebx, %eax
	jne	LBB0_5
## %bb.4:
	movq	24(%r13), %rax
	xorl	%edi, %edi
	cmpq	32(%r13), %rax
	jne	LBB0_22
	jmp	LBB0_23
LBB0_5:
	cmpl	$2048, %ecx                     ## imm = 0x800
	jl	LBB0_13
## %bb.6:
	movq	_debNormal@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IBM_MP2_AUD_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$2, %ecx
	callq	_debiread
	andl	$252, %eax
	cmpl	$59, %eax
	ja	LBB0_13
## %bb.7:
	movl	12(%r13), %eax
	movslq	%eax, %rsi
	movl	$65536, %r14d                   ## imm = 0x10000
	subq	%rsi, %r14
	xorl	%ecx, %ecx
	cmpl	8(%r13), %esi
	movl	%r14d, %r12d
	cmovlel	%ecx, %r12d
	leal	-1(%r12), %ecx
	movq	%r15, %rbx
	cmpl	$2046, %ecx                     ## imm = 0x7FE
	ja	LBB0_8
## %bb.9:
	movq	56(%r13), %rdi
	addq	72(%r13), %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movl	$0, 12(%r13)
	movl	$2048, %r15d                    ## imm = 0x800
	subl	%r12d, %r15d
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_13:
	cmpl	$30720, %ebx                    ## imm = 0x7800
	jl	LBB0_22
## %bb.14:
	movq	_debNormal@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IBM_MP2_FIFO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movl	$2, %ecx
	callq	_debiread
	cmpl	$16383, %eax                    ## imm = 0x3FFF
	jg	LBB0_22
## %bb.15:
	movl	16(%r13), %eax
	movslq	%eax, %rsi
	movl	$524288, %r14d                  ## imm = 0x80000
	subq	%rsi, %r14
	xorl	%ecx, %ecx
	cmpl	20(%r13), %esi
	movl	%r14d, %r12d
	cmovlel	%ecx, %r12d
	leal	-1(%r12), %ecx
	cmpl	$30718, %ecx                    ## imm = 0x77FE
	ja	LBB0_16
## %bb.17:
	movq	56(%r13), %rdi
	addq	48(%r13), %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movl	$0, 16(%r13)
	movl	$30720, %r15d                   ## imm = 0x7800
	subl	%r12d, %r15d
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_8:
	movl	$2048, %r15d                    ## imm = 0x800
	xorl	%r14d, %r14d
LBB0_10:
	movq	_SAA7146_PSR_PIN1@GOTPCREL(%rip), %r12
	addq	56(%r13), %r14
	movslq	%eax, %rsi
	addq	72(%r13), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_memcpy
	addl	12(%r13), %r15d
	movzwl	%r15w, %eax
	movl	%eax, 12(%r13)
	movq	_debAudio@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NewCard@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_IBM_MP2_AUD_FIFO@GOTPCREL(%rip), %rax
	jne	LBB0_12
## %bb.11:
	movq	_IBM_MP2_AUD_FIFOW@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %edx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	movl	$2048, %r8d                     ## imm = 0x800
	callq	_debiwrite
	addq	$64, %r13
	movq	%rbx, %r15
	jmp	LBB0_21
LBB0_16:
	movl	$30720, %r15d                   ## imm = 0x7800
	xorl	%r14d, %r14d
LBB0_18:
	addq	56(%r13), %r14
	movslq	%eax, %rsi
	addq	48(%r13), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_memcpy
	addl	16(%r13), %r15d
	andl	$524287, %r15d                  ## imm = 0x7FFFF
	movl	%r15d, 16(%r13)
	movq	_debVideo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NewCard@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_SAA7146_PSR_PIN1@GOTPCREL(%rip), %r12
	jne	LBB0_20
## %bb.19:
	movq	_IBM_MP2_FIFOW@GOTPCREL(%rip), %rbx
LBB0_20:
	movl	(%rbx), %edx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	movl	$30720, %r8d                    ## imm = 0x7800
	callq	_debiwrite
	addq	$40, %r13
	movq	_SAA7146_IER@GOTPCREL(%rip), %r15
LBB0_21:
	movq	%r13, %rdi
	callq	_wake_up_interruptible
LBB0_22:
	movq	_SAA7146_PSR_DEBI_S@GOTPCREL(%rip), %rax
	movl	(%r12), %edi
	orl	(%rax), %edi
LBB0_23:
	movl	(%r15), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_saawrite                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7146_PSR_PIN1,4,2           ## @SAA7146_PSR_PIN1
	.comm	_SAA7146_IER,4,2                ## @SAA7146_IER
	.comm	_VID_PLAY_NORMAL,8,3            ## @VID_PLAY_NORMAL
	.comm	_debNormal,4,2                  ## @debNormal
	.comm	_IBM_MP2_AUD_FIFO,4,2           ## @IBM_MP2_AUD_FIFO
	.comm	_debAudio,4,2                   ## @debAudio
	.comm	_NewCard,8,3                    ## @NewCard
	.comm	_IBM_MP2_AUD_FIFOW,4,2          ## @IBM_MP2_AUD_FIFOW
	.comm	_IBM_MP2_FIFO,4,2               ## @IBM_MP2_FIFO
	.comm	_debVideo,4,2                   ## @debVideo
	.comm	_IBM_MP2_FIFOW,4,2              ## @IBM_MP2_FIFOW
	.comm	_SAA7146_PSR_DEBI_S,4,2         ## @SAA7146_PSR_DEBI_S
	.no_dead_strip	_do_irq_send_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_irq_send_data
_do_irq_send_data:                      ; @do_irq_send_data
	.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	x19, x0
Lloh0:
	adrp	x23, _SAA7146_PSR_PIN1@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SAA7146_PSR_PIN1@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x22, _SAA7146_IER@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SAA7146_IER@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_saawrite
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _VID_PLAY_NORMAL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _VID_PLAY_NORMAL@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldp	w9, w8, [x19, #8]
	b	LBB0_3
LBB0_2:
	mov	w9, #0
	mov	w8, #0
	str	xzr, [x19, #8]
LBB0_3:
	subs	w8, w9, w8
	add	w9, w8, #16, lsl #12            ; =65536
	csel	w8, w9, w8, lt
	ldp	w9, w10, [x19, #16]
	subs	w9, w10, w9
	add	w10, w9, #128, lsl #12          ; =524288
	csel	w20, w10, w9, lt
	orr	w9, w8, w20
	cbnz	w9, LBB0_6
; %bb.4:
	ldp	x8, x9, [x19, #24]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.5:
	mov	w0, #0
	b	LBB0_20
LBB0_6:
	cmp	w8, #2048
	b.lt	LBB0_10
; %bb.7:
Lloh7:
	adrp	x8, _debNormal@GOTPAGE
Lloh8:
	ldr	x8, [x8, _debNormal@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x24, _IBM_MP2_AUD_FIFO@GOTPAGE
Lloh11:
	ldr	x24, [x24, _IBM_MP2_AUD_FIFO@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	mov	w3, #2
	bl	_debiread
	and	w8, w0, #0xfc
	cmp	w8, #59
	b.hi	LBB0_10
; %bb.8:
	ldp	w10, w8, [x19, #8]
	sxtw	x9, w8
	mov	w11, #65536
	sub	x25, x11, x9
	cmp	w8, w10
	csel	w21, w25, wzr, gt
	sub	w10, w21, #1
	mov	w20, #2048
	cmp	w10, #2046
	b.hi	LBB0_14
; %bb.9:
	ldr	x0, [x19, #56]
	ldr	x8, [x19, #72]
	add	x1, x8, x9
	mov	x2, x21
	bl	_memcpy
	mov	w8, #0
	str	wzr, [x19, #12]
	sub	w20, w20, w21
	b	LBB0_15
LBB0_10:
	mov	w8, #30720
	cmp	w20, w8
	b.lt	LBB0_19
; %bb.11:
Lloh12:
	adrp	x8, _debNormal@GOTPAGE
Lloh13:
	ldr	x8, [x8, _debNormal@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x24, _IBM_MP2_FIFO@GOTPAGE
Lloh16:
	ldr	x24, [x24, _IBM_MP2_FIFO@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	mov	w3, #2
	bl	_debiread
	cmp	w0, #4, lsl #12                 ; =16384
	b.ge	LBB0_19
; %bb.12:
	ldp	w8, w10, [x19, #16]
	sxtw	x9, w8
	mov	w11, #524288
	sub	x25, x11, x9
	cmp	w8, w10
	csel	w21, w25, wzr, gt
	sub	w10, w21, #1
	mov	w20, #30720
	mov	w11, #30718
	cmp	w10, w11
	b.hi	LBB0_16
; %bb.13:
	ldp	x8, x0, [x19, #48]
	add	x1, x8, x9
	mov	x2, x21
	bl	_memcpy
	mov	w8, #0
	str	wzr, [x19, #16]
	sub	w20, w20, w21
	b	LBB0_17
LBB0_14:
	mov	x25, #0
LBB0_15:
	ldr	x9, [x19, #56]
	add	x0, x9, x25
	ldr	x9, [x19, #72]
	add	x1, x9, w8, sxtw
	mov	x2, x20
	bl	_memcpy
	ldr	w8, [x19, #12]
	add	w8, w8, w20
	and	w8, w8, #0xffff
	str	w8, [x19, #12]
Lloh17:
	adrp	x8, _debAudio@GOTPAGE
Lloh18:
	ldr	x8, [x8, _debAudio@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _NewCard@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NewCard@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
Lloh23:
	adrp	x9, _IBM_MP2_AUD_FIFOW@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IBM_MP2_AUD_FIFOW@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x24, eq
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #2048
	bl	_debiwrite
	add	x0, x19, #64
	b	LBB0_18
LBB0_16:
	mov	x25, #0
LBB0_17:
	ldp	x10, x9, [x19, #48]
	add	x0, x9, x25
	add	x1, x10, w8, sxtw
	mov	x2, x20
	bl	_memcpy
	ldr	w8, [x19, #16]
	add	w8, w8, w20
	and	w8, w8, #0x7ffff
	str	w8, [x19, #16]
Lloh25:
	adrp	x8, _debVideo@GOTPAGE
Lloh26:
	ldr	x8, [x8, _debVideo@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _NewCard@GOTPAGE
Lloh29:
	ldr	x8, [x8, _NewCard@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
Lloh31:
	adrp	x9, _IBM_MP2_FIFOW@GOTPAGE
Lloh32:
	ldr	x9, [x9, _IBM_MP2_FIFOW@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x24, eq
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #30720
	bl	_debiwrite
	add	x0, x19, #40
LBB0_18:
	bl	_wake_up_interruptible
LBB0_19:
Lloh33:
	adrp	x8, _SAA7146_PSR_DEBI_S@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SAA7146_PSR_DEBI_S@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w0, w9, w8
LBB0_20:
	ldr	w1, [x22]
	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
	b	_saawrite
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7146_PSR_PIN1,4,2           ; @SAA7146_PSR_PIN1
	.comm	_SAA7146_IER,4,2                ; @SAA7146_IER
	.comm	_VID_PLAY_NORMAL,8,3            ; @VID_PLAY_NORMAL
	.comm	_debNormal,4,2                  ; @debNormal
	.comm	_IBM_MP2_AUD_FIFO,4,2           ; @IBM_MP2_AUD_FIFO
	.comm	_debAudio,4,2                   ; @debAudio
	.comm	_NewCard,8,3                    ; @NewCard
	.comm	_IBM_MP2_AUD_FIFOW,4,2          ; @IBM_MP2_AUD_FIFOW
	.comm	_IBM_MP2_FIFO,4,2               ; @IBM_MP2_FIFO
	.comm	_debVideo,4,2                   ; @debVideo
	.comm	_IBM_MP2_FIFOW,4,2              ; @IBM_MP2_FIFOW
	.comm	_SAA7146_PSR_DEBI_S,4,2         ; @SAA7146_PSR_DEBI_S
	.no_dead_strip	_do_irq_send_data
.subsections_via_symbols
