	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioctl_try_fmt_cap
_ioctl_try_fmt_cap:                     ## @ioctl_try_fmt_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	(%rdi), %r15
	movl	(%rsi), %esi
	movl	4(%r12), %edx
	callq	_tcm825x_find_size
	movl	%eax, %r14d
	movq	(%r15), %rdi
	movq	_TCM825X_NUM_CAPTURE_FORMATS@GOTPCREL(%rip), %r13
	movslq	(%r13), %rcx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_tcm825x_sizes@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	%r14d, %edx
	movl	(%rcx,%rdx,8), %eax
	movl	%eax, (%r12)
	movl	4(%rcx,%rdx,8), %ecx
	movl	%ecx, 4(%r12)
	movl	(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	movl	8(%r12), %edi
	movq	_tcm825x_formats@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%rsi,%rbx,4), %edi
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %rdx
	jne	LBB0_3
## %bb.5:
	movl	%edx, %ebx
	jmp	LBB0_6
LBB0_1:
	movq	_tcm825x_formats@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
LBB0_6:
	xorl	%edi, %edi
	cmpl	%edx, %ebx
	cmovel	%edi, %ebx
	movl	(%rsi,%rbx,4), %edx
	movl	%edx, 8(%r12)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 32(%r12)
	movq	_TCM825X_BYTES_PER_PIXEL@GOTPCREL(%rip), %rsi
	imull	(%rsi), %eax
	movl	%eax, 12(%r12)
	imull	%ecx, %eax
	movl	%eax, 16(%r12)
	movq	$0, 24(%r12)
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	$129, 8(%r12)
	jne	LBB0_7
## %bb.8:
	movq	_V4L2_COLORSPACE_SRGB@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_V4L2_COLORSPACE_JPEG@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"isize = %d num_capture = %lu\n"

	.comm	_TCM825X_NUM_CAPTURE_FORMATS,4,2 ## @TCM825X_NUM_CAPTURE_FORMATS
	.comm	_tcm825x_sizes,8,3              ## @tcm825x_sizes
	.comm	_tcm825x_formats,8,3            ## @tcm825x_formats
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_TCM825X_BYTES_PER_PIXEL,4,2    ## @TCM825X_BYTES_PER_PIXEL
L_.str.1:                               ## @.str.1
	.asciz	"format = 0x%08x\n"

	.comm	_V4L2_COLORSPACE_JPEG,4,2       ## @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ## @V4L2_COLORSPACE_SRGB
	.no_dead_strip	_ioctl_try_fmt_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioctl_try_fmt_cap
_ioctl_try_fmt_cap:                     ; @ioctl_try_fmt_cap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	ldr	x21, [x0]
	ldr	w1, [x1]
	ldr	w2, [x19, #4]
	bl	_tcm825x_find_size
	mov	x20, x0
	ldr	x0, [x21]
Lloh0:
	adrp	x22, _TCM825X_NUM_CAPTURE_FORMATS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TCM825X_NUM_CAPTURE_FORMATS@GOTPAGEOFF]
	ldrsw	x8, [x22]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
Lloh4:
	adrp	x8, _tcm825x_sizes@GOTPAGE
Lloh5:
	ldr	x8, [x8, _tcm825x_sizes@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	add	x9, x8, w20, uxtw #3
	ldp	w8, w9, [x9]
	stp	w8, w9, [x19]
	ldr	w10, [x22]
	cmp	w10, #0
	b.le	LBB0_5
; %bb.1:
	mov	x12, #0
	ldr	w13, [x19, #8]
Lloh7:
	adrp	x11, _tcm825x_formats@GOTPAGE
Lloh8:
	ldr	x11, [x11, _tcm825x_formats@GOTPAGEOFF]
Lloh9:
	ldr	x11, [x11]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x11, x12, lsl #2]
	cmp	w13, w14
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x12, x12, #1
	cmp	x10, x12
	b.ne	LBB0_2
; %bb.4:
	mov	x12, x10
	b	LBB0_6
LBB0_5:
	mov	w12, #0
Lloh10:
	adrp	x11, _tcm825x_formats@GOTPAGE
Lloh11:
	ldr	x11, [x11, _tcm825x_formats@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
LBB0_6:
	cmp	w12, w10
	csel	w10, wzr, w12, eq
	ldr	w2, [x11, w10, uxtw #2]
Lloh13:
	adrp	x10, _V4L2_FIELD_NONE@GOTPAGE
Lloh14:
	ldr	x10, [x10, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	str	w10, [x19, #32]
Lloh16:
	adrp	x10, _TCM825X_BYTES_PER_PIXEL@GOTPAGE
Lloh17:
	ldr	x10, [x10, _TCM825X_BYTES_PER_PIXEL@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	mul	w8, w10, w8
	stp	w2, w8, [x19, #8]
	mul	w8, w8, w9
	str	w8, [x19, #16]
	str	xzr, [x19, #24]
	ldr	x0, [x21]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
Lloh21:
	adrp	x8, _V4L2_COLORSPACE_SRGB@GOTPAGE
Lloh22:
	ldr	x8, [x8, _V4L2_COLORSPACE_SRGB@GOTPAGEOFF]
Lloh23:
	adrp	x9, _V4L2_COLORSPACE_JPEG@GOTPAGE
Lloh24:
	ldr	x9, [x9, _V4L2_COLORSPACE_JPEG@GOTPAGEOFF]
	ldr	w10, [x19, #8]
	cmp	w10, #129
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #20]
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"isize = %d num_capture = %lu\n"

	.comm	_TCM825X_NUM_CAPTURE_FORMATS,4,2 ; @TCM825X_NUM_CAPTURE_FORMATS
	.comm	_tcm825x_sizes,8,3              ; @tcm825x_sizes
	.comm	_tcm825x_formats,8,3            ; @tcm825x_formats
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_TCM825X_BYTES_PER_PIXEL,4,2    ; @TCM825X_BYTES_PER_PIXEL
l_.str.1:                               ; @.str.1
	.asciz	"format = 0x%08x\n"

	.comm	_V4L2_COLORSPACE_JPEG,4,2       ; @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ; @V4L2_COLORSPACE_SRGB
	.no_dead_strip	_ioctl_try_fmt_cap
.subsections_via_symbols
