	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov2680_bayer_order
_ov2680_bayer_order:                    ## @ov2680_bayer_order
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_OV2680_REG_FORMAT1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	callq	_ov2680_read_reg
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	_OV2680_REG_FORMAT2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_ov2680_read_reg
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movl	-28(%rbp), %r15d
	movl	$2, %edi
	callq	_BIT
	movl	%eax, %ebx
	addl	%eax, %ebx
	andl	%r15d, %ebx
	movl	-32(%rbp), %r15d
	movl	$2, %edi
	callq	_BIT
	andl	%r15d, %eax
	orl	%ebx, %eax
	movq	_ov2680_hv_flip_bayer_order@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OV2680_REG_FORMAT1,4,2         ## @OV2680_REG_FORMAT1
	.comm	_OV2680_REG_FORMAT2,4,2         ## @OV2680_REG_FORMAT2
	.comm	_ov2680_hv_flip_bayer_order,8,3 ## @ov2680_hv_flip_bayer_order
	.no_dead_strip	_ov2680_bayer_order
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov2680_bayer_order
_ov2680_bayer_order:                    ; @ov2680_bayer_order
	.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, x0
Lloh0:
	adrp	x8, _OV2680_REG_FORMAT1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OV2680_REG_FORMAT1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_ov2680_read_reg
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _OV2680_REG_FORMAT2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OV2680_REG_FORMAT2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ov2680_read_reg
	tbnz	w0, #31, LBB0_3
; %bb.2:
	ldr	w20, [sp, #8]
	mov	w0, #2
	bl	_BIT
	and	w20, w20, w0, lsl #1
	ldr	w21, [sp, #12]
	mov	w0, #2
	bl	_BIT
	mov	x8, x0
	mov	w0, #0
	and	w8, w8, w21
	orr	w8, w8, w20
Lloh6:
	adrp	x9, _ov2680_hv_flip_bayer_order@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ov2680_hv_flip_bayer_order@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	w8, [x9, w8, sxtw #2]
	str	w8, [x19]
LBB0_3:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OV2680_REG_FORMAT1,4,2         ; @OV2680_REG_FORMAT1
	.comm	_OV2680_REG_FORMAT2,4,2         ; @OV2680_REG_FORMAT2
	.comm	_ov2680_hv_flip_bayer_order,8,3 ; @ov2680_hv_flip_bayer_order
	.no_dead_strip	_ov2680_bayer_order
.subsections_via_symbols
