	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov511_set_packet_size
_ov511_set_packet_size:                 ## @ov511_set_packet_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_ov51x_stop
	testq	%rax, %rax
	js	LBB0_41
## %bb.1:
	movq	(%r15), %rax
	movq	_BRG_OV511@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.2:
	cmpl	$512, %r14d                     ## imm = 0x200
	jle	LBB0_3
## %bb.5:
	cmpl	$513, %r14d                     ## imm = 0x201
	je	LBB0_9
## %bb.6:
	cmpl	$769, %r14d                     ## imm = 0x301
	je	LBB0_10
## %bb.7:
	cmpl	$993, %r14d                     ## imm = 0x3E1
	jne	LBB0_12
## %bb.8:
	movq	_OV511_ALT_SIZE_993@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_13:
	movq	_BRG_OV511PLUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_33
## %bb.14:
	cmpl	$384, %r14d                     ## imm = 0x180
	jg	LBB0_21
## %bb.15:
	cmpl	$128, %r14d
	jg	LBB0_18
## %bb.16:
	testl	%r14d, %r14d
	je	LBB0_17
## %bb.31:
	cmpl	$33, %r14d
	jne	LBB0_12
## %bb.32:
	movq	_OV511PLUS_ALT_SIZE_33@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_33:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_42
LBB0_3:
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.11:
	cmpl	$257, %r14d                     ## imm = 0x101
	jne	LBB0_12
## %bb.35:
	movq	_OV511_ALT_SIZE_257@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_21:
	cmpl	$768, %r14d                     ## imm = 0x300
	jg	LBB0_25
## %bb.22:
	cmpl	$385, %r14d                     ## imm = 0x181
	je	LBB0_29
## %bb.23:
	cmpl	$513, %r14d                     ## imm = 0x201
	jne	LBB0_12
## %bb.24:
	movq	_OV511PLUS_ALT_SIZE_513@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_9:
	movq	_OV511_ALT_SIZE_513@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_10:
	movq	_OV511_ALT_SIZE_769@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_4:
	movq	_OV511_ALT_SIZE_0@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_18:
	cmpl	$129, %r14d
	je	LBB0_28
## %bb.19:
	cmpl	$257, %r14d                     ## imm = 0x101
	jne	LBB0_12
## %bb.20:
	movq	_OV511PLUS_ALT_SIZE_257@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_25:
	cmpl	$769, %r14d                     ## imm = 0x301
	je	LBB0_30
## %bb.26:
	cmpl	$961, %r14d                     ## imm = 0x3C1
	jne	LBB0_12
## %bb.27:
	movq	_OV511PLUS_ALT_SIZE_961@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_12:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_42
LBB0_17:
	movq	_OV511PLUS_ALT_SIZE_0@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_29:
	movq	_OV511PLUS_ALT_SIZE_385@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_28:
	movq	_OV511PLUS_ALT_SIZE_129@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_30:
	movq	_OV511PLUS_ALT_SIZE_769@GOTPCREL(%rip), %rax
LBB0_36:
	movl	%r14d, %ebx
	sarl	$5, %ebx
	movl	(%rax), %r12d
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	%r12d, %r8d
	callq	_PDEBUG
	movq	_R51x_FIFO_PSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_reg_w
	testq	%rax, %rax
	js	LBB0_41
## %bb.37:
	movl	12(%r15), %esi
	movl	16(%r15), %edi
	movl	%r12d, %edx
	callq	_usb_set_interface
	testq	%rax, %rax
	js	LBB0_38
## %bb.39:
	movq	_OV511_RESET_NOREGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ov51x_reset
	testq	%rax, %rax
	js	LBB0_41
## %bb.40:
	movl	%r14d, 8(%r15)
	movq	%r15, %rdi
	callq	_ov51x_restart
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jns	LBB0_43
LBB0_41:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_42:
	subl	(%rax), %ebx
LBB0_43:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_38:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_42
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_BRG_OV511,8,3                  ## @BRG_OV511
	.comm	_OV511_ALT_SIZE_0,4,2           ## @OV511_ALT_SIZE_0
	.comm	_OV511_ALT_SIZE_257,4,2         ## @OV511_ALT_SIZE_257
	.comm	_OV511_ALT_SIZE_513,4,2         ## @OV511_ALT_SIZE_513
	.comm	_OV511_ALT_SIZE_769,4,2         ## @OV511_ALT_SIZE_769
	.comm	_OV511_ALT_SIZE_993,4,2         ## @OV511_ALT_SIZE_993
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set packet size: invalid size (%d)"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BRG_OV511PLUS,8,3              ## @BRG_OV511PLUS
	.comm	_OV511PLUS_ALT_SIZE_0,4,2       ## @OV511PLUS_ALT_SIZE_0
	.comm	_OV511PLUS_ALT_SIZE_33,4,2      ## @OV511PLUS_ALT_SIZE_33
	.comm	_OV511PLUS_ALT_SIZE_129,4,2     ## @OV511PLUS_ALT_SIZE_129
	.comm	_OV511PLUS_ALT_SIZE_257,4,2     ## @OV511PLUS_ALT_SIZE_257
	.comm	_OV511PLUS_ALT_SIZE_385,4,2     ## @OV511PLUS_ALT_SIZE_385
	.comm	_OV511PLUS_ALT_SIZE_513,4,2     ## @OV511PLUS_ALT_SIZE_513
	.comm	_OV511PLUS_ALT_SIZE_769,4,2     ## @OV511PLUS_ALT_SIZE_769
	.comm	_OV511PLUS_ALT_SIZE_961,4,2     ## @OV511PLUS_ALT_SIZE_961
L_.str.1:                               ## @.str.1
	.asciz	"Set packet size: Invalid bridge type"

L_.str.2:                               ## @.str.2
	.asciz	"%d, mult=%d, alt=%d"

	.comm	_R51x_FIFO_PSIZE,4,2            ## @R51x_FIFO_PSIZE
L_.str.3:                               ## @.str.3
	.asciz	"Set packet size: set interface error"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_OV511_RESET_NOREGS,4,2         ## @OV511_RESET_NOREGS
	.no_dead_strip	_ov511_set_packet_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov511_set_packet_size
_ov511_set_packet_size:                 ; @ov511_set_packet_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_ov51x_stop
	tbnz	x0, #63, LBB0_42
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _BRG_OV511@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BRG_OV511@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
	cmp	w19, #512
	b.le	LBB0_14
; %bb.3:
	cmp	w19, #513
	b.eq	LBB0_21
; %bb.4:
	cmp	w19, #769
	b.eq	LBB0_22
; %bb.5:
	cmp	w19, #993
	b.ne	LBB0_24
; %bb.6:
Lloh3:
	adrp	x8, _OV511_ALT_SIZE_993@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OV511_ALT_SIZE_993@GOTPAGEOFF]
	b	LBB0_37
LBB0_7:
Lloh5:
	adrp	x9, _BRG_OV511PLUS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BRG_OV511PLUS@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.8:
	cmp	w19, #384
	b.gt	LBB0_17
; %bb.9:
	cmp	w19, #128
	b.gt	LBB0_27
; %bb.10:
	cbz	w19, LBB0_33
; %bb.11:
	cmp	w19, #33
	b.ne	LBB0_25
; %bb.12:
Lloh8:
	adrp	x8, _OV511PLUS_ALT_SIZE_33@GOTPAGE
Lloh9:
	ldr	x8, [x8, _OV511PLUS_ALT_SIZE_33@GOTPAGEOFF]
	b	LBB0_37
LBB0_13:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_26
LBB0_14:
	cbz	w19, LBB0_23
; %bb.15:
	cmp	w19, #257
	b.ne	LBB0_24
; %bb.16:
Lloh12:
	adrp	x8, _OV511_ALT_SIZE_257@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OV511_ALT_SIZE_257@GOTPAGEOFF]
	b	LBB0_37
LBB0_17:
	cmp	w19, #768
	b.gt	LBB0_30
; %bb.18:
	cmp	w19, #385
	b.eq	LBB0_34
; %bb.19:
	cmp	w19, #513
	b.ne	LBB0_25
; %bb.20:
Lloh14:
	adrp	x8, _OV511PLUS_ALT_SIZE_513@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OV511PLUS_ALT_SIZE_513@GOTPAGEOFF]
	b	LBB0_37
LBB0_21:
Lloh16:
	adrp	x8, _OV511_ALT_SIZE_513@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OV511_ALT_SIZE_513@GOTPAGEOFF]
	b	LBB0_37
LBB0_22:
Lloh18:
	adrp	x8, _OV511_ALT_SIZE_769@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OV511_ALT_SIZE_769@GOTPAGEOFF]
	b	LBB0_37
LBB0_23:
Lloh20:
	adrp	x8, _OV511_ALT_SIZE_0@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OV511_ALT_SIZE_0@GOTPAGEOFF]
	b	LBB0_37
LBB0_24:
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
LBB0_25:
	str	x19, [sp]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
LBB0_26:
	bl	_err
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_43
LBB0_27:
	cmp	w19, #129
	b.eq	LBB0_35
; %bb.28:
	cmp	w19, #257
	b.ne	LBB0_25
; %bb.29:
Lloh26:
	adrp	x8, _OV511PLUS_ALT_SIZE_257@GOTPAGE
Lloh27:
	ldr	x8, [x8, _OV511PLUS_ALT_SIZE_257@GOTPAGEOFF]
	b	LBB0_37
LBB0_30:
	cmp	w19, #769
	b.eq	LBB0_36
; %bb.31:
	cmp	w19, #961
	b.ne	LBB0_25
; %bb.32:
Lloh28:
	adrp	x8, _OV511PLUS_ALT_SIZE_961@GOTPAGE
Lloh29:
	ldr	x8, [x8, _OV511PLUS_ALT_SIZE_961@GOTPAGEOFF]
	b	LBB0_37
LBB0_33:
Lloh30:
	adrp	x8, _OV511PLUS_ALT_SIZE_0@GOTPAGE
Lloh31:
	ldr	x8, [x8, _OV511PLUS_ALT_SIZE_0@GOTPAGEOFF]
	b	LBB0_37
LBB0_34:
Lloh32:
	adrp	x8, _OV511PLUS_ALT_SIZE_385@GOTPAGE
Lloh33:
	ldr	x8, [x8, _OV511PLUS_ALT_SIZE_385@GOTPAGEOFF]
	b	LBB0_37
LBB0_35:
Lloh34:
	adrp	x8, _OV511PLUS_ALT_SIZE_129@GOTPAGE
Lloh35:
	ldr	x8, [x8, _OV511PLUS_ALT_SIZE_129@GOTPAGEOFF]
	b	LBB0_37
LBB0_36:
Lloh36:
	adrp	x8, _OV511PLUS_ALT_SIZE_769@GOTPAGE
Lloh37:
	ldr	x8, [x8, _OV511PLUS_ALT_SIZE_769@GOTPAGEOFF]
LBB0_37:
	asr	w22, w19, #5
	ldr	w21, [x8]
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	mov	x2, x19
	mov	x3, x22
	mov	x4, x21
	bl	_PDEBUG
Lloh40:
	adrp	x8, _R51x_FIFO_PSIZE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _R51x_FIFO_PSIZE@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_reg_w
	tbnz	x0, #63, LBB0_42
; %bb.38:
	ldp	w1, w0, [x20, #12]
	mov	x2, x21
	bl	_usb_set_interface
	tbnz	x0, #63, LBB0_45
; %bb.39:
Lloh43:
	adrp	x8, _OV511_RESET_NOREGS@GOTPAGE
Lloh44:
	ldr	x8, [x8, _OV511_RESET_NOREGS@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ov51x_reset
	tbnz	x0, #63, LBB0_42
; %bb.40:
	str	w19, [x20, #8]
	mov	x0, x20
	bl	_ov51x_restart
	tbnz	x0, #63, LBB0_42
; %bb.41:
	mov	w0, #0
	b	LBB0_44
LBB0_42:
Lloh46:
	adrp	x8, _EIO@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_43:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_44:
	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
	add	sp, sp, #64
	ret
LBB0_45:
Lloh48:
	adrp	x0, l_.str.3@PAGE
Lloh49:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_err
Lloh50:
	adrp	x8, _EBUSY@GOTPAGE
Lloh51:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_43
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_BRG_OV511,8,3                  ; @BRG_OV511
	.comm	_OV511_ALT_SIZE_0,4,2           ; @OV511_ALT_SIZE_0
	.comm	_OV511_ALT_SIZE_257,4,2         ; @OV511_ALT_SIZE_257
	.comm	_OV511_ALT_SIZE_513,4,2         ; @OV511_ALT_SIZE_513
	.comm	_OV511_ALT_SIZE_769,4,2         ; @OV511_ALT_SIZE_769
	.comm	_OV511_ALT_SIZE_993,4,2         ; @OV511_ALT_SIZE_993
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set packet size: invalid size (%d)"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BRG_OV511PLUS,8,3              ; @BRG_OV511PLUS
	.comm	_OV511PLUS_ALT_SIZE_0,4,2       ; @OV511PLUS_ALT_SIZE_0
	.comm	_OV511PLUS_ALT_SIZE_33,4,2      ; @OV511PLUS_ALT_SIZE_33
	.comm	_OV511PLUS_ALT_SIZE_129,4,2     ; @OV511PLUS_ALT_SIZE_129
	.comm	_OV511PLUS_ALT_SIZE_257,4,2     ; @OV511PLUS_ALT_SIZE_257
	.comm	_OV511PLUS_ALT_SIZE_385,4,2     ; @OV511PLUS_ALT_SIZE_385
	.comm	_OV511PLUS_ALT_SIZE_513,4,2     ; @OV511PLUS_ALT_SIZE_513
	.comm	_OV511PLUS_ALT_SIZE_769,4,2     ; @OV511PLUS_ALT_SIZE_769
	.comm	_OV511PLUS_ALT_SIZE_961,4,2     ; @OV511PLUS_ALT_SIZE_961
l_.str.1:                               ; @.str.1
	.asciz	"Set packet size: Invalid bridge type"

l_.str.2:                               ; @.str.2
	.asciz	"%d, mult=%d, alt=%d"

	.comm	_R51x_FIFO_PSIZE,4,2            ; @R51x_FIFO_PSIZE
l_.str.3:                               ; @.str.3
	.asciz	"Set packet size: set interface error"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_OV511_RESET_NOREGS,4,2         ; @OV511_RESET_NOREGS
	.no_dead_strip	_ov511_set_packet_size
.subsections_via_symbols
