	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cp2112_gpio_direction_input
_cp2112_gpio_direction_input:           ## @cp2112_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, -44(%rbp)                 ## 4-byte Spill
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movq	(%rax), %r12
	movq	16(%rax), %r14
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_CP2112_GPIO_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CP2112_GPIO_CONFIG_LENGTH@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	_HID_FEATURE_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_HID_REQ_GET_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_hid_hw_raw_request
	movl	%eax, %ebx
	cmpl	(%r13), %eax
	jne	LBB0_1
## %bb.2:
	movl	$-2, %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	roll	%cl, %eax
	andl	%eax, 4(%r12)
	movq	_gpio_push_pull@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	_CP2112_GPIO_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HID_FEATURE_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_HID_REQ_SET_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r14, %rdi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_hid_hw_raw_request
	xorl	%ebx, %ebx
	cmpl	(%r13), %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_hid_err
	movl	%r12d, %ebx
	testl	%r12d, %r12d
	jns	LBB0_4
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_hid_err
	testl	%ebx, %ebx
	js	LBB0_5
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CP2112_GPIO_CONFIG,4,2         ## @CP2112_GPIO_CONFIG
	.comm	_CP2112_GPIO_CONFIG_LENGTH,4,2  ## @CP2112_GPIO_CONFIG_LENGTH
	.comm	_HID_FEATURE_REPORT,4,2         ## @HID_FEATURE_REPORT
	.comm	_HID_REQ_GET_REPORT,4,2         ## @HID_REQ_GET_REPORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error requesting GPIO config: %d\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_gpio_push_pull,4,2             ## @gpio_push_pull
	.comm	_HID_REQ_SET_REPORT,4,2         ## @HID_REQ_SET_REPORT
L_.str.1:                               ## @.str.1
	.asciz	"error setting GPIO config: %d\n"

	.no_dead_strip	_cp2112_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 cp2112_gpio_direction_input
_cp2112_gpio_direction_input:           ; @cp2112_gpio_direction_input
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x1
	bl	_gpiochip_get_data
	ldr	x20, [x0, #16]
	ldr	x22, [x0]
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x25, _CP2112_GPIO_CONFIG@GOTPAGE
Lloh1:
	ldr	x25, [x25, _CP2112_GPIO_CONFIG@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh2:
	adrp	x24, _CP2112_GPIO_CONFIG_LENGTH@GOTPAGE
Lloh3:
	ldr	x24, [x24, _CP2112_GPIO_CONFIG_LENGTH@GOTPAGEOFF]
	ldr	w3, [x24]
Lloh4:
	adrp	x26, _HID_FEATURE_REPORT@GOTPAGE
Lloh5:
	ldr	x26, [x26, _HID_FEATURE_REPORT@GOTPAGEOFF]
	ldr	w4, [x26]
Lloh6:
	adrp	x8, _HID_REQ_GET_REPORT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HID_REQ_GET_REPORT@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_hid_hw_raw_request
	mov	x21, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
	mov	w8, #1
	lsl	w8, w8, w23
	ldr	w9, [x22, #4]
	bic	w8, w9, w8
Lloh9:
	adrp	x9, _gpio_push_pull@GOTPAGE
Lloh10:
	ldr	x9, [x9, _gpio_push_pull@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w8, w9, [x22, #4]
	ldr	w1, [x25]
	ldr	w4, [x26]
Lloh12:
	adrp	x8, _HID_REQ_SET_REPORT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HID_REQ_SET_REPORT@GOTPAGEOFF]
Lloh14:
	ldr	w5, [x8]
	mov	x0, x20
	mov	x2, x22
	mov	x3, x21
	bl	_hid_hw_raw_request
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
	mov	w21, #0
	b	LBB0_7
LBB0_3:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
	mov	x21, x0
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x20
	mov	x2, x21
	bl	_hid_err
	tbnz	w21, #31, LBB0_7
; %bb.6:
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_CP2112_GPIO_CONFIG,4,2         ; @CP2112_GPIO_CONFIG
	.comm	_CP2112_GPIO_CONFIG_LENGTH,4,2  ; @CP2112_GPIO_CONFIG_LENGTH
	.comm	_HID_FEATURE_REPORT,4,2         ; @HID_FEATURE_REPORT
	.comm	_HID_REQ_GET_REPORT,4,2         ; @HID_REQ_GET_REPORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error requesting GPIO config: %d\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_gpio_push_pull,4,2             ; @gpio_push_pull
	.comm	_HID_REQ_SET_REPORT,4,2         ; @HID_REQ_SET_REPORT
l_.str.1:                               ; @.str.1
	.asciz	"error setting GPIO config: %d\n"

	.no_dead_strip	_cp2112_gpio_direction_input
.subsections_via_symbols
