	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shark_write_val
_shark_write_val:                       ## @shark_write_val
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	cmpl	%esi, (%rbx)
	je	LBB0_4
## %bb.1:
	movl	%esi, %r12d
	movq	8(%rbx), %rdi
	movq	_TB_LEN@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	8(%rbx), %rax
	movl	%r12d, %edx
	movl	%r12d, %ecx
	shrl	$24, %ecx
	orl	$192, %ecx
	movl	%ecx, (%rax)
	movl	%r12d, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %ecx
	orl	%ecx, 4(%rax)
	movzbl	%dh, %ecx
	orl	%ecx, 8(%rax)
	movzbl	%dl, %ecx
	orl	%ecx, 12(%rax)
	movl	20(%rbx), %r14d
	movq	_SHARK_OUT_EP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_usb_sndintpipe
	movq	8(%rbx), %rdx
	movl	(%r15), %ecx
	leaq	-36(%rbp), %r8
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	$1000, %r9d                     ## imm = 0x3E8
	callq	_usb_interrupt_msg
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movl	%r12d, (%rbx)
	jmp	LBB0_4
LBB0_3:
	addq	$16, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_v4l2_err
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TB_LEN,4,2                     ## @TB_LEN
	.comm	_SHARK_OUT_EP,4,2               ## @SHARK_OUT_EP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set-freq error: %d\n"

	.no_dead_strip	_shark_write_val
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function shark_write_val
lCPI0_0:
	.long	4294967280                      ; 0xfffffff0
	.long	4294967288                      ; 0xfffffff8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_shark_write_val:                       ; @shark_write_val
	.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
	ldr	x21, [x0]
	ldr	w8, [x21]
	cmp	w8, w1
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x1
	ldr	x0, [x21, #8]
Lloh0:
	adrp	x22, _TB_LEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TB_LEN@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_memset
	ldr	x8, [x21, #8]
	lsr	w9, w19, #24
	orr	w9, w9, #0xc0
	str	w9, [x8]
	dup.2s	v0, w19
Lloh2:
	adrp	x9, lCPI0_0@PAGE
Lloh3:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi	d1, #0x0000ff000000ff
	and.8b	v0, v0, v1
	ldur	d1, [x8, #4]
	orr.8b	v0, v1, v0
	stur	d0, [x8, #4]
	and	w9, w19, #0xff
	ldr	w10, [x8, #12]
	orr	w9, w10, w9
	str	w9, [x8, #12]
	ldr	w20, [x21, #20]
Lloh4:
	adrp	x8, _SHARK_OUT_EP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SHARK_OUT_EP@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_usb_sndintpipe
	mov	x1, x0
	ldr	x2, [x21, #8]
	ldr	w3, [x22]
	add	x4, sp, #12
	mov	x0, x20
	mov	w5, #1000
	bl	_usb_interrupt_msg
	tbnz	w0, #31, LBB0_3
; %bb.2:
	str	w19, [x21]
	b	LBB0_4
LBB0_3:
	mov	x2, x0
	add	x0, x21, #16
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_v4l2_err
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TB_LEN,4,2                     ; @TB_LEN
	.comm	_SHARK_OUT_EP,4,2               ; @SHARK_OUT_EP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set-freq error: %d\n"

	.no_dead_strip	_shark_write_val
.subsections_via_symbols
