	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shark_read_reg
_shark_read_reg:                        ## @shark_read_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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movq	(%r12), %rdi
	movq	_TB_LEN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	(%r12), %rax
	movl	$130, (%rax)
	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
	js	LBB0_1
## %bb.2:
	movl	8(%r12), %ebx
	movq	_SHARK_IN_EP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_usb_rcvintpipe
	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
	js	LBB0_4
## %bb.3:
	movq	(%r12), %r9
	movl	(%r9), %eax
	movl	4(%r9), %ebx
	shll	$16, %eax
	shll	$8, %ebx
	orl	%eax, %ebx
	orl	8(%r9), %ebx
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rcx
	movl	$1, %edi
	movl	$3, %r8d
	callq	_v4l2_dbg
	movl	%ebx, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_4:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	movl	%ebx, %edx
	callq	_v4l2_err
LBB0_6:
	movl	%ebx, %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	_SHARK_OUT_EP,4,2               ## @SHARK_OUT_EP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"request-read error: %d\n"

	.comm	_SHARK_IN_EP,4,2                ## @SHARK_IN_EP
L_.str.1:                               ## @.str.1
	.asciz	"read error: %d\n"

	.comm	_debug,4,2                      ## @debug
L_.str.2:                               ## @.str.2
	.asciz	"shark2-read: %*ph\n"

	.no_dead_strip	_shark_read_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shark_read_reg
_shark_read_reg:                        ; @shark_read_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	x0, [x22]
Lloh0:
	adrp	x23, _TB_LEN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TB_LEN@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w1, #0
	bl	_memset
	ldr	x8, [x22]
	mov	w9, #130
	str	w9, [x8]
	ldr	w21, [x22, #8]
Lloh2:
	adrp	x8, _SHARK_OUT_EP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SHARK_OUT_EP@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_usb_sndintpipe
	mov	x1, x0
	ldr	x2, [x22]
	ldr	w3, [x23]
	add	x4, sp, #12
	mov	x0, x21
	mov	w5, #1000
	bl	_usb_interrupt_msg
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w21, [x22, #8]
Lloh5:
	adrp	x8, _SHARK_IN_EP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SHARK_IN_EP@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_usb_rcvintpipe
	mov	x1, x0
	ldr	x2, [x22]
	ldr	w3, [x23]
	add	x4, sp, #12
	mov	x0, x21
	mov	w5, #1000
	bl	_usb_interrupt_msg
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	x5, [x22]
	ldp	w8, w9, [x5]
	lsl	w9, w9, #8
	orr	w8, w9, w8, lsl #16
	ldr	w9, [x5, #8]
	orr	w22, w9, w8
Lloh8:
	adrp	x8, _debug@GOTPAGE
Lloh9:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w2, [x20]
Lloh11:
	adrp	x3, l_.str.2@PAGE
Lloh12:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	w4, #3
	bl	_v4l2_dbg
	mov	w21, #0
	str	w22, [x19]
	b	LBB0_6
LBB0_3:
	mov	x21, x0
	ldr	w0, [x20]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
	mov	x21, x0
	ldr	w0, [x20]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x2, x21
	bl	_v4l2_err
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.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	"request-read error: %d\n"

	.comm	_SHARK_IN_EP,4,2                ; @SHARK_IN_EP
l_.str.1:                               ; @.str.1
	.asciz	"read error: %d\n"

	.comm	_debug,4,2                      ; @debug
l_.str.2:                               ; @.str.2
	.asciz	"shark2-read: %*ph\n"

	.no_dead_strip	_shark_read_reg
.subsections_via_symbols
