	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ps3_program_dma
_snd_ps3_program_dma:                   ## @snd_ps3_program_dma
	.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
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r15
	xorl	%r12d, %r12d
	addl	$-128, %esi
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	movl	$0, %r14d
	cmpl	$3, %esi
	ja	LBB0_6
## %bb.1:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	jmpq	*%rcx
LBB0_4:
	movl	$1, %eax
LBB0_5:
	movq	_PS3_AUDIO_KICK_EVENT_SERIALOUT0_EMPTY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movl	%eax, %r14d
	jmp	LBB0_6
LBB0_2:
	movl	$1, %r14d
LBB0_3:
	movq	_PS3_AUDIO_KICK_EVENT_ALWAYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
LBB0_6:
	movq	%r15, %rdi
	movl	$700, %esi                      ## imm = 0x2BC
	xorl	%edx, %edx
	callq	_snd_ps3_verify_dma_stop
	leaq	4(%r15), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	xorl	%r13d, %r13d
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, %edi
	callq	_PS3_AUDIO_KICK
	movl	%eax, %ebx
	leal	-1(%r12), %edi
	callq	_PS3_AUDIO_KICK_EVENT_AUDIO_DMA
	movq	_PS3_AUDIO_KICK_REQUEST@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	callq	_write_reg
	incl	%r13d
	addl	$2, %r12d
	cmpl	$4, %r13d
	je	LBB0_16
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r15), %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r15), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_v_to_bus
	movl	%eax, %r14d
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, %edi
	callq	_PS3_AUDIO_SOURCE
	movq	_PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r14d
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_write_reg
	movl	%r12d, %edi
	callq	_PS3_AUDIO_DEST
	movl	%eax, %r14d
	movq	_PS3_AUDIO_DEST_TARGET_AUDIOFIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%edi, %edi
	callq	_PS3_AUDIO_AO_3W_LDATA
	orl	%eax, %ebx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_write_reg
	movl	%r12d, %edi
	callq	_PS3_AUDIO_DMASIZE
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_write_reg
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_14
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_PS3_AUDIO_DMAC_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r13d, %ecx
	callq	_snd_ps3_bump_buffer
	testl	%r12d, %r12d
	jne	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%edi, %edi
	callq	_PS3_AUDIO_KICK
	movl	%eax, %edi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_15
LBB0_16:
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%r13d, %edi
	callq	_PS3_AUDIO_KICK
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_PS3_AUDIO_KICK_EVENT_AUDIO_DMA
	movq	_PS3_AUDIO_KICK_REQUEST@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_write_reg
	incl	%r12d
	addl	$2, %r14d
	cmpl	$4, %r12d
	je	LBB0_23
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	leal	1(%r14), %r13d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	(%r15), %ebx
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	8(%r15), %rax
	movq	8(%rax), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_v_to_bus
	movl	%eax, %ebx
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%r13d, %edi
	callq	_PS3_AUDIO_SOURCE
	movq	_PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_write_reg
	movl	%r13d, %edi
	callq	_PS3_AUDIO_DEST
	movl	%eax, %ebx
	movq	_PS3_AUDIO_DEST_TARGET_AUDIOFIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%edi, %edi
	callq	_PS3_AUDIO_AO_3W_RDATA
	orl	%eax, %r15d
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_write_reg
	movl	%r13d, %edi
	callq	_PS3_AUDIO_DMASIZE
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_write_reg
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	_PS3_AUDIO_DMAC_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	movl	%r12d, %ecx
	callq	_snd_ps3_bump_buffer
	jmp	LBB0_22
LBB0_23:
	xorl	%eax, %eax
	callq	_wmb
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_5
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_PS3_AUDIO_KICK_EVENT_ALWAYS,4,2 ## @PS3_AUDIO_KICK_EVENT_ALWAYS
	.comm	_PS3_AUDIO_KICK_EVENT_SERIALOUT0_EMPTY,4,2 ## @PS3_AUDIO_KICK_EVENT_SERIALOUT0_EMPTY
	.comm	_PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY,4,2 ## @PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY
	.comm	_PS3_AUDIO_DEST_TARGET_AUDIOFIFO,4,2 ## @PS3_AUDIO_DEST_TARGET_AUDIOFIFO
	.comm	_PS3_AUDIO_DMAC_BLOCK_SIZE,4,2  ## @PS3_AUDIO_DMAC_BLOCK_SIZE
	.comm	_PS3_AUDIO_KICK_REQUEST,4,2     ## @PS3_AUDIO_KICK_REQUEST
	.no_dead_strip	_snd_ps3_program_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ps3_program_dma
_snd_ps3_program_dma:                   ; @snd_ps3_program_dma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	mov	w21, #0
	sub	w8, w1, #128
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	w21, #1
LBB0_3:
	mov	x25, x21
Lloh2:
	adrp	x8, _PS3_AUDIO_KICK_EVENT_SERIALOUT0_EMPTY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PS3_AUDIO_KICK_EVENT_SERIALOUT0_EMPTY@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	mov	x25, x21
	b	LBB0_8
LBB0_5:
	mov	w21, #1
LBB0_6:
	mov	x25, x21
Lloh4:
	adrp	x8, _PS3_AUDIO_KICK_EVENT_ALWAYS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PS3_AUDIO_KICK_EVENT_ALWAYS@GOTPAGEOFF]
LBB0_7:
	ldr	w21, [x8]
LBB0_8:
	mov	x0, x19
	mov	w1, #700
	mov	w2, #0
	bl	_snd_ps3_verify_dma_stop
	add	x0, x19, #4
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_spin_lock_irqsave
	mov	w22, #0
	mov	w23, #0
Lloh6:
	adrp	x26, _PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY@GOTPAGE
Lloh7:
	ldr	x26, [x26, _PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY@GOTPAGEOFF]
Lloh8:
	adrp	x27, _PS3_AUDIO_DEST_TARGET_AUDIOFIFO@GOTPAGE
Lloh9:
	ldr	x27, [x27, _PS3_AUDIO_DEST_TARGET_AUDIOFIFO@GOTPAGEOFF]
Lloh10:
	adrp	x20, _PS3_AUDIO_KICK_REQUEST@GOTPAGE
Lloh11:
	ldr	x20, [x20, _PS3_AUDIO_KICK_REQUEST@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	bl	_PS3_AUDIO_KICK
	mov	x24, x0
	sub	w0, w22, #1
	bl	_PS3_AUDIO_KICK_EVENT_AUDIO_DMA
	ldr	w8, [x20]
	orr	w1, w8, w0
	mov	x0, x24
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	bl	_write_reg
	add	w23, w23, #1
	add	w22, w22, #2
	cmp	w23, #4
	b.eq	LBB0_18
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	cbz	w25, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w24, [x19]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x19, #8]
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_v_to_bus
	mov	x24, x0
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	bl	_PS3_AUDIO_SOURCE
	ldr	w8, [x26]
	orr	w1, w8, w24
	bl	_write_reg
	mov	x0, x22
	bl	_PS3_AUDIO_DEST
	mov	x24, x0
	ldr	w28, [x27]
	mov	w0, #0
	bl	_PS3_AUDIO_AO_3W_LDATA
	orr	w1, w0, w28
	mov	x0, x24
	bl	_write_reg
	mov	x0, x22
	bl	_PS3_AUDIO_DMASIZE
	mov	w1, #0
	bl	_write_reg
	cbz	w25, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	cbnz	w22, LBB0_9
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=1
Lloh12:
	adrp	x8, _PS3_AUDIO_DMAC_BLOCK_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PS3_AUDIO_DMAC_BLOCK_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	x3, x23
	bl	_snd_ps3_bump_buffer
	cbnz	w22, LBB0_9
LBB0_17:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #0
	bl	_PS3_AUDIO_KICK
	mov	x1, x21
	b	LBB0_10
LBB0_18:
	mov	w21, #0
	mov	w22, #0
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	mov	x0, x23
	bl	_PS3_AUDIO_KICK
	mov	x23, x0
	mov	x0, x21
	bl	_PS3_AUDIO_KICK_EVENT_AUDIO_DMA
	ldr	w8, [x20]
	orr	w1, w8, w0
	mov	x0, x23
	bl	_write_reg
	add	w22, w22, #1
	add	w21, w21, #2
	cmp	w22, #4
	b.eq	LBB0_25
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	cbz	w25, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	w24, [x19]
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_20 Depth=1
	ldr	x8, [x19, #8]
	ldr	x1, [x8, #8]
	mov	x0, x19
	mov	w2, #1
	bl	_v_to_bus
	mov	x24, x0
LBB0_23:                                ;   in Loop: Header=BB0_20 Depth=1
	add	w23, w21, #1
	mov	x0, x23
	bl	_PS3_AUDIO_SOURCE
	ldr	w8, [x26]
	orr	w1, w8, w24
	bl	_write_reg
	mov	x0, x23
	bl	_PS3_AUDIO_DEST
	mov	x24, x0
	ldr	w28, [x27]
	mov	w0, #0
	bl	_PS3_AUDIO_AO_3W_RDATA
	orr	w1, w0, w28
	mov	x0, x24
	bl	_write_reg
	mov	x0, x23
	bl	_PS3_AUDIO_DMASIZE
	mov	w1, #0
	bl	_write_reg
	cbnz	w25, LBB0_19
; %bb.24:                               ;   in Loop: Header=BB0_20 Depth=1
Lloh15:
	adrp	x8, _PS3_AUDIO_DMAC_BLOCK_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PS3_AUDIO_DMAC_BLOCK_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #1
	mov	x3, x22
	bl	_snd_ps3_bump_buffer
	b	LBB0_19
LBB0_25:
	bl	_wmb
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_PS3_AUDIO_KICK_EVENT_ALWAYS,4,2 ; @PS3_AUDIO_KICK_EVENT_ALWAYS
	.comm	_PS3_AUDIO_KICK_EVENT_SERIALOUT0_EMPTY,4,2 ; @PS3_AUDIO_KICK_EVENT_SERIALOUT0_EMPTY
	.comm	_PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY,4,2 ; @PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY
	.comm	_PS3_AUDIO_DEST_TARGET_AUDIOFIFO,4,2 ; @PS3_AUDIO_DEST_TARGET_AUDIOFIFO
	.comm	_PS3_AUDIO_DMAC_BLOCK_SIZE,4,2  ; @PS3_AUDIO_DMAC_BLOCK_SIZE
	.comm	_PS3_AUDIO_KICK_REQUEST,4,2     ; @PS3_AUDIO_KICK_REQUEST
	.no_dead_strip	_snd_ps3_program_dma
.subsections_via_symbols
