	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function transmit_802_3_packet
_transmit_802_3_packet:                 ## @transmit_802_3_packet
	.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	%rdx, %r15
	movq	%rdi, %r12
	movl	%esi, %edx
	sarl	$16, %edx
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	movl	%edx, %ebx
	subl	%eax, %ebx
	jle	LBB0_1
## %bb.2:
	movl	%esi, %r14d
	movq	_FLAG_MIC_CAPABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r12), %rsi
	callq	_test_bit
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	cmpq	$0, (%r12)
	je	LBB0_3
## %bb.5:
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	24(%r15), %edi
	callq	_ntohs
	cmpl	$34958, %eax                    ## imm = 0x888E
	je	LBB0_8
## %bb.6:
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ebx, %ecx
	callq	_encapsulate
	movq	_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.7:
	movl	$4, %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_8
LBB0_1:
	movq	16(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_airo_print_warn
	jmp	LBB0_13
LBB0_3:
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_8:
	movq	_BAP1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$54, %edx
	callq	_bap_setup
	movq	_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.9:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	leal	(%rbx,%r13), %edi
	callq	_cpu_to_le16
	movl	%eax, -56(%rbp)
	movq	_BAP1@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_bap_write
	movl	(%r13), %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_bap_write
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_11
## %bb.10:
	movl	(%r13), %ecx
	leaq	-52(%rbp), %rsi
	movq	%r12, %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_bap_write
LBB0_11:
	addq	$4, %r15
	movl	(%r13), %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_bap_write
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_CMD_TRANSMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movl	%r14d, -64(%rbp)
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_issuecommand
	movq	_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	cmpb	$0, -47(%rbp)
	je	LBB0_14
LBB0_13:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Short packet %d"

	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_FLAG_MIC_CAPABLE,4,2           ## @FLAG_MIC_CAPABLE
	.comm	_SUCCESS,8,3                    ## @SUCCESS
	.comm	_BAP1,4,2                       ## @BAP1
	.comm	_CMD_TRANSMIT,4,2               ## @CMD_TRANSMIT
	.no_dead_strip	_transmit_802_3_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function transmit_802_3_packet
_transmit_802_3_packet:                 ; @transmit_802_3_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x2
	mov	x19, x0
	asr	w2, w1, #16
Lloh0:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w8, w8, #1
	subs	w22, w2, w8
	b.le	LBB0_10
; %bb.1:
	mov	x20, x1
Lloh3:
	adrp	x8, _FLAG_MIC_CAPABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FLAG_MIC_CAPABLE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_test_bit
Lloh6:
	adrp	x24, _SUCCESS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SUCCESS@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x21, #24]
	bl	_ntohs
	mov	w8, #34958
	cmp	w0, w8
	b.ne	LBB0_13
LBB0_4:
	mov	w23, #0
	mov	w25, #1
LBB0_5:
Lloh8:
	adrp	x26, _BAP1@GOTPAGE
Lloh9:
	ldr	x26, [x26, _BAP1@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #54
	bl	_bap_setup
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.6:
	add	w0, w23, w22
	bl	_cpu_to_le16
	str	w0, [sp, #28]
	ldr	w3, [x26]
	add	x1, sp, #28
	mov	x0, x19
	mov	w2, #4
	bl	_bap_write
	ldr	w3, [x26]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #4
	bl	_bap_write
	tbnz	w25, #0, LBB0_8
; %bb.7:
	ldr	w3, [x26]
	add	x1, sp, #4
	mov	x0, x19
	mov	x2, x23
	bl	_bap_write
LBB0_8:
	add	x1, x21, #4
	ldr	w3, [x26]
	mov	x0, x19
	mov	x2, x22
	bl	_bap_write
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh10:
	adrp	x8, _CMD_TRANSMIT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CMD_TRANSMIT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	stp	w20, w8, [sp, #16]
	add	x1, sp, #16
	add	x2, sp, #8
	mov	x0, x19
	bl	_issuecommand
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.9:
	ldrb	w8, [sp, #9]
	cbnz	w8, LBB0_11
	b	LBB0_12
LBB0_10:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_airo_print_warn
LBB0_11:
Lloh15:
	adrp	x8, _ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_12:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	add	sp, sp, #112
	ret
LBB0_13:
	add	x2, sp, #4
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	bl	_encapsulate
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.14:
	mov	w25, #0
	mov	w23, #4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Short packet %d"

	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_FLAG_MIC_CAPABLE,4,2           ; @FLAG_MIC_CAPABLE
	.comm	_SUCCESS,8,3                    ; @SUCCESS
	.comm	_BAP1,4,2                       ; @BAP1
	.comm	_CMD_TRANSMIT,4,2               ; @CMD_TRANSMIT
	.no_dead_strip	_transmit_802_3_packet
.subsections_via_symbols
