	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sti_hqvdp_get_next_cmd
_sti_hqvdp_get_next_cmd:                ## @sti_hqvdp_get_next_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdi), %ebx
	movq	_HQVDP_MBX_NEXT_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	8(%rdi), %rax
	movq	%rax, %rdi
	callq	_readl
	movl	%eax, %ecx
	movq	_NB_VDP_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-1, %eax
	testl	%edx, %edx
	je	LBB0_5
## %bb.1:
	subl	%ebx, %ecx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, %ecx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	$4, %esi
	decl	%edx
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movl	%esi, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HQVDP_MBX_NEXT_CMD,8,3         ## @HQVDP_MBX_NEXT_CMD
	.comm	_NB_VDP_CMD,4,2                 ## @NB_VDP_CMD
	.no_dead_strip	_sti_hqvdp_get_next_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sti_hqvdp_get_next_cmd
_sti_hqvdp_get_next_cmd:                ; @sti_hqvdp_get_next_cmd
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w19, [x0]
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _HQVDP_MBX_NEXT_CMD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HQVDP_MBX_NEXT_CMD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh3:
	adrp	x9, _NB_VDP_CMD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NB_VDP_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cbz	w9, LBB0_4
; %bb.1:
	mov	x8, x0
	mov	w0, #0
	sub	w8, w8, w19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, w0
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w0, w0, #4
	subs	w9, w9, #1
	b.ne	LBB0_2
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HQVDP_MBX_NEXT_CMD,8,3         ; @HQVDP_MBX_NEXT_CMD
	.comm	_NB_VDP_CMD,4,2                 ; @NB_VDP_CMD
	.no_dead_strip	_sti_hqvdp_get_next_cmd
.subsections_via_symbols
