	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lochnagar_pin_set_mux
_lochnagar_pin_set_mux:                 ## @lochnagar_pin_set_mux
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	cmpl	$128, (%rax)
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_lochnagar2_get_gpio_chan
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_2
LBB0_3:
	movl	(%rbx), %edi
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %ecx
	callq	_dev_dbg
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	movl	4(%r14), %esi
	movl	%r15d, %edx
	callq	_regmap_write
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	(%rbx), %edi
	movl	(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %ecx
	jmp	LBB0_5
LBB0_2:
	movl	(%rbx), %edi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %ecx
LBB0_5:
	callq	_dev_err
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get channel for %s: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Set pin %s to 0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to set %s mux: %d\n"

	.no_dead_strip	_lochnagar_pin_set_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lochnagar_pin_set_mux
_lochnagar_pin_set_mux:                 ; @lochnagar_pin_set_mux
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	bl	_lochnagar2_get_gpio_chan
	mov	x19, x0
	tbnz	w0, #31, LBB0_5
LBB0_2:
	ldr	w0, [x21]
	ldr	w2, [x20]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x19
	bl	_dev_dbg
	ldr	x8, [x21, #8]
	ldr	w0, [x8, #4]
	ldr	w1, [x20, #4]
	mov	x2, x19
	bl	_regmap_write
	cbz	w0, LBB0_4
; %bb.3:
	mov	x3, x0
	ldr	w0, [x21]
	ldr	w2, [x20]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_4:
	mov	w19, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [x21]
	ldr	w2, [x20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	bl	_dev_err
LBB0_6:
	mov	x0, x19
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get channel for %s: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Set pin %s to 0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to set %s mux: %d\n"

	.no_dead_strip	_lochnagar_pin_set_mux
.subsections_via_symbols
