	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_reset                  ## -- Begin function s5p_mfc_reset
	.p2align	4, 0x90
_s5p_mfc_reset:                         ## @s5p_mfc_reset
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_mfc_debug_enter
	movq	%r14, %rdi
	callq	_IS_MFCV6_PLUS
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	_S5P_FIMV_RISC2HOST_CMD_V6@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mfc_write
	movq	_S5P_FIMV_HOST2RISC_CMD_V6@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mfc_write
	movq	_S5P_FIMV_FW_VERSION_V6@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mfc_write
	movq	_S5P_FIMV_REG_CLEAR_COUNT_V6@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_4
## %bb.2:
	xorl	%r13d, %r13d
	movq	_S5P_FIMV_REG_CLEAR_BEGIN_V6@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdx
	addq	%r13, %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mfc_write
	incq	%rbx
	movslq	(%r15), %rax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	cmpq	$0, (%r14)
	je	LBB0_9
## %bb.5:
	movq	%r14, %rdi
	callq	_s5p_mfc_bus_reset
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	cmpq	$0, (%r14)
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_IS_MFCV7_PLUS
	testl	%eax, %eax
	jne	LBB0_10
LBB0_9:
	movq	_S5P_FIMV_RISC_ON_V6@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mfc_write
LBB0_10:
	movq	_S5P_FIMV_MFC_RESET_V6@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	movl	$8191, %esi                     ## imm = 0x1FFF
	callq	_mfc_write
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	jmp	LBB0_16
LBB0_11:
	movq	_S5P_FIMV_SW_RESET@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movq	%r14, %rdi
	movl	$1014, %esi                     ## imm = 0x3F6
	callq	_mfc_write
	movq	(%r15), %rdx
	movq	%r14, %rdi
	movl	$994, %esi                      ## imm = 0x3E2
	callq	_mfc_write
	movl	$10, %edi
	callq	_mdelay
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %r13
	movq	_MFC_BW_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r13, %rbx
	movq	_S5P_FIMV_MC_STATUS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_mfc_read
	testb	$3, %al
	jne	LBB0_12
## %bb.15:
	movq	(%r15), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mfc_write
	movq	(%r15), %rdx
	movq	%r14, %rdi
	movl	$1022, %esi                     ## imm = 0x3FE
LBB0_16:
	callq	_mfc_write
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mfc_debug_leave
	jmp	LBB0_17
LBB0_13:
	leaq	L_.str(%rip), %rdi
	callq	_mfc_err
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S5P_FIMV_RISC2HOST_CMD_V6,8,3  ## @S5P_FIMV_RISC2HOST_CMD_V6
	.comm	_S5P_FIMV_HOST2RISC_CMD_V6,8,3  ## @S5P_FIMV_HOST2RISC_CMD_V6
	.comm	_S5P_FIMV_FW_VERSION_V6,8,3     ## @S5P_FIMV_FW_VERSION_V6
	.comm	_S5P_FIMV_REG_CLEAR_COUNT_V6,4,2 ## @S5P_FIMV_REG_CLEAR_COUNT_V6
	.comm	_S5P_FIMV_REG_CLEAR_BEGIN_V6,8,3 ## @S5P_FIMV_REG_CLEAR_BEGIN_V6
	.comm	_EIO,4,2                        ## @EIO
	.comm	_S5P_FIMV_RISC_ON_V6,8,3        ## @S5P_FIMV_RISC_ON_V6
	.comm	_S5P_FIMV_MFC_RESET_V6,8,3      ## @S5P_FIMV_MFC_RESET_V6
	.comm	_S5P_FIMV_SW_RESET,8,3          ## @S5P_FIMV_SW_RESET
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_MFC_BW_TIMEOUT,4,2             ## @MFC_BW_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout while resetting MFC\n"

	.comm	_S5P_FIMV_MC_STATUS,4,2         ## @S5P_FIMV_MC_STATUS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_reset                  ; -- Begin function s5p_mfc_reset
	.p2align	2
_s5p_mfc_reset:                         ; @s5p_mfc_reset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_mfc_debug_enter
	mov	x0, x19
	bl	_IS_MFCV6_PLUS
	cbz	x0, LBB0_10
; %bb.1:
Lloh0:
	adrp	x8, _S5P_FIMV_RISC2HOST_CMD_V6@GOTPAGE
Lloh1:
	ldr	x8, [x8, _S5P_FIMV_RISC2HOST_CMD_V6@GOTPAGEOFF]
Lloh2:
	ldr	x2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_mfc_write
Lloh3:
	adrp	x8, _S5P_FIMV_HOST2RISC_CMD_V6@GOTPAGE
Lloh4:
	ldr	x8, [x8, _S5P_FIMV_HOST2RISC_CMD_V6@GOTPAGEOFF]
Lloh5:
	ldr	x2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_mfc_write
Lloh6:
	adrp	x8, _S5P_FIMV_FW_VERSION_V6@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S5P_FIMV_FW_VERSION_V6@GOTPAGEOFF]
Lloh8:
	ldr	x2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_mfc_write
Lloh9:
	adrp	x20, _S5P_FIMV_REG_CLEAR_COUNT_V6@GOTPAGE
Lloh10:
	ldr	x20, [x20, _S5P_FIMV_REG_CLEAR_COUNT_V6@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
	mov	x22, #0
Lloh11:
	adrp	x23, _S5P_FIMV_REG_CLEAR_BEGIN_V6@GOTPAGE
Lloh12:
	ldr	x23, [x23, _S5P_FIMV_REG_CLEAR_BEGIN_V6@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x2, x21, x8
	mov	x0, x19
	mov	w1, #0
	bl	_mfc_write
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_3
LBB0_4:
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_s5p_mfc_bus_reset
	cbnz	x0, LBB0_16
; %bb.6:
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_IS_MFCV7_PLUS
	cbnz	w0, LBB0_9
LBB0_8:
Lloh13:
	adrp	x8, _S5P_FIMV_RISC_ON_V6@GOTPAGE
Lloh14:
	ldr	x8, [x8, _S5P_FIMV_RISC_ON_V6@GOTPAGEOFF]
Lloh15:
	ldr	x2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_mfc_write
LBB0_9:
Lloh16:
	adrp	x20, _S5P_FIMV_MFC_RESET_V6@GOTPAGE
Lloh17:
	ldr	x20, [x20, _S5P_FIMV_MFC_RESET_V6@GOTPAGEOFF]
	ldr	x2, [x20]
	mov	x0, x19
	mov	w1, #8191
	bl	_mfc_write
	ldr	x2, [x20]
	mov	x0, x19
	mov	w1, #0
	b	LBB0_14
LBB0_10:
Lloh18:
	adrp	x21, _S5P_FIMV_SW_RESET@GOTPAGE
Lloh19:
	ldr	x21, [x21, _S5P_FIMV_SW_RESET@GOTPAGEOFF]
	ldr	x2, [x21]
	mov	x0, x19
	mov	w1, #1014
	bl	_mfc_write
	ldr	x2, [x21]
	mov	x0, x19
	mov	w1, #994
	bl	_mfc_write
	mov	w0, #10
	bl	_mdelay
Lloh20:
	adrp	x22, _jiffies@GOTPAGE
Lloh21:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x20, [x22]
Lloh22:
	adrp	x8, _MFC_BW_TIMEOUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MFC_BW_TIMEOUT@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x20, x0, x20
Lloh25:
	adrp	x23, _S5P_FIMV_MC_STATUS@GOTPAGE
Lloh26:
	ldr	x23, [x23, _S5P_FIMV_MC_STATUS@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_mfc_read
	tst	w0, #0x3
	b.ne	LBB0_11
; %bb.13:
	ldr	x2, [x21]
	mov	x0, x19
	mov	w1, #0
	bl	_mfc_write
	ldr	x2, [x21]
	mov	x0, x19
	mov	w1, #1022
LBB0_14:
	bl	_mfc_write
	bl	_mfc_debug_leave
	mov	w0, #0
	b	LBB0_17
LBB0_15:
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mfc_err
LBB0_16:
Lloh29:
	adrp	x8, _EIO@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_S5P_FIMV_RISC2HOST_CMD_V6,8,3  ; @S5P_FIMV_RISC2HOST_CMD_V6
	.comm	_S5P_FIMV_HOST2RISC_CMD_V6,8,3  ; @S5P_FIMV_HOST2RISC_CMD_V6
	.comm	_S5P_FIMV_FW_VERSION_V6,8,3     ; @S5P_FIMV_FW_VERSION_V6
	.comm	_S5P_FIMV_REG_CLEAR_COUNT_V6,4,2 ; @S5P_FIMV_REG_CLEAR_COUNT_V6
	.comm	_S5P_FIMV_REG_CLEAR_BEGIN_V6,8,3 ; @S5P_FIMV_REG_CLEAR_BEGIN_V6
	.comm	_EIO,4,2                        ; @EIO
	.comm	_S5P_FIMV_RISC_ON_V6,8,3        ; @S5P_FIMV_RISC_ON_V6
	.comm	_S5P_FIMV_MFC_RESET_V6,8,3      ; @S5P_FIMV_MFC_RESET_V6
	.comm	_S5P_FIMV_SW_RESET,8,3          ; @S5P_FIMV_SW_RESET
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_MFC_BW_TIMEOUT,4,2             ; @MFC_BW_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout while resetting MFC\n"

	.comm	_S5P_FIMV_MC_STATUS,4,2         ; @S5P_FIMV_MC_STATUS
.subsections_via_symbols
