	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_try_fmt_vid_cap
_pvr2_try_fmt_vid_cap:                  ## @pvr2_try_fmt_vid_cap
	.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
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movl	(%rdx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	4(%rdx), %r14d
	movq	_PVR2_CID_HRES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pvr2_hdw_get_ctrl_by_id
	movq	%rax, %rbx
	movq	_PVR2_CID_VRES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pvr2_hdw_get_ctrl_by_id
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_pvr2_ctrl_get_min
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_pvr2_ctrl_get_max
	movl	%eax, %r12d
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_pvr2_ctrl_get_def
	cmpl	$-1, %r14d
	je	LBB0_1
## %bb.2:
	cmpl	%r12d, %r14d
	cmovll	%r14d, %r12d
	cmpl	%r13d, %r14d
	cmovll	%r13d, %r12d
	jmp	LBB0_3
LBB0_1:
	movl	-44(%rbp), %r12d
LBB0_3:
	movq	%r15, %rdi
	callq	_pvr2_ctrl_get_min
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_pvr2_ctrl_get_max
	movl	%eax, %r14d
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_pvr2_ctrl_get_def
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	cmpl	%r14d, %eax
	cmovll	%eax, %r14d
	cmpl	%r13d, %eax
	cmovll	%r13d, %r14d
	jmp	LBB0_6
LBB0_4:
	movl	-44(%rbp), %r14d
LBB0_6:
	movq	_pvr_format@GOTPCREL(%rip), %rax
	movq	_PVR_FORMAT_PIX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	shlq	$2, %rsi
	addq	(%rax), %rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_memcpy
	movl	%r12d, 4(%rbx)
	movl	%r14d, (%rbx)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PVR2_CID_HRES,4,2              ## @PVR2_CID_HRES
	.comm	_PVR2_CID_VRES,4,2              ## @PVR2_CID_VRES
	.comm	_pvr_format,8,3                 ## @pvr_format
	.comm	_PVR_FORMAT_PIX,8,3             ## @PVR_FORMAT_PIX
	.no_dead_strip	_pvr2_try_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_try_fmt_vid_cap
_pvr2_try_fmt_vid_cap:                  ; @pvr2_try_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x20, [x8]
	ldp	w24, w25, [x2]
Lloh0:
	adrp	x8, _PVR2_CID_HRES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PVR2_CID_HRES@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pvr2_hdw_get_ctrl_by_id
	mov	x23, x0
Lloh3:
	adrp	x8, _PVR2_CID_VRES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PVR2_CID_VRES@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pvr2_hdw_get_ctrl_by_id
	mov	x20, x0
	mov	x0, x23
	bl	_pvr2_ctrl_get_min
	mov	x21, x0
	mov	x0, x23
	bl	_pvr2_ctrl_get_max
	mov	x22, x0
	add	x1, sp, #12
	mov	x0, x23
	bl	_pvr2_ctrl_get_def
	cmn	w25, #1
	b.eq	LBB0_2
; %bb.1:
	cmp	w25, w22
	csel	w8, w25, w22, lt
	cmp	w25, w21
	csel	w23, w21, w8, lt
	b	LBB0_3
LBB0_2:
	ldr	w23, [sp, #12]
LBB0_3:
	mov	x0, x20
	bl	_pvr2_ctrl_get_min
	mov	x21, x0
	mov	x0, x20
	bl	_pvr2_ctrl_get_max
	mov	x22, x0
	add	x1, sp, #12
	mov	x0, x20
	bl	_pvr2_ctrl_get_def
	cmn	w24, #1
	b.eq	LBB0_5
; %bb.4:
	cmp	w24, w22
	csel	w8, w24, w22, lt
	cmp	w24, w21
	csel	w20, w21, w8, lt
	b	LBB0_6
LBB0_5:
	ldr	w20, [sp, #12]
LBB0_6:
Lloh6:
	adrp	x8, _pvr_format@GOTPAGE
Lloh7:
	ldr	x8, [x8, _pvr_format@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _PVR_FORMAT_PIX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PVR_FORMAT_PIX@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	mov	w2, #8
	bl	_memcpy
	stp	w20, w23, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PVR2_CID_HRES,4,2              ; @PVR2_CID_HRES
	.comm	_PVR2_CID_VRES,4,2              ; @PVR2_CID_VRES
	.comm	_pvr_format,8,3                 ; @pvr_format
	.comm	_PVR_FORMAT_PIX,8,3             ; @PVR_FORMAT_PIX
	.no_dead_strip	_pvr2_try_fmt_vid_cap
.subsections_via_symbols
