	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3fwrn5_i2c_read
_s3fwrn5_i2c_read:                      ## @s3fwrn5_i2c_read
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_S3FWRN5_MODE_NCI@GOTPCREL(%rip), %rax
	movl	(%rdi), %ecx
	movl	8(%rdi), %edi
	cmpl	(%rax), %ecx
	jne	LBB0_1
## %bb.2:
	movq	_NCI_CTRL_HDR_SIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_S3FWRN5_FW_HDR_SIZE@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rbx
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_i2c_master_recv
	testl	%eax, %eax
	js	LBB0_13
## %bb.4:
	movl	%eax, %eax
	cmpq	%rax, %rbx
	jbe	LBB0_7
LBB0_5:
	movq	_EBADMSG@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_7:
	movq	-40(%rbp), %r15
	leaq	(%r15,%rbx), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_alloc_skb
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r14
	leaq	-40(%rbp), %rsi
	movq	%rax, %rdi
	movq	%rbx, %rdx
	callq	_skb_put_data
	testq	%r15, %r15
	je	LBB0_12
## %bb.10:
	movl	8(%r12), %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_skb_put
	movl	%ebx, %edi
	movq	%rax, %rsi
	movq	%r15, %rdx
	callq	_i2c_master_recv
	cltq
	cmpq	%rax, %r15
	jne	LBB0_11
LBB0_12:
	movl	(%r12), %edx
	movl	4(%r12), %edi
	movq	%r14, %rsi
	callq	_s3fwrn5_recv_frame
	jmp	LBB0_13
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree_skb
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_S3FWRN5_MODE_NCI,4,2           ## @S3FWRN5_MODE_NCI
	.comm	_NCI_CTRL_HDR_SIZE,8,3          ## @NCI_CTRL_HDR_SIZE
	.comm	_S3FWRN5_FW_HDR_SIZE,8,3        ## @S3FWRN5_FW_HDR_SIZE
	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_s3fwrn5_i2c_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3fwrn5_i2c_read
_s3fwrn5_i2c_read:                      ; @s3fwrn5_i2c_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _S3FWRN5_MODE_NCI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S3FWRN5_MODE_NCI@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _NCI_CTRL_HDR_SIZE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NCI_CTRL_HDR_SIZE@GOTPAGEOFF]
Lloh5:
	adrp	x11, _S3FWRN5_FW_HDR_SIZE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _S3FWRN5_FW_HDR_SIZE@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x10, x11, eq
	ldr	x22, [x8]
	ldr	w0, [x0, #8]
	add	x1, sp, #8
	mov	x2, x22
	bl	_i2c_master_recv
	tbnz	w0, #31, LBB0_9
; %bb.1:
	cmp	x22, w0, uxtw
	b.ls	LBB0_3
LBB0_2:
Lloh7:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
	ldr	x21, [sp, #8]
	add	x0, x21, x22
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_alloc_skb
	cbz	x0, LBB0_7
; %bb.4:
	mov	x20, x0
	add	x1, sp, #8
	mov	x2, x22
	bl	_skb_put_data
	cbz	x21, LBB0_6
; %bb.5:
	ldr	w22, [x19, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_skb_put
	mov	x1, x0
	mov	x0, x22
	mov	x2, x21
	bl	_i2c_master_recv
	cmp	x21, w0, sxtw
	b.ne	LBB0_10
LBB0_6:
	ldp	w2, w0, [x19]
	mov	x1, x20
	bl	_s3fwrn5_recv_frame
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	mov	x0, x20
	bl	_kfree_skb
	b	LBB0_2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_S3FWRN5_MODE_NCI,4,2           ; @S3FWRN5_MODE_NCI
	.comm	_NCI_CTRL_HDR_SIZE,8,3          ; @NCI_CTRL_HDR_SIZE
	.comm	_S3FWRN5_FW_HDR_SIZE,8,3        ; @S3FWRN5_FW_HDR_SIZE
	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_s3fwrn5_i2c_read
.subsections_via_symbols
