	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vr41xx_gpio_pullupdown         ## -- Begin function vr41xx_gpio_pullupdown
	.p2align	4, 0x90
_vr41xx_gpio_pullupdown:                ## @vr41xx_gpio_pullupdown
	.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	_giu_flags@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_GPIO_HAS_PULLUPDOWN_IO@GOTPCREL(%rip), %rcx
	notl	%eax
	testl	%eax, (%rcx)
	jne	LBB0_1
## %bb.3:
	cmpl	$15, %edi
	jb	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_5:
	movq	%rsi, %rbx
	movl	$1, %r14d
	movl	%edi, %ecx
	shll	%cl, %r14d
	movq	_giu_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_GPIO_PULL_UP@GOTPCREL(%rip), %r15
	cmpq	%rbx, (%r15)
	je	LBB0_7
## %bb.6:
	movq	_GPIO_PULL_DOWN@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	je	LBB0_7
## %bb.8:
	movq	_GIUUSEUPDN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_giu_read
	notl	%r14d
	andl	%eax, %r14d
	movl	%r14d, %esi
	jmp	LBB0_9
LBB0_7:
	movq	_GIUTERMUPDN@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_giu_read
	movl	%r14d, %esi
	notl	%esi
	andl	%eax, %esi
	orl	%r14d, %eax
	cmpq	%rbx, (%r15)
	cmovel	%eax, %esi
	movl	(%r12), %edi
	callq	_giu_write
	movq	_GIUUSEUPDN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_giu_read
	movl	%eax, %esi
	orl	%r14d, %esi
LBB0_9:
	movq	_GIUUSEUPDN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_giu_write
	movq	_giu_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_giu_flags,4,2                  ## @giu_flags
	.comm	_GPIO_HAS_PULLUPDOWN_IO,4,2     ## @GPIO_HAS_PULLUPDOWN_IO
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_giu_lock,4,2                   ## @giu_lock
	.comm	_GPIO_PULL_UP,8,3               ## @GPIO_PULL_UP
	.comm	_GPIO_PULL_DOWN,8,3             ## @GPIO_PULL_DOWN
	.comm	_GIUTERMUPDN,4,2                ## @GIUTERMUPDN
	.comm	_GIUUSEUPDN,4,2                 ## @GIUUSEUPDN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vr41xx_gpio_pullupdown         ; -- Begin function vr41xx_gpio_pullupdown
	.p2align	2
_vr41xx_gpio_pullupdown:                ; @vr41xx_gpio_pullupdown
	.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
Lloh0:
	adrp	x8, _giu_flags@GOTPAGE
Lloh1:
	ldr	x8, [x8, _giu_flags@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _GPIO_HAS_PULLUPDOWN_IO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GPIO_HAS_PULLUPDOWN_IO@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	bics	wzr, w9, w8
	b.ne	LBB0_3
; %bb.1:
	cmp	w0, #15
	b.lo	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _EPERM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	mov	x19, x1
	mov	w8, #1
	lsl	w20, w8, w0
Lloh10:
	adrp	x0, _giu_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _giu_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh12:
	adrp	x22, _GPIO_PULL_UP@GOTPAGE
Lloh13:
	ldr	x22, [x22, _GPIO_PULL_UP@GOTPAGEOFF]
Lloh14:
	adrp	x8, _GPIO_PULL_DOWN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GPIO_PULL_DOWN@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh16:
	ldr	x8, [x8]
	cmp	x9, x19
	ccmp	x8, x19, #4, ne
Lloh17:
	adrp	x21, _GIUUSEUPDN@GOTPAGE
Lloh18:
	ldr	x21, [x21, _GIUUSEUPDN@GOTPAGEOFF]
	b.ne	LBB0_7
; %bb.6:
Lloh19:
	adrp	x23, _GIUTERMUPDN@GOTPAGE
Lloh20:
	ldr	x23, [x23, _GIUTERMUPDN@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_giu_read
	ldr	x8, [x22]
	orr	w9, w0, w20
	bic	w10, w0, w20
	cmp	x8, x19
	csel	w1, w9, w10, eq
	ldr	w0, [x23]
	bl	_giu_write
	ldr	w0, [x21]
	bl	_giu_read
	orr	w1, w0, w20
	b	LBB0_8
LBB0_7:
	ldr	w0, [x21]
	bl	_giu_read
	bic	w1, w0, w20
LBB0_8:
	ldr	w0, [x21]
	bl	_giu_write
Lloh21:
	adrp	x0, _giu_lock@GOTPAGE
Lloh22:
	ldr	x0, [x0, _giu_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_giu_flags,4,2                  ; @giu_flags
	.comm	_GPIO_HAS_PULLUPDOWN_IO,4,2     ; @GPIO_HAS_PULLUPDOWN_IO
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_giu_lock,4,2                   ; @giu_lock
	.comm	_GPIO_PULL_UP,8,3               ; @GPIO_PULL_UP
	.comm	_GPIO_PULL_DOWN,8,3             ; @GPIO_PULL_DOWN
	.comm	_GIUTERMUPDN,4,2                ; @GIUTERMUPDN
	.comm	_GIUUSEUPDN,4,2                 ; @GIUUSEUPDN
.subsections_via_symbols
