	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sn9c102_request_buffers
_sn9c102_request_buffers:               ## @sn9c102_request_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 24(%rdi)
	setne	%al
	movq	_IO_READ@GOTPCREL(%rip), %rcx
	cmpl	%edx, (%rcx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %eax
	movl	36(%rdi,%rax,8), %ecx
	imull	32(%rdi,%rax,8), %ecx
	movq	%rsi, %r13
	imull	48(%rdi), %ecx
	leal	7(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$3, %eax
	movslq	%eax, %rcx
	movq	_SN9C102_MAX_FRAMES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rsi, %rax
	cmovlq	%rax, %r13
	movq	(%rdi), %rax
	movq	_BRIDGE_SN9C105@GOTPCREL(%rip), %rbx
	movq	_BRIDGE_SN9C120@GOTPCREL(%rip), %rdx
	leaq	591(%rcx), %rsi
	cmpq	(%rdx), %rax
	cmoveq	%rsi, %rcx
	cmpq	(%rbx), %rax
	cmoveq	%rsi, %rcx
	movq	%r13, 8(%rdi)
	testq	%r13, %r13
	jle	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %r15
	movq	%rcx, %rdi
	callq	_PAGE_ALIGN
	imulq	%rax, %r13
	movq	%r13, %rdi
	callq	_vmalloc_32_user
	movq	%rax, %r12
	movq	8(%rbx), %rax
	testq	%r12, %r12
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-1(%rax), %r13
	movq	%r13, 8(%rbx)
	cmpq	$1, %rax
	movq	%r15, %rcx
	jg	LBB0_2
	jmp	LBB0_7
LBB0_4:
	movq	%rax, %r13
	testq	%rax, %rax
	jle	LBB0_7
## %bb.5:
	movq	%rbx, %rax
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rax, %r13
	callq	_PAGE_ALIGN
	imulq	%r14, %rax
	addq	%r12, %rax
	movq	16(%r13), %rcx
	movq	%rax, 56(%rcx,%rbx)
	movq	%r14, 48(%rcx,%rbx)
	movq	%r15, %rdi
	callq	_PAGE_ALIGN
	movq	%r15, %rdx
	imulq	%r14, %rax
	movq	16(%r13), %rcx
	movq	%rax, 40(%rcx,%rbx)
	movq	%r15, (%rcx,%rbx)
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rcx,%rbx)
	movq	$0, 24(%rcx,%rbx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rcx,%rbx)
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rcx,%rbx)
	movq	%r13, %rax
	movq	$0, 8(%rcx,%rbx)
	incq	%r14
	movq	8(%r13), %r13
	addq	$64, %rbx
	cmpq	%r13, %r14
	jl	LBB0_6
LBB0_7:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_READ,4,2                    ## @IO_READ
	.comm	_SN9C102_MAX_FRAMES,8,3         ## @SN9C102_MAX_FRAMES
	.comm	_BRIDGE_SN9C105,8,3             ## @BRIDGE_SN9C105
	.comm	_BRIDGE_SN9C120,8,3             ## @BRIDGE_SN9C120
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_MEMORY_MMAP,4,2           ## @V4L2_MEMORY_MMAP
	.no_dead_strip	_sn9c102_request_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sn9c102_request_buffers
_sn9c102_request_buffers:               ; @sn9c102_request_buffers
	.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
	ldr	x8, [x0, #24]
	cmp	x8, #0
Lloh0:
	adrp	x8, _IO_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IO_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w2, #4, eq
	mov	w8, #36
	mov	w9, #44
	csel	x8, x9, x8, eq
	mov	w9, #32
	mov	w10, #40
	csel	x9, x10, x9, eq
	ldr	w9, [x0, x9]
	ldr	w8, [x0, x8]
	mul	w8, w8, w9
	ldr	w9, [x0, #48]
	mul	w8, w8, w9
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sbfx	x8, x8, #3, #29
Lloh3:
	adrp	x9, _SN9C102_MAX_FRAMES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SN9C102_MAX_FRAMES@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x1
	csel	x22, x9, x1, lt
	ldr	x9, [x0]
Lloh6:
	adrp	x10, _BRIDGE_SN9C105@GOTPAGE
Lloh7:
	ldr	x10, [x10, _BRIDGE_SN9C105@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _BRIDGE_SN9C120@GOTPAGE
Lloh10:
	ldr	x11, [x11, _BRIDGE_SN9C120@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	cmp	x9, x11
	ccmp	x9, x10, #4, ne
	add	x9, x8, #591
	csel	x20, x9, x8, eq
	str	x22, [x0, #8]
	cmp	x22, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_PAGE_ALIGN
	mul	x0, x0, x22
	bl	_vmalloc_32_user
	ldr	x22, [x19, #8]
	cbnz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	x22, x22, #1
	str	x22, [x19, #8]
	b.gt	LBB0_2
	b	LBB0_7
LBB0_4:
	cmp	x22, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x21, x0
	mov	x23, #0
	mov	w24, #56
Lloh12:
	adrp	x25, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh13:
	ldr	x25, [x25, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh14:
	adrp	x26, _V4L2_FIELD_NONE@GOTPAGE
Lloh15:
	ldr	x26, [x26, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh16:
	adrp	x27, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh17:
	ldr	x27, [x27, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_PAGE_ALIGN
	madd	x8, x0, x23, x21
	ldr	x9, [x19, #16]
	add	x9, x9, x24
	stp	x23, x8, [x9, #-8]
	mov	x0, x20
	bl	_PAGE_ALIGN
	mul	x8, x0, x23
	ldp	x22, x9, [x19, #8]
	add	x9, x9, x24
	stur	x8, [x9, #-16]
	ldr	w8, [x25]
	stur	w8, [x9, #-24]
	ldr	w8, [x26]
	stur	w8, [x9, #-36]
	ldr	w8, [x27]
	stur	w8, [x9, #-40]
	stur	xzr, [x9, #-32]
	stp	x20, xzr, [x9, #-56]
	add	x23, x23, #1
	add	x24, x24, #64
	cmp	x23, x22
	b.lt	LBB0_6
LBB0_7:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_READ,4,2                    ; @IO_READ
	.comm	_SN9C102_MAX_FRAMES,8,3         ; @SN9C102_MAX_FRAMES
	.comm	_BRIDGE_SN9C105,8,3             ; @BRIDGE_SN9C105
	.comm	_BRIDGE_SN9C120,8,3             ; @BRIDGE_SN9C120
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_MEMORY_MMAP,4,2           ; @V4L2_MEMORY_MMAP
	.no_dead_strip	_sn9c102_request_buffers
.subsections_via_symbols
