	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_bus_reset
_s5p_mfc_bus_reset:                     ## @s5p_mfc_bus_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
	movq	_S5P_FIMV_MFC_BUS_RESET_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$1, %esi
	callq	_mfc_write
	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
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_mfc_read
	testb	$2, %al
	je	LBB0_1
## %bb.4:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_mfc_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S5P_FIMV_MFC_BUS_RESET_CTRL,4,2 ## @S5P_FIMV_MFC_BUS_RESET_CTRL
	.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	_EIO,4,2                        ## @EIO
	.no_dead_strip	_s5p_mfc_bus_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_mfc_bus_reset
_s5p_mfc_bus_reset:                     ; @s5p_mfc_bus_reset
	.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	x21, _S5P_FIMV_MFC_BUS_RESET_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _S5P_FIMV_MFC_BUS_RESET_CTRL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #1
	bl	_mfc_write
Lloh2:
	adrp	x22, _jiffies@GOTPAGE
Lloh3:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x20, [x22]
Lloh4:
	adrp	x8, _MFC_BW_TIMEOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MFC_BW_TIMEOUT@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x20, x0, x20
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mfc_read
	tbz	w0, #1, LBB0_1
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mfc_err
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_S5P_FIMV_MFC_BUS_RESET_CTRL,4,2 ; @S5P_FIMV_MFC_BUS_RESET_CTRL
	.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	_EIO,4,2                        ; @EIO
	.no_dead_strip	_s5p_mfc_bus_reset
.subsections_via_symbols
