	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function as3722_gpio_set
_as3722_gpio_set:                       ## @as3722_gpio_set
	.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, %r12d
	movl	%esi, %r13d
	callq	_gpiochip_get_data
	movq	%rax, %r14
	movq	8(%rax), %r15
	movl	%r13d, %edi
	callq	_AS3722_GPIOn_CONTROL_REG
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_as3722_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_AS3722_GPIO_INV@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	-44(%rbp), %ecx
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.3:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_7
	jmp	LBB0_4
LBB0_1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_5:
	testl	%ecx, %ecx
	je	LBB0_6
LBB0_4:
	movl	%r13d, %edi
	callq	_AS3722_GPIOn_SIGNAL
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	movl	%eax, -44(%rbp)
	movq	_AS3722_GPIO_SIGNAL_OUT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r13d, %edi
	callq	_AS3722_GPIOn_SIGNAL
	movl	-44(%rbp), %ecx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_as3722_update_bits
	testl	%eax, %eax
	jns	LBB0_9
## %bb.8:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPIO_CONTROL%d_REG read failed: %d\n"

	.comm	_AS3722_GPIO_INV,4,2            ## @AS3722_GPIO_INV
	.comm	_AS3722_GPIO_SIGNAL_OUT_REG,4,2 ## @AS3722_GPIO_SIGNAL_OUT_REG
L_.str.1:                               ## @.str.1
	.asciz	"GPIO_SIGNAL_OUT_REG update failed: %d\n"

	.no_dead_strip	_as3722_gpio_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function as3722_gpio_set
_as3722_gpio_set:                       ; @as3722_gpio_set
	.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	x22, x2
	mov	x20, x1
	bl	_gpiochip_get_data
	mov	x19, x0
	ldr	x21, [x0, #8]
	mov	x0, x20
	bl	_AS3722_GPIOn_CONTROL_REG
	mov	x1, x0
	add	x2, sp, #12
	mov	x0, x21
	bl	_as3722_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x9, _AS3722_GPIO_INV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AS3722_GPIO_INV@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
	cbz	w22, LBB0_5
; %bb.2:
	cbz	w8, LBB0_6
LBB0_3:
	mov	w0, #0
	b	LBB0_7
LBB0_4:
	ldr	w8, [x19]
	str	x0, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	mov	x2, x20
	b	LBB0_9
LBB0_5:
	cbz	w8, LBB0_3
LBB0_6:
	mov	x0, x20
	bl	_AS3722_GPIOn_SIGNAL
LBB0_7:
	str	w0, [sp, #12]
Lloh5:
	adrp	x8, _AS3722_GPIO_SIGNAL_OUT_REG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AS3722_GPIO_SIGNAL_OUT_REG@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_AS3722_GPIOn_SIGNAL
	mov	x2, x0
	ldr	w3, [sp, #12]
	mov	x0, x21
	mov	x1, x22
	bl	_as3722_update_bits
	tbz	w0, #31, LBB0_10
; %bb.8:
	mov	x2, x0
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	bl	_dev_err
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPIO_CONTROL%d_REG read failed: %d\n"

	.comm	_AS3722_GPIO_INV,4,2            ; @AS3722_GPIO_INV
	.comm	_AS3722_GPIO_SIGNAL_OUT_REG,4,2 ; @AS3722_GPIO_SIGNAL_OUT_REG
l_.str.1:                               ; @.str.1
	.asciz	"GPIO_SIGNAL_OUT_REG update failed: %d\n"

	.no_dead_strip	_as3722_gpio_set
.subsections_via_symbols
