	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function da9052_gpio_get
_da9052_gpio_get:                       ## @da9052_gpio_get
	.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
	movl	%esi, %r14d
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movl	(%rax), %edi
	movq	_DA9052_GPIO_0_1_REG@GOTPCREL(%rip), %rax
	movl	%r14d, %esi
	shrl	%esi
	addq	(%rax), %rsi
	callq	_da9052_reg_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_16
## %bb.1:
	movl	%r14d, %edi
	callq	_da9052_gpio_port_odd
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	_DA9052_GPIO_ODD_PORT_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	shrl	$4, %eax
	cmpl	$128, %eax
	je	LBB0_7
LBB0_3:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.4:
	movq	_DA9052_GPIO_MAX_PORTS_PER_REGISTER@GOTPCREL(%rip), %rax
	movl	(%r15), %edi
	cmpl	%r14d, (%rax)
	jbe	LBB0_10
## %bb.5:
	movq	_DA9052_STATUS_C_REG@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_6:
	movq	_DA9052_GPIO_EVEN_PORT_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	cmpl	$128, %eax
	jne	LBB0_3
LBB0_7:
	movl	%r14d, %edi
	callq	_da9052_gpio_port_odd
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	_DA9052_GPIO_ODD_PORT_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_10:
	movq	_DA9052_STATUS_D_REG@GOTPCREL(%rip), %rax
LBB0_11:
	movq	(%rax), %rsi
	callq	_da9052_reg_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_16
## %bb.12:
	movl	%r14d, %edi
	callq	_DA9052_GPIO_SHIFT_COUNT
	xorl	%ecx, %ecx
	btl	%eax, %ebx
	setb	%cl
	jmp	LBB0_15
LBB0_13:
	movq	_DA9052_GPIO_EVEN_PORT_MODE@GOTPCREL(%rip), %rax
LBB0_14:
	xorl	%ecx, %ecx
	testl	%ebx, (%rax)
	setne	%cl
LBB0_15:
	movl	%ecx, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DA9052_GPIO_0_1_REG,8,3        ## @DA9052_GPIO_0_1_REG
	.comm	_DA9052_GPIO_ODD_PORT_PIN,4,2   ## @DA9052_GPIO_ODD_PORT_PIN
	.comm	_DA9052_GPIO_EVEN_PORT_PIN,4,2  ## @DA9052_GPIO_EVEN_PORT_PIN
	.comm	_DA9052_GPIO_MAX_PORTS_PER_REGISTER,4,2 ## @DA9052_GPIO_MAX_PORTS_PER_REGISTER
	.comm	_DA9052_STATUS_C_REG,8,3        ## @DA9052_STATUS_C_REG
	.comm	_DA9052_STATUS_D_REG,8,3        ## @DA9052_STATUS_D_REG
	.comm	_DA9052_GPIO_ODD_PORT_MODE,4,2  ## @DA9052_GPIO_ODD_PORT_MODE
	.comm	_DA9052_GPIO_EVEN_PORT_MODE,4,2 ## @DA9052_GPIO_EVEN_PORT_MODE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_da9052_gpio_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function da9052_gpio_get
_da9052_gpio_get:                       ; @da9052_gpio_get
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	bl	_gpiochip_get_data
	mov	x21, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _DA9052_GPIO_0_1_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DA9052_GPIO_0_1_REG@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	lsr	w9, w20, #1
	add	x1, x8, x9
	bl	_da9052_reg_read
	mov	x19, x0
	tbnz	w0, #31, LBB0_12
; %bb.1:
	mov	x0, x20
	bl	_da9052_gpio_port_odd
	cbz	x0, LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _DA9052_GPIO_ODD_PORT_PIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DA9052_GPIO_ODD_PORT_PIN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w19
	lsr	w8, w8, #4
	cmp	w8, #128
	b.eq	LBB0_7
LBB0_3:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.4:
Lloh6:
	adrp	x8, _DA9052_GPIO_MAX_PORTS_PER_REGISTER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DA9052_GPIO_MAX_PORTS_PER_REGISTER@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _DA9052_STATUS_C_REG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DA9052_STATUS_C_REG@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh11:
	adrp	x10, _DA9052_STATUS_D_REG@GOTPAGE
Lloh12:
	ldr	x10, [x10, _DA9052_STATUS_D_REG@GOTPAGEOFF]
	cmp	w8, w20
	csel	x8, x9, x10, hi
	ldr	x1, [x8]
	bl	_da9052_reg_read
	mov	x19, x0
	tbnz	w0, #31, LBB0_12
; %bb.5:
	mov	x0, x20
	bl	_DA9052_GPIO_SHIFT_COUNT
	lsr	w8, w19, w0
	and	w19, w8, #0x1
	b	LBB0_12
LBB0_6:
Lloh13:
	adrp	x8, _DA9052_GPIO_EVEN_PORT_PIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DA9052_GPIO_EVEN_PORT_PIN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	and	w8, w8, w19
	cmp	w8, #128
	b.ne	LBB0_3
LBB0_7:
	mov	x0, x20
	bl	_da9052_gpio_port_odd
	cbz	x0, LBB0_10
; %bb.8:
Lloh16:
	adrp	x8, _DA9052_GPIO_ODD_PORT_MODE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DA9052_GPIO_ODD_PORT_MODE@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_12
LBB0_10:
Lloh21:
	adrp	x8, _DA9052_GPIO_EVEN_PORT_MODE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DA9052_GPIO_EVEN_PORT_MODE@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	tst	w8, w19
	cset	w19, ne
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_DA9052_GPIO_0_1_REG,8,3        ; @DA9052_GPIO_0_1_REG
	.comm	_DA9052_GPIO_ODD_PORT_PIN,4,2   ; @DA9052_GPIO_ODD_PORT_PIN
	.comm	_DA9052_GPIO_EVEN_PORT_PIN,4,2  ; @DA9052_GPIO_EVEN_PORT_PIN
	.comm	_DA9052_GPIO_MAX_PORTS_PER_REGISTER,4,2 ; @DA9052_GPIO_MAX_PORTS_PER_REGISTER
	.comm	_DA9052_STATUS_C_REG,8,3        ; @DA9052_STATUS_C_REG
	.comm	_DA9052_STATUS_D_REG,8,3        ; @DA9052_STATUS_D_REG
	.comm	_DA9052_GPIO_ODD_PORT_MODE,4,2  ; @DA9052_GPIO_ODD_PORT_MODE
	.comm	_DA9052_GPIO_EVEN_PORT_MODE,4,2 ; @DA9052_GPIO_EVEN_PORT_MODE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_da9052_gpio_get
.subsections_via_symbols
