	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sn9c102_set_pix_format
_sn9c102_set_pix_format:                ## @sn9c102_set_pix_format
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rsi), %rcx
	movq	_V4L2_PIX_FMT_SN9C10X@GOTPCREL(%rip), %rdx
	movl	(%rdi), %eax
	cmpq	(%rdx), %rcx
	je	LBB0_2
## %bb.1:
	movq	_V4L2_PIX_FMT_JPEG@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_2
## %bb.5:
	leal	-130(%rax), %ecx
	cmpl	$3, %ecx
	jb	LBB0_4
## %bb.6:
	addl	$-128, %eax
	cmpl	$2, %eax
	jb	LBB0_7
	jmp	LBB0_10
LBB0_2:
	leal	-130(%rax), %ecx
	cmpl	$3, %ecx
	jae	LBB0_3
LBB0_7:
	movq	8(%rdi), %rax
	movl	$128, %esi
	orl	96(%rax), %esi
	jmp	LBB0_8
LBB0_3:
	addl	$-128, %eax
	cmpl	$2, %eax
	jae	LBB0_10
LBB0_4:
	movq	8(%rdi), %rax
	movl	96(%rax), %esi
	andl	$127, %esi
LBB0_8:
	movl	$24, %edx
	callq	_sn9c102_write_reg
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_10:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_PIX_FMT_SN9C10X,8,3       ## @V4L2_PIX_FMT_SN9C10X
	.comm	_V4L2_PIX_FMT_JPEG,8,3          ## @V4L2_PIX_FMT_JPEG
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sn9c102_set_pix_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sn9c102_set_pix_format
_sn9c102_set_pix_format:                ; @sn9c102_set_pix_format
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x9, [x1]
Lloh0:
	adrp	x8, _V4L2_PIX_FMT_SN9C10X@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_PIX_FMT_SN9C10X@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
Lloh3:
	adrp	x8, _V4L2_PIX_FMT_JPEG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_PIX_FMT_JPEG@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x8]
	ldr	w8, [x0]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_3
; %bb.1:
	sub	w9, w8, #130
	cmp	w9, #3
	b.lo	LBB0_6
; %bb.2:
	sub	w8, w8, #128
	cmp	w8, #2
	b.lo	LBB0_4
	b	LBB0_9
LBB0_3:
	sub	w9, w8, #130
	cmp	w9, #3
	b.hs	LBB0_5
LBB0_4:
	ldr	x8, [x0, #8]
	ldr	w8, [x8, #96]
	and	w1, w8, #0x7f
	b	LBB0_7
LBB0_5:
	sub	w8, w8, #128
	cmp	w8, #2
	b.hs	LBB0_9
LBB0_6:
	ldr	x8, [x0, #8]
	ldr	w8, [x8, #96]
	orr	w1, w8, #0x80
LBB0_7:
	mov	w2, #24
	bl	_sn9c102_write_reg
	cbz	w0, LBB0_9
; %bb.8:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_PIX_FMT_SN9C10X,8,3       ; @V4L2_PIX_FMT_SN9C10X
	.comm	_V4L2_PIX_FMT_JPEG,8,3          ; @V4L2_PIX_FMT_JPEG
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sn9c102_set_pix_format
.subsections_via_symbols
