	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioctl_cap_query
_ioctl_cap_query:                       ## @ioctl_cap_query
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpl	$337, 4(%rsi)                   ## imm = 0x151
	movl	32(%rdi), %edi
	leaq	L_.str(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	callq	_strcpy
	movq	_VID_TYPE_CAPTURE@GOTPCREL(%rip), %rax
	movq	_VID_TYPE_MJPEG_ENCODER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movl	$1, 4(%rbx)
	movq	$0, 24(%rbx)
	movabsq	$618475290800, %rax             ## imm = 0x90000000B0
	movq	%rax, 8(%rbx)
	movl	(%r14), %eax
	cmpl	$129, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.2:
	movq	_STV_IMAGE_VGA_COLS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_STV_IMAGE_VGA_ROWS@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movq	_STV_IMAGE_CIF_COLS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_STV_IMAGE_CIF_ROWS@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QX5 Microscope"

L_.str.1:                               ## @.str.1
	.asciz	"CPiA2 Camera"

	.comm	_VID_TYPE_CAPTURE,4,2           ## @VID_TYPE_CAPTURE
	.comm	_VID_TYPE_MJPEG_ENCODER,4,2     ## @VID_TYPE_MJPEG_ENCODER
	.comm	_STV_IMAGE_VGA_COLS,4,2         ## @STV_IMAGE_VGA_COLS
	.comm	_STV_IMAGE_VGA_ROWS,4,2         ## @STV_IMAGE_VGA_ROWS
	.comm	_STV_IMAGE_CIF_COLS,4,2         ## @STV_IMAGE_CIF_COLS
	.comm	_STV_IMAGE_CIF_ROWS,4,2         ## @STV_IMAGE_CIF_ROWS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ioctl_cap_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ioctl_cap_query
lCPI0_0:
	.long	176                             ; 0xb0
	.long	144                             ; 0x90
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ioctl_cap_query:                       ; @ioctl_cap_query
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x1, #4]
	ldr	w0, [x0, #32]
Lloh0:
	adrp	x9, l_.str.1@PAGE
Lloh1:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh2:
	adrp	x10, l_.str@PAGE
Lloh3:
	add	x10, x10, l_.str@PAGEOFF
	cmp	w8, #337
	csel	x1, x10, x9, eq
	bl	_strcpy
Lloh4:
	adrp	x8, _VID_TYPE_CAPTURE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VID_TYPE_CAPTURE@GOTPAGEOFF]
Lloh6:
	adrp	x9, _VID_TYPE_MJPEG_ENCODER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VID_TYPE_MJPEG_ENCODER@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	w9, #1
	stp	w8, w9, [x19]
	str	xzr, [x19, #24]
Lloh10:
	adrp	x8, lCPI0_0@PAGE
Lloh11:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #8]
	ldr	w8, [x20]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.2:
	mov	w0, #0
Lloh12:
	adrp	x8, _STV_IMAGE_VGA_COLS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STV_IMAGE_VGA_COLS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _STV_IMAGE_VGA_ROWS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _STV_IMAGE_VGA_ROWS@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	mov	w0, #0
Lloh17:
	adrp	x8, _STV_IMAGE_CIF_COLS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STV_IMAGE_CIF_COLS@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _STV_IMAGE_CIF_ROWS@GOTPAGE
Lloh21:
	ldr	x9, [x9, _STV_IMAGE_CIF_ROWS@GOTPAGEOFF]
LBB0_4:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
	b	LBB0_6
LBB0_5:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QX5 Microscope"

l_.str.1:                               ; @.str.1
	.asciz	"CPiA2 Camera"

	.comm	_VID_TYPE_CAPTURE,4,2           ; @VID_TYPE_CAPTURE
	.comm	_VID_TYPE_MJPEG_ENCODER,4,2     ; @VID_TYPE_MJPEG_ENCODER
	.comm	_STV_IMAGE_VGA_COLS,4,2         ; @STV_IMAGE_VGA_COLS
	.comm	_STV_IMAGE_VGA_ROWS,4,2         ; @STV_IMAGE_VGA_ROWS
	.comm	_STV_IMAGE_CIF_COLS,4,2         ; @STV_IMAGE_CIF_COLS
	.comm	_STV_IMAGE_CIF_ROWS,4,2         ; @STV_IMAGE_CIF_ROWS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ioctl_cap_query
.subsections_via_symbols
