	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ovcamchip_ioctl
_ovcamchip_ioctl:                       ## @ovcamchip_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	%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	%rdx, %r12
	movl	%esi, %ebx
	movq	%rdi, %r13
	callq	_to_ovcamchip
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, %r14
	movl	%ebx, %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$0, (%r15)
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_v4l2_err
	movq	_EPERM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
	jmp	LBB0_17
LBB0_3:
	cmpl	$129, %ebx
	je	LBB0_6
## %bb.4:
	cmpl	$128, %ebx
	jne	LBB0_14
## %bb.5:
	movl	4(%r15), %eax
	movl	%eax, (%r12)
	jmp	LBB0_16
LBB0_6:
	movq	_mono@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:
	movl	(%r12), %eax
LBB0_8:
	movl	%eax, 8(%r15)
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	movl	4(%r15), %eax
	movq	_CC_OV7620@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.11:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_v4l2_info
	jmp	LBB0_12
LBB0_14:
	movq	16(%r15), %rax
	movq	8(%rax), %rax
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_v4l2_warn
LBB0_12:
	movq	16(%r15), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_13
## %bb.15:
	movl	$1, (%r15)
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	cltq
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Camera chip not initialized yet!\n"

	.comm	_EPERM,8,3                      ## @EPERM
	.comm	_mono,4,2                       ## @mono
	.comm	_CC_OV7620,4,2                  ## @CC_OV7620
L_.str.1:                               ## @.str.1
	.asciz	"Monochrome not implemented for this chip\n"

L_.str.2:                               ## @.str.2
	.asciz	"Initializing chip as monochrome\n"

	.no_dead_strip	_ovcamchip_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ovcamchip_ioctl
_ovcamchip_ioctl:                       ; @ovcamchip_ioctl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
	bl	_to_ovcamchip
	mov	x19, x0
	mov	x0, x21
	bl	_v4l2_get_subdevdata
	mov	x20, x0
	and	w8, w23, #0xfffffffe
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x19]
	cbnz	w8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_v4l2_err
Lloh2:
	adrp	x8, _EPERM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_16
LBB0_3:
	cmp	w23, #129
	b.eq	LBB0_6
; %bb.4:
	cmp	w23, #128
	b.ne	LBB0_11
; %bb.5:
	mov	x0, #0
	ldr	w8, [x19, #4]
	str	w8, [x22]
	b	LBB0_16
LBB0_6:
Lloh5:
	adrp	x8, _mono@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mono@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w8, #1
	b.ne	LBB0_8
; %bb.7:
	ldr	w8, [x22]
LBB0_8:
	str	w8, [x19, #8]
	cbz	w8, LBB0_13
; %bb.9:
	ldr	w8, [x19, #4]
Lloh8:
	adrp	x9, _CC_OV7620@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CC_OV7620@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.10:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_v4l2_info
	b	LBB0_13
LBB0_11:
	ldr	x8, [x19, #16]
	ldr	x3, [x8, #8]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	br	x3
LBB0_12:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_v4l2_warn
LBB0_13:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_15
; %bb.14:
	mov	x0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_16
LBB0_15:
	sxtw	x0, w0
LBB0_16:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Camera chip not initialized yet!\n"

	.comm	_EPERM,8,3                      ; @EPERM
	.comm	_mono,4,2                       ; @mono
	.comm	_CC_OV7620,4,2                  ; @CC_OV7620
l_.str.1:                               ; @.str.1
	.asciz	"Monochrome not implemented for this chip\n"

l_.str.2:                               ; @.str.2
	.asciz	"Initializing chip as monochrome\n"

	.no_dead_strip	_ovcamchip_ioctl
.subsections_via_symbols
