	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_wait_for_done_ctx      ## -- Begin function s5p_mfc_wait_for_done_ctx
	.p2align	4, 0x90
_s5p_mfc_wait_for_done_ctx:             ## @s5p_mfc_wait_for_done_ctx
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	16(%rdi), %r15d
	movq	8(%rdi), %rax
	testl	%edx, %edx
	je	LBB0_4
## %bb.1:
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movl	(%r12), %eax
	movl	$1, %ebx
	cmpl	%r14d, %eax
	je	LBB0_8
## %bb.3:
	movq	_S5P_MFC_R2H_CMD_ERR_RET@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	sete	%bl
	jmp	LBB0_8
LBB0_4:
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movl	(%r12), %eax
	movl	$1, %ebx
	cmpl	%r14d, %eax
	je	LBB0_13
## %bb.6:
	movq	_S5P_MFC_R2H_CMD_ERR_RET@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	sete	%bl
	jmp	LBB0_13
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	_MFC_INT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_wait_event_interruptible_timeout
	testl	%eax, %eax
	je	LBB0_14
LBB0_9:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_mfc_err
	jmp	LBB0_15
LBB0_11:
	movl	(%r12), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movl	%r14d, %ecx
	callq	_mfc_debug
	movl	(%r12), %ecx
	movq	_S5P_MFC_R2H_CMD_ERR_RET@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	sete	%al
	jmp	LBB0_16
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	_MFC_INT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	testl	%eax, %eax
	jne	LBB0_9
LBB0_14:
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_mfc_err
LBB0_15:
	movl	$1, %eax
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S5P_MFC_R2H_CMD_ERR_RET,4,2    ## @S5P_MFC_R2H_CMD_ERR_RET
	.comm	_MFC_INT_TIMEOUT,4,2            ## @MFC_INT_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Interrupt (ctx->int_type:%d, command:%d) timed out\n"

	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
L_.str.1:                               ## @.str.1
	.asciz	"Interrupted by a signal\n"

L_.str.2:                               ## @.str.2
	.asciz	"Finished waiting (ctx->int_type:%d, command: %d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_wait_for_done_ctx      ; -- Begin function s5p_mfc_wait_for_done_ctx
	.p2align	2
_s5p_mfc_wait_for_done_ctx:             ; @s5p_mfc_wait_for_done_ctx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w21, [x0, #16]
	ldr	x8, [x0, #8]
	cbz	w2, LBB0_4
; %bb.1:
	cbz	x8, LBB0_7
; %bb.2:
	ldr	w8, [x20]
	cmp	w8, w19
	b.ne	LBB0_8
; %bb.3:
	mov	w22, #1
	b	LBB0_9
LBB0_4:
	cbz	x8, LBB0_13
; %bb.5:
	ldr	w8, [x20]
	cmp	w8, w19
	b.ne	LBB0_14
; %bb.6:
	mov	w22, #1
	b	LBB0_15
LBB0_7:
	mov	w22, #0
	b	LBB0_9
LBB0_8:
Lloh0:
	adrp	x9, _S5P_MFC_R2H_CMD_ERR_RET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S5P_MFC_R2H_CMD_ERR_RET@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w22, eq
LBB0_9:
Lloh3:
	adrp	x8, _MFC_INT_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MFC_INT_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_wait_event_interruptible_timeout
	cbz	w0, LBB0_16
LBB0_10:
Lloh6:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_12
; %bb.11:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_12:
	ldr	w2, [x20]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x3, x19
	bl	_mfc_debug
	ldr	w8, [x20]
Lloh13:
	adrp	x9, _S5P_MFC_R2H_CMD_ERR_RET@GOTPAGE
Lloh14:
	ldr	x9, [x9, _S5P_MFC_R2H_CMD_ERR_RET@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, eq
	b	LBB0_18
LBB0_13:
	mov	w22, #0
	b	LBB0_15
LBB0_14:
Lloh16:
	adrp	x9, _S5P_MFC_R2H_CMD_ERR_RET@GOTPAGE
Lloh17:
	ldr	x9, [x9, _S5P_MFC_R2H_CMD_ERR_RET@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w22, eq
LBB0_15:
Lloh19:
	adrp	x8, _MFC_INT_TIMEOUT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MFC_INT_TIMEOUT@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_wait_event_timeout
	cbnz	w0, LBB0_10
LBB0_16:
	ldr	w8, [x20]
	stp	x8, x19, [sp]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
LBB0_17:
	bl	_mfc_err
	mov	w0, #1
LBB0_18:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_S5P_MFC_R2H_CMD_ERR_RET,4,2    ; @S5P_MFC_R2H_CMD_ERR_RET
	.comm	_MFC_INT_TIMEOUT,4,2            ; @MFC_INT_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Interrupt (ctx->int_type:%d, command:%d) timed out\n"

	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
l_.str.1:                               ; @.str.1
	.asciz	"Interrupted by a signal\n"

l_.str.2:                               ; @.str.2
	.asciz	"Finished waiting (ctx->int_type:%d, command: %d)\n"

.subsections_via_symbols
