	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_et61x251_write_reg             ## -- Begin function et61x251_write_reg
	.p2align	4, 0x90
_et61x251_write_reg:                    ## @et61x251_write_reg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	(%rdi), %r13
	movq	8(%rdi), %rbx
	movl	%esi, (%r13)
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_ET61X251_CTRL_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	$65, %ecx
	xorl	%r8d, %r8d
	movl	%r14d, %r9d
	pushq	%r10
	pushq	$1
	pushq	%r13
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%eax, %r8d
	callq	_DBG
	movl	$-1, %r12d
LBB0_2:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ET61X251_CTRL_TIMEOUT,4,2      ## @ET61X251_CTRL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to write a register (value 0x%02X, index 0x%02X, error %d)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_et61x251_write_reg             ; -- Begin function et61x251_write_reg
	.p2align	2
_et61x251_write_reg:                    ; @et61x251_write_reg
	.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, x1
	ldp	x22, x21, [x0]
	str	w1, [x22]
	mov	x0, x21
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh0:
	adrp	x8, _ET61X251_CTRL_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ET61X251_CTRL_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x21
	mov	w2, #0
	mov	w3, #65
	mov	w4, #0
	mov	x5, x19
	mov	x6, x22
	mov	w7, #1
	bl	_usb_control_msg
	mov	x4, x0
	mov	w0, #0
	tbz	w4, #31, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	mov	x2, x20
	mov	x3, x19
	bl	_DBG
	mov	w0, #-1
LBB0_2:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ET61X251_CTRL_TIMEOUT,4,2      ; @ET61X251_CTRL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to write a register (value 0x%02X, index 0x%02X, error %d)"

.subsections_via_symbols
