	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vp702x_usb_inout_cmd
_vp702x_usb_inout_cmd:                  ## @vp702x_usb_inout_cmd
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r15d
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r14
	leal	2(%r15), %edi
	leal	1(%r12), %esi
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	callq	_max
	movl	%eax, %r13d
	leaq	16(%r14), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock_interruptible
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	cmpl	(%r14), %r13d
	jle	LBB0_6
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	leaq	L_.str(%rip), %rdi
	callq	_info
	movq	8(%r14), %rdi
	callq	_kfree
	movq	%r12, 8(%r14)
	movl	%r13d, (%r14)
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_6:
	movq	8(%r14), %r12
LBB0_7:
	movl	16(%rbp), %ebx
	movl	$0, (%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r12)
	leaq	8(%r12), %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcpy
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	%r12, %rcx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	%ebx, %r9d
	callq	_vp702x_usb_inout_op
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	addq	$4, %r12
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
LBB0_9:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_10
LBB0_4:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"successfully reallocated a bigger buffer"

	.no_dead_strip	_vp702x_usb_inout_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vp702x_usb_inout_cmd
_vp702x_usb_inout_cmd:                  ; @vp702x_usb_inout_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w6, [sp, #28]                   ; 4-byte Folded Spill
	mov	x19, x5
	stp	x4, x2, [sp, #8]                ; 16-byte Folded Spill
	mov	x26, x3
	mov	x28, x1
	mov	x24, x0
	ldr	x27, [x0]
	add	w25, w3, #2
	add	w23, w5, #1
	mov	x0, x25
	mov	x1, x23
	bl	_max
	mov	x22, x0
	add	x21, x27, #16
	mov	x0, x21
	bl	_mutex_lock_interruptible
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w8, [x27]
	cmp	w22, w8
	b.le	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_kmalloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_info
	ldr	x0, [x27, #8]
	bl	_kfree
	str	x20, [x27, #8]
	str	w22, [x27]
	b	LBB0_6
LBB0_4:
	mov	x20, x0
	b	LBB0_10
LBB0_5:
	ldr	x20, [x27, #8]
LBB0_6:
	mov	x0, x20
	str	wzr, [x0], #8
	mov	x22, x20
	str	w28, [x22, #4]!
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	mov	x2, x26
	bl	_memcpy
	mov	x0, x24
	mov	x1, x20
	mov	x2, x25
	mov	x3, x20
	mov	x4, x23
	ldr	w5, [sp, #28]                   ; 4-byte Folded Reload
	bl	_vp702x_usb_inout_op
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.7:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x22
	mov	x2, x19
	bl	_memcpy
LBB0_8:
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_10
LBB0_9:
	mov	x0, x21
	bl	_mutex_unlock
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"successfully reallocated a bigger buffer"

	.no_dead_strip	_vp702x_usb_inout_cmd
.subsections_via_symbols
