	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reg_w_buf
_reg_w_buf:                             ## @reg_w_buf
	.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	%rdx, %rbx
	movq	%rdi, %r14
	movq	_USB_BUF_SZ@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jge	LBB0_3
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rsi, %rdi
	movq	%rbx, %rsi
	callq	_kmemdup
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %r15
	movl	(%r14), %r14d
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rdx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	subq	$8, %rsp
	movl	%r14d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	pushq	$500                            ## imm = 0x1F4
	pushq	%rbx
	pushq	%r15
	callq	_usb_control_msg
	addq	$32, %rsp
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_3:
	movq	8(%r14), %rdi
	movq	%rbx, %rdx
	callq	_memcpy
	movl	(%r14), %r15d
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rdx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	subq	$8, %rsp
	movl	%r15d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	pushq	$500                            ## imm = 0x1F4
	pushq	%rbx
	pushq	8(%r14)
	callq	_usb_control_msg
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_BUF_SZ,8,3                 ## @USB_BUF_SZ
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory\n"

	.no_dead_strip	_reg_w_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reg_w_buf
_reg_w_buf:                             ; @reg_w_buf
	.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, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _USB_BUF_SZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USB_BUF_SZ@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x2
	b.ge	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x1
	mov	x1, x19
	bl	_kmemdup
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	w20, [x20]
	mov	x0, x20
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh6:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	w8, #500
	str	w8, [sp]
	mov	x0, x20
	mov	w2, #0
	mov	w4, #1
	mov	w5, #0
	mov	x6, x21
	mov	x7, x19
	bl	_usb_control_msg
	mov	x0, x21
	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
	b	_kfree
LBB0_3:
	ldr	x0, [x20, #8]
	mov	x2, x19
	bl	_memcpy
	ldr	w21, [x20]
	mov	x0, x21
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh15:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w3, w8, w9
	ldr	x6, [x20, #8]
	mov	w8, #500
	str	w8, [sp]
	mov	x0, x21
	mov	w2, #0
	mov	w4, #1
	mov	w5, #0
	mov	x7, x19
	bl	_usb_control_msg
	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_4:
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_pr_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_BUF_SZ,8,3                 ; @USB_BUF_SZ
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory\n"

	.no_dead_strip	_reg_w_buf
.subsections_via_symbols
