	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c_camif_reqbufs
_s3c_camif_reqbufs:                     ## @s3c_camif_reqbufs
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	callq	_video_drvdata
	movq	%rax, %rbx
	movl	20(%rax), %esi
	movq	(%r15), %rdx
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %r8
	callq	_pr_debug
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpq	%r14, %rax
	je	LBB0_3
## %bb.2:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_3:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:
	movq	_u32@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CAMIF_REQ_BUFS_MIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_max_t
	movq	%rax, (%r15)
	jmp	LBB0_6
LBB0_5:
	movq	$0, (%rbx)
LBB0_6:
	movq	%rbx, %r12
	addq	$16, %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_vb2_reqbufs
	testl	%eax, %eax
	js	LBB0_13
## %bb.7:
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.8:
	movq	_CAMIF_REQ_BUFS_MIN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_10
## %bb.9:
	movq	$0, (%r15)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_vb2_reqbufs
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movq	(%r15), %rcx
LBB0_10:
	movq	%rcx, 8(%rbx)
	cmpq	$0, (%rbx)
	jne	LBB0_13
## %bb.11:
	testq	%rcx, %rcx
	jle	LBB0_13
## %bb.12:
	movq	%r14, (%rbx)
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[vp%d] rb count: %d, owner: %p, priv: %p\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_u32,4,2                        ## @u32
	.comm	_CAMIF_REQ_BUFS_MIN,8,3         ## @CAMIF_REQ_BUFS_MIN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_s3c_camif_reqbufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c_camif_reqbufs
_s3c_camif_reqbufs:                     ; @s3c_camif_reqbufs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	bl	_video_drvdata
	mov	x20, x0
	ldr	w1, [x0, #20]
	ldr	x2, [x21]
	ldr	x3, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x4, x19
	bl	_pr_debug
	ldr	x8, [x20]
	cmp	x8, #0
	ccmp	x8, x19, #4, ne
	b.ne	LBB0_3
; %bb.1:
	ldr	x2, [x21]
Lloh2:
	adrp	x23, _CAMIF_REQ_BUFS_MIN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CAMIF_REQ_BUFS_MIN@GOTPAGEOFF]
	cbz	x2, LBB0_4
; %bb.2:
Lloh4:
	adrp	x8, _u32@GOTPAGE
Lloh5:
	ldr	x8, [x8, _u32@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	x1, [x23]
	bl	_max_t
	str	x0, [x21]
	b	LBB0_5
LBB0_3:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_4:
	str	xzr, [x20]
LBB0_5:
	add	x22, x20, #16
	mov	x0, x22
	mov	x1, x21
	bl	_vb2_reqbufs
	tbnz	w0, #31, LBB0_12
; %bb.6:
	ldr	x8, [x21]
	cbz	x8, LBB0_9
; %bb.7:
	ldr	x9, [x23]
	cmp	x8, x9
	b.ge	LBB0_9
; %bb.8:
	str	xzr, [x21]
	mov	x0, x22
	mov	x1, x21
	bl	_vb2_reqbufs
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	ldr	x8, [x21]
LBB0_9:
	str	x8, [x20, #8]
	ldr	x9, [x20]
	cbnz	x9, LBB0_12
; %bb.10:
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.11:
	str	x19, [x20]
LBB0_12:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[vp%d] rb count: %d, owner: %p, priv: %p\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_u32,4,2                        ; @u32
	.comm	_CAMIF_REQ_BUFS_MIN,8,3         ; @CAMIF_REQ_BUFS_MIN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_s3c_camif_reqbufs
.subsections_via_symbols
