	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opencl_device_init
_opencl_device_init:                    ## @opencl_device_init
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rdi), %rbx
	movq	(%rax), %r12
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	callq	_clRetainCommandQueue
	movl	%eax, -36(%rbp)
	movq	_CL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.2:
	movq	8(%rbx), %rax
	movq	%rax, 32(%r12)
	jmp	LBB0_3
LBB0_5:
	movl	(%rbx), %edi
	movl	4(%rbx), %esi
	leaq	-36(%rbp), %rcx
	xorl	%edx, %edx
	callq	_clCreateCommandQueue
	movq	%rax, 32(%r12)
	testq	%rax, %rax
	je	LBB0_6
LBB0_3:
	movl	4(%rbx), %edi
	movq	_CL_DEVICE_PLATFORM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$24, %r12
	xorl	%r15d, %r15d
	movl	$4, %edx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_clGetDeviceInfo
	movl	%eax, -36(%rbp)
	movq	_CL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_7
LBB0_9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CL_SUCCESS,4,2                 ## @CL_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to retain external command queue: %d.\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create internal command queue: %d.\n"

	.comm	_CL_DEVICE_PLATFORM,4,2         ## @CL_DEVICE_PLATFORM
L_.str.2:                               ## @.str.2
	.asciz	"Failed to determine the OpenCL platform containing the device.\n"

	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.comm	_CL_ADAPTER_D3D9EX_KHR,4,2      ## @CL_ADAPTER_D3D9EX_KHR
	.comm	_CL_CONTEXT_PROPERTIES,4,2      ## @CL_CONTEXT_PROPERTIES
	.comm	_CL_CONTEXT_VA_API_DISPLAY_INTEL,8,3 ## @CL_CONTEXT_VA_API_DISPLAY_INTEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_clCreateFromD3D11Texture2DKHR,4,2 ## @clCreateFromD3D11Texture2DKHR
	.comm	_clCreateFromDX9MediaSurfaceKHR,4,2 ## @clCreateFromDX9MediaSurfaceKHR
	.comm	_clCreateFromVA_APIMediaSurfaceINTEL,4,2 ## @clCreateFromVA_APIMediaSurfaceINTEL
	.comm	_clCreateImageFromFdINTEL,4,2   ## @clCreateImageFromFdINTEL
	.comm	_clEnqueueAcquireD3D11ObjectsKHR,4,2 ## @clEnqueueAcquireD3D11ObjectsKHR
	.comm	_clEnqueueAcquireDX9MediaSurfacesKHR,4,2 ## @clEnqueueAcquireDX9MediaSurfacesKHR
	.comm	_clEnqueueAcquireVA_APIMediaSurfacesINTEL,4,2 ## @clEnqueueAcquireVA_APIMediaSurfacesINTEL
	.comm	_clEnqueueReleaseD3D11ObjectsKHR,4,2 ## @clEnqueueReleaseD3D11ObjectsKHR
	.comm	_clEnqueueReleaseDX9MediaSurfacesKHR,4,2 ## @clEnqueueReleaseDX9MediaSurfacesKHR
	.comm	_clEnqueueReleaseVA_APIMediaSurfacesINTEL,4,2 ## @clEnqueueReleaseVA_APIMediaSurfacesINTEL
	.no_dead_strip	_opencl_device_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opencl_device_init
_opencl_device_init:                    ; @opencl_device_init
	.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, x0
	ldp	x8, x21, [x0]
	ldr	x22, [x8]
	ldr	x0, [x21, #8]
Lloh0:
	adrp	x20, _CL_SUCCESS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CL_SUCCESS@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.1:
	bl	_clRetainCommandQueue
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [sp, #12]
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.2:
	ldr	x8, [x21, #8]
	str	x8, [x22, #32]
	b	LBB0_4
LBB0_3:
	ldp	w0, w1, [x21]
	add	x3, sp, #12
	mov	w2, #0
	bl	_clCreateCommandQueue
	str	x0, [x22, #32]
	cbz	x0, LBB0_8
LBB0_4:
	ldr	w0, [x21, #4]
Lloh2:
	adrp	x8, _CL_DEVICE_PLATFORM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CL_DEVICE_PLATFORM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x3, x22, #24
	mov	w2, #4
	mov	x4, #0
	bl	_clGetDeviceInfo
	str	w0, [sp, #12]
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.5:
	mov	w0, #0
	b	LBB0_10
LBB0_6:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_7:
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w8, [sp, #12]
	str	x8, [sp]
Lloh21:
	adrp	x2, l_.str.1@PAGE
Lloh22:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_av_log
Lloh23:
	adrp	x8, _EIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_10:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_CL_SUCCESS,4,2                 ; @CL_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to retain external command queue: %d.\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create internal command queue: %d.\n"

	.comm	_CL_DEVICE_PLATFORM,4,2         ; @CL_DEVICE_PLATFORM
l_.str.2:                               ; @.str.2
	.asciz	"Failed to determine the OpenCL platform containing the device.\n"

	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.comm	_CL_ADAPTER_D3D9EX_KHR,4,2      ; @CL_ADAPTER_D3D9EX_KHR
	.comm	_CL_CONTEXT_PROPERTIES,4,2      ; @CL_CONTEXT_PROPERTIES
	.comm	_CL_CONTEXT_VA_API_DISPLAY_INTEL,8,3 ; @CL_CONTEXT_VA_API_DISPLAY_INTEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_clCreateFromD3D11Texture2DKHR,4,2 ; @clCreateFromD3D11Texture2DKHR
	.comm	_clCreateFromDX9MediaSurfaceKHR,4,2 ; @clCreateFromDX9MediaSurfaceKHR
	.comm	_clCreateFromVA_APIMediaSurfaceINTEL,4,2 ; @clCreateFromVA_APIMediaSurfaceINTEL
	.comm	_clCreateImageFromFdINTEL,4,2   ; @clCreateImageFromFdINTEL
	.comm	_clEnqueueAcquireD3D11ObjectsKHR,4,2 ; @clEnqueueAcquireD3D11ObjectsKHR
	.comm	_clEnqueueAcquireDX9MediaSurfacesKHR,4,2 ; @clEnqueueAcquireDX9MediaSurfacesKHR
	.comm	_clEnqueueAcquireVA_APIMediaSurfacesINTEL,4,2 ; @clEnqueueAcquireVA_APIMediaSurfacesINTEL
	.comm	_clEnqueueReleaseD3D11ObjectsKHR,4,2 ; @clEnqueueReleaseD3D11ObjectsKHR
	.comm	_clEnqueueReleaseDX9MediaSurfacesKHR,4,2 ; @clEnqueueReleaseDX9MediaSurfacesKHR
	.comm	_clEnqueueReleaseVA_APIMediaSurfacesINTEL,4,2 ; @clEnqueueReleaseVA_APIMediaSurfacesINTEL
	.no_dead_strip	_opencl_device_init
.subsections_via_symbols
