	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_all_mem
_alloc_all_mem:                         ## @alloc_all_mem
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	72(%rdi), %rax
	movq	80(%rdi), %rcx
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rcx), %rdi
	testq	%rdi, %rdi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	callq	_dev_to_node
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
LBB0_1:
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
LBB0_3:
	leaq	64(%r12), %rdi
	callq	_spin_lock_init
	leaq	60(%r12), %rdi
	callq	_spin_lock_init
	leaq	56(%r12), %rdi
	callq	_INIT_LIST_HEAD
	leaq	24(%r12), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_INIT_LIST_HEAD
	leaq	52(%r12), %rdi
	callq	_INIT_LIST_HEAD
	leaq	48(%r12), %rdi
	callq	_skb_queue_head_init
	leaq	44(%r12), %rdi
	callq	_skb_queue_head_init
	leaq	40(%r12), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_atomic_set
	movq	_RTL8152_MAX_RX@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_alloc_rx_agg
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	cmpl	(%r14), %ebx
	jl	LBB0_5
LBB0_7:
	movq	_RTL8152_MAX_TX@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_16
## %bb.8:
	xorl	%r15d, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	_agg_buf_sz@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%r13), %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_kmalloc_node
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_tx_agg_align
	cmpq	%rax, %rbx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rdi
	callq	_kfree
	movq	_TX_ALIGN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_agg_buf_sz@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movl	(%r13), %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_kmalloc_node
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r13, %r14
	movl	(%r13), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %r13
	movq	32(%r12), %rdi
	addq	%r15, %rdi
	callq	_INIT_LIST_HEAD
	movq	32(%r12), %rax
	movq	%r12, 32(%rax,%r15)
	movq	%r13, 24(%rax,%r15)
	movq	%rbx, 16(%rax,%r15)
	movq	%rbx, %rdi
	callq	_tx_agg_align
	movq	32(%r12), %rdi
	movq	%rax, 8(%rdi,%r15)
	addq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add_tail
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	_RTL8152_MAX_TX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$40, %r15
	cmpq	%rax, %rcx
	movq	%r14, %r13
	jl	LBB0_9
LBB0_16:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	je	LBB0_14
## %bb.17:
	movq	_INTBUFSIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	(%rbx), %esi
	callq	_kmalloc
	movl	%eax, 4(%r12)
	testl	%eax, %eax
	je	LBB0_14
## %bb.18:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %eax
	movl	%eax, (%r12)
	movq	16(%r12), %r14
	movl	8(%r12), %ebx
	movl	%ebx, %edi
	movl	$3, %esi
	callq	_usb_rcvintpipe
	movl	(%r12), %r10d
	movl	4(%r12), %ecx
	movl	(%r15), %r8d
	movq	_intr_callback@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	pushq	%r10
	pushq	%r12
	callq	_usb_fill_int_urb
	addq	$16, %rsp
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_13:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_14:
	movq	%r12, %rdi
	callq	_free_all_mem
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8152_MAX_RX,4,2             ## @RTL8152_MAX_RX
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_RTL8152_MAX_TX,4,2             ## @RTL8152_MAX_TX
	.comm	_agg_buf_sz,8,3                 ## @agg_buf_sz
	.comm	_TX_ALIGN,8,3                   ## @TX_ALIGN
	.comm	_INTBUFSIZE,4,2                 ## @INTBUFSIZE
	.comm	_intr_callback,4,2              ## @intr_callback
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_alloc_all_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_all_mem
_alloc_all_mem:                         ; @alloc_all_mem
	.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
	mov	x19, x0
	ldp	x9, x8, [x0, #72]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x0, [x8]
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	cbz	x0, LBB0_2
; %bb.1:
	bl	_dev_to_node
	mov	x20, x0
	b	LBB0_3
LBB0_2:
	mov	w20, #-1
LBB0_3:
	add	x0, x19, #64
	bl	_spin_lock_init
	add	x0, x19, #60
	bl	_spin_lock_init
	add	x0, x19, #56
	bl	_INIT_LIST_HEAD
	add	x21, x19, #24
	mov	x0, x21
	bl	_INIT_LIST_HEAD
	add	x0, x19, #52
	bl	_INIT_LIST_HEAD
	add	x0, x19, #48
	bl	_skb_queue_head_init
	add	x0, x19, #44
	bl	_skb_queue_head_init
	add	x0, x19, #40
	mov	w1, #0
	bl	_atomic_set
Lloh0:
	adrp	x22, _RTL8152_MAX_RX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RTL8152_MAX_RX@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	w23, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	bl	_alloc_rx_agg
	cbz	w0, LBB0_18
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w23, w23, #1
	ldr	w8, [x22]
	cmp	w23, w8
	b.lt	LBB0_5
LBB0_7:
Lloh4:
	adrp	x26, _RTL8152_MAX_TX@GOTPAGE
Lloh5:
	ldr	x26, [x26, _RTL8152_MAX_TX@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.8:
	mov	x27, #0
	mov	x28, #0
Lloh6:
	adrp	x24, _agg_buf_sz@GOTPAGE
Lloh7:
	ldr	x24, [x24, _agg_buf_sz@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	ldr	w1, [x25]
	mov	x2, x20
	bl	_kmalloc_node
	cbz	x0, LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x22, x0
	bl	_tx_agg_align
	cmp	x22, x0
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x22
	bl	_kfree
	ldr	x8, [x24]
Lloh8:
	adrp	x9, _TX_ALIGN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TX_ALIGN@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldr	w1, [x25]
	mov	x2, x20
	bl	_kmalloc_node
	mov	x22, x0
	cbz	x0, LBB0_18
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w1, [x25]
	mov	w0, #0
	bl	_usb_alloc_urb
	cbz	x0, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x23, x0
	ldr	x8, [x19, #32]
	add	x0, x8, x27
	bl	_INIT_LIST_HEAD
	ldr	x8, [x19, #32]
	add	x8, x8, x27
	stp	x23, x19, [x8, #24]
	str	x22, [x8, #16]
	mov	x0, x22
	bl	_tx_agg_align
	ldr	x8, [x19, #32]
	add	x8, x8, x27
	str	x0, [x8, #8]
	mov	x0, x8
	mov	x1, x21
	bl	_list_add_tail
	add	x28, x28, #1
	ldrsw	x8, [x26]
	add	x27, x27, #40
	cmp	x28, x8
	b.lt	LBB0_9
LBB0_14:
	ldr	w1, [x25]
	mov	w0, #0
	bl	_usb_alloc_urb
	str	x0, [x19, #16]
	cbz	x0, LBB0_18
; %bb.15:
Lloh11:
	adrp	x22, _INTBUFSIZE@GOTPAGE
Lloh12:
	ldr	x22, [x22, _INTBUFSIZE@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w1, [x25]
	bl	_kmalloc
	str	w0, [x19, #4]
	cbz	w0, LBB0_18
; %bb.16:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x8, #16]
	str	w8, [x19]
	ldr	x20, [x19, #16]
	ldr	w21, [x19, #8]
	mov	x0, x21
	mov	w1, #3
	bl	_usb_rcvintpipe
	mov	x2, x0
	ldr	w4, [x22]
Lloh13:
	adrp	x8, _intr_callback@GOTPAGE
Lloh14:
	ldr	x8, [x8, _intr_callback@GOTPAGEOFF]
Lloh15:
	ldr	w5, [x8]
	ldp	w7, w3, [x19]
	mov	x0, x20
	mov	x1, x21
	mov	x6, x19
	bl	_usb_fill_int_urb
	mov	w0, #0
	b	LBB0_19
LBB0_17:
	mov	x0, x22
	bl	_kfree
LBB0_18:
	mov	x0, x19
	bl	_free_all_mem
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8152_MAX_RX,4,2             ; @RTL8152_MAX_RX
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_RTL8152_MAX_TX,4,2             ; @RTL8152_MAX_TX
	.comm	_agg_buf_sz,8,3                 ; @agg_buf_sz
	.comm	_TX_ALIGN,8,3                   ; @TX_ALIGN
	.comm	_INTBUFSIZE,4,2                 ; @INTBUFSIZE
	.comm	_intr_callback,4,2              ; @intr_callback
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_alloc_all_mem
.subsections_via_symbols
