	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lochnagar_gpio_set
_lochnagar_gpio_set:                    ## @lochnagar_gpio_set
	.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	%edx, %r13d
	movl	%esi, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_gpiochip_get_data
	movq	%rax, %rbx
	movq	16(%rax), %r14
	movq	8(%rax), %rax
	movl	%r15d, %ecx
	movq	(%rax,%rcx,8), %r15
	xorl	%r12d, %r12d
	testl	%r13d, %r13d
	setne	%r12b
	movl	(%rbx), %edi
	movl	8(%r15), %edx
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rcx
	cmovneq	%rax, %rcx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movl	(%r15), %eax
	cmpl	$129, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.2:
	movq	_LN2_OP_GPIO@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_lochnagar_pin_set_mux
	testl	%eax, %eax
	jns	LBB0_6
	jmp	LBB0_7
LBB0_3:
	xorl	%ebx, %ebx
	testl	%r13d, %r13d
	sete	%bl
	cmpl	$0, 16(%r15)
	cmovel	%r12d, %ebx
	movl	(%r14), %r12d
	movl	4(%r15), %edi
	movl	12(%r15), %r13d
	callq	_BIT
	movb	4(%r15), %cl
	shll	%cl, %ebx
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_7
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%eax, %eax
	jns	LBB0_6
LBB0_7:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	movl	8(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set GPIO %s to %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"high"

L_.str.2:                               ## @.str.2
	.asciz	"low"

	.comm	_LN2_OP_GPIO,4,2                ## @LN2_OP_GPIO
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"Failed to set %s value: %d\n"

	.no_dead_strip	_lochnagar_gpio_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lochnagar_gpio_set
_lochnagar_gpio_set:                    ; @lochnagar_gpio_set
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	bl	_gpiochip_get_data
	mov	x21, x0
	ldp	x8, x24, [x0, #8]
	ldr	x20, [x8, w20, uxtw #3]
	cmp	w22, #0
	cset	w23, ne
	ldr	w0, [x0]
	ldr	w2, [x20, #8]
Lloh0:
	adrp	x8, l_.str.2@PAGE
Lloh1:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
	csel	x3, x9, x8, ne
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x20]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _LN2_OP_GPIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LN2_OP_GPIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w2, w8, w23
	mov	x0, x21
	mov	x1, x20
	bl	_lochnagar_pin_set_mux
	mov	x3, x0
	tbz	w3, #31, LBB0_4
	b	LBB0_6
LBB0_3:
	cmp	w22, #0
	cset	w8, eq
	ldp	w21, w9, [x20, #12]
	cmp	w9, #0
	csel	w23, w23, w8, eq
	ldr	w22, [x24]
	ldr	w0, [x20, #4]
	bl	_BIT
	mov	x2, x0
	ldr	w8, [x20, #4]
	lsl	w3, w23, w8
	mov	x0, x22
	mov	x1, x21
	bl	_regmap_update_bits
	mov	x3, x0
	tbnz	w3, #31, LBB0_6
LBB0_4:
	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
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w3, w8
	tbz	w3, #31, LBB0_4
LBB0_6:
	ldr	w0, [x19]
	ldr	w2, [x20, #8]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	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
	b	_dev_err
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set GPIO %s to %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"high"

l_.str.2:                               ; @.str.2
	.asciz	"low"

	.comm	_LN2_OP_GPIO,4,2                ; @LN2_OP_GPIO
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"Failed to set %s value: %d\n"

	.no_dead_strip	_lochnagar_gpio_set
.subsections_via_symbols
