	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c_camif_hw_init
_s3c_camif_hw_init:                     ## @s3c_camif_hw_init
	.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
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	cmpq	$0, 8(%rsi)
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movq	24(%rdi), %r15
	movq	(%r15), %rax
	movq	_S3C244X_CAMIF_IP_REV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_camif_hw_clear_fifo_overflow
LBB0_5:
	movq	%rbx, %rdi
	callq	_camif_hw_set_camera_bus
	movq	%rbx, %rdi
	callq	_camif_hw_set_source_format
	movq	%rbx, %rdi
	callq	_camif_hw_set_camera_crop
	movl	12(%rbx), %esi
	movq	%rbx, %rdi
	callq	_camif_hw_set_test_pattern
	cmpq	$0, 8(%r15)
	je	LBB0_7
## %bb.6:
	movl	8(%rbx), %esi
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_camif_hw_set_effect
LBB0_7:
	movq	(%r15), %rax
	movq	_S3C6410_CAMIF_IP_REV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_camif_hw_set_input_path
LBB0_9:
	movq	%r14, %rdi
	callq	_camif_cfg_video_path
	movq	_ST_VP_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_S3C244X_CAMIF_IP_REV,8,3       ## @S3C244X_CAMIF_IP_REV
	.comm	_S3C6410_CAMIF_IP_REV,8,3       ## @S3C6410_CAMIF_IP_REV
	.comm	_ST_VP_CONFIG,4,2               ## @ST_VP_CONFIG
	.no_dead_strip	_s3c_camif_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c_camif_hw_init
_s3c_camif_hw_init:                     ; @s3c_camif_hw_init
	.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
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x19, x1
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_9
; %bb.2:
	mov	x20, x0
	ldr	x21, [x0, #24]
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _S3C244X_CAMIF_IP_REV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S3C244X_CAMIF_IP_REV@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_camif_hw_clear_fifo_overflow
LBB0_4:
	mov	x0, x20
	bl	_camif_hw_set_camera_bus
	mov	x0, x20
	bl	_camif_hw_set_source_format
	mov	x0, x20
	bl	_camif_hw_set_camera_crop
	ldr	w1, [x20, #12]
	mov	x0, x20
	bl	_camif_hw_set_test_pattern
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_6
; %bb.5:
	ldp	w2, w1, [x20, #4]
	ldr	w3, [x20]
	mov	x0, x20
	bl	_camif_hw_set_effect
LBB0_6:
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _S3C6410_CAMIF_IP_REV@GOTPAGE
Lloh4:
	ldr	x9, [x9, _S3C6410_CAMIF_IP_REV@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_camif_hw_set_input_path
LBB0_8:
	mov	x0, x19
	bl	_camif_cfg_video_path
	mov	w0, #0
Lloh6:
	adrp	x8, _ST_VP_CONFIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ST_VP_CONFIG@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	b	LBB0_10
LBB0_9:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_S3C244X_CAMIF_IP_REV,8,3       ; @S3C244X_CAMIF_IP_REV
	.comm	_S3C6410_CAMIF_IP_REV,8,3       ; @S3C6410_CAMIF_IP_REV
	.comm	_ST_VP_CONFIG,4,2               ; @ST_VP_CONFIG
	.no_dead_strip	_s3c_camif_hw_init
.subsections_via_symbols
