	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_encoder_helper_hw_reset
_dpu_encoder_helper_hw_reset:           ## @dpu_encoder_helper_hw_reset
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_to_dpu_encoder_virt
	movq	8(%rbx), %r15
	testq	%r15, %r15
	je	LBB0_6
## %bb.2:
	cmpq	$0, 8(%r15)
	je	LBB0_6
## %bb.3:
	movq	%rax, %r14
	movl	4(%rbx), %edi
	callq	_DRMID
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_KMS
	movq	%r15, %rdi
	callq	*8(%r15)
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_DPU_ERROR_ENC
LBB0_5:
	movq	_DPU_ENC_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str(%rip), %rdi
	jmp	_DPU_ERROR                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid encoder\n"

L_.str.1:                               ## @.str.1
	.asciz	"id:%u ctl %d reset\n"

L_.str.2:                               ## @.str.2
	.asciz	"ctl %d reset failure\n"

	.comm	_DPU_ENC_ENABLED,4,2            ## @DPU_ENC_ENABLED
	.no_dead_strip	_dpu_encoder_helper_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpu_encoder_helper_hw_reset
_dpu_encoder_helper_hw_reset:           ; @dpu_encoder_helper_hw_reset
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_7
; %bb.1:
	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	w0, [x0, #4]
	bl	_to_dpu_encoder_virt
	ldr	x21, [x19, #8]
	cbz	x21, LBB0_6
; %bb.2:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_6
; %bb.3:
	mov	x20, x0
	ldr	w0, [x19, #4]
	bl	_DRMID
	mov	x1, x0
	ldr	w2, [x21]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	x8, [x21, #8]
	mov	x0, x21
	blr	x8
	cbz	w0, LBB0_5
; %bb.4:
	ldr	w2, [x21]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_DPU_ERROR_ENC
LBB0_5:
Lloh4:
	adrp	x8, _DPU_ENC_ENABLED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DPU_ENC_ENABLED@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_6:
	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
LBB0_7:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	b	_DPU_ERROR
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid encoder\n"

l_.str.1:                               ; @.str.1
	.asciz	"id:%u ctl %d reset\n"

l_.str.2:                               ; @.str.2
	.asciz	"ctl %d reset failure\n"

	.comm	_DPU_ENC_ENABLED,4,2            ; @DPU_ENC_ENABLED
	.no_dead_strip	_dpu_encoder_helper_hw_reset
.subsections_via_symbols
