	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtsx_pci_add_cmd               ## -- Begin function rtsx_pci_add_cmd
	.p2align	4, 0x90
_rtsx_pci_add_cmd:                      ## @rtsx_pci_add_cmd
	.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	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movslq	(%r15), %rax
	movq	_HOST_CMDS_BUF_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	3(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$2, %edx
	cmpl	%edx, %eax
	jge	LBB0_2
## %bb.1:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	shll	$30, %r12d
	shll	$16, %ebx
	andl	$1073676288, %ebx               ## imm = 0x3FFF0000
	orl	%r12d, %ebx
	shll	$8, %r13d
	orl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%ebx, %r13d
	movl	%r13d, %edi
	callq	_put_unaligned_le32
	incl	(%r15)
LBB0_2:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST_CMDS_BUF_LEN,4,2          ## @HOST_CMDS_BUF_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtsx_pci_add_cmd               ; -- Begin function rtsx_pci_add_cmd
	.p2align	2
_rtsx_pci_add_cmd:                      ; @rtsx_pci_add_cmd
	.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	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
	ldr	x25, [x0, #8]
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x9, _HOST_CMDS_BUF_LEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HOST_CMDS_BUF_LEN@GOTPAGEOFF]
	ldrsw	x8, [x20]
Lloh2:
	ldr	w9, [x9]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	cmp	w8, w9, asr #2
	b.ge	LBB0_2
; %bb.1:
	add	x1, x25, x8, lsl #2
	lsl	w8, w24, #30
	bfi	w8, w23, #16, #14
	orr	w9, w21, w22, lsl #8
	orr	w0, w9, w8
	bl	_put_unaligned_le32
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
LBB0_2:
	mov	x0, x19
	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	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST_CMDS_BUF_LEN,4,2          ; @HOST_CMDS_BUF_LEN
.subsections_via_symbols
