	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_camif_hw_set_camera_bus        ## -- Begin function camif_hw_set_camera_bus
	.p2align	4, 0x90
_camif_hw_set_camera_bus:               ## @camif_hw_set_camera_bus
	.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, %r14
	movl	8(%rdi), %r12d
	movq	_S3C_CAMIF_REG_CIGCTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_camif_read
	movq	_CIGCTRL_INVPOLPCLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CIGCTRL_INVPOLVSYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%ebx, %edi
	orl	%esi, %edi
	movq	_CIGCTRL_INVPOLHREF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_CIGCTRL_INVPOLFIELD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r8d, %edx
	orl	%ecx, %edx
	orl	%edi, %edx
	notl	%edx
	andl	%eax, %edx
	movq	_V4L2_MBUS_PCLK_SAMPLE_FALLING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	cmovnel	%esi, %eax
	orl	%edx, %eax
	movq	_V4L2_MBUS_VSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%r12d, %edx
	cmovnel	%ebx, %edx
	movq	_V4L2_MBUS_HSYNC_ACTIVE_HIGH@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ebx
	andl	%r12d, %ebx
	cmovnel	%r8d, %ebx
	orl	%edx, %ebx
	orl	%eax, %ebx
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_S3C6410_CAMIF_IP_REV@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_V4L2_MBUS_FIELD_EVEN_LOW@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	cmovel	%r12d, %ecx
	movq	_CIGCTRL_FIELDMODE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	orl	%ecx, %ebx
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_debug
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_camif_write                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_S3C_CAMIF_REG_CIGCTRL,4,2      ## @S3C_CAMIF_REG_CIGCTRL
	.comm	_CIGCTRL_INVPOLPCLK,4,2         ## @CIGCTRL_INVPOLPCLK
	.comm	_CIGCTRL_INVPOLVSYNC,4,2        ## @CIGCTRL_INVPOLVSYNC
	.comm	_CIGCTRL_INVPOLHREF,4,2         ## @CIGCTRL_INVPOLHREF
	.comm	_CIGCTRL_INVPOLFIELD,4,2        ## @CIGCTRL_INVPOLFIELD
	.comm	_V4L2_MBUS_PCLK_SAMPLE_FALLING,4,2 ## @V4L2_MBUS_PCLK_SAMPLE_FALLING
	.comm	_V4L2_MBUS_VSYNC_ACTIVE_LOW,4,2 ## @V4L2_MBUS_VSYNC_ACTIVE_LOW
	.comm	_V4L2_MBUS_HSYNC_ACTIVE_HIGH,4,2 ## @V4L2_MBUS_HSYNC_ACTIVE_HIGH
	.comm	_S3C6410_CAMIF_IP_REV,8,3       ## @S3C6410_CAMIF_IP_REV
	.comm	_V4L2_MBUS_FIELD_EVEN_LOW,4,2   ## @V4L2_MBUS_FIELD_EVEN_LOW
	.comm	_CIGCTRL_FIELDMODE,4,2          ## @CIGCTRL_FIELDMODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting CIGCTRL to: %#x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_camif_hw_set_camera_bus        ; -- Begin function camif_hw_set_camera_bus
	.p2align	2
_camif_hw_set_camera_bus:               ; @camif_hw_set_camera_bus
	.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
	ldr	w22, [x0, #8]
Lloh0:
	adrp	x21, _S3C_CAMIF_REG_CIGCTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _S3C_CAMIF_REG_CIGCTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_camif_read
Lloh2:
	adrp	x8, _CIGCTRL_INVPOLPCLK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CIGCTRL_INVPOLPCLK@GOTPAGEOFF]
Lloh4:
	adrp	x9, _CIGCTRL_INVPOLVSYNC@GOTPAGE
Lloh5:
	ldr	x9, [x9, _CIGCTRL_INVPOLVSYNC@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x8]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w10
Lloh8:
	adrp	x11, _CIGCTRL_INVPOLHREF@GOTPAGE
Lloh9:
	ldr	x11, [x11, _CIGCTRL_INVPOLHREF@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	orr	w12, w8, w11
Lloh11:
	adrp	x8, _CIGCTRL_INVPOLFIELD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CIGCTRL_INVPOLFIELD@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w12, w12, w8
	bic	w12, w0, w12
Lloh14:
	adrp	x13, _V4L2_MBUS_PCLK_SAMPLE_FALLING@GOTPAGE
Lloh15:
	ldr	x13, [x13, _V4L2_MBUS_PCLK_SAMPLE_FALLING@GOTPAGEOFF]
Lloh16:
	ldr	w13, [x13]
	tst	w13, w22
	csel	w10, wzr, w10, eq
	orr	w10, w10, w12
Lloh17:
	adrp	x12, _V4L2_MBUS_VSYNC_ACTIVE_LOW@GOTPAGE
Lloh18:
	ldr	x12, [x12, _V4L2_MBUS_VSYNC_ACTIVE_LOW@GOTPAGEOFF]
Lloh19:
	ldr	w12, [x12]
	tst	w12, w22
	csel	w9, wzr, w9, eq
	orr	w9, w10, w9
Lloh20:
	adrp	x10, _V4L2_MBUS_HSYNC_ACTIVE_HIGH@GOTPAGE
Lloh21:
	ldr	x10, [x10, _V4L2_MBUS_HSYNC_ACTIVE_HIGH@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	tst	w10, w22
	csel	w10, wzr, w11, eq
	orr	w20, w9, w10
	ldr	x9, [x19]
	ldr	x9, [x9]
Lloh23:
	adrp	x10, _S3C6410_CAMIF_IP_REV@GOTPAGE
Lloh24:
	ldr	x10, [x10, _S3C6410_CAMIF_IP_REV@GOTPAGEOFF]
Lloh25:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
Lloh26:
	adrp	x9, _V4L2_MBUS_FIELD_EVEN_LOW@GOTPAGE
Lloh27:
	ldr	x9, [x9, _V4L2_MBUS_FIELD_EVEN_LOW@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w22
	csel	w8, wzr, w8, eq
Lloh29:
	adrp	x9, _CIGCTRL_FIELDMODE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _CIGCTRL_FIELDMODE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w9, w9, w20
	orr	w20, w9, w8
LBB0_2:
Lloh32:
	adrp	x0, l_.str@PAGE
Lloh33:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	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 AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_S3C_CAMIF_REG_CIGCTRL,4,2      ; @S3C_CAMIF_REG_CIGCTRL
	.comm	_CIGCTRL_INVPOLPCLK,4,2         ; @CIGCTRL_INVPOLPCLK
	.comm	_CIGCTRL_INVPOLVSYNC,4,2        ; @CIGCTRL_INVPOLVSYNC
	.comm	_CIGCTRL_INVPOLHREF,4,2         ; @CIGCTRL_INVPOLHREF
	.comm	_CIGCTRL_INVPOLFIELD,4,2        ; @CIGCTRL_INVPOLFIELD
	.comm	_V4L2_MBUS_PCLK_SAMPLE_FALLING,4,2 ; @V4L2_MBUS_PCLK_SAMPLE_FALLING
	.comm	_V4L2_MBUS_VSYNC_ACTIVE_LOW,4,2 ; @V4L2_MBUS_VSYNC_ACTIVE_LOW
	.comm	_V4L2_MBUS_HSYNC_ACTIVE_HIGH,4,2 ; @V4L2_MBUS_HSYNC_ACTIVE_HIGH
	.comm	_S3C6410_CAMIF_IP_REV,8,3       ; @S3C6410_CAMIF_IP_REV
	.comm	_V4L2_MBUS_FIELD_EVEN_LOW,4,2   ; @V4L2_MBUS_FIELD_EVEN_LOW
	.comm	_CIGCTRL_FIELDMODE,4,2          ; @CIGCTRL_FIELDMODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting CIGCTRL to: %#x\n"

.subsections_via_symbols
