	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function l2_ndisuio_set_ether_type
_l2_ndisuio_set_ether_type:             ## @l2_ndisuio_set_ether_type
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_htons
	movl	%eax, -12(%rbp)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_driver_ndis_get_ndisuio_handle
	movq	_IOCTL_NDISUIO_SET_ETHER_TYPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-16(%rbp), %r10
	leaq	-12(%rbp), %rdx
	movl	%eax, %edi
	movl	$4, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	%r10
	callq	_DeviceIoControl
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_wpa_printf
	movl	$-1, %ebx
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOCTL_NDISUIO_SET_ETHER_TYPE,4,2 ## @IOCTL_NDISUIO_SET_ETHER_TYPE
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"L2(NDISUIO): IOCTL_NDISUIO_SET_ETHER_TYPE failed: %d"

	.no_dead_strip	_l2_ndisuio_set_ether_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function l2_ndisuio_set_ether_type
_l2_ndisuio_set_ether_type:             ; @l2_ndisuio_set_ether_type
	.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
	bl	_htons
	str	w0, [sp, #12]
	bl	_driver_ndis_get_ndisuio_handle
Lloh0:
	adrp	x8, _IOCTL_NDISUIO_SET_ETHER_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IOCTL_NDISUIO_SET_ETHER_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	add	x6, sp, #8
	mov	w3, #4
	mov	x4, #0
	mov	w5, #0
	mov	x7, #0
	bl	_DeviceIoControl
	mov	x8, x0
	mov	w0, #0
	cbnz	w8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	bl	_GetLastError
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_wpa_printf
	mov	w0, #-1
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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IOCTL_NDISUIO_SET_ETHER_TYPE,4,2 ; @IOCTL_NDISUIO_SET_ETHER_TYPE
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"L2(NDISUIO): IOCTL_NDISUIO_SET_ETHER_TYPE failed: %d"

	.no_dead_strip	_l2_ndisuio_set_ether_type
.subsections_via_symbols
