	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_capture_size
_set_capture_size:                      ## @set_capture_size
	.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	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	$0, -44(%rbp)
	movl	$0, -48(%rbp)
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.1:
	movl	8(%r12), %edi
	callq	_valid_pixelformat
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_get_resolution
	movq	24(%r14), %rdx
	movq	_GO7007_SENSOR_SCALING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %ecx
	movl	-48(%rbp), %eax
	testl	%esi, (%rdx)
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_8
## %bb.4:
	movl	%ecx, %edx
	andl	$-16, %edx
	cmpl	$144, %ecx
	movl	$144, %r13d
	cmovgel	%edx, %r13d
	cmpl	%eax, %ecx
	cmovgl	%eax, %r13d
	movl	4(%r12), %eax
	movl	-44(%rbp), %r15d
	cmpl	%r15d, %eax
	jg	LBB0_6
## %bb.5:
	movl	%eax, %ecx
	andl	$-16, %ecx
	cmpl	$96, %eax
	movl	$96, %r15d
	cmovgel	%ecx, %r15d
	jmp	LBB0_6
LBB0_14:
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_get_resolution
	xorl	%ebx, %ebx
	testl	%r15d, %r15d
	jne	LBB0_27
## %bb.15:
	movl	-48(%rbp), %r13d
	movl	-44(%rbp), %r15d
	jmp	LBB0_16
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_8:
	leal	3(%rax), %r13d
	testl	%eax, %eax
	cmovnsl	%eax, %r13d
	sarl	$2, %r13d
	cmpl	%r13d, %ecx
	jle	LBB0_9
## %bb.10:
	movl	%eax, %r13d
	shrl	$31, %r13d
	addl	%eax, %r13d
	sarl	%r13d
	movl	-44(%rbp), %r15d
	cmpl	%r13d, %ecx
	jle	LBB0_12
## %bb.11:
	movl	%eax, %r13d
	jmp	LBB0_13
LBB0_9:
	movl	-44(%rbp), %eax
	leal	3(%rax), %r15d
	testl	%eax, %eax
	cmovnsl	%eax, %r15d
	sarl	$2, %r15d
	jmp	LBB0_13
LBB0_12:
	movl	%r15d, %eax
	shrl	$31, %eax
	addl	%r15d, %eax
	sarl	%eax
	movl	%eax, %r15d
LBB0_13:
	andl	$-16, %r13d
	andl	$-16, %r15d
LBB0_6:
	movl	8(%r12), %r14d
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movl	%r14d, %ecx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r12)
	movl	%r13d, (%r12)
	movl	%r15d, 4(%r12)
	movl	%r14d, 8(%r12)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	$0, 24(%r12)
	movq	_GO7007_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_27
## %bb.7:
	movl	%ecx, 40(%r14)
LBB0_16:
	movl	%r13d, (%r14)
	movl	%r15d, 4(%r14)
	movq	24(%r14), %rax
	movl	8(%rax), %ecx
	movl	%ecx, 36(%r14)
	movl	4(%rax), %ecx
	movl	%ecx, 32(%r14)
	movq	_GO7007_SENSOR_SCALING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_20
## %bb.17:
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_MEDIA_BUS_FMT_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	testq	%r12, %r12
	je	LBB0_19
## %bb.18:
	movl	(%r12), %r13d
LBB0_19:
	movl	%r13d, -72(%rbp)
	movl	%r15d, -68(%rbp)
	movq	$0, 8(%r14)
	movl	$0, 16(%r14)
	addq	$20, %r14
	movq	_pad@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_set_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	leaq	-72(%rbp), %r8
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_call_all
	jmp	LBB0_27
LBB0_20:
	movl	-48(%rbp), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	cmpl	%ecx, %r13d
	jle	LBB0_21
## %bb.22:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r13d
	jle	LBB0_23
## %bb.24:
	movq	$0, 8(%r14)
	jmp	LBB0_25
LBB0_21:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%r14)
	movl	$1, 16(%r14)
	jmp	LBB0_26
LBB0_23:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%r14)
LBB0_25:
	movl	$0, 16(%r14)
LBB0_26:
	xorl	%ebx, %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GO7007_SENSOR_SCALING,4,2      ## @GO7007_SENSOR_SCALING
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_GO7007_BUF_SIZE,4,2            ## @GO7007_BUF_SIZE
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_MEDIA_BUS_FMT_FIXED,4,2        ## @MEDIA_BUS_FMT_FIXED
	.comm	_pad,4,2                        ## @pad
	.comm	_set_fmt,4,2                    ## @set_fmt
	.no_dead_strip	_set_capture_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_capture_size
_set_capture_size:                      ; @set_capture_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	str	xzr, [sp, #24]
	cbz	x1, LBB0_4
; %bb.1:
	ldr	w0, [x20, #8]
	bl	_valid_pixelformat
	cbz	w0, LBB0_6
; %bb.2:
	add	x1, sp, #24
	add	x2, sp, #28
	mov	x0, x19
	bl	_get_resolution
	ldr	x8, [x19, #24]
	ldr	w10, [x8]
Lloh0:
	adrp	x8, _GO7007_SENSOR_SCALING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GO7007_SENSOR_SCALING@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x8]
	ldr	w9, [x20]
	ldr	w8, [sp, #24]
	tst	w11, w10
	b.eq	LBB0_7
; %bb.3:
	and	w10, w9, #0xfffffff0
	mov	w11, #144
	cmp	w9, #144
	csel	w10, w11, w10, lt
	cmp	w9, w8
	csel	w22, w8, w10, gt
	ldr	w8, [x20, #4]
	ldr	w9, [sp, #28]
	and	w10, w8, #0xfffffff0
	mov	w11, #96
	cmp	w8, #96
	csel	w10, w11, w10, lt
	cmp	w8, w9
	csel	w23, w9, w10, gt
	b	LBB0_12
LBB0_4:
	add	x1, sp, #24
	add	x2, sp, #28
	mov	x0, x19
	bl	_get_resolution
	cbz	w21, LBB0_9
; %bb.5:
	mov	w0, #0
	b	LBB0_24
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_24
LBB0_7:
	add	w10, w8, #3
	cmp	w8, #0
	csel	w10, w10, w8, lt
	asr	w10, w10, #2
	cmp	w9, w10
	b.le	LBB0_10
; %bb.8:
	cmp	w8, #0
	cinc	w10, w8, lt
	asr	w10, w10, #1
	ldr	w11, [sp, #28]
	cmp	w11, #0
	cinc	w12, w11, lt
	asr	w12, w12, #1
	cmp	w9, w10
	csel	w10, w8, w10, gt
	csel	w8, w11, w12, gt
	b	LBB0_11
LBB0_9:
	ldp	w22, w23, [sp, #24]
	b	LBB0_14
LBB0_10:
	ldr	w8, [sp, #28]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
LBB0_11:
	and	w22, w10, #0xfffffff0
	and	w23, w8, #0xfffffff0
LBB0_12:
	ldr	w24, [x20, #8]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	mov	w0, #0
Lloh6:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20, #40]
	str	w22, [x20]
Lloh9:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x20, #32]
Lloh12:
	adrp	x8, _GO7007_BUF_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GO7007_BUF_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x8]
Lloh15:
	adrp	x9, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x9]
	stp	w23, w24, [x20, #4]
	stp	w8, w10, [x20, #12]
	str	xzr, [x20, #24]
	cbnz	w21, LBB0_24
; %bb.13:
	str	w24, [x19, #40]
LBB0_14:
	stp	w22, w23, [x19]
	ldr	x8, [x19, #24]
	ldur	d0, [x8, #4]
	str	d0, [x19, #32]
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _GO7007_SENSOR_SCALING@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GO7007_SENSOR_SCALING@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.15:
Lloh21:
	adrp	x8, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _MEDIA_BUS_FMT_FIXED@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MEDIA_BUS_FMT_FIXED@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #16]
	cbz	x20, LBB0_17
; %bb.16:
	ldr	w22, [x20]
LBB0_17:
	stp	w22, w23, [sp, #8]
	str	xzr, [x19, #8]
	str	wzr, [x19, #16]
	add	x0, x19, #20
Lloh27:
	adrp	x8, _pad@GOTPAGE
Lloh28:
	ldr	x8, [x8, _pad@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _set_fmt@GOTPAGE
Lloh31:
	ldr	x8, [x8, _set_fmt@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	add	x4, sp, #8
	mov	x3, #0
	bl	_call_all
	mov	w0, #0
	b	LBB0_24
LBB0_18:
	ldr	w8, [sp, #24]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w9, w9, w8, lt
	cmp	w22, w9, asr #2
	b.le	LBB0_21
; %bb.19:
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w22, w8, asr #1
	b.le	LBB0_22
; %bb.20:
	mov	w0, #0
	str	xzr, [x19, #8]
	b	LBB0_23
LBB0_21:
	mov	w0, #0
	movi.2s	v0, #1
	str	d0, [x19, #8]
	mov	w8, #1
	str	w8, [x19, #16]
	b	LBB0_24
LBB0_22:
	mov	w0, #0
	movi.2s	v0, #1
	str	d0, [x19, #8]
LBB0_23:
	str	wzr, [x19, #16]
LBB0_24:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GO7007_SENSOR_SCALING,4,2      ; @GO7007_SENSOR_SCALING
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_GO7007_BUF_SIZE,4,2            ; @GO7007_BUF_SIZE
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_MEDIA_BUS_FMT_FIXED,4,2        ; @MEDIA_BUS_FMT_FIXED
	.comm	_pad,4,2                        ; @pad
	.comm	_set_fmt,4,2                    ; @set_fmt
	.no_dead_strip	_set_capture_size
.subsections_via_symbols
