	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_alloc
_read_alloc:                            ## @read_alloc
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	_D_STREAM@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_PDEBUG
	cmpq	$0, (%r13)
	je	LBB0_1
LBB0_9:
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_vidioc_streamon
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movl	%eax, %ebx
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_11:
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_PDEBUG
	movl	%ebx, %r14d
	jmp	LBB0_12
LBB0_1:
	leaq	-88(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	8(%r13), %eax
	movl	%eax, -88(%rbp)
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)
	movq	_GSPCA_MEMORY_READ@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_vidioc_reqbufs
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r12d
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_PDEBUG
	movl	%r12d, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	-64(%rbp), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_GSPCA_MEMORY_READ@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	cmpl	$0, 8(%r13)
	jle	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, -60(%rbp)
	movq	%r15, %rdi
	movq	%r13, %rsi
	leaq	-64(%rbp), %rdx
	callq	_vidioc_qbuf
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%r12d
	cmpl	8(%r13), %r12d
	jl	LBB0_5
## %bb.7:
	movq	_GSPCA_MEMORY_READ@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_8:
	movq	%rax, 16(%r13)
	movq	_D_STREAM@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_6:
	movl	%eax, %ebx
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_D_STREAM,4,2                   ## @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read alloc"

	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_GSPCA_MEMORY_READ,8,3          ## @GSPCA_MEMORY_READ
L_.str.1:                               ## @.str.1
	.asciz	"read reqbuf err %d"

L_.str.2:                               ## @.str.2
	.asciz	"read qbuf err: %d"

L_.str.3:                               ## @.str.3
	.asciz	"read streamon err %d"

	.no_dead_strip	_read_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_alloc
_read_alloc:                            ; @read_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _D_STREAM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _D_STREAM@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
	ldr	x8, [x19]
Lloh4:
	adrp	x23, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
	cbz	x8, LBB0_4
LBB0_1:
	ldr	x2, [x23]
	mov	x0, x20
	mov	x1, x19
	bl	_vidioc_streamon
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w0, [x22]
	str	x21, [sp]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_3:
	bl	_PDEBUG
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_6
LBB0_4:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w8, [x19, #8]
	str	w8, [sp, #16]
	ldr	x8, [x23]
Lloh8:
	adrp	x24, _GSPCA_MEMORY_READ@GOTPAGE
Lloh9:
	ldr	x24, [x24, _GSPCA_MEMORY_READ@GOTPAGEOFF]
	ldr	x9, [x24]
	stp	x9, x8, [sp, #24]
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x19
	bl	_vidioc_reqbufs
	cbz	w0, LBB0_7
; %bb.5:
	mov	x21, x0
	ldr	w0, [x22]
	str	x21, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PDEBUG
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_7:
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	x9, [x23]
	ldr	x8, [x24]
	stp	x8, x9, [sp, #48]
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.8:
	mov	w25, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	str	w25, [sp, #44]
	add	x2, sp, #40
	mov	x0, x20
	mov	x1, x19
	bl	_vidioc_qbuf
	cbnz	w0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w25, w25, #1
	ldr	w8, [x19, #8]
	cmp	w25, w8
	b.lt	LBB0_9
; %bb.11:
	ldr	x8, [x24]
LBB0_12:
	str	x8, [x19, #16]
	b	LBB0_1
LBB0_13:
	mov	x21, x0
	ldr	w0, [x22]
	str	x21, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_D_STREAM,4,2                   ; @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read alloc"

	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_GSPCA_MEMORY_READ,8,3          ; @GSPCA_MEMORY_READ
l_.str.1:                               ; @.str.1
	.asciz	"read reqbuf err %d"

l_.str.2:                               ; @.str.2
	.asciz	"read qbuf err: %d"

l_.str.3:                               ; @.str.3
	.asciz	"read streamon err %d"

	.no_dead_strip	_read_alloc
.subsections_via_symbols
