	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gm12u320_usb_alloc
_gm12u320_usb_alloc:                    ## @gm12u320_usb_alloc
	.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	%rdi, %r14
	movq	_CMD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movl	%eax, 12(%r14)
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	_GM12U320_BLOCK_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	jle	LBB0_7
## %bb.2:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	decl	%r12d
	movq	_DATA_BLOCK_SIZE@GOTPCREL(%rip), %rax
	cmpq	%r12, %r13
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_DATA_LAST_BLOCK_SIZE@GOTPCREL(%rip), %rax
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_data_last_block_header@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	_data_block_header@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	movl	(%rax), %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_kzalloc
	movq	(%r14), %rcx
	movl	%eax, (%rcx,%r13,4)
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r12, %r13
	cmoveq	-48(%rbp), %r15                 ## 8-byte Folded Reload
	movq	_DATA_BLOCK_HEADER_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_memcpy
	movq	(%r14), %rax
	movq	_DATA_BLOCK_FOOTER_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	addl	(%rax,%r13,4), %ebx
	subl	%edx, %ebx
	movq	_data_block_footer@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%ebx, %edi
	callq	_memcpy
	incq	%r13
	movq	_GM12U320_BLOCK_COUNT@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	cmpq	%r12, %r13
	jl	LBB0_3
LBB0_7:
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_create_singlethread_workqueue
	movl	%eax, %ecx
	movl	%eax, 8(%r14)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_9
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_SIZE,4,2                   ## @CMD_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GM12U320_BLOCK_COUNT,4,2       ## @GM12U320_BLOCK_COUNT
	.comm	_DATA_LAST_BLOCK_SIZE,4,2       ## @DATA_LAST_BLOCK_SIZE
	.comm	_data_last_block_header,8,3     ## @data_last_block_header
	.comm	_DATA_BLOCK_SIZE,4,2            ## @DATA_BLOCK_SIZE
	.comm	_data_block_header,8,3          ## @data_block_header
	.comm	_DATA_BLOCK_HEADER_SIZE,4,2     ## @DATA_BLOCK_HEADER_SIZE
	.comm	_DATA_BLOCK_FOOTER_SIZE,4,2     ## @DATA_BLOCK_FOOTER_SIZE
	.comm	_data_block_footer,8,3          ## @data_block_footer
	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
	.no_dead_strip	_gm12u320_usb_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gm12u320_usb_alloc
_gm12u320_usb_alloc:                    ; @gm12u320_usb_alloc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _CMD_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kmalloc
	str	w0, [x19, #12]
	cbz	w0, LBB0_7
; %bb.1:
Lloh6:
	adrp	x8, _GM12U320_BLOCK_COUNT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GM12U320_BLOCK_COUNT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x23, #0
Lloh9:
	adrp	x26, _DATA_LAST_BLOCK_SIZE@GOTPAGE
Lloh10:
	ldr	x26, [x26, _DATA_LAST_BLOCK_SIZE@GOTPAGEOFF]
Lloh11:
	adrp	x27, _DATA_BLOCK_SIZE@GOTPAGE
Lloh12:
	ldr	x27, [x27, _DATA_BLOCK_SIZE@GOTPAGEOFF]
Lloh13:
	adrp	x22, _DATA_BLOCK_FOOTER_SIZE@GOTPAGE
Lloh14:
	ldr	x22, [x22, _DATA_BLOCK_FOOTER_SIZE@GOTPAGEOFF]
Lloh15:
	adrp	x24, _data_block_footer@GOTPAGE
Lloh16:
	ldr	x24, [x24, _data_block_footer@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w21, w8, #1
Lloh17:
	adrp	x8, _data_last_block_header@GOTPAGE
Lloh18:
	ldr	x8, [x8, _data_last_block_header@GOTPAGEOFF]
Lloh19:
	ldr	x25, [x8]
Lloh20:
	adrp	x8, _data_block_header@GOTPAGE
Lloh21:
	ldr	x8, [x8, _data_block_header@GOTPAGEOFF]
Lloh22:
	ldr	x28, [x8]
	cmp	x23, x21
	csel	x8, x26, x27, eq
	ldr	w20, [x8]
Lloh23:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_kzalloc
	ldr	x8, [x19]
	str	w0, [x8, x23, lsl #2]
	cbz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x23, x21
	csel	x1, x25, x28, eq
Lloh26:
	adrp	x8, _DATA_BLOCK_HEADER_SIZE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DATA_BLOCK_HEADER_SIZE@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	bl	_memcpy
	ldr	x8, [x19]
	ldr	w8, [x8, x23, lsl #2]
	ldr	w2, [x22]
	add	w8, w8, w20
	sub	w0, w8, w2
	ldr	x1, [x24]
	bl	_memcpy
	add	x23, x23, #1
Lloh29:
	adrp	x8, _GM12U320_BLOCK_COUNT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _GM12U320_BLOCK_COUNT@GOTPAGEOFF]
Lloh31:
	ldrsw	x8, [x8]
	cmp	x23, x8
	b.lt	LBB0_3
LBB0_5:
Lloh32:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_create_singlethread_workqueue
	str	w0, [x19, #8]
	cbz	w0, LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_SIZE,4,2                   ; @CMD_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GM12U320_BLOCK_COUNT,4,2       ; @GM12U320_BLOCK_COUNT
	.comm	_DATA_LAST_BLOCK_SIZE,4,2       ; @DATA_LAST_BLOCK_SIZE
	.comm	_data_last_block_header,8,3     ; @data_last_block_header
	.comm	_DATA_BLOCK_SIZE,4,2            ; @DATA_BLOCK_SIZE
	.comm	_data_block_header,8,3          ; @data_block_header
	.comm	_DATA_BLOCK_HEADER_SIZE,4,2     ; @DATA_BLOCK_HEADER_SIZE
	.comm	_DATA_BLOCK_FOOTER_SIZE,4,2     ; @DATA_BLOCK_FOOTER_SIZE
	.comm	_data_block_footer,8,3          ; @data_block_footer
	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
	.no_dead_strip	_gm12u320_usb_alloc
.subsections_via_symbols
