	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_change_rx_buffers
_ql_change_rx_buffers:                  ## @ql_change_rx_buffers
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_QL_ADAPTER_UP@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	16(%r15), %r14
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movq	_ifup@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	8(%r15), %rdx
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	callq	_netif_err
	movl	$1, %edi
	callq	_ssleep
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_3
LBB0_5:
	movq	%r15, %rdi
	callq	_ql_adapter_down
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.6:
	movq	8(%r15), %rax
	cmpl	$1501, (%rax)                   ## imm = 0x5DD
	jl	LBB0_7
## %bb.8:
	movq	_LARGE_BUFFER_MAX_SIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_LARGE_BUFFER_MIN_SIZE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_get_order
	movl	%eax, 32(%r15)
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.10:
	movq	24(%r15), %rcx
	cmpl	$8, %eax
	jae	LBB0_12
## %bb.11:
	xorl	%edx, %edx
	jmp	LBB0_20
LBB0_12:
	movl	%eax, %edx
	andl	$-8, %edx
	movd	%ebx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%rdx), %rsi
	movq	%rsi, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r8d
	andl	$7, %r8d
	cmpq	$56, %rsi
	jae	LBB0_14
## %bb.13:
	xorl	%esi, %esi
	jmp	LBB0_16
LBB0_14:
	andq	$-8, %rdi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, (%rcx,%rsi,4)
	movdqu	%xmm0, 16(%rcx,%rsi,4)
	movdqu	%xmm0, 32(%rcx,%rsi,4)
	movdqu	%xmm0, 48(%rcx,%rsi,4)
	movdqu	%xmm0, 64(%rcx,%rsi,4)
	movdqu	%xmm0, 80(%rcx,%rsi,4)
	movdqu	%xmm0, 96(%rcx,%rsi,4)
	movdqu	%xmm0, 112(%rcx,%rsi,4)
	movdqu	%xmm0, 128(%rcx,%rsi,4)
	movdqu	%xmm0, 144(%rcx,%rsi,4)
	movdqu	%xmm0, 160(%rcx,%rsi,4)
	movdqu	%xmm0, 176(%rcx,%rsi,4)
	movdqu	%xmm0, 192(%rcx,%rsi,4)
	movdqu	%xmm0, 208(%rcx,%rsi,4)
	movdqu	%xmm0, 224(%rcx,%rsi,4)
	movdqu	%xmm0, 240(%rcx,%rsi,4)
	addq	$64, %rsi
	addq	$-8, %rdi
	jne	LBB0_15
LBB0_16:
	testq	%r8, %r8
	je	LBB0_19
## %bb.17:
	leaq	(%rcx,%rsi,4), %rsi
	addq	$16, %rsi
	shlq	$5, %r8
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, -16(%rsi,%rdi)
	movdqu	%xmm0, (%rsi,%rdi)
	addq	$32, %rdi
	cmpq	%rdi, %r8
	jne	LBB0_18
LBB0_19:
	cmpq	%rax, %rdx
	je	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, (%rcx,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_20
LBB0_21:
	movq	%r15, %rdi
	callq	_ql_adapter_up
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_22
LBB0_23:
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r15), %rdx
	leaq	L_.str.2(%rip), %rcx
	movq	%r15, %rdi
	callq	_netif_alert
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movq	8(%r15), %rdi
	callq	_dev_close
LBB0_24:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_3:
	movl	(%rbx), %esi
	movq	8(%r15), %rdx
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	callq	_netif_err
	movl	$1, %edi
	callq	_ssleep
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_test_bit
	movl	(%rbx), %esi
	movq	8(%r15), %rdx
	testl	%eax, %eax
	je	LBB0_4
## %bb.25:
	leaq	L_.str.1(%rip), %rcx
	movq	%r15, %rdi
	callq	_netif_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_4:
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	callq	_netif_err
	movl	$1, %edi
	callq	_ssleep
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_QL_ADAPTER_UP,4,2              ## @QL_ADAPTER_UP
	.comm	_ifup,4,2                       ## @ifup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Waiting for adapter UP...\n"

L_.str.1:                               ## @.str.1
	.asciz	"Timed out waiting for adapter UP\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_LARGE_BUFFER_MAX_SIZE,4,2      ## @LARGE_BUFFER_MAX_SIZE
	.comm	_LARGE_BUFFER_MIN_SIZE,4,2      ## @LARGE_BUFFER_MIN_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Driver up/down cycle failed, closing device.\n"

	.no_dead_strip	_ql_change_rx_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_change_rx_buffers
_ql_change_rx_buffers:                  ; @ql_change_rx_buffers
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _QL_ADAPTER_UP@GOTPAGE
Lloh1:
	ldr	x22, [x22, _QL_ADAPTER_UP@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x20, x19, #16
	mov	x1, x20
	bl	_test_bit
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w0, [x22]
	mov	x1, x20
	bl	_test_bit
	cbnz	w0, LBB0_3
; %bb.2:
Lloh2:
	adrp	x21, _ifup@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ifup@GOTPAGEOFF]
	ldr	w1, [x21]
	ldr	x2, [x19, #8]
Lloh4:
	adrp	x3, l_.str@PAGE
Lloh5:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	mov	w0, #1
	bl	_ssleep
	ldr	w0, [x22]
	mov	x1, x20
	bl	_test_bit
	cbz	w0, LBB0_15
LBB0_3:
	mov	x0, x19
	bl	_ql_adapter_down
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.4:
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _LARGE_BUFFER_MAX_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LARGE_BUFFER_MAX_SIZE@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh8:
	adrp	x10, _LARGE_BUFFER_MIN_SIZE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _LARGE_BUFFER_MIN_SIZE@GOTPAGEOFF]
	cmp	w8, #1500
	csel	x8, x9, x10, gt
	ldr	w21, [x8]
	mov	x0, x21
	bl	_get_order
	str	w0, [x19, #32]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.5:
	ldr	x9, [x19, #24]
	cmp	w8, #16
	b.hs	LBB0_7
; %bb.6:
	mov	x10, #0
	b	LBB0_10
LBB0_7:
	and	x10, x8, #0xfffffff0
	dup.4s	v0, w21
	add	x11, x9, #32
	mov	x12, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11], #64
	subs	x12, x12, #16
	b.ne	LBB0_8
; %bb.9:
	cmp	x10, x8
	b.eq	LBB0_12
LBB0_10:
	add	x9, x9, x10, lsl #2
	sub	x8, x8, x10
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	str	w21, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_11
LBB0_12:
	mov	x0, x19
	bl	_ql_adapter_up
	mov	x21, x0
	cbz	w0, LBB0_14
LBB0_13:
Lloh10:
	adrp	x8, _ifup@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
Lloh13:
	adrp	x3, l_.str.2@PAGE
Lloh14:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netif_alert
	ldr	w0, [x22]
	mov	x1, x20
	bl	_set_bit
	ldr	x0, [x19, #8]
	bl	_dev_close
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_15:
	ldr	w1, [x21]
	ldr	x2, [x19, #8]
Lloh15:
	adrp	x3, l_.str@PAGE
Lloh16:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	mov	w0, #1
	bl	_ssleep
	ldr	w0, [x22]
	mov	x1, x20
	bl	_test_bit
	ldr	w1, [x21]
	ldr	x2, [x19, #8]
	cbz	w0, LBB0_17
; %bb.16:
Lloh17:
	adrp	x3, l_.str.1@PAGE
Lloh18:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh19:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_17:
Lloh22:
	adrp	x3, l_.str@PAGE
Lloh23:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	mov	w0, #1
	bl	_ssleep
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_QL_ADAPTER_UP,4,2              ; @QL_ADAPTER_UP
	.comm	_ifup,4,2                       ; @ifup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Waiting for adapter UP...\n"

l_.str.1:                               ; @.str.1
	.asciz	"Timed out waiting for adapter UP\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_LARGE_BUFFER_MAX_SIZE,4,2      ; @LARGE_BUFFER_MAX_SIZE
	.comm	_LARGE_BUFFER_MIN_SIZE,4,2      ; @LARGE_BUFFER_MIN_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Driver up/down cycle failed, closing device.\n"

	.no_dead_strip	_ql_change_rx_buffers
.subsections_via_symbols
