	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zd1201_getconfig
_zd1201_getconfig:                      ## @zd1201_getconfig
	.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
	movl	%ecx, %r12d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	$0, 24(%rdi)
	movq	_ZD1201_CMDCODE_ACCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_zd1201_docmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movl	32(%r13), %edi
	movq	24(%r13), %rsi
	callq	_wait_event_interruptible
	cmpl	$0, (%r13)
	je	LBB0_11
## %bb.2:
	movq	8(%r13), %rax
	movl	4(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, %r14d
	movq	8(%r13), %rax
	movl	6(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, %ebx
	movq	8(%r13), %rax
	movl	8(%rax), %edi
	callq	_le16_to_cpu
	movl	(%r13), %ecx
	leal	-6(%rcx), %r8d
	cmpl	%ecx, %eax
	cmovlel	%eax, %r8d
	movq	_ZD1201_ACCESSBIT@GOTPCREL(%rip), %rax
	notl	%r14d
	testl	%r14d, (%rax)
	jne	LBB0_12
## %bb.3:
	cmpl	%r15d, %ebx
	jne	LBB0_12
## %bb.4:
	leal	-4(%r8), %eax
	cmpl	%r12d, %eax
	jne	LBB0_16
## %bb.5:
	movq	$0, 24(%r13)
	movq	_ZD1201_CMDCODE_SETRXRID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_zd1201_docmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.6:
	movl	32(%r13), %edi
	movq	24(%r13), %rsi
	callq	_wait_event_interruptible
	movslq	(%r13), %r14
	testq	%r14, %r14
	je	LBB0_11
## %bb.7:
	movq	8(%r13), %rdx
	movb	-1(%r14,%rdx), %al
	movq	_ZD1201_PACKET_RESOURCE@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	jne	LBB0_17
## %bb.8:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rdx), %eax
	cmpb	$3, %al
	jne	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$64, %r14d
	movl	$64, %eax
	cmovll	%r14d, %eax
	decl	%eax
	cmpl	$64, %r14d
	movl	$64, %ecx
	cmovgel	%ecx, %eax
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	subl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	setb	%r15b
	leaq	4(%rdx,%r15,4), %rsi
	setae	%cl
	leal	-8(%rax,%rcx,4), %ebx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edx
	callq	_memcpy
	movslq	%ebx, %rax
	addq	%rax, %r12
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leal	-64(%r14), %ecx
	xorl	%ebx, %ebx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%r15,4), %rdx
	addq	%rax, %rdx
	addq	$4, %rdx
	cmpl	$64, %r14d
	movl	%ecx, %r14d
	jg	LBB0_9
	jmp	LBB0_15
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	16(%r13), %rdi
	movl	%r15d, (%rsp)
	movzbl	%r12b, %edx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	%r15d, %r9d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_ENODATA@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_17:
	movq	16(%r13), %rdi
	movzbl	%al, %edx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_19
LBB0_18:
	movq	16(%r13), %rdi
	movzbl	%al, %edx
	leaq	L_.str.2(%rip), %rsi
LBB0_19:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ZD1201_CMDCODE_ACCESS,4,2      ## @ZD1201_CMDCODE_ACCESS
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ZD1201_ACCESSBIT,4,2           ## @ZD1201_ACCESSBIT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"riddatalen mismatches, expected=%u, (packet=%u) length=%u, rid=0x%04X, rid_fid=0x%04X\n"

	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_ZD1201_CMDCODE_SETRXRID,4,2    ## @ZD1201_CMDCODE_SETRXRID
	.comm	_ZD1201_PACKET_RESOURCE,1,0     ## @ZD1201_PACKET_RESOURCE
L_.str.1:                               ## @.str.1
	.asciz	"Packet type mismatch: 0x%x not 0x3\n"

L_.str.2:                               ## @.str.2
	.asciz	"Rx Resource packet type error: %02X\n"

	.no_dead_strip	_zd1201_getconfig
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zd1201_getconfig
_zd1201_getconfig:                      ; @zd1201_getconfig
	.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	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	xzr, [x0, #24]
Lloh0:
	adrp	x8, _ZD1201_CMDCODE_ACCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ZD1201_CMDCODE_ACCESS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x21
	mov	w3, #0
	mov	w4, #0
	bl	_zd1201_docmd
	cbnz	w0, LBB0_14
; %bb.1:
	ldr	w0, [x19, #32]
	ldr	x1, [x19, #24]
	bl	_wait_event_interruptible
	ldr	w8, [x19]
	cbz	w8, LBB0_11
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
	bl	_le16_to_cpu
	mov	x23, x0
	ldr	x8, [x19, #8]
	ldur	w0, [x8, #6]
	bl	_le16_to_cpu
	mov	x24, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #8]
	bl	_le16_to_cpu
	ldr	w8, [x19]
	sub	w9, w8, #6
	cmp	w0, w8
	csel	w4, w9, w0, gt
Lloh3:
	adrp	x9, _ZD1201_ACCESSBIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ZD1201_ACCESSBIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	bic	w9, w9, w23
	cmp	w9, #0
	ccmp	w24, w21, #0, eq
	b.eq	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_4:
	sub	w9, w4, #4
	cmp	w9, w22
	b.ne	LBB0_12
; %bb.5:
	str	xzr, [x19, #24]
Lloh8:
	adrp	x8, _ZD1201_CMDCODE_SETRXRID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ZD1201_CMDCODE_SETRXRID@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	mov	w3, #0
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_zd1201_docmd
	cbnz	w0, LBB0_14
; %bb.6:
	ldr	w0, [x19, #32]
	ldr	x1, [x19, #24]
	bl	_wait_event_interruptible
	ldrsw	x23, [x19]
	cbz	w23, LBB0_11
; %bb.7:
	ldr	x8, [x19, #8]
	add	x9, x23, x8
	ldurb	w2, [x9, #-1]
Lloh11:
	adrp	x9, _ZD1201_PACKET_RESOURCE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ZD1201_PACKET_RESOURCE@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w2, w9
	b.ne	LBB0_15
; %bb.8:
	mov	w24, #0
	mov	w25, #64
	mov	w27, #8
	mov	w28, #-4
	mov	w26, #-8
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w2, [x8]
	cmp	w2, #3
	b.ne	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w9, w23, w24
	cmp	w9, #64
	csel	w10, w9, w25, lt
	sub	w10, w10, #1
	cmp	w9, #64
	csel	w9, w10, w25, lt
	cmp	w24, #0
	csel	w10, w26, w28, eq
	mov	w11, #4
	csel	x11, x27, x11, eq
	add	x21, x8, x11
	add	w22, w9, w10
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	mov	w0, #0
	sxtw	x8, w22
	add	x20, x20, x8
	add	x8, x21, x8
	sub	w24, w24, #64
	add	w9, w23, w24
	add	w9, w9, #64
	cmp	w9, #64
	b.gt	LBB0_9
	b	LBB0_14
LBB0_11:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
	ldr	x0, [x19, #16]
	stp	x21, x21, [sp, #16]
	stp	x8, x4, [sp]
	and	w2, w22, #0xff
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh17:
	adrp	x8, _ENODATA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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
LBB0_15:
	ldr	x0, [x19, #16]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_16:
	ldr	x0, [x19, #16]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_17:
	bl	_dev_dbg
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ZD1201_CMDCODE_ACCESS,4,2      ; @ZD1201_CMDCODE_ACCESS
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ZD1201_ACCESSBIT,4,2           ; @ZD1201_ACCESSBIT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"riddatalen mismatches, expected=%u, (packet=%u) length=%u, rid=0x%04X, rid_fid=0x%04X\n"

	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_ZD1201_CMDCODE_SETRXRID,4,2    ; @ZD1201_CMDCODE_SETRXRID
	.comm	_ZD1201_PACKET_RESOURCE,1,0     ; @ZD1201_PACKET_RESOURCE
l_.str.1:                               ; @.str.1
	.asciz	"Packet type mismatch: 0x%x not 0x3\n"

l_.str.2:                               ; @.str.2
	.asciz	"Rx Resource packet type error: %02X\n"

	.no_dead_strip	_zd1201_getconfig
.subsections_via_symbols
