	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiod_configure_flags          ## -- Begin function gpiod_configure_flags
	.p2align	4, 0x90
_gpiod_configure_flags:                 ## @gpiod_configure_flags
	.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
	movl	%ecx, %r14d
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_GPIO_ACTIVE_LOW@GOTPCREL(%rip), %rax
	testq	%rdx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_FLAG_ACTIVE_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
LBB0_2:
	movq	_GPIO_OPEN_DRAIN@GOTPCREL(%rip), %rax
	testq	%rbx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_FLAG_OPEN_DRAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
	jmp	LBB0_6
LBB0_4:
	movq	_GPIOD_FLAGS_BIT_OPEN_DRAIN@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_FLAG_OPEN_DRAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_gpiod_warn
LBB0_6:
	movq	_GPIO_OPEN_SOURCE@GOTPCREL(%rip), %rax
	testq	%rbx, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_FLAG_OPEN_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
LBB0_8:
	movq	_GPIO_PULL_UP@GOTPCREL(%rip), %rcx
	movq	_GPIO_PULL_DOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rbx, (%rcx)
	je	LBB0_11
## %bb.9:
	testq	%rbx, %rax
	je	LBB0_10
## %bb.19:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_gpiod_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_11:
	testq	%rbx, %rax
	je	LBB0_14
## %bb.12:
	movq	_FLAG_PULL_DOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	_FLAG_PULL_UP@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
LBB0_14:
	movq	_GPIO_TRANSITORY@GOTPCREL(%rip), %rax
	andq	(%rax), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_gpiod_set_transitory
	testl	%eax, %eax
	js	LBB0_20
## %bb.15:
	movq	_GPIOD_FLAGS_BIT_DIR_SET@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_16
## %bb.17:
	movq	_GPIOD_FLAGS_BIT_DIR_OUT@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_18
## %bb.21:
	movq	_GPIOD_FLAGS_BIT_DIR_VAL@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	andl	(%rax), %r14d
	setne	%sil
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gpiod_direction_output         ## TAILCALL
LBB0_16:
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	callq	_pr_debug
	xorl	%eax, %eax
LBB0_20:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gpiod_direction_input          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO_ACTIVE_LOW,8,3            ## @GPIO_ACTIVE_LOW
	.comm	_FLAG_ACTIVE_LOW,4,2            ## @FLAG_ACTIVE_LOW
	.comm	_GPIO_OPEN_DRAIN,8,3            ## @GPIO_OPEN_DRAIN
	.comm	_FLAG_OPEN_DRAIN,4,2            ## @FLAG_OPEN_DRAIN
	.comm	_GPIOD_FLAGS_BIT_OPEN_DRAIN,4,2 ## @GPIOD_FLAGS_BIT_OPEN_DRAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enforced open drain please flag it properly in DT/ACPI DSDT/board file\n"

	.comm	_GPIO_OPEN_SOURCE,8,3           ## @GPIO_OPEN_SOURCE
	.comm	_FLAG_OPEN_SOURCE,4,2           ## @FLAG_OPEN_SOURCE
	.comm	_GPIO_PULL_UP,8,3               ## @GPIO_PULL_UP
	.comm	_GPIO_PULL_DOWN,8,3             ## @GPIO_PULL_DOWN
L_.str.1:                               ## @.str.1
	.asciz	"both pull-up and pull-down enabled, invalid configuration\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FLAG_PULL_UP,4,2               ## @FLAG_PULL_UP
	.comm	_FLAG_PULL_DOWN,4,2             ## @FLAG_PULL_DOWN
	.comm	_GPIO_TRANSITORY,8,3            ## @GPIO_TRANSITORY
	.comm	_GPIOD_FLAGS_BIT_DIR_SET,4,2    ## @GPIOD_FLAGS_BIT_DIR_SET
L_.str.2:                               ## @.str.2
	.asciz	"no flags found for %s\n"

	.comm	_GPIOD_FLAGS_BIT_DIR_OUT,4,2    ## @GPIOD_FLAGS_BIT_DIR_OUT
	.comm	_GPIOD_FLAGS_BIT_DIR_VAL,4,2    ## @GPIOD_FLAGS_BIT_DIR_VAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiod_configure_flags          ; -- Begin function gpiod_configure_flags
	.p2align	2
_gpiod_configure_flags:                 ; @gpiod_configure_flags
	.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, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GPIO_ACTIVE_LOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIO_ACTIVE_LOW@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	tst	x8, x2
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _FLAG_ACTIVE_LOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FLAG_ACTIVE_LOW@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
LBB0_2:
Lloh6:
	adrp	x8, _GPIO_OPEN_DRAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPIO_OPEN_DRAIN@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	tst	x8, x22
	b.eq	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _FLAG_OPEN_DRAIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FLAG_OPEN_DRAIN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
	b	LBB0_6
LBB0_4:
Lloh12:
	adrp	x8, _GPIOD_FLAGS_BIT_OPEN_DRAIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GPIOD_FLAGS_BIT_OPEN_DRAIN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
Lloh15:
	adrp	x8, _FLAG_OPEN_DRAIN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FLAG_OPEN_DRAIN@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gpiod_warn
LBB0_6:
Lloh20:
	adrp	x8, _GPIO_OPEN_SOURCE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GPIO_OPEN_SOURCE@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	tst	x8, x22
	b.eq	LBB0_8
; %bb.7:
Lloh23:
	adrp	x8, _FLAG_OPEN_SOURCE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FLAG_OPEN_SOURCE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
LBB0_8:
Lloh26:
	adrp	x8, _GPIO_PULL_UP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _GPIO_PULL_UP@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x8]
Lloh29:
	adrp	x8, _GPIO_PULL_DOWN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _GPIO_PULL_DOWN@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	and	x8, x8, x22
	tst	x9, x22
	b.eq	LBB0_11
; %bb.9:
	cbz	x8, LBB0_13
; %bb.10:
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_gpiod_err
Lloh34:
	adrp	x8, _EINVAL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_11:
	cbz	x8, LBB0_15
; %bb.12:
Lloh37:
	adrp	x8, _FLAG_PULL_DOWN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _FLAG_PULL_DOWN@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh39:
	adrp	x8, _FLAG_PULL_UP@GOTPAGE
Lloh40:
	ldr	x8, [x8, _FLAG_PULL_UP@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
LBB0_15:
Lloh41:
	adrp	x8, _GPIO_TRANSITORY@GOTPAGE
Lloh42:
	ldr	x8, [x8, _GPIO_TRANSITORY@GOTPAGEOFF]
Lloh43:
	ldr	x8, [x8]
	and	x1, x8, x22
	mov	x0, x19
	bl	_gpiod_set_transitory
	tbnz	w0, #31, LBB0_20
; %bb.16:
Lloh44:
	adrp	x8, _GPIOD_FLAGS_BIT_DIR_SET@GOTPAGE
Lloh45:
	ldr	x8, [x8, _GPIOD_FLAGS_BIT_DIR_SET@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_19
; %bb.17:
Lloh47:
	adrp	x8, _GPIOD_FLAGS_BIT_DIR_OUT@GOTPAGE
Lloh48:
	ldr	x8, [x8, _GPIOD_FLAGS_BIT_DIR_OUT@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_21
; %bb.18:
Lloh50:
	adrp	x8, _GPIOD_FLAGS_BIT_DIR_VAL@GOTPAGE
Lloh51:
	ldr	x8, [x8, _GPIOD_FLAGS_BIT_DIR_VAL@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w1, ne
	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
	b	_gpiod_direction_output
LBB0_19:
Lloh53:
	adrp	x0, l_.str.2@PAGE
Lloh54:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_pr_debug
	mov	w0, #0
LBB0_20:
	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_21:
	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
	b	_gpiod_direction_input
	.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 AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_ACTIVE_LOW,8,3            ; @GPIO_ACTIVE_LOW
	.comm	_FLAG_ACTIVE_LOW,4,2            ; @FLAG_ACTIVE_LOW
	.comm	_GPIO_OPEN_DRAIN,8,3            ; @GPIO_OPEN_DRAIN
	.comm	_FLAG_OPEN_DRAIN,4,2            ; @FLAG_OPEN_DRAIN
	.comm	_GPIOD_FLAGS_BIT_OPEN_DRAIN,4,2 ; @GPIOD_FLAGS_BIT_OPEN_DRAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enforced open drain please flag it properly in DT/ACPI DSDT/board file\n"

	.comm	_GPIO_OPEN_SOURCE,8,3           ; @GPIO_OPEN_SOURCE
	.comm	_FLAG_OPEN_SOURCE,4,2           ; @FLAG_OPEN_SOURCE
	.comm	_GPIO_PULL_UP,8,3               ; @GPIO_PULL_UP
	.comm	_GPIO_PULL_DOWN,8,3             ; @GPIO_PULL_DOWN
l_.str.1:                               ; @.str.1
	.asciz	"both pull-up and pull-down enabled, invalid configuration\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FLAG_PULL_UP,4,2               ; @FLAG_PULL_UP
	.comm	_FLAG_PULL_DOWN,4,2             ; @FLAG_PULL_DOWN
	.comm	_GPIO_TRANSITORY,8,3            ; @GPIO_TRANSITORY
	.comm	_GPIOD_FLAGS_BIT_DIR_SET,4,2    ; @GPIOD_FLAGS_BIT_DIR_SET
l_.str.2:                               ; @.str.2
	.asciz	"no flags found for %s\n"

	.comm	_GPIOD_FLAGS_BIT_DIR_OUT,4,2    ; @GPIOD_FLAGS_BIT_DIR_OUT
	.comm	_GPIOD_FLAGS_BIT_DIR_VAL,4,2    ; @GPIOD_FLAGS_BIT_DIR_VAL
.subsections_via_symbols
