	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_hdw_get_ctrl_nextv4l      ## -- Begin function pvr2_hdw_get_ctrl_nextv4l
	.p2align	4, 0x90
_pvr2_hdw_get_ctrl_nextv4l:             ## @pvr2_hdw_get_ctrl_nextv4l
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %r8d
	testq	%r8, %r8
	je	LBB0_1
## %bb.2:
	movq	8(%rdi), %r9
	cmpl	$1, %r8d
	jne	LBB0_4
## %bb.3:
	xorl	%r11d, %r11d
	xorl	%eax, %eax
LBB0_14:
	testb	$1, %r8b
	je	LBB0_19
## %bb.15:
	movq	(%r9,%r11,8), %rcx
	movl	(%rcx), %ecx
	cmpl	%esi, %ecx
	jbe	LBB0_19
## %bb.16:
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	(%rax), %rdx
	cmpl	%ecx, (%rdx)
	jl	LBB0_19
LBB0_18:
	leaq	(%r9,%r11,8), %rax
LBB0_19:
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_4:
	movl	%r8d, %r10d
	andl	$-2, %r10d
	leaq	8(%r9), %rdi
	xorl	%r11d, %r11d
	xorl	%eax, %eax
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rdi, %rax
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	addq	$2, %r11
	addq	$16, %rdi
	cmpq	%r11, %r10
	je	LBB0_14
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8(%rdi), %rcx
	movl	(%rcx), %ecx
	cmpl	%esi, %ecx
	jbe	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rax), %rdx
	cmpl	%ecx, (%rdx)
	jl	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	-8(%rdi), %rax
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rdi), %rcx
	movl	(%rcx), %ecx
	cmpl	%esi, %ecx
	jbe	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rax), %rdx
	cmpl	%ecx, (%rdx)
	jge	LBB0_12
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_hdw_get_ctrl_nextv4l      ; -- Begin function pvr2_hdw_get_ctrl_nextv4l
	.p2align	2
_pvr2_hdw_get_ctrl_nextv4l:             ; @pvr2_hdw_get_ctrl_nextv4l
	.cfi_startproc
; %bb.0:
	ldr	w9, [x0]
	cbz	w9, LBB0_8
; %bb.1:
	mov	x8, x0
	mov	x0, #0
	ldr	x8, [x8, #8]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x8
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #8
	subs	x9, x9, #1
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8]
	ldr	w10, [x10]
	cmp	w10, w1
	b.ls	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x11, [x0]
	ldr	w11, [x11]
	cmp	w11, w10
	b.ge	LBB0_2
	b	LBB0_3
LBB0_7:
	ret
LBB0_8:
	mov	x0, #0
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
