	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __acpi_gpio_update_gpiod_flags
___acpi_gpio_update_gpiod_flags:        ## @__acpi_gpio_update_gpiod_flags
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_GPIOD_FLAGS_BIT_DIR_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%esi, %eax
	je	LBB0_1
## %bb.2:
	movq	_GPIOD_FLAGS_BIT_DIR_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movl	%r9d, %ecx
	orl	%eax, %ecx
	movq	_GPIOD_FLAGS_BIT_DIR_VAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	orl	%r8d, %ecx
	movl	(%rdi), %edx
	xorl	%edx, %esi
	testl	%eax, %edx
	je	LBB0_4
## %bb.3:
	movl	%esi, %eax
	andl	%r9d, %eax
	jne	LBB0_6
LBB0_4:
	xorl	%eax, %eax
	testl	%r9d, %edx
	je	LBB0_7
## %bb.5:
	andl	%esi, %r8d
	je	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %r8
	xorl	%eax, %eax
	subl	(%r8), %eax
LBB0_7:
	andl	%ecx, %esi
	xorl	%edx, %esi
	movl	%esi, (%rdi)
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIOD_FLAGS_BIT_DIR_SET,4,2    ## @GPIOD_FLAGS_BIT_DIR_SET
	.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
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	___acpi_gpio_update_gpiod_flags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __acpi_gpio_update_gpiod_flags
___acpi_gpio_update_gpiod_flags:        ; @__acpi_gpio_update_gpiod_flags
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _GPIOD_FLAGS_BIT_DIR_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIOD_FLAGS_BIT_DIR_SET@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x8]
	tst	w11, w1
	b.eq	LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _GPIOD_FLAGS_BIT_DIR_OUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPIOD_FLAGS_BIT_DIR_OUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w9, w8, w11
Lloh6:
	adrp	x10, _GPIOD_FLAGS_BIT_DIR_VAL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GPIOD_FLAGS_BIT_DIR_VAL@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x10]
	orr	w9, w9, w12
	ldr	w10, [x0]
	eor	w13, w10, w1
	and	w11, w10, w11
	and	w14, w13, w8
	cmp	w11, #0
	ccmp	w14, #0, #4, ne
	b.ne	LBB0_4
; %bb.2:
	and	w8, w10, w8
	and	w11, w13, w12
	cmp	w8, #0
	ccmp	w11, #0, #4, ne
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #0
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_5:
	bic	w10, w10, w9
	and	w9, w9, w1
	orr	w9, w10, w9
	str	w9, [x0]
	mov	x0, x8
	ret
LBB0_6:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIOD_FLAGS_BIT_DIR_SET,4,2    ; @GPIOD_FLAGS_BIT_DIR_SET
	.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
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	___acpi_gpio_update_gpiod_flags
.subsections_via_symbols
