	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_mode
_set_mode:                              ## @set_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %rcx
	movq	8(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movl	(%rcx), %edx
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.2:
	testl	%edx, %edx
	jle	LBB0_8
## %bb.3:
	movq	%rdi, %r14
	movl	$1, %edi
	movl	%esi, %ecx
	shll	%cl, %edi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rcx,8), %rbx
	cmpl	%edi, (%rbx)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rcx
	cmpq	%rcx, %rdx
	jne	LBB0_5
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movl	16(%rbx), %esi
	movq	%r14, %rdi
	callq	_pmx_readl
	movl	16(%rbx), %edx
	movl	24(%rbx), %esi
	notl	%esi
	andl	%eax, %esi
	orl	20(%rbx), %esi
	movq	%r14, %rdi
	callq	_pmx_writel
	movl	(%rbx), %eax
	movq	8(%r14), %rcx
	movl	%eax, 4(%rcx)
	movl	(%r14), %edi
	movq	8(%rbx), %rax
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %rdx
	cmovneq	%rax, %rdx
	movl	16(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Configured Mode: %s with id: %x\n\n"

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

	.no_dead_strip	_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_mode
_set_mode:                              ; @set_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x9, [x0, #8]
	ldr	x8, [x9, #8]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	w9, [x9]
	cbz	w9, LBB0_6
; %bb.2:
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x19, x0
	mov	w10, #1
	lsl	w10, w10, w1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x8]
	ldr	w11, [x20]
	cmp	w11, w10
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #8
	subs	x9, x9, #1
	b.ne	LBB0_4
LBB0_6:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w1, [x20, #16]
	mov	x0, x19
	bl	_pmx_readl
	ldp	w9, w8, [x20, #20]
	bic	w8, w0, w8
	ldr	w2, [x20, #16]
	orr	w1, w8, w9
	mov	x0, x19
	bl	_pmx_writel
	ldr	w8, [x20]
	ldr	x9, [x19, #8]
	str	w8, [x9, #4]
	ldr	w0, [x19]
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, l_.str.1@PAGE
Lloh4:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x8, #0
	csel	x2, x9, x8, eq
	ldr	w3, [x20, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Configured Mode: %s with id: %x\n\n"

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

	.no_dead_strip	_set_mode
.subsections_via_symbols
