	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function adm6996_read_gpio_reg
LCPI0_0:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_adm6996_read_gpio_reg:                 ## @adm6996_read_gpio_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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [255,255,255,255]
	movaps	%xmm0, -64(%rbp)
	movl	%esi, %eax
	shrl	$6, %eax
	andl	$1, %eax
	orl	$96, %eax
	movl	%eax, -48(%rbp)
	leal	(,%r14,4), %eax
	movzbl	%al, %eax
	movl	%eax, -44(%rbp)
	movl	4(%rdi), %edi
	xorl	%esi, %esi
	callq	_gpio_direction_output
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_gpio_direction_output
	movl	8(%rbx), %edi
	xorl	%esi, %esi
	callq	_gpio_direction_output
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$46, %ecx
	callq	_adm6996_gpio_write
	movl	8(%rbx), %edi
	callq	_gpio_direction_input
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_adm6996_gpio_adclk
	leaq	-80(%rbp), %r15
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	movl	$32, %ecx
	callq	_adm6996_gpio_read
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_adm6996_gpio_adclk
	movl	4(%rbx), %edi
	callq	_gpio_direction_input
	movl	(%rbx), %edi
	callq	_gpio_direction_input
	xorl	%ecx, %ecx
	testb	$1, %r14b
	sete	%cl
	leaq	-72(%rbp), %rax
	cmovneq	%r15, %rax
	movl	(%rax), %eax
	shll	$8, %eax
	orl	-76(%rbp,%rcx,8), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_2
## %bb.1:
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_adm6996_read_gpio_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adm6996_read_gpio_reg
_adm6996_read_gpio_reg:                 ; @adm6996_read_gpio_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	movi.2d	v0, #0x0000ff000000ff
	str	q0, [sp, #16]
	mov	w8, #96
	bfxil	w8, w1, #6, #1
	ubfiz	w9, w1, #2, #6
	stp	w8, w9, [sp, #32]
	ldr	w0, [x0, #4]
	mov	w1, #0
	bl	_gpio_direction_output
	ldr	w0, [x20]
	mov	w1, #0
	bl	_gpio_direction_output
	ldr	w0, [x20, #8]
	mov	w1, #0
	bl	_gpio_direction_output
	add	x2, sp, #16
	mov	x0, x20
	mov	w1, #0
	mov	w3, #46
	bl	_adm6996_gpio_write
	ldr	w0, [x20, #8]
	bl	_gpio_direction_input
	mov	x0, x20
	mov	w1, #2
	bl	_adm6996_gpio_adclk
	mov	x21, sp
	mov	x2, sp
	mov	x0, x20
	mov	w1, #0
	mov	w3, #32
	bl	_adm6996_gpio_read
	mov	x0, x20
	mov	w1, #2
	bl	_adm6996_gpio_adclk
	ldr	w0, [x20, #4]
	bl	_gpio_direction_input
	ldr	w0, [x20]
	bl	_gpio_direction_input
	add	x8, x21, #8
	tst	w19, #0x1
	csel	x8, x8, x21, eq
	ldr	w8, [x8]
	mov	w9, #4
	mov	w10, #12
	csel	x9, x10, x9, eq
	ldr	w9, [x21, x9]
	ldr	x10, [sp, #40]
Lloh3:
	adrp	x11, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x11, [x11, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	cmp	x11, x10
	b.ne	LBB0_2
; %bb.1:
	orr	w0, w9, w8, lsl #8
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_adm6996_read_gpio_reg
.subsections_via_symbols
