	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flexcop_usb_memory_req
_flexcop_usb_memory_req:                ## @flexcop_usb_memory_req
	.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
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	leal	-128(%rsi), %ecx
	cmpl	$3, %ecx
	jae	LBB0_1
## %bb.2:
	movl	16(%rbp), %r13d
	xorl	%eax, %eax
	testl	%r13d, %r13d
	jle	LBB0_9
## %bb.3:
	movslq	%ecx, %rax
	leaq	l_switch.table.flexcop_usb_memory_req(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movl	%r13d, %esi
	callq	_bytes_left_to_read_on_page
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %r15
	cmpq	%rax, %rcx
	jl	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %edi
	movl	%r13d, %esi
	callq	_bytes_left_to_read_on_page
	movq	%rax, %r15
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_V8_MEMORY_PAGE_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	andl	%ebx, %eax
	movq	_V8_MEMORY_EXTENDED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	imull	%r14d, %esi
	orl	%eax, %esi
	leaq	L_.str(%rip), %rdi
	callq	_deb_info
	movl	%ebx, %eax
	cltd
	movq	_V8_MEMORY_PAGE_SIZE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movslq	%eax, %rdx
	addq	-80(%rbp), %rdx                 ## 8-byte Folded Reload
	movl	(%r12), %eax
	andl	%ebx, %eax
	movq	_V8_MEMORY_EXTENDED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	%r14d, %ecx
	orl	%eax, %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	movl	%r15d, %r9d
	callq	_flexcop_usb_v8_memory_req
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	%r15d, %ebx
	subl	%r15d, %r13d
	jg	LBB0_4
## %bb.8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_MEM_READ_MAX,8,3           ## @USB_MEM_READ_MAX
	.comm	_USB_MEM_WRITE_MAX,8,3          ## @USB_MEM_WRITE_MAX
	.comm	_USB_FLASH_MAX,8,3              ## @USB_FLASH_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%x\n"

	.comm	_V8_MEMORY_PAGE_MASK,4,2        ## @V8_MEMORY_PAGE_MASK
	.comm	_V8_MEMORY_EXTENDED,4,2         ## @V8_MEMORY_EXTENDED
	.comm	_V8_MEMORY_PAGE_SIZE,4,2        ## @V8_MEMORY_PAGE_SIZE
	.no_dead_strip	_flexcop_usb_memory_req
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.flexcop_usb_memory_req
l_switch.table.flexcop_usb_memory_req:
	.quad	_USB_MEM_WRITE_MAX
	.quad	_USB_MEM_READ_MAX
	.quad	_USB_FLASH_MAX

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flexcop_usb_memory_req
_flexcop_usb_memory_req:                ; @flexcop_usb_memory_req
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x5, [sp, #8]                    ; 8-byte Folded Spill
	sub	w8, w1, #128
	cmp	w8, #3
	b.hs	LBB0_8
; %bb.1:
	mov	x19, x6
	cmp	w6, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
Lloh0:
	adrp	x9, l_switch.table.flexcop_usb_memory_req@PAGE
Lloh1:
	add	x9, x9, l_switch.table.flexcop_usb_memory_req@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	x28, [x8]
Lloh2:
	adrp	x26, _V8_MEMORY_PAGE_MASK@GOTPAGE
Lloh3:
	ldr	x26, [x26, _V8_MEMORY_PAGE_MASK@GOTPAGEOFF]
Lloh4:
	adrp	x20, _V8_MEMORY_EXTENDED@GOTPAGE
Lloh5:
	ldr	x20, [x20, _V8_MEMORY_EXTENDED@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x19
	bl	_bytes_left_to_read_on_page
	mov	x27, x28
	cmp	x28, x0
	b.lt	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	mov	x1, x19
	bl	_bytes_left_to_read_on_page
	mov	x27, x0
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	and	w8, w8, w22
	ldr	w9, [x20]
	mul	w9, w9, w21
	orr	w1, w9, w8
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_info
Lloh8:
	adrp	x8, _V8_MEMORY_PAGE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V8_MEMORY_PAGE_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	sdiv	w8, w22, w8
	add	x2, x23, w8, sxtw
	ldr	w8, [x26]
	and	w8, w8, w22
	ldr	w9, [x20]
	mul	w9, w9, w21
	orr	w3, w9, w8
	mov	x0, x25
	mov	x1, x24
	ldr	x4, [sp, #8]                    ; 8-byte Folded Reload
	mov	x5, x27
	bl	_flexcop_usb_v8_memory_req
	tbnz	w0, #31, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w22, w27
	sub	w19, w19, w27
	cmp	w19, #0
	b.gt	LBB0_3
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_MEM_READ_MAX,8,3           ; @USB_MEM_READ_MAX
	.comm	_USB_MEM_WRITE_MAX,8,3          ; @USB_MEM_WRITE_MAX
	.comm	_USB_FLASH_MAX,8,3              ; @USB_FLASH_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%x\n"

	.comm	_V8_MEMORY_PAGE_MASK,4,2        ; @V8_MEMORY_PAGE_MASK
	.comm	_V8_MEMORY_EXTENDED,4,2         ; @V8_MEMORY_EXTENDED
	.comm	_V8_MEMORY_PAGE_SIZE,4,2        ; @V8_MEMORY_PAGE_SIZE
	.no_dead_strip	_flexcop_usb_memory_req
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.flexcop_usb_memory_req
l_switch.table.flexcop_usb_memory_req:
	.quad	_USB_MEM_WRITE_MAX
	.quad	_USB_MEM_READ_MAX
	.quad	_USB_FLASH_MAX

.subsections_via_symbols
