	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shark_write_reg
_shark_write_reg:                       ## @shark_write_reg
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movq	(%r12), %rdi
	movq	_TB_LEN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_memset
	movq	(%r12), %r9
	movl	$129, (%r9)
	movl	%ebx, %eax
	shrl	$24, %eax
	movl	%eax, 12(%r9)
	movl	%ebx, %eax
	shrl	$16, %eax
	movzbl	%al, %eax
	movl	%eax, 16(%r9)
	movzbl	%bh, %eax
	movl	%eax, 20(%r9)
	movzbl	%bl, %eax
	movl	%eax, 24(%r9)
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movl	$7, %r8d
	callq	_v4l2_dbg
	movl	8(%r12), %ebx
	movq	_SHARK_OUT_EP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_usb_sndintpipe
	movq	(%r12), %rdx
	movl	(%r13), %ecx
	leaq	-44(%rbp), %r8
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$1000, %r9d                     ## imm = 0x3E8
	callq	_usb_interrupt_msg
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_v4l2_err
	movl	%ebx, %r14d
LBB0_2:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TB_LEN,4,2                     ## @TB_LEN
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"shark2-write: %*ph\n"

	.comm	_SHARK_OUT_EP,4,2               ## @SHARK_OUT_EP
L_.str.1:                               ## @.str.1
	.asciz	"write error: %d\n"

	.no_dead_strip	_shark_write_reg
.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_reg
lCPI0_0:
	.long	4294967280                      ; 0xfffffff0
	.long	4294967288                      ; 0xfffffff8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_shark_write_reg:                       ; @shark_write_reg
	.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	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	ldr	x0, [x21]
Lloh0:
	adrp	x22, _TB_LEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TB_LEN@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_memset
	ldr	x5, [x21]
	mov	w8, #129
	str	w8, [x5]
	lsr	w8, w20, #24
	str	w8, [x5, #12]
	dup.2s	v0, w20
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi	d1, #0x0000ff000000ff
	and.8b	v0, v0, v1
	str	d0, [x5, #16]
	and	w8, w20, #0xff
	str	w8, [x5, #24]
Lloh4:
	adrp	x8, _debug@GOTPAGE
Lloh5:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh7:
	adrp	x3, l_.str@PAGE
Lloh8:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	w4, #7
	bl	_v4l2_dbg
	ldr	w20, [x21, #8]
Lloh9:
	adrp	x8, _SHARK_OUT_EP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SHARK_OUT_EP@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_usb_sndintpipe
	mov	x1, x0
	ldr	x2, [x21]
	ldr	w3, [x22]
	add	x4, sp, #12
	mov	x0, x20
	mov	w5, #1000
	bl	_usb_interrupt_msg
	mov	x20, x0
	mov	w0, #0
	tbz	w20, #31, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_v4l2_err
	mov	x0, x20
LBB0_2:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_TB_LEN,4,2                     ; @TB_LEN
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"shark2-write: %*ph\n"

	.comm	_SHARK_OUT_EP,4,2               ; @SHARK_OUT_EP
l_.str.1:                               ; @.str.1
	.asciz	"write error: %d\n"

	.no_dead_strip	_shark_write_reg
.subsections_via_symbols
