	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gs_can_close
_gs_can_close:                          ## @gs_can_close
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	16(%rax), %r15
	movq	%r14, %rdi
	callq	_netif_stop_queue
	leaq	4(%r15), %rdi
	callq	_atomic_dec_and_test
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_usb_kill_anchored_urbs
LBB0_2:
	leaq	12(%rbx), %rdi
	callq	_usb_kill_anchored_urbs
	movq	%rbx, %rdi
	addq	$8, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	%rbx, %rdi
	callq	_gs_cmd_reset
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_netdev_warn
LBB0_4:
	movq	_GS_MAX_TX_URBS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.5:
	movq	(%rbx), %rdx
	addq	$8, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, (%rdx)
	movl	%ecx, -8(%rdx)
	incq	%rsi
	movslq	(%rax), %rcx
	addq	$16, %rdx
	cmpq	%rcx, %rsi
	jl	LBB0_6
LBB0_7:
	movq	%r14, %rdi
	callq	_close_candev
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't shutdown device (err=%d)"

	.comm	_GS_MAX_TX_URBS,4,2             ## @GS_MAX_TX_URBS
	.no_dead_strip	_gs_can_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gs_can_close
_gs_can_close:                          ; @gs_can_close
	.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
	bl	_netdev_priv
	mov	x20, x0
	ldr	x21, [x0, #16]
	mov	x0, x19
	bl	_netif_stop_queue
	add	x0, x21, #4
	bl	_atomic_dec_and_test
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_usb_kill_anchored_urbs
LBB0_2:
	add	x0, x20, #12
	bl	_usb_kill_anchored_urbs
	add	x0, x20, #8
	mov	w1, #0
	bl	_atomic_set
	mov	x0, x20
	bl	_gs_cmd_reset
	tbz	w0, #31, LBB0_4
; %bb.3:
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_warn
LBB0_4:
Lloh2:
	adrp	x8, _GS_MAX_TX_URBS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GS_MAX_TX_URBS@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x10, #0
	ldr	x11, [x20]
	add	x11, x11, #8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	str	x20, [x11]
	stur	w9, [x11, #-8]
	add	x10, x10, #1
	ldrsw	x9, [x8]
	add	x11, x11, #16
	cmp	x10, x9
	b.lt	LBB0_6
LBB0_7:
	mov	x0, x19
	bl	_close_candev
	mov	w0, #0
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't shutdown device (err=%d)"

	.comm	_GS_MAX_TX_URBS,4,2             ; @GS_MAX_TX_URBS
	.no_dead_strip	_gs_can_close
.subsections_via_symbols
