	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function qcam_do_ioctl
LCPI0_0:
	.long	1                               ## 0x1
	.long	320                             ## 0x140
	.long	240                             ## 0xf0
	.long	80                              ## 0x50
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_qcam_do_ioctl:                         ## @qcam_do_ioctl
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	callq	_video_devdata
	addl	$-128, %ebx
	cmpl	$16, %ebx
	ja	LBB0_27
## %bb.1:
	movq	%rax, %r14
	xorl	%r12d, %r12d
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_28:
	xorl	%r12d, %r12d
	subq	(%rax), %r12
LBB0_29:
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	_ENOIOCTLCMD@GOTPCREL(%rip), %rax
	jmp	LBB0_28
LBB0_16:
	cmpl	$0, 12(%r15)
	jne	LBB0_4
## %bb.17:
	cmpl	$0, 8(%r15)
	jne	LBB0_4
## %bb.18:
	movl	(%r15), %eax
	leal	-241(%rax), %ecx
	cmpl	$-182, %ecx
	jbe	LBB0_4
## %bb.19:
	movl	4(%r15), %ecx
	leal	-321(%rcx), %edx
	cmpl	$-242, %edx
	jbe	LBB0_4
## %bb.20:
	movabsq	$1030792151360, %rdx            ## imm = 0xF000000140
	movq	%rdx, 16(%r14)
	movl	$4, 24(%r14)
	cmpl	$160, %ecx
	jb	LBB0_25
## %bb.21:
	cmpl	$120, %eax
	jb	LBB0_25
## %bb.22:
	movl	$2, 24(%r14)
	cmpl	$320, %ecx                      ## imm = 0x140
	jb	LBB0_25
## %bb.23:
	cmpl	$240, %eax
	jb	LBB0_25
## %bb.24:
	movabsq	$4294967536, %rax               ## imm = 0x1000000F0
	movq	%rax, 20(%r14)
	jmp	LBB0_25
LBB0_9:
	cmpl	$0, 4(%r15)
	jne	LBB0_4
## %bb.10:
	movl	(%r15), %eax
	movq	_VIDEO_MODE_AUTO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.11:
	xorl	%r12d, %r12d
	jmp	LBB0_29
LBB0_13:
	movl	24(%r15), %eax
	movq	_VIDEO_PALETTE_GREY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.14:
	movl	20(%r15), %eax
	movl	%eax, %ecx
	orl	$2, %ecx
	cmpl	$6, %ecx
	jne	LBB0_4
## %bb.15:
	movl	8(%r15), %ecx
	sarl	$8, %ecx
	movl	%ecx, (%r14)
	movl	12(%r15), %ecx
	sarl	$8, %ecx
	movl	%ecx, 4(%r14)
	movl	16(%r15), %ecx
	sarl	$8, %ecx
	movl	%ecx, 8(%r14)
	movl	%eax, 12(%r14)
LBB0_25:
	movq	%r14, %rbx
	addq	$32, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_qc_setscanmode
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_QC_PARAM_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 28(%r14)
	xorl	%r12d, %r12d
	jmp	LBB0_29
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	xorl	%r12d, %r12d
	subq	(%rax), %r12
	cmpl	$0, (%r15)
	cmoveq	%rcx, %r12
	jmp	LBB0_29
LBB0_26:
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	16(%r14), %eax
	movl	24(%r14), %ecx
	cltd
	idivl	%ecx
	movl	%eax, 4(%r15)
	movl	20(%r14), %eax
	cltd
	idivl	%ecx
	movl	%eax, (%r15)
	jmp	LBB0_29
LBB0_7:
	cmpl	$0, 4(%r15)
	jne	LBB0_4
## %bb.8:
	movl	20(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcpy
	movl	$0, 16(%r15)
	movq	$0, 8(%r15)
	movq	_VIDEO_MODE_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	xorl	%r12d, %r12d
	jmp	LBB0_29
LBB0_12:
	movabsq	$140737488388096, %rax          ## imm = 0x800000008000
	movq	%rax, (%r15)
	movl	(%r14), %eax
	shll	$8, %eax
	movl	%eax, 8(%r15)
	movl	4(%r14), %eax
	shll	$8, %eax
	movl	%eax, 12(%r15)
	movl	8(%r14), %eax
	shll	$8, %eax
	movl	%eax, 16(%r15)
	movl	12(%r14), %eax
	movl	%eax, 20(%r15)
	movq	_VIDEO_PALETTE_GREY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	xorl	%r12d, %r12d
	jmp	LBB0_29
LBB0_3:
	cmpl	$0, (%r15)
	jne	LBB0_4
## %bb.5:
	movq	$0, 12(%r15)
	movq	_VIDEO_TYPE_CAMERA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movl	4(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcpy
	xorl	%r12d, %r12d
	jmp	LBB0_29
LBB0_2:
	movl	28(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	_VID_TYPE_CAPTURE@GOTPCREL(%rip), %rax
	movq	_VID_TYPE_SCALES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_VID_TYPE_MONOCHROME@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%r15)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,320,240,80]
	movups	%xmm0, 4(%r15)
	movq	$60, 20(%r15)
	xorl	%r12d, %r12d
	jmp	LBB0_29
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_29, LBB0_29-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_16
	.long	L0_0_set_9
	.long	L0_0_set_13
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_29
	.long	L0_0_set_26
	.long	L0_0_set_7
	.long	L0_0_set_12
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Quickcam"

	.comm	_VID_TYPE_CAPTURE,4,2           ## @VID_TYPE_CAPTURE
	.comm	_VID_TYPE_SCALES,4,2            ## @VID_TYPE_SCALES
	.comm	_VID_TYPE_MONOCHROME,4,2        ## @VID_TYPE_MONOCHROME
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_VIDEO_TYPE_CAMERA,4,2          ## @VIDEO_TYPE_CAMERA
L_.str.1:                               ## @.str.1
	.asciz	"Camera"

L_.str.2:                               ## @.str.2
	.asciz	"Format"

	.comm	_VIDEO_MODE_AUTO,4,2            ## @VIDEO_MODE_AUTO
	.comm	_VIDEO_PALETTE_GREY,4,2         ## @VIDEO_PALETTE_GREY
	.comm	_QC_PARAM_CHANGE,4,2            ## @QC_PARAM_CHANGE
	.comm	_ENOIOCTLCMD,8,3                ## @ENOIOCTLCMD
	.no_dead_strip	_qcam_do_ioctl
.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 qcam_do_ioctl
lCPI0_0:
	.long	320                             ; 0x140
	.long	240                             ; 0xf0
lCPI0_1:
	.long	240                             ; 0xf0
	.long	1                               ; 0x1
lCPI0_3:
	.long	60                              ; 0x3c
	.long	0                               ; 0x0
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
lCPI0_2:
	.long	1                               ; 0x1
	.long	320                             ; 0x140
	.long	240                             ; 0xf0
	.long	80                              ; 0x50
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_qcam_do_ioctl:                         ; @qcam_do_ioctl
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x21, x1
	bl	_video_devdata
	sub	w8, w21, #128
	cmp	w8, #16
	b.hi	LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x0, #0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh4:
	adrp	x8, _ENOIOCTLCMD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOIOCTLCMD@GOTPAGEOFF]
	b	LBB0_3
LBB0_6:
	ldr	w8, [x20, #12]
	cbnz	w8, LBB0_2
; %bb.7:
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_2
; %bb.8:
	ldr	w8, [x20]
	sub	w9, w8, #241
	cmn	w9, #182
	b.ls	LBB0_2
; %bb.9:
	ldr	w9, [x20, #4]
	sub	w10, w9, #321
	cmn	w10, #242
	b.ls	LBB0_2
; %bb.10:
Lloh6:
	adrp	x10, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x10, lCPI0_0@PAGEOFF]
	str	d0, [x19, #16]
	mov	w10, #4
	str	w10, [x19, #24]
	cmp	w9, #160
	b.lo	LBB0_21
; %bb.11:
	cmp	w8, #120
	b.lo	LBB0_21
; %bb.12:
	mov	w10, #2
	str	w10, [x19, #24]
	cmp	w9, #320
	b.lo	LBB0_21
; %bb.13:
	cmp	w8, #240
	b.lo	LBB0_21
; %bb.14:
Lloh8:
	adrp	x8, lCPI0_1@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	stur	d0, [x19, #20]
	b	LBB0_21
LBB0_15:
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_2
; %bb.16:
	ldr	w8, [x20]
Lloh10:
	adrp	x9, _VIDEO_MODE_AUTO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _VIDEO_MODE_AUTO@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.17:
	mov	x0, #0
	b	LBB0_4
LBB0_18:
	ldr	w8, [x20, #24]
Lloh13:
	adrp	x9, _VIDEO_PALETTE_GREY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _VIDEO_PALETTE_GREY@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.19:
	ldr	w8, [x20, #20]
	orr	w9, w8, #0x2
	cmp	w9, #6
	b.ne	LBB0_2
; %bb.20:
	ldr	d0, [x20, #8]
	sshr.2s	v0, v0, #8
	str	d0, [x19]
	ldr	w9, [x20, #16]
	asr	w9, w9, #8
	stp	w9, w8, [x19, #8]
LBB0_21:
	add	x20, x19, #32
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_qc_setscanmode
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, #0
Lloh16:
	adrp	x8, _QC_PARAM_CHANGE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _QC_PARAM_CHANGE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x19, #28]
	orr	w8, w9, w8
	str	w8, [x19, #28]
	b	LBB0_4
LBB0_22:
	ldr	w8, [x20]
Lloh19:
	adrp	x9, _EINVAL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	w8, #0
	csneg	x0, xzr, x9, eq
	b	LBB0_4
LBB0_23:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, #0
	ldp	w10, w8, [x19, #20]
	ldr	w9, [x19, #16]
	sdiv	w9, w9, w8
	sdiv	w8, w10, w8
	stp	w8, w9, [x20]
	b	LBB0_4
LBB0_24:
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_2
; %bb.25:
	ldr	w0, [x20, #20]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcpy
	mov	x0, #0
	str	wzr, [x20, #16]
	str	xzr, [x20, #8]
Lloh24:
	adrp	x8, _VIDEO_MODE_AUTO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _VIDEO_MODE_AUTO@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_4
LBB0_26:
	mov	x0, #0
	movi.2s	v0, #128, lsl #8
	str	d0, [x20]
	ldr	d0, [x19]
	shl.2s	v0, v0, #8
	str	d0, [x20, #8]
	ldp	w8, w9, [x19, #8]
	lsl	w8, w8, #8
	stp	w8, w9, [x20, #16]
Lloh27:
	adrp	x8, _VIDEO_PALETTE_GREY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VIDEO_PALETTE_GREY@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x20, #24]
	b	LBB0_4
LBB0_27:
	ldr	w8, [x20]
	cbnz	w8, LBB0_2
; %bb.28:
	str	wzr, [x20, #16]
Lloh30:
	adrp	x8, _VIDEO_TYPE_CAMERA@GOTPAGE
Lloh31:
	ldr	x8, [x8, _VIDEO_TYPE_CAMERA@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	stp	w8, wzr, [x20, #8]
	ldr	w0, [x20, #4]
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcpy
	mov	x0, #0
	b	LBB0_4
LBB0_29:
	ldr	w0, [x20, #28]
Lloh35:
	adrp	x1, l_.str@PAGE
Lloh36:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	mov	x0, #0
Lloh37:
	adrp	x8, _VID_TYPE_CAPTURE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _VID_TYPE_CAPTURE@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
Lloh40:
	adrp	x9, _VID_TYPE_SCALES@GOTPAGE
Lloh41:
	ldr	x9, [x9, _VID_TYPE_SCALES@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh43:
	adrp	x9, _VID_TYPE_MONOCHROME@GOTPAGE
Lloh44:
	ldr	x9, [x9, _VID_TYPE_MONOCHROME@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20]
Lloh46:
	adrp	x8, lCPI0_2@PAGE
Lloh47:
	ldr	q0, [x8, lCPI0_2@PAGEOFF]
	stur	q0, [x20, #4]
Lloh48:
	adrp	x8, lCPI0_3@PAGE
Lloh49:
	ldr	d0, [x8, lCPI0_3@PAGEOFF]
	stur	d0, [x20, #20]
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdr	Lloh48, Lloh49
	.loh AdrpAdrp	Lloh46, Lloh48
	.loh AdrpLdr	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_15-LBB0_2)>>2
	.byte	(LBB0_18-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_22-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_23-LBB0_2)>>2
	.byte	(LBB0_24-LBB0_2)>>2
	.byte	(LBB0_26-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_27-LBB0_2)>>2
	.byte	(LBB0_29-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Quickcam"

	.comm	_VID_TYPE_CAPTURE,4,2           ; @VID_TYPE_CAPTURE
	.comm	_VID_TYPE_SCALES,4,2            ; @VID_TYPE_SCALES
	.comm	_VID_TYPE_MONOCHROME,4,2        ; @VID_TYPE_MONOCHROME
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_VIDEO_TYPE_CAMERA,4,2          ; @VIDEO_TYPE_CAMERA
l_.str.1:                               ; @.str.1
	.asciz	"Camera"

l_.str.2:                               ; @.str.2
	.asciz	"Format"

	.comm	_VIDEO_MODE_AUTO,4,2            ; @VIDEO_MODE_AUTO
	.comm	_VIDEO_PALETTE_GREY,4,2         ; @VIDEO_PALETTE_GREY
	.comm	_QC_PARAM_CHANGE,4,2            ; @QC_PARAM_CHANGE
	.comm	_ENOIOCTLCMD,8,3                ; @ENOIOCTLCMD
	.no_dead_strip	_qcam_do_ioctl
.subsections_via_symbols
