	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cp2112_gpio_direction_output
_cp2112_gpio_direction_output:          ## @cp2112_gpio_direction_output
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_gpiochip_get_data
	movq	%rax, %rbx
	movq	(%rax), %r15
	movq	16(%rax), %r13
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_CP2112_GPIO_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CP2112_GPIO_CONFIG_LENGTH@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	_HID_FEATURE_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_HID_REQ_GET_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r13, %rdi
	movq	%r15, %rdx
	callq	_hid_hw_raw_request
	movl	%eax, %r14d
	cmpl	(%r12), %eax
	jne	LBB0_1
## %bb.3:
	movl	$1, %eax
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %ecx
	shll	%cl, %eax
	orl	%eax, 4(%r15)
	movq	_gpio_push_pull@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	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	%r13, %rdi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_hid_hw_raw_request
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_cp2112_gpio_set
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_hid_err
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%r14d, %r14d
	cmovsl	%r14d, %eax
LBB0_6:
	addq	$24, %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	_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"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_cp2112_gpio_direction_output
.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_output
_cp2112_gpio_direction_output:          ; @cp2112_gpio_direction_output
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_gpiochip_get_data
	ldr	x23, [x0, #16]
	ldr	x25, [x0]
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x26, _CP2112_GPIO_CONFIG@GOTPAGE
Lloh1:
	ldr	x26, [x26, _CP2112_GPIO_CONFIG@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh2:
	adrp	x28, _CP2112_GPIO_CONFIG_LENGTH@GOTPAGE
Lloh3:
	ldr	x28, [x28, _CP2112_GPIO_CONFIG_LENGTH@GOTPAGEOFF]
	ldr	w3, [x28]
Lloh4:
	adrp	x27, _HID_FEATURE_REPORT@GOTPAGE
Lloh5:
	ldr	x27, [x27, _HID_FEATURE_REPORT@GOTPAGEOFF]
	ldr	w4, [x27]
Lloh6:
	adrp	x8, _HID_REQ_GET_REPORT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HID_REQ_GET_REPORT@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	mov	x0, x23
	mov	x2, x25
	bl	_hid_hw_raw_request
	mov	x24, x0
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
	mov	w8, #1
	lsl	w8, w8, w21
	ldr	w9, [x25, #4]
	orr	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, [x25, #4]
	ldr	w1, [x26]
	ldr	w4, [x27]
Lloh12:
	adrp	x8, _HID_REQ_SET_REPORT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HID_REQ_SET_REPORT@GOTPAGEOFF]
Lloh14:
	ldr	w5, [x8]
	mov	x0, x23
	mov	x2, x25
	mov	x3, x24
	bl	_hid_hw_raw_request
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_cp2112_gpio_set
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
	mov	x24, x0
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x23
	mov	x2, x24
	bl	_hid_err
	mov	x0, x19
	bl	_mutex_unlock
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w24, #0
	csneg	w0, w24, w8, lt
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 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	_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"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_cp2112_gpio_direction_output
.subsections_via_symbols
