	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lynx_transmit
_lynx_transmit:                         ## @lynx_transmit
	.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
	movl	(%rsi), %ecx
	cmpl	$4096, %ecx                     ## imm = 0x1000
	jl	LBB0_3
## %bb.1:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdx
	callq	_PRINT
	movq	_EOVERFLOW@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	%rsi, %rbx
	movl	4(%rsi), %ecx
	movl	%ecx, %eax
	orl	$2, %eax
	cmpl	$130, %eax
	jne	LBB0_11
## %bb.4:
	movq	8(%rbx), %rax
	movq	_TCODE_WRITEQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	_TCODE_READQ_RESPONSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
LBB0_6:
	movq	24(%rbx), %rdi
	addq	$12, %rdi
	callq	_cpu_to_be32s
LBB0_7:
	leaq	16(%r14), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	leaq	16(%rbx), %rdi
	leaq	24(%r14), %rsi
	callq	_list_add_tail
	leaq	20(%r14), %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	callq	_send_next
LBB0_9:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_11:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdx
	callq	_PRINT
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"transmit packet data too big (%Zd)"

	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
L_.str.1:                               ## @.str.1
	.asciz	"invalid packet type %d"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TCODE_WRITEQ,8,3               ## @TCODE_WRITEQ
	.comm	_TCODE_READQ_RESPONSE,8,3       ## @TCODE_READQ_RESPONSE
	.no_dead_strip	_lynx_transmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lynx_transmit
_lynx_transmit:                         ; @lynx_transmit
	.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
	ldr	x19, [x0]
	ldr	w3, [x1]
	cmp	w3, #1, lsl #12                 ; =4096
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_PRINT
Lloh5:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	mov	x20, x1
	ldr	w3, [x1, #4]
	orr	w8, w3, #0x2
	cmp	w8, #130
	b.ne	LBB0_8
; %bb.3:
	ldr	x8, [x20, #8]
Lloh7:
	adrp	x9, _TCODE_WRITEQ@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TCODE_WRITEQ@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	adrp	x10, _TCODE_READQ_RESPONSE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _TCODE_READQ_RESPONSE@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x20, #24]
	add	x0, x8, #12
	bl	_cpu_to_be32s
LBB0_5:
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	add	x0, x20, #16
	add	x1, x19, #24
	bl	_list_add_tail
	add	x0, x19, #20
	bl	_list_empty
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_send_next
LBB0_7:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_10
LBB0_8:
Lloh13:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	w1, [x19]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_PRINT
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"transmit packet data too big (%Zd)"

	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
l_.str.1:                               ; @.str.1
	.asciz	"invalid packet type %d"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TCODE_WRITEQ,8,3               ; @TCODE_WRITEQ
	.comm	_TCODE_READQ_RESPONSE,8,3       ; @TCODE_READQ_RESPONSE
	.no_dead_strip	_lynx_transmit
.subsections_via_symbols
