	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_map_frame
_drm_map_frame:                         ## @drm_map_frame
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	24(%rdx), %rax
	movq	(%rax), %rbx
	movl	$24, %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_27
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_AV_HWFRAME_MAP_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	je	LBB0_3
## %bb.2:
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	_AV_HWFRAME_MAP_WRITE@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	je	LBB0_5
## %bb.4:
	movq	_PROT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_5:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %eax
	movq	_AV_DRM_MAX_PLANES@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	setle	%dil
	callq	_av_assert0
	xorl	%edx, %edx
	cmpl	$0, (%rbx)
	movl	$0, %r13d
	jle	LBB0_11
## %bb.6:
	movl	%r12d, %edx
	orl	-52(%rbp), %edx                 ## 4-byte Folded Reload
	movq	16(%rbx), %rax
	xorl	%r13d, %r13d
	movq	_MAP_SHARED@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %ecx
	movl	(%rax,%r13,8), %esi
	movl	4(%rax,%r13,8), %r8d
	xorl	%edi, %edi
	movl	%edx, %r12d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%r15), %rcx
	movq	%rax, (%rcx,%r13,8)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	16(%rsi), %rax
	movl	(%rax,%r13,8), %ecx
	movq	8(%r15), %rdx
	movl	%ecx, (%rdx,%r13,4)
	incq	%r13
	movslq	(%rsi), %rcx
	cmpq	%rcx, %r13
	movl	%r12d, %edx
	jl	LBB0_7
## %bb.10:
	xorl	%edx, %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_11:
	movl	%r13d, (%r15)
	movl	4(%rbx), %ecx
	testl	%ecx, %ecx
	movq	%rbx, %r12
	jle	LBB0_18
## %bb.12:
	xorl	%r8d, %r8d
	xorl	%edx, %edx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r8
	movslq	%ecx, %rax
	cmpq	%rax, %r8
	jge	LBB0_18
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	8(%r12), %rax
	movq	%r8, %rdi
	shlq	$4, %rdi
	cmpl	$0, (%rax,%rdi)
	jle	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	(%rax,%rdi), %r9
	leaq	(%rax,%rdi), %r10
	addq	$8, %r10
	movl	%edx, %r13d
	movslq	%edx, %rsi
	movq	8(%rax,%rdi), %rcx
	leaq	(,%rsi,8), %r11
	shlq	$2, %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r15), %rdx
	movq	(%rcx,%rbx), %rdi
	movslq	8(%rcx,%rbx), %rcx
	shlq	$2, %rcx
	addq	(%rdx,%rdi,8), %rcx
	movq	24(%r14), %rdx
	addq	%r11, %rdx
	movq	%rcx, (%rdx,%rax,8)
	movq	(%r10), %rcx
	movl	12(%rcx,%rbx), %edx
	movq	16(%r14), %rdi
	addq	%rsi, %rdi
	movl	%edx, (%rdi,%rax,4)
	incq	%rax
	movslq	(%r9), %rdx
	addq	$16, %rbx
	cmpq	%rdx, %rax
	jl	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%r13d, %edx
	addl	%eax, %edx
	movl	4(%r12), %ecx
	jmp	LBB0_17
LBB0_18:
	xorl	%edi, %edi
	movq	_AV_DRM_MAX_PLANES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	setle	%dil
	callq	_av_assert0
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	8(%rdx), %eax
	movl	%eax, 8(%r14)
	movl	4(%rdx), %eax
	movl	%eax, 4(%r14)
	movl	(%rdx), %edi
	movq	_drm_unmap_frame@GOTPCREL(%rip), %rcx
	movq	%r14, %rsi
	movq	%r15, %r8
	callq	_ff_hwframe_map_create
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jns	LBB0_26
## %bb.19:
	movl	%eax, %r14d
	jmp	LBB0_20
LBB0_27:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_AVERROR
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	16(%r12), %rax
	movl	4(%rax,%r13,8), %ecx
	movl	(%rbx), %r8d
	leaq	L_.str(%rip), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
LBB0_20:
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_25
## %bb.21:
	xorl	%ebx, %ebx
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_22 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_25
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_munmap
	movl	(%r12), %eax
	jmp	LBB0_24
LBB0_25:
	movq	%r15, %rdi
	callq	_av_free
LBB0_26:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_HWFRAME_MAP_READ,4,2        ## @AV_HWFRAME_MAP_READ
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_AV_HWFRAME_MAP_WRITE,4,2       ## @AV_HWFRAME_MAP_WRITE
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_AV_DRM_MAX_PLANES,4,2          ## @AV_DRM_MAX_PLANES
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_errno,4,2                      ## @errno
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to map DRM object %d to memory: %d.\n"

	.comm	_drm_unmap_frame,4,2            ## @drm_unmap_frame
	.no_dead_strip	_drm_map_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_map_frame
_drm_map_frame:                         ; @drm_map_frame
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x8, [x2, #24]
	ldr	x24, [x8]
	mov	w0, #24
	bl	_av_mallocz
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _AV_HWFRAME_MAP_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_HWFRAME_MAP_READ@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PROT_READ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PROT_READ@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	tst	w8, w23
	csel	w25, wzr, w9, eq
Lloh6:
	adrp	x8, _AV_HWFRAME_MAP_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_HWFRAME_MAP_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w8, w23
	csel	w23, wzr, w9, eq
	ldr	w8, [x24]
Lloh12:
	adrp	x26, _AV_DRM_MAX_PLANES@GOTPAGE
Lloh13:
	ldr	x26, [x26, _AV_DRM_MAX_PLANES@GOTPAGEOFF]
	ldr	w9, [x26]
	cmp	w8, w9
	cset	w0, le
	bl	_av_assert0
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x26, #0
	mov	x27, #0
	orr	w23, w23, w25
	ldr	x8, [x24, #16]
Lloh14:
	adrp	x28, _MAP_SHARED@GOTPAGE
Lloh15:
	ldr	x28, [x28, _MAP_SHARED@GOTPAGEOFF]
Lloh16:
	adrp	x25, _MAP_FAILED@GOTPAGE
Lloh17:
	ldr	x25, [x25, _MAP_FAILED@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x26, lsl #2
	ldr	w3, [x28]
	ldp	w1, w4, [x8]
	mov	x0, #0
	mov	x2, x23
	mov	w5, #0
	bl	_mmap
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_15
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #16]
	str	x0, [x8, x27, lsl #3]
	ldr	x8, [x24, #16]
	ldr	w9, [x8, x26, lsl #2]
	ldr	x10, [x19, #8]
	str	w9, [x10, x27, lsl #2]
	add	x27, x27, #1
	ldrsw	x9, [x24]
	add	x26, x26, #2
	cmp	x27, x9
	b.lt	LBB0_3
; %bb.5:
Lloh18:
	adrp	x26, _AV_DRM_MAX_PLANES@GOTPAGE
Lloh19:
	ldr	x26, [x26, _AV_DRM_MAX_PLANES@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_7:
	mov	w27, #0
LBB0_8:
	str	w27, [x19]
	ldr	w11, [x24, #4]
	cmp	w11, #1
	b.lt	LBB0_16
; %bb.9:
	mov	x9, #0
	mov	w8, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x9, x9, #1
	cmp	x9, w11, sxtw
	b.ge	LBB0_17
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	x10, [x24, #8]
	add	x10, x10, x9, lsl #4
	ldr	w12, [x10]
	cmp	w12, #1
	b.lt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x12, #0
	mov	x11, #0
	mov	x13, x10
	ldr	x16, [x13, #8]!
	sbfiz	x14, x8, #3, #32
	sbfiz	x15, x8, #2, #32
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x17, [x19, #16]
	add	x16, x16, x12
	ldr	x0, [x16]
	ldr	x17, [x17, x0, lsl #3]
	ldrsw	x16, [x16, #8]
	add	x16, x17, x16, lsl #2
	ldr	x17, [x21, #24]
	add	x17, x17, x14
	str	x16, [x17, x11, lsl #3]
	ldr	x16, [x13]
	add	x17, x16, x12
	ldr	w17, [x17, #12]
	ldr	x0, [x21, #16]
	add	x0, x0, x15
	str	w17, [x0, x11, lsl #2]
	add	x11, x11, #1
	ldrsw	x17, [x10]
	add	x12, x12, #16
	cmp	x11, x17
	b.lt	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w8, w8, w11
	ldr	w11, [x24, #4]
	b	LBB0_10
LBB0_15:
Lloh23:
	adrp	x21, _errno@GOTPAGE
Lloh24:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_AVERROR
	mov	x20, x0
Lloh25:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldr	x8, [x24, #16]
	add	x8, x8, x26, lsl #2
	ldr	w3, [x8, #4]
	ldr	w4, [x21]
Lloh28:
	adrp	x2, l_.str@PAGE
Lloh29:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	bl	_av_log
	b	LBB0_20
LBB0_16:
	mov	w8, #0
LBB0_17:
	ldr	w9, [x26]
	cmp	w8, w9
	cset	w0, le
	bl	_av_assert0
	ldur	d0, [x20, #4]
	stur	d0, [x21, #4]
	ldr	w0, [x20]
Lloh30:
	adrp	x3, _drm_unmap_frame@GOTPAGE
Lloh31:
	ldr	x3, [x3, _drm_unmap_frame@GOTPAGEOFF]
	mov	x1, x21
	mov	x2, x20
	mov	x4, x19
	bl	_ff_hwframe_map_create
	tbnz	w0, #31, LBB0_19
; %bb.18:
	mov	w20, #0
	b	LBB0_26
LBB0_19:
	mov	x20, x0
LBB0_20:
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.21:
	mov	x21, #0
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_25
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldr	x0, [x9, x21, lsl #3]
	cbz	x0, LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x21, lsl #2]
	bl	_munmap
	ldr	w8, [x24]
	b	LBB0_22
LBB0_25:
	mov	x0, x19
	bl	_av_free
LBB0_26:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_HWFRAME_MAP_READ,4,2        ; @AV_HWFRAME_MAP_READ
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_AV_HWFRAME_MAP_WRITE,4,2       ; @AV_HWFRAME_MAP_WRITE
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_AV_DRM_MAX_PLANES,4,2          ; @AV_DRM_MAX_PLANES
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_errno,4,2                      ; @errno
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to map DRM object %d to memory: %d.\n"

	.comm	_drm_unmap_frame,4,2            ; @drm_unmap_frame
	.no_dead_strip	_drm_map_frame
.subsections_via_symbols
