	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_vcn_enc_get_destroy_msg
_amdgpu_vcn_enc_get_destroy_msg:        ## @amdgpu_vcn_enc_get_destroy_msg
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r12
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	movl	(%rdi), %edi
	leaq	-56(%rbp), %rdx
	movl	$64, %esi
	callq	_amdgpu_job_alloc_with_ib
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	-56(%rbp), %rax
	movq	(%rax), %rbx
	movq	%r12, %rdi
	callq	_amdgpu_bo_gpu_offset
	movl	%eax, %r12d
	movq	8(%rbx), %rax
	movl	$1, (%rbx)
	movl	$24, (%rax)
	movslq	(%rbx), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%rbx)
	movl	$1, (%rax,%rcx,4)
	movslq	(%rbx), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%rbx)
	movl	%r13d, (%rax,%rcx,4)
	movl	%r12d, %edi
	callq	_upper_32_bits
	movq	8(%rbx), %rcx
	movslq	(%rbx), %rdx
	leal	1(%rdx), %esi
	movl	%esi, (%rbx)
	movl	%eax, (%rcx,%rdx,4)
	movslq	(%rbx), %rax
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	movl	%r12d, (%rcx,%rax,4)
	movslq	(%rbx), %rax
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	movl	$11, (%rcx,%rax,4)
	movslq	(%rbx), %rax
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	movl	$20, (%rcx,%rax,4)
	movslq	(%rbx), %rax
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	movl	$2, (%rcx,%rax,4)
	movslq	(%rbx), %rax
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	movl	$28, (%rcx,%rax,4)
	movslq	(%rbx), %rax
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	movl	$0, (%rcx,%rax,4)
	movslq	(%rbx), %rax
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	movl	$0, (%rcx,%rax,4)
	movslq	(%rbx), %rax
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	movl	$8, (%rcx,%rax,4)
	movslq	(%rbx), %rax
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	movl	$134217730, (%rcx,%rax,4)       ## imm = 0x8000002
	movl	(%rbx), %eax
	cmpq	$15, %rax
	ja	LBB0_3
## %bb.2:
	leaq	(%rcx,%rax,4), %rdi
	movl	$15, %ecx
	subl	%eax, %ecx
	leaq	4(,%rcx,4), %rsi
	callq	___bzero
LBB0_3:
	movq	-56(%rbp), %rdi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rsi
	callq	_amdgpu_job_submit_direct
	testl	%eax, %eax
	je	LBB0_4
## %bb.7:
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi
	callq	_amdgpu_job_free
	jmp	LBB0_8
LBB0_4:
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movq	-48(%rbp), %rdi
	callq	_dma_fence_get
	movq	%rax, (%r14)
LBB0_6:
	movq	-48(%rbp), %rdi
	callq	_dma_fence_put
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_amdgpu_vcn_enc_get_destroy_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_vcn_enc_get_destroy_msg
_amdgpu_vcn_enc_get_destroy_msg:        ; @amdgpu_vcn_enc_get_destroy_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	str	xzr, [sp]
	ldr	w0, [x0]
	add	x2, sp, #8
	mov	w1, #64
	bl	_amdgpu_job_alloc_with_ib
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	x23, [x8]
	mov	x0, x22
	bl	_amdgpu_bo_gpu_offset
	mov	x22, x0
	ldr	x8, [x23, #8]
	mov	w9, #1
	str	w9, [x23]
	mov	w10, #24
	str	w10, [x8]
	ldrsw	x10, [x23]
	add	w11, w10, #1
	str	w11, [x23]
	str	w9, [x8, x10, lsl #2]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	str	w21, [x8, x9, lsl #2]
	bl	_upper_32_bits
	ldr	x8, [x23, #8]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	str	w0, [x8, x9, lsl #2]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	str	w22, [x8, x9, lsl #2]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	mov	w10, #11
	str	w10, [x8, x9, lsl #2]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	mov	w10, #20
	str	w10, [x8, x9, lsl #2]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	mov	w10, #2
	str	w10, [x8, x9, lsl #2]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	mov	w10, #28
	str	w10, [x8, x9, lsl #2]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	str	wzr, [x8, x9, lsl #2]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	str	wzr, [x8, x9, lsl #2]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	mov	w10, #8
	str	w10, [x8, x9, lsl #2]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	mov	w10, #2
	movk	w10, #2048, lsl #16
	str	w10, [x8, x9, lsl #2]
	ldr	w9, [x23]
	cmp	w9, #15
	b.hi	LBB0_3
; %bb.2:
	add	x0, x8, x9, lsl #2
	mov	w8, #15
	sub	w8, w8, w9
	lsl	x8, x8, #2
	add	x1, x8, #4
	bl	_bzero
LBB0_3:
	ldr	x0, [sp, #8]
	mov	x2, sp
	mov	x1, x20
	bl	_amdgpu_job_submit_direct
	cbz	w0, LBB0_5
; %bb.4:
	mov	x23, x0
	ldr	x0, [sp, #8]
	bl	_amdgpu_job_free
	b	LBB0_8
LBB0_5:
	cbz	x19, LBB0_7
; %bb.6:
	ldr	x0, [sp]
	bl	_dma_fence_get
	str	x0, [x19]
LBB0_7:
	ldr	x0, [sp]
	bl	_dma_fence_put
	mov	w23, #0
LBB0_8:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_amdgpu_vcn_enc_get_destroy_msg
.subsections_via_symbols
