	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function typhoon_process_response
_typhoon_process_response:              ## @typhoon_process_response
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, -84(%rbp)                 ## 4-byte Spill
	movq	8(%rdi), %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r14
	movl	(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, %r13
	movq	%rax, -64(%rbp)
	movl	4(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %r13
	je	LBB0_19
## %bb.1:
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	movq	_RESPONSE_RING_SIZE@GOTPCREL(%rip), %rdx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_typhoon_media_status
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	-64(%rbp), %rdi
	movl	%r14d, %esi
	callq	_typhoon_inc_resp_index
	movq	-64(%rbp), %r13
	cmpq	-96(%rbp), %r13                 ## 8-byte Folded Reload
	movq	_RESPONSE_RING_SIZE@GOTPCREL(%rip), %rdx
	je	LBB0_18
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(,%r13,2), %r12
	addq	%r13, %r12
	shlq	$4, %r12
	leaq	(%rbx,%r12), %r15
	movl	(%rbx,%r12), %eax
	leal	1(%rax), %r14d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 40(%rbx,%r12)
	je	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	-84(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %eax
	shll	$4, %eax
	leal	(%rax,%rax,2), %r12d
	movslq	%r12d, %rax
	addq	%rax, %r13
	xorl	%edi, %edi
	cmpq	(%rdx), %r13
	setg	%dil
	movq	%rdx, %r13
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-64(%rbp), %eax
	addl	%eax, %r12d
	movq	%r13, %rcx
	movl	%r12d, %r13d
	movl	(%rcx), %r12d
	subl	%r12d, %r13d
	subl	%eax, %r12d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx,%r12), %rdi
	movq	_TYPHOON_CMD_READ_MEDIA_STATUS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_TYPHOON_CMD_HELLO_RESP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_typhoon_hello
	jmp	LBB0_17
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_TYPHOON_RESP_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rcx)
	jmp	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	callq	_le16_to_cpu
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	(%r15), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	32(%rbx,%r12), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	16(%rbx,%r12), %rdi
	callq	_le16_to_cpu
	movl	%eax, %r15d
	movl	28(%rbx,%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, %r13
	movl	24(%rbx,%r12), %edi
	callq	_le32_to_cpu
	movl	-80(%rbp), %edi                 ## 4-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	movl	-68(%rbp), %r8d                 ## 4-byte Reload
	movl	%r15d, %r9d
	pushq	%rax
	pushq	%r13
	callq	_netdev_err
	addq	$16, %rsp
	jmp	LBB0_17
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%rdi, %r15
	movl	%r12d, %edx
	callq	_memcpy
	movl	%r13d, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r12d, %rax
	movabsq	$-6148914691236517205, %rcx     ## imm = 0xAAAAAAAAAAAAAAAB
	mulq	%rcx
	shrq	$5, %rdx
	leaq	(%rdx,%rdx,2), %rax
	shlq	$4, %rax
	addq	%rax, %r15
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_memcpy
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_17
LBB0_18:
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	movq	-104(%rbp), %r14                ## 8-byte Reload
LBB0_19:
	movq	%r13, %rdi
	callq	_cpu_to_le32
	movl	%eax, (%r14)
	xorl	%eax, %eax
	callq	_wmb
	xorl	%eax, %eax
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	sete	%al
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TYPHOON_RESP_ERROR,4,2         ## @TYPHOON_RESP_ERROR
	.comm	_RESPONSE_RING_SIZE,8,3         ## @RESPONSE_RING_SIZE
	.comm	_TYPHOON_CMD_READ_MEDIA_STATUS,8,3 ## @TYPHOON_CMD_READ_MEDIA_STATUS
	.comm	_TYPHOON_CMD_HELLO_RESP,8,3     ## @TYPHOON_CMD_HELLO_RESP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dumping unexpected response 0x%04x:%d:0x%02x:0x%04x:%08x:%08x\n"

	.no_dead_strip	_typhoon_process_response
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function typhoon_process_response
_typhoon_process_response:              ; @typhoon_process_response
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	str	w1, [sp, #20]                   ; 4-byte Folded Spill
	mov	x23, x0
	ldp	x22, x20, [x0, #8]
	ldr	w0, [x20]
	bl	_le32_to_cpu
	mov	x26, x0
	str	x0, [sp, #24]
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	cmp	x26, x0
	b.eq	LBB0_19
; %bb.1:
	mov	x24, x0
	str	x20, [sp]                       ; 8-byte Folded Spill
	mov	w20, #48
Lloh0:
	adrp	x28, _RESPONSE_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _RESPONSE_RING_SIZE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
	mov	x1, x27
	bl	_typhoon_media_status
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #24
	mov	x1, x25
	bl	_typhoon_inc_resp_index
	ldr	x26, [sp, #24]
	cmp	x26, x24
	b.eq	LBB0_18
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	madd	x27, x26, x20, x22
	ldr	w8, [x27]
	add	w25, w8, #1
	cbz	x19, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	madd	x9, x26, x20, x22
	ldr	x9, [x9, #40]
	cbz	x9, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w8, w9
	b.ge	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w25, w25, lsl #1
	mov	x21, x28
	lsl	w28, w8, #4
	sxtw	x20, w28
	ldr	x8, [x21]
	add	x9, x26, x20
	cmp	x9, x8
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #24]
	ldr	w9, [x21]
	add	w10, w8, w20
	sub	w26, w10, w9
	sub	w28, w9, w8
	b	LBB0_15
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x26, x20, x22
	ldr	x0, [x8, #8]
Lloh2:
	adrp	x8, _TYPHOON_CMD_READ_MEDIA_STATUS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TYPHOON_CMD_READ_MEDIA_STATUS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh5:
	adrp	x8, _TYPHOON_CMD_HELLO_RESP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TYPHOON_CMD_HELLO_RESP@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_typhoon_hello
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh8:
	adrp	x8, _TYPHOON_RESP_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TYPHOON_RESP_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	b	LBB0_3
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x23]
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
	bl	_le16_to_cpu
	ldr	w8, [x27]
	stp	w8, w0, [sp, #8]                ; 8-byte Folded Spill
	madd	x28, x26, x20, x22
	ldr	w26, [x28, #32]
	ldr	x0, [x28, #16]
	bl	_le16_to_cpu
	mov	x20, x0
	ldr	w0, [x28, #28]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	w0, [x28, #24]
Lloh11:
	adrp	x28, _RESPONSE_RING_SIZE@GOTPAGE
Lloh12:
	ldr	x28, [x28, _RESPONSE_RING_SIZE@GOTPAGEOFF]
	bl	_le32_to_cpu
	mov	x7, x0
	ldp	w2, w0, [sp, #12]               ; 8-byte Folded Reload
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	ldr	w3, [sp, #8]                    ; 4-byte Folded Reload
	mov	x4, x26
	mov	x5, x20
	mov	w20, #48
	mov	x6, x21
	bl	_netdev_err
	b	LBB0_3
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #0
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w20, #48
	mov	x0, x19
	mov	x1, x27
	mov	x2, x28
	bl	_memcpy
	mov	x0, x26
	bl	_unlikely
	cbz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
                                        ; kill: def $w28 killed $w28 killed $x28 def $x28
	sxtw	x8, w28
	mov	x9, #-6148914691236517206
	movk	x9, #43691
	umulh	x8, x8, x9
	lsr	x8, x8, #5
	madd	x0, x8, x20, x19
	mov	x1, x22
	mov	x2, x26
	bl	_memcpy
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x19, #0
Lloh15:
	adrp	x28, _RESPONSE_RING_SIZE@GOTPAGE
Lloh16:
	ldr	x28, [x28, _RESPONSE_RING_SIZE@GOTPAGEOFF]
	b	LBB0_3
LBB0_18:
	mov	x26, x24
	ldr	x20, [sp]                       ; 8-byte Folded Reload
LBB0_19:
	mov	x0, x26
	bl	_cpu_to_le32
	str	w0, [x20]
	bl	_wmb
	cmp	x19, #0
	cset	w0, eq
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TYPHOON_RESP_ERROR,4,2         ; @TYPHOON_RESP_ERROR
	.comm	_RESPONSE_RING_SIZE,8,3         ; @RESPONSE_RING_SIZE
	.comm	_TYPHOON_CMD_READ_MEDIA_STATUS,8,3 ; @TYPHOON_CMD_READ_MEDIA_STATUS
	.comm	_TYPHOON_CMD_HELLO_RESP,8,3     ; @TYPHOON_CMD_HELLO_RESP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dumping unexpected response 0x%04x:%d:0x%02x:0x%04x:%08x:%08x\n"

	.no_dead_strip	_typhoon_process_response
.subsections_via_symbols
