	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_camif_hw_set_source_format     ## -- Begin function camif_hw_set_source_format
	.p2align	4, 0x90
_camif_hw_set_source_format:            ## @camif_hw_set_source_format
	.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	%rdi, %rbx
	movq	_src_pixfmt_map@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	movq	(%r14), %rcx
	movl	%eax, %eax
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testl	%eax, %eax
	jle	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-8(%rcx,%rax,8), %rdx
	decq	%rax
	movl	(%rdx), %edx
	cmpl	4(%rbx), %edx
	jne	LBB0_1
## %bb.3:
	movl	%eax, %r15d
	jmp	LBB0_4
LBB0_5:
	movl	(%rbx), %edi
	movq	(%rcx), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	xorl	%r15d, %r15d
LBB0_4:
	movq	_S3C_CAMIF_REG_CISRCFMT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_camif_read
	movq	_CISRCFMT_ORDER422_MASK@GOTPCREL(%rip), %rcx
	movq	_CISRCFMT_SIZE_CAM_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	8(%rbx), %edx
	shll	$16, %edx
	orl	12(%rbx), %edx
	orl	%esi, %edx
	movq	(%r14), %rax
	movq	(%rax,%r15,8), %rax
	orl	4(%rax), %edx
	movl	(%r12), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_camif_write                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_src_pixfmt_map,8,3             ## @src_pixfmt_map
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported pixel code, falling back to %#08x\n"

	.comm	_S3C_CAMIF_REG_CISRCFMT,4,2     ## @S3C_CAMIF_REG_CISRCFMT
	.comm	_CISRCFMT_ORDER422_MASK,4,2     ## @CISRCFMT_ORDER422_MASK
	.comm	_CISRCFMT_SIZE_CAM_MASK,4,2     ## @CISRCFMT_SIZE_CAM_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_camif_hw_set_source_format     ; -- Begin function camif_hw_set_source_format
	.p2align	2
_camif_hw_set_source_format:            ; @camif_hw_set_source_format
	.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	x19, x0
Lloh0:
	adrp	x20, _src_pixfmt_map@GOTPAGE
Lloh1:
	ldr	x20, [x20, _src_pixfmt_map@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	ldr	x8, [x20]
	mov	w9, w0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	x10, x9, #1
	add	x9, x8, x9, lsl #3
	ldur	x9, [x9, #-8]
	ldr	w11, [x9]
	ldr	w12, [x19, #4]
	mov	x9, x10
	cmp	w11, w12
	b.ne	LBB0_1
; %bb.3:
	and	x21, x10, #0xffffffff
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19]
	ldr	x8, [x8]
	ldr	w2, [x8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x21, #0
LBB0_5:
Lloh4:
	adrp	x22, _S3C_CAMIF_REG_CISRCFMT@GOTPAGE
Lloh5:
	ldr	x22, [x22, _S3C_CAMIF_REG_CISRCFMT@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_camif_read
Lloh6:
	adrp	x8, _CISRCFMT_ORDER422_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CISRCFMT_ORDER422_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _CISRCFMT_SIZE_CAM_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CISRCFMT_SIZE_CAM_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w0, w8
	ldp	w9, w10, [x19, #8]
	orr	w9, w10, w9, lsl #16
	orr	w8, w9, w8
	ldr	x9, [x20]
	ldr	x9, [x9, x21, lsl #3]
	ldr	w9, [x9, #4]
	orr	w2, w8, w9
	ldr	w1, [x22]
	mov	x0, x19
	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
	b	_camif_write
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_src_pixfmt_map,8,3             ; @src_pixfmt_map
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported pixel code, falling back to %#08x\n"

	.comm	_S3C_CAMIF_REG_CISRCFMT,4,2     ; @S3C_CAMIF_REG_CISRCFMT
	.comm	_CISRCFMT_ORDER422_MASK,4,2     ; @CISRCFMT_ORDER422_MASK
	.comm	_CISRCFMT_SIZE_CAM_MASK,4,2     ; @CISRCFMT_SIZE_CAM_MASK
.subsections_via_symbols
