	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v4l2_release_buffers
_v4l2_release_buffers:                  ## @v4l2_release_buffers
	.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	$0, -72(%rbp)
	movl	16(%rdi), %eax
	movl	%eax, -68(%rbp)
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.1:
	xorl	%esi, %esi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rsi
	movslq	%eax, %rcx
	cmpq	%rcx, %rsi
	jge	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movq	%rsi, %rdx
	shlq	$4, %rdx
	cmpl	$0, (%rcx,%rdx)
	jle	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rdx), %r15
	leaq	(%rcx,%rdx), %r14
	addq	$8, %r14
	movl	$8, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%rbx
	movslq	(%r15), %rax
	addq	$16, %r13
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14), %rax
	movq	(%rax,%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-8(%rax,%r13), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	callq	_munmap
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_logger
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%r12), %r12d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %edi
	callq	_av_err2str
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	leaq	L_.str(%rip), %rdx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	callq	_av_log
	jmp	LBB0_8
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ctx_to_m2mctx
	movl	(%rax), %edi
	movq	_VIDIOC_REQBUFS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-72(%rbp), %rdx
	callq	_ioctl
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MEMORY_MMAP,4,2           ## @V4L2_MEMORY_MMAP
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s unmap plane (%s))\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_VIDIOC_REQBUFS,4,2             ## @VIDIOC_REQBUFS
	.no_dead_strip	_v4l2_release_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v4l2_release_buffers
_v4l2_release_buffers:                  ; @v4l2_release_buffers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	ldr	w8, [x0, #16]
	stp	wzr, w8, [sp]
Lloh0:
	adrp	x8, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x24, #0
Lloh3:
	adrp	x20, l_.str@PAGE
Lloh4:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	cmp	x24, w8, sxtw
	b.ge	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x9, [x19, #8]
	add	x27, x9, x24, lsl #4
	ldr	w9, [x27]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, #0
	mov	x25, #0
	add	x26, x27, #8
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x25, x25, #1
	ldrsw	x8, [x27]
	add	x28, x28, #16
	cmp	x25, x8
	b.ge	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	add	x9, x8, x28
	ldr	x0, [x9, #8]
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x1, [x8, x28]
	cbz	x1, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	bl	_munmap
	tbz	x0, #63, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x19
	bl	_logger
	mov	x21, x0
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	ldr	w23, [x19, #4]
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_AVERROR
	bl	_av_err2str
	mov	x4, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	x3, x23
	bl	_av_log
	b	LBB0_6
LBB0_11:
	mov	x0, x19
	bl	_ctx_to_m2mctx
	ldr	w0, [x0]
Lloh11:
	adrp	x8, _VIDIOC_REQBUFS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VIDIOC_REQBUFS@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_ioctl
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MEMORY_MMAP,4,2           ; @V4L2_MEMORY_MMAP
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s unmap plane (%s))\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_VIDIOC_REQBUFS,4,2             ; @VIDIOC_REQBUFS
	.no_dead_strip	_v4l2_release_buffers
.subsections_via_symbols
