	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpiomm_gpio_direction_input
_gpiomm_gpio_direction_input:           ## @gpiomm_gpio_direction_input
	.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, %r13d
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movl	%r13d, %ebx
	shrl	$3, %ebx
	movl	%r13d, %eax
	movl	$2863311531, %r12d              ## imm = 0xAAAAAAAB
	imulq	%rax, %r12
	shrq	$36, %r12
	movl	(%r15), %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %r14
	addq	$24, %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpl	$5, %ebx
	je	LBB0_2
## %bb.1:
	cmpl	$2, %ebx
	jne	LBB0_5
LBB0_2:
	movq	8(%r15), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %edx
	testb	$4, %r13b
	jne	LBB0_3
## %bb.4:
	orl	$15, %edx
	movl	%edx, (%rax,%rcx,4)
	xorl	%edi, %edi
	jmp	LBB0_9
LBB0_5:
	movq	8(%r15), %rax
	movl	%ebx, %ecx
	orl	$255, (%rax,%rcx,4)
	cmpl	$8, %r13d
	jb	LBB0_7
## %bb.6:
	cmpl	$3, %ebx
	je	LBB0_7
## %bb.8:
	movl	$1, %edi
	jmp	LBB0_9
LBB0_3:
	orl	$240, %edx
	movl	%edx, (%rax,%rcx,4)
	movl	$3, %edi
	jmp	LBB0_9
LBB0_7:
	movl	$4, %edi
LBB0_9:
	callq	_BIT
	movl	%r12d, %r13d
	leaq	(,%r13,4), %rcx
	addq	16(%r15), %rcx
	orl	%eax, (%rcx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r12,4), %ebx
	addl	$3, %ebx
	movl	$7, %edi
	callq	_BIT
	movq	16(%r15), %rcx
	orl	(%rcx,%r13,4), %eax
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_outb
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gpiomm_gpio_direction_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpiomm_gpio_direction_input
_gpiomm_gpio_direction_input:           ; @gpiomm_gpio_direction_input
	.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
	bl	_gpiochip_get_data
	mov	x20, x0
	lsr	w24, w21, #3
	mov	w8, #43691
	movk	w8, #43690, lsl #16
	umull	x8, w21, w8
	lsr	x22, x8, #36
	mov	x19, x0
	ldr	w23, [x19], #24
	mov	x0, x19
	bl	_spin_lock_irqsave
	cmp	w24, #5
	b.eq	LBB0_2
; %bb.1:
	cmp	w24, #2
	b.ne	LBB0_4
LBB0_2:
	ldr	x8, [x20, #8]
	ldr	w9, [x8, w24, uxtw #2]
	tbnz	w21, #2, LBB0_7
; %bb.3:
	orr	w9, w9, #0xf
	str	w9, [x8, x24, lsl #2]
	mov	w0, #0
	b	LBB0_9
LBB0_4:
	ldr	x8, [x20, #8]
	lsl	x9, x24, #2
	ldr	w10, [x8, x9]
	orr	w10, w10, #0xff
	str	w10, [x8, x9]
	cmp	w21, #8
	b.lo	LBB0_8
; %bb.5:
	cmp	w24, #3
	b.eq	LBB0_8
; %bb.6:
	mov	w0, #1
	b	LBB0_9
LBB0_7:
	orr	w9, w9, #0xf0
	str	w9, [x8, x24, lsl #2]
	mov	w0, #3
	b	LBB0_9
LBB0_8:
	mov	w0, #4
LBB0_9:
	bl	_BIT
	ldr	x8, [x20, #16]
	mov	w24, w22
	add	x8, x8, w22, uxtw #2
	ldr	w9, [x8]
	orr	w9, w9, w0
	str	w9, [x8]
	add	w8, w23, w22, lsl #2
	add	w21, w8, #3
	mov	w0, #7
	bl	_BIT
	ldr	x8, [x20, #16]
	ldr	w8, [x8, x24, lsl #2]
	orr	w0, w8, w0
	mov	x1, x21
	bl	_outb
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gpiomm_gpio_direction_input
.subsections_via_symbols
