	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lochnagar_gpio_request
_lochnagar_gpio_request:                ## @lochnagar_gpio_request
	.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
	movl	%edx, %ebx
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, %r12
	movq	16(%rax), %r14
	movq	8(%rax), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rbx
	movl	(%r12), %edi
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	(%r14), %rax
	movq	_LOCHNAGAR1@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.1:
	movq	(%rbx), %rax
	movq	_LN_PTYPE_MUX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.2:
	movq	_LN2_OP_GPIO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_lochnagar2_get_gpio_chan
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	(%rbx), %esi
	orl	$1, %esi
	movq	%r12, %rdi
	callq	_lochnagar2_get_gpio_chan
	testl	%eax, %eax
	jns	LBB0_7
## %bb.5:
	movl	%eax, %r15d
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_6
LBB0_3:
	movl	%eax, %r15d
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movl	%r15d, %edx
	callq	_dev_err
	movl	%r15d, %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Requesting GPIO %s\n"

	.comm	_LOCHNAGAR1,8,3                 ## @LOCHNAGAR1
	.comm	_LN_PTYPE_MUX,8,3               ## @LN_PTYPE_MUX
	.comm	_LN2_OP_GPIO,4,2                ## @LN2_OP_GPIO
L_.str.1:                               ## @.str.1
	.asciz	"Failed to get low channel: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to get high channel: %d\n"

	.no_dead_strip	_lochnagar_gpio_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lochnagar_gpio_request
_lochnagar_gpio_request:                ; @lochnagar_gpio_request
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	bl	_pinctrl_dev_get_drvdata
	mov	x19, x0
	ldp	x8, x21, [x0, #8]
	ldr	x20, [x8, w20, uxtw #3]
	ldr	w0, [x0]
	ldr	w2, [x20, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _LOCHNAGAR1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _LOCHNAGAR1@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _LN_PTYPE_MUX@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LN_PTYPE_MUX@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh8:
	adrp	x21, _LN2_OP_GPIO@GOTPAGE
Lloh9:
	ldr	x21, [x21, _LN2_OP_GPIO@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_lochnagar2_get_gpio_chan
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w8, [x21]
	orr	w1, w8, #0x1
	mov	x0, x19
	bl	_lochnagar2_get_gpio_chan
	tbnz	w0, #31, LBB0_7
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x20, x0
	ldr	w0, [x19]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
	mov	x20, x0
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_8:
	mov	x2, x20
	bl	_dev_err
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Requesting GPIO %s\n"

	.comm	_LOCHNAGAR1,8,3                 ; @LOCHNAGAR1
	.comm	_LN_PTYPE_MUX,8,3               ; @LN_PTYPE_MUX
	.comm	_LN2_OP_GPIO,4,2                ; @LN2_OP_GPIO
l_.str.1:                               ; @.str.1
	.asciz	"Failed to get low channel: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to get high channel: %d\n"

	.no_dead_strip	_lochnagar_gpio_request
.subsections_via_symbols
