	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpio_request_one               ## -- Begin function gpio_request_one
	.p2align	4, 0x90
_gpio_request_one:                      ## @gpio_request_one
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movl	%edi, %ebx
	callq	_gpio_to_desc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_1
LBB0_3:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_gpiod_request
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.4:
	movq	_GPIOF_OPEN_DRAIN@GOTPCREL(%rip), %rax
	testq	%r14, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_FLAG_OPEN_DRAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
LBB0_6:
	movq	_GPIOF_OPEN_SOURCE@GOTPCREL(%rip), %rax
	testq	%r14, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_FLAG_OPEN_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
LBB0_8:
	movq	_GPIOF_ACTIVE_LOW@GOTPCREL(%rip), %rax
	testq	%r14, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_FLAG_ACTIVE_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
LBB0_10:
	movq	_GPIOF_DIR_IN@GOTPCREL(%rip), %rax
	testq	%r14, (%rax)
	je	LBB0_12
## %bb.11:
	movq	%r15, %rdi
	callq	_gpiod_direction_input
	jmp	LBB0_13
LBB0_1:
	movl	%ebx, %edi
	callq	_gpio_is_valid
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_12:
	movq	_GPIOF_INIT_HIGH@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	movq	(%rax), %rax
	andq	%r14, %rax
	setne	%sil
	movq	%r15, %rdi
	callq	_gpiod_direction_output_raw
LBB0_13:
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_14
LBB0_16:
	movq	%r15, %rdi
	callq	_gpiod_free
	movl	%r12d, %ebx
LBB0_17:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_GPIOF_EXPORT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	testq	%r14, (%rax)
	je	LBB0_17
## %bb.15:
	movq	_GPIOF_EXPORT_CHANGEABLE@GOTPCREL(%rip), %rax
	andq	(%rax), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_gpiod_export
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_16
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_GPIOF_OPEN_DRAIN,8,3           ## @GPIOF_OPEN_DRAIN
	.comm	_FLAG_OPEN_DRAIN,4,2            ## @FLAG_OPEN_DRAIN
	.comm	_GPIOF_OPEN_SOURCE,8,3          ## @GPIOF_OPEN_SOURCE
	.comm	_FLAG_OPEN_SOURCE,4,2           ## @FLAG_OPEN_SOURCE
	.comm	_GPIOF_ACTIVE_LOW,8,3           ## @GPIOF_ACTIVE_LOW
	.comm	_FLAG_ACTIVE_LOW,4,2            ## @FLAG_ACTIVE_LOW
	.comm	_GPIOF_DIR_IN,8,3               ## @GPIOF_DIR_IN
	.comm	_GPIOF_INIT_HIGH,8,3            ## @GPIOF_INIT_HIGH
	.comm	_GPIOF_EXPORT,8,3               ## @GPIOF_EXPORT
	.comm	_GPIOF_EXPORT_CHANGEABLE,8,3    ## @GPIOF_EXPORT_CHANGEABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpio_request_one               ; -- Begin function gpio_request_one
	.p2align	2
_gpio_request_one:                      ; @gpio_request_one
	.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	x21, x2
	mov	x20, x1
	mov	x22, x0
	bl	_gpio_to_desc
	mov	x19, x0
	cbz	x0, LBB0_10
LBB0_1:
	mov	x0, x19
	mov	x1, x21
	bl	_gpiod_request
	mov	x21, x0
	cbnz	w0, LBB0_16
; %bb.2:
Lloh0:
	adrp	x8, _GPIOF_OPEN_DRAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIOF_OPEN_DRAIN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	tst	x8, x20
	b.eq	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _FLAG_OPEN_DRAIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FLAG_OPEN_DRAIN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
LBB0_4:
Lloh6:
	adrp	x8, _GPIOF_OPEN_SOURCE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPIOF_OPEN_SOURCE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	tst	x8, x20
	b.eq	LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _FLAG_OPEN_SOURCE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FLAG_OPEN_SOURCE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
LBB0_6:
Lloh12:
	adrp	x8, _GPIOF_ACTIVE_LOW@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GPIOF_ACTIVE_LOW@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	tst	x8, x20
	b.eq	LBB0_8
; %bb.7:
Lloh15:
	adrp	x8, _FLAG_ACTIVE_LOW@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FLAG_ACTIVE_LOW@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
LBB0_8:
Lloh18:
	adrp	x8, _GPIOF_DIR_IN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GPIOF_DIR_IN@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	tst	x8, x20
	b.eq	LBB0_12
; %bb.9:
	mov	x0, x19
	bl	_gpiod_direction_input
	mov	x21, x0
	cbnz	w0, LBB0_15
	b	LBB0_13
LBB0_10:
	mov	x0, x22
	bl	_gpio_is_valid
	cbz	x0, LBB0_1
; %bb.11:
Lloh21:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_16
LBB0_12:
Lloh24:
	adrp	x8, _GPIOF_INIT_HIGH@GOTPAGE
Lloh25:
	ldr	x8, [x8, _GPIOF_INIT_HIGH@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	tst	x8, x20
	cset	w1, ne
	mov	x0, x19
	bl	_gpiod_direction_output_raw
	mov	x21, x0
	cbnz	w0, LBB0_15
LBB0_13:
Lloh27:
	adrp	x8, _GPIOF_EXPORT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _GPIOF_EXPORT@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	tst	x8, x20
	b.eq	LBB0_17
; %bb.14:
Lloh30:
	adrp	x8, _GPIOF_EXPORT_CHANGEABLE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _GPIOF_EXPORT_CHANGEABLE@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	and	x1, x8, x20
	mov	x0, x19
	bl	_gpiod_export
	mov	x21, x0
	cbz	w0, LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_gpiod_free
LBB0_16:
	mov	x0, x21
	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
LBB0_17:
	mov	w21, #0
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_GPIOF_OPEN_DRAIN,8,3           ; @GPIOF_OPEN_DRAIN
	.comm	_FLAG_OPEN_DRAIN,4,2            ; @FLAG_OPEN_DRAIN
	.comm	_GPIOF_OPEN_SOURCE,8,3          ; @GPIOF_OPEN_SOURCE
	.comm	_FLAG_OPEN_SOURCE,4,2           ; @FLAG_OPEN_SOURCE
	.comm	_GPIOF_ACTIVE_LOW,8,3           ; @GPIOF_ACTIVE_LOW
	.comm	_FLAG_ACTIVE_LOW,4,2            ; @FLAG_ACTIVE_LOW
	.comm	_GPIOF_DIR_IN,8,3               ; @GPIOF_DIR_IN
	.comm	_GPIOF_INIT_HIGH,8,3            ; @GPIOF_INIT_HIGH
	.comm	_GPIOF_EXPORT,8,3               ; @GPIOF_EXPORT
	.comm	_GPIOF_EXPORT_CHANGEABLE,8,3    ; @GPIOF_EXPORT_CHANGEABLE
.subsections_via_symbols
