	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipmi_set_maintenance_mode      ## -- Begin function ipmi_set_maintenance_mode
	.p2align	4, 0x90
_ipmi_set_maintenance_mode:             ## @ipmi_set_maintenance_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	(%rdi), %r12
	leaq	8(%r12), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	xorl	%r14d, %r14d
	cmpl	%ebx, (%r12)
	je	LBB0_9
## %bb.1:
	cmpl	$128, %ebx
	je	LBB0_5
## %bb.2:
	cmpl	$129, %ebx
	je	LBB0_7
## %bb.3:
	cmpl	$130, %ebx
	jne	LBB0_6
## %bb.4:
	movl	$130, (%r12)
	xorl	%eax, %eax
	cmpl	$0, 12(%r12)
	setg	%al
	jmp	LBB0_8
LBB0_5:
	movl	$128, (%r12)
	movl	$1, %eax
	jmp	LBB0_8
LBB0_7:
	movl	$129, (%r12)
	xorl	%eax, %eax
LBB0_8:
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	callq	_maintenance_mode_update
	jmp	LBB0_9
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipmi_set_maintenance_mode      ; -- Begin function ipmi_set_maintenance_mode
	.p2align	2
_ipmi_set_maintenance_mode:             ; @ipmi_set_maintenance_mode
	.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	x21, x1
	ldr	x20, [x0]
	add	x19, x20, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
	cmp	w8, w21
	b.eq	LBB0_8
; %bb.1:
	cmp	w21, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #129
	b.eq	LBB0_6
; %bb.3:
	cmp	w21, #130
	b.ne	LBB0_10
; %bb.4:
	mov	w8, #130
	str	w8, [x20]
	ldr	w8, [x20, #12]
	cmp	w8, #0
	cset	w8, gt
	b	LBB0_7
LBB0_5:
	mov	w8, #128
	str	w8, [x20]
	mov	w8, #1
	b	LBB0_7
LBB0_6:
	mov	w8, #0
	mov	w9, #129
	str	w9, [x20]
LBB0_7:
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_maintenance_mode_update
LBB0_8:
	mov	w20, #0
LBB0_9:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	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_10:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
