	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _dpu_encoder_resource_control_helper
__dpu_encoder_resource_control_helper:  ## @_dpu_encoder_resource_control_helper
	.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, %rbx
	callq	_to_dpu_encoder_virt
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_to_dpu_kms
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_DRMID
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_trace_dpu_enc_rc_helper
	cmpl	$0, (%r12)
	je	LBB0_3
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.4:
	movq	(%r15), %rdi
	callq	_pm_runtime_get_sync
	movq	%rbx, %rdi
	movl	$1, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__dpu_encoder_irq_control       ## TAILCALL
LBB0_3:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DPU_ERROR                      ## TAILCALL
LBB0_2:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	__dpu_encoder_irq_control
	movq	(%r15), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pm_runtime_put_sync            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"encoder master not set\n"

	.no_dead_strip	__dpu_encoder_resource_control_helper
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _dpu_encoder_resource_control_helper
__dpu_encoder_resource_control_helper:  ; @_dpu_encoder_resource_control_helper
	.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	x20, x1
	mov	x19, x0
	bl	_to_dpu_encoder_virt
	mov	x22, x0
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_to_dpu_kms
	mov	x21, x0
	mov	x0, x19
	bl	_DRMID
	mov	x1, x20
	bl	_trace_dpu_enc_rc_helper
	ldr	w8, [x22]
	cbz	w8, LBB0_3
; %bb.1:
	cbz	w20, LBB0_4
; %bb.2:
	ldr	x0, [x21]
	bl	_pm_runtime_get_sync
	mov	x0, x19
	mov	w1, #1
	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	__dpu_encoder_irq_control
LBB0_3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	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	_DPU_ERROR
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	bl	__dpu_encoder_irq_control
	ldr	x0, [x21]
	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	_pm_runtime_put_sync
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"encoder master not set\n"

	.no_dead_strip	__dpu_encoder_resource_control_helper
.subsections_via_symbols
