	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kaweth_async_set_rx_mode
_kaweth_async_set_rx_mode:              ## @kaweth_async_set_rx_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %r14
	movq	$0, (%rdi)
	testq	%r14, %r14
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_in_interrupt
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movl	28(%rbx), %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rdx
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_KAWETH_COMMAND_SET_PACKET_FILTER@GOTPCREL(%rip), %rdx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movl	(%rdx), %edx
	leaq	24(%rbx), %r10
	movq	_KAWETH_CONTROL_TIMEOUT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r11d
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r14, %r8
	xorl	%r9d, %r9d
	pushq	%r11
	pushq	$0
	pushq	%r10
	callq	_kaweth_control
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_netdev_dbg                     ## TAILCALL
LBB0_5:
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_KAWETH_COMMAND_SET_PACKET_FILTER,4,2 ## @KAWETH_COMMAND_SET_PACKET_FILTER
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.comm	_KAWETH_CONTROL_TIMEOUT,4,2     ## @KAWETH_CONTROL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set Rx mode: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Set Rx mode to %d\n"

	.no_dead_strip	_kaweth_async_set_rx_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kaweth_async_set_rx_mode
_kaweth_async_set_rx_mode:              ; @kaweth_async_set_rx_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x19, [x0]
	str	xzr, [x0]
	cbz	x19, LBB0_2
; %bb.1:
	mov	x20, x0
	bl	_in_interrupt
	cbz	x0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_3:
	ldr	w0, [x20, #28]
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh0:
	adrp	x8, _KAWETH_COMMAND_SET_PACKET_FILTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KAWETH_COMMAND_SET_PACKET_FILTER@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _USB_DIR_OUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _USB_DIR_OUT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w8, w9
	add	x6, x20, #24
Lloh12:
	adrp	x8, _KAWETH_CONTROL_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _KAWETH_CONTROL_TIMEOUT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x20
	mov	x4, x19
	mov	w5, #0
	mov	w7, #0
	bl	_kaweth_control
	tbnz	w0, #31, LBB0_5
; %bb.4:
	ldr	w0, [x20, #8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_netdev_dbg
LBB0_5:
	mov	x2, x0
	ldr	x0, [x20, #16]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_dev_err
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_KAWETH_COMMAND_SET_PACKET_FILTER,4,2 ; @KAWETH_COMMAND_SET_PACKET_FILTER
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.comm	_KAWETH_CONTROL_TIMEOUT,4,2     ; @KAWETH_CONTROL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set Rx mode: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Set Rx mode to %d\n"

	.no_dead_strip	_kaweth_async_set_rx_mode
.subsections_via_symbols
