	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxusb_gpio_tuner
_cxusb_gpio_tuner:                      ## @cxusb_gpio_tuner
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rdi), %rbx
	movq	(%rbx), %rcx
	movq	_GPIO_TUNER@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	cmpl	%esi, (%rcx,%rax,4)
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %rcx
	cmpl	$0, (%rcx,%rax,4)
	je	LBB0_5
LBB0_2:
	movl	%eax, -40(%rbp)
	movl	%r14d, -36(%rbp)
	movq	_CMD_GPIO_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %r8
	movl	$2, %ecx
	movl	$1, %r9d
	callq	_cxusb_ctrl_msg
	cmpl	$1, -44(%rbp)
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_deb_info
LBB0_4:
	movq	(%rbx), %rax
	movq	(%r15), %rcx
	movl	%r14d, (%rax,%rcx,4)
	movq	8(%rbx), %rax
	movl	$0, (%rax,%rcx,4)
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO_TUNER,8,3                 ## @GPIO_TUNER
	.comm	_CMD_GPIO_WRITE,4,2             ## @CMD_GPIO_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gpio_write failed.\n"

	.no_dead_strip	_cxusb_gpio_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxusb_gpio_tuner
_cxusb_gpio_tuner:                      ; @cxusb_gpio_tuner
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x20, [x0]
	ldr	x9, [x20]
Lloh3:
	adrp	x21, _GPIO_TUNER@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GPIO_TUNER@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w9, [x9, x8, lsl #2]
	cmp	w9, w1
	b.ne	LBB0_2
; %bb.1:
	ldr	x9, [x20, #8]
	ldr	w9, [x9, x8, lsl #2]
	cbz	w9, LBB0_5
LBB0_2:
	stp	w8, w19, [sp, #16]
Lloh5:
	adrp	x8, _CMD_GPIO_WRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CMD_GPIO_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #16
	add	x4, sp, #12
	mov	w3, #2
	mov	w5, #1
	bl	_cxusb_ctrl_msg
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_info
LBB0_4:
	ldr	x8, [x20]
	ldr	x9, [x21]
	lsl	x9, x9, #2
	str	w19, [x8, x9]
	ldr	x8, [x20, #8]
	str	wzr, [x8, x9]
LBB0_5:
	ldr	x8, [sp, #24]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_TUNER,8,3                 ; @GPIO_TUNER
	.comm	_CMD_GPIO_WRITE,4,2             ; @CMD_GPIO_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gpio_write failed.\n"

	.no_dead_strip	_cxusb_gpio_tuner
.subsections_via_symbols
