	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zd1201_setconfig
_zd1201_setconfig:                      ## @zd1201_setconfig
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	testl	%r8d, %r8d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -68(%rbp)                 ## 4-byte Spill
	jne	LBB0_1
## %bb.2:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
	cmpl	$-3, %ebx
	jl	LBB0_16
## %bb.4:
	addl	$4, %ebx
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$16, %edi
	movl	%r13d, %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r12
	xorl	%edi, %edi
	movl	%r13d, %esi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r13
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	cmpl	$12, %ebx
	movl	$12, %r15d
	cmovll	%ebx, %r15d
	movq	_ZD1201_USB_RESREQ@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	movb	%al, (%r12)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movb	%al, 1(%r12)
	movw	$0, 2(%r12)
	testb	%al, %al
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	addq	$4, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcpy
	movl	%r15d, %eax
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	leal	-1(%rbx), %edi
	shrl	%edi
	callq	_cpu_to_le16
	movl	%eax, 4(%r12)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le16
	movl	%eax, 6(%r12)
	movq	%r12, %rdi
	addq	$8, %rdi
	leal	-4(%r15), %edx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	callq	_memcpy
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %rbx
	movl	36(%r14), %esi
	movq	%rbx, %rdi
	callq	_usb_sndbulkpipe
	movq	_zd1201_usbfree@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	%r14, %r15
	movq	%r14, (%rsp)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	movq	%r12, %rcx
	movl	$16, %r8d
	callq	_usb_fill_bulk_urb
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	%r12, %rbx
	movl	%esi, %r12d
	callq	_usb_submit_urb
	testl	%eax, %eax
	jne	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movslq	-56(%rbp), %rax                 ## 4-byte Folded Reload
	addq	%rax, -64(%rbp)                 ## 8-byte Folded Spill
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	incb	%al
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	subl	-80(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	%r15, %r14
	movl	%r12d, %r13d
	jg	LBB0_5
LBB0_16:
	movl	$16, %edi
	movl	%r13d, %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.17:
	movq	%rax, %rbx
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	movl	%r13d, %esi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_18
## %bb.19:
	movl	%r13d, %r12d
	movq	%rax, %r13
	movq	_ZD1201_USB_CMDREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, (%rbx)
	movq	_ZD1201_CMDCODE_ACCESS@GOTPCREL(%rip), %rax
	movq	_ZD1201_ACCESSBIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_cpu_to_le16
	movl	%eax, 4(%rbx)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le16
	movl	%eax, 6(%rbx)
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_cpu_to_le16
	movl	%eax, 8(%rbx)
	xorl	%edi, %edi
	callq	_cpu_to_le16
	movl	%eax, 10(%rbx)
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movq	(%r14), %r12
	movl	36(%r14), %esi
	movq	%r12, %rdi
	callq	_usb_sndbulkpipe
	movq	_zd1201_usbfree@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	%r14, (%rsp)
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	movq	%rbx, %rcx
	movl	$16, %r8d
	callq	_usb_fill_bulk_urb
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_usb_submit_urb
	movq	%r14, %rcx
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.20:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_24
## %bb.21:
	movq	%rcx, %rbx
	movl	32(%rcx), %edi
	movq	24(%rcx), %rsi
	callq	_wait_event_interruptible
	cmpq	$0, 16(%rbx)
	je	LBB0_23
## %bb.22:
	movq	8(%rbx), %rax
	movl	24(%rax), %edi
	callq	_le16_to_cpu
	cmpl	%r13d, %eax
	je	LBB0_24
LBB0_23:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	jmp	LBB0_24
LBB0_18:
	movq	%rbx, %rdi
	callq	_kfree
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_24
LBB0_8:
	movq	%r12, %rdi
	callq	_kfree
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_24
LBB0_13:
	movl	%eax, %r14d
LBB0_14:
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r13, %rdi
	callq	_usb_free_urb
	movl	%r14d, %r15d
LBB0_24:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOIO,4,2                   ## @GFP_NOIO
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ZD1201_USB_RESREQ,1,0          ## @ZD1201_USB_RESREQ
	.comm	_zd1201_usbfree,4,2             ## @zd1201_usbfree
	.comm	_ZD1201_USB_CMDREQ,4,2          ## @ZD1201_USB_CMDREQ
	.comm	_ZD1201_CMDCODE_ACCESS,4,2      ## @ZD1201_CMDCODE_ACCESS
	.comm	_ZD1201_ACCESSBIT,4,2           ## @ZD1201_ACCESSBIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrong or no RID received\n"

	.no_dead_strip	_zd1201_setconfig
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zd1201_setconfig
_zd1201_setconfig:                      ; @zd1201_setconfig
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	stp	w4, w1, [sp, #8]                ; 8-byte Folded Spill
	mov	x19, x0
	cmp	w4, #0
Lloh0:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh2:
	adrp	x9, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GFP_ATOMIC@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w22, [x8]
	stp	xzr, xzr, [x0, #16]
	cmn	w3, #3
	b.lt	LBB0_9
; %bb.1:
	mov	x25, x2
	mov	w21, #0
	add	w20, w3, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #16
	mov	x1, x22
	bl	_kmalloc
	cbz	x0, LBB0_18
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	mov	w0, #0
	mov	x1, x22
	bl	_usb_alloc_urb
	cbz	x0, LBB0_17
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x0
	mov	x0, x23
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh4:
	adrp	x8, _ZD1201_USB_RESREQ@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ZD1201_USB_RESREQ@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w20, #12
	mov	w9, #12
	csel	w26, w20, w9, lt
	strb	w8, [x23]
	strb	w21, [x23, #1]
	strh	wzr, [x23, #2]
	tst	w21, #0xff
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x23, #4
	mov	x1, x25
	mov	x2, x26
	bl	_memcpy
	mov	x28, x26
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	sub	w8, w20, #1
	lsr	w0, w8, #1
	bl	_cpu_to_le16
	str	w0, [x23, #4]
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	bl	_cpu_to_le16
	stur	w0, [x23, #6]
	add	x0, x23, #8
	sub	w28, w26, #4
	mov	x1, x25
	mov	x2, x28
	bl	_memcpy
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x27, [x19]
	ldr	w1, [x19, #36]
	mov	x0, x27
	bl	_usb_sndbulkpipe
	mov	x2, x0
Lloh6:
	adrp	x8, _zd1201_usbfree@GOTPAGE
Lloh7:
	ldr	x8, [x8, _zd1201_usbfree@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	mov	x0, x24
	mov	x1, x27
	mov	x3, x23
	mov	w4, #16
	mov	x6, x19
	bl	_usb_fill_bulk_urb
	mov	x0, x24
	mov	x1, x22
	bl	_usb_submit_urb
	cbnz	w0, LBB0_19
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w20, w20, w26
	add	x25, x25, w28, sxtw
	add	w21, w21, #1
	cmp	w20, #0
	b.gt	LBB0_2
LBB0_9:
	mov	w0, #16
	mov	x1, x22
	bl	_kmalloc
	cbz	x0, LBB0_18
; %bb.10:
	mov	x23, x0
	mov	w0, #0
	mov	x1, x22
	bl	_usb_alloc_urb
	cbz	x0, LBB0_17
; %bb.11:
	mov	x24, x0
Lloh9:
	adrp	x8, _ZD1201_USB_CMDREQ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ZD1201_USB_CMDREQ@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_cpu_to_le32
Lloh12:
	adrp	x8, _ZD1201_CMDCODE_ACCESS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ZD1201_CMDCODE_ACCESS@GOTPAGEOFF]
	str	w0, [x23]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _ZD1201_ACCESSBIT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ZD1201_ACCESSBIT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_le16
	str	w0, [x23, #4]
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
	mov	x0, x20
	bl	_cpu_to_le16
	stur	w0, [x23, #6]
	mov	w0, #0
	bl	_cpu_to_le16
	str	w0, [x23, #8]
	mov	w0, #0
	bl	_cpu_to_le16
	stur	w0, [x23, #10]
	ldr	x25, [x19]
	ldr	w1, [x19, #36]
	mov	x0, x25
	bl	_usb_sndbulkpipe
	mov	x2, x0
Lloh18:
	adrp	x8, _zd1201_usbfree@GOTPAGE
Lloh19:
	ldr	x8, [x8, _zd1201_usbfree@GOTPAGEOFF]
Lloh20:
	ldr	w5, [x8]
	mov	x0, x24
	mov	x1, x25
	mov	x3, x23
	mov	w4, #16
	mov	x6, x19
	bl	_usb_fill_bulk_urb
	mov	x0, x24
	mov	x1, x22
	bl	_usb_submit_urb
	mov	x27, x0
	cbnz	w0, LBB0_20
; %bb.12:
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	cbz	w8, LBB0_16
; %bb.13:
	ldr	w0, [x19, #32]
	ldr	x1, [x19, #24]
	bl	_wait_event_interruptible
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #24]
	bl	_le16_to_cpu
	cmp	w0, w20
	b.eq	LBB0_16
LBB0_15:
	ldr	x0, [x19]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_16:
	mov	w27, #0
	b	LBB0_21
LBB0_17:
	mov	x0, x23
	bl	_kfree
LBB0_18:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_21
LBB0_19:
	mov	x27, x0
LBB0_20:
	mov	x0, x23
	bl	_kfree
	mov	x0, x24
	bl	_usb_free_urb
LBB0_21:
	mov	x0, x27
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOIO,4,2                   ; @GFP_NOIO
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ZD1201_USB_RESREQ,1,0          ; @ZD1201_USB_RESREQ
	.comm	_zd1201_usbfree,4,2             ; @zd1201_usbfree
	.comm	_ZD1201_USB_CMDREQ,4,2          ; @ZD1201_USB_CMDREQ
	.comm	_ZD1201_CMDCODE_ACCESS,4,2      ; @ZD1201_CMDCODE_ACCESS
	.comm	_ZD1201_ACCESSBIT,4,2           ; @ZD1201_ACCESSBIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrong or no RID received\n"

	.no_dead_strip	_zd1201_setconfig
.subsections_via_symbols
