	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function plgpio_request
_plgpio_request:                        ## @plgpio_request
	.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	%esi, %r12d
	movq	%rdi, %rbx
	callq	_gpiochip_get_data
	cmpl	%r12d, (%rbx)
	jbe	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	4(%rbx), %r15d
	addl	%r12d, %r15d
	movl	%r15d, %edi
	callq	_pinctrl_gpio_request
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.3:
	movl	12(%r14), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	je	LBB0_4
LBB0_5:
	xorl	%r13d, %r13d
	cmpl	$-1, 20(%r14)
	je	LBB0_15
## %bb.6:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_plgpio_direction_input
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
LBB0_11:
	movl	12(%r14), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movl	12(%r14), %edi
	callq	_clk_disable
LBB0_13:
	movl	%ebx, %r13d
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_15:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	12(%r14), %edi
	callq	_clk_enable
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_5
LBB0_14:
	movl	%r15d, %edi
	callq	_pinctrl_gpio_free
	jmp	LBB0_15
LBB0_7:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.8:
	movq	_PTO_ENB_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_16
## %bb.9:
	movl	%r12d, %edi
	callq	*%rcx
	movl	%eax, %r12d
	cmpl	$-1, %eax
	je	LBB0_10
LBB0_16:
	movq	%r14, %rbx
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movl	20(%r14), %edx
	movl	24(%r14), %edi
	movl	%r12d, %esi
	callq	_plgpio_reg_set
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_15
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PTO_ENB_REG,4,2                ## @PTO_ENB_REG
	.no_dead_strip	_plgpio_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function plgpio_request
_plgpio_request:                        ; @plgpio_request
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x23, x0
	bl	_gpiochip_get_data
	ldr	w8, [x23]
	cmp	w8, w21
	b.ls	LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w8, [x23, #4]
	add	w20, w8, w21
	mov	x0, x20
	bl	_pinctrl_gpio_request
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	w0, [x19, #12]
	bl	_IS_ERR
	cbz	w0, LBB0_9
LBB0_3:
	ldr	w8, [x19, #20]
	cmn	w8, #1
	b.eq	LBB0_11
; %bb.4:
	mov	x0, x23
	mov	x1, x21
	bl	_plgpio_direction_input
	mov	x22, x0
	cbz	w0, LBB0_12
LBB0_5:
	ldr	w0, [x19, #12]
	bl	_IS_ERR
	cbnz	w0, LBB0_10
; %bb.6:
	ldr	w0, [x19, #12]
	bl	_clk_disable
	b	LBB0_10
LBB0_7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	w0, [x19, #12]
	bl	_clk_enable
	mov	x22, x0
	cbz	w0, LBB0_3
LBB0_10:
	mov	x0, x20
	bl	_pinctrl_gpio_free
	b	LBB0_8
LBB0_11:
	mov	w22, #0
	b	LBB0_8
LBB0_12:
	ldr	x8, [x19]
	cbz	x8, LBB0_15
; %bb.13:
	ldr	w9, [x19, #8]
Lloh3:
	adrp	x10, _PTO_ENB_REG@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PTO_ENB_REG@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_15
; %bb.14:
	mov	x0, x21
	blr	x8
	mov	x21, x0
	cmn	w0, #1
	b.eq	LBB0_16
LBB0_15:
	add	x20, x19, #16
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldp	w2, w0, [x19, #20]
	mov	x1, x21
	bl	_plgpio_reg_set
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w22, #0
	b	LBB0_8
LBB0_16:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PTO_ENB_REG,4,2                ; @PTO_ENB_REG
	.no_dead_strip	_plgpio_request
.subsections_via_symbols
