	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mpt_write_config_page          ## -- Begin function mpt_write_config_page
	.p2align	4, 0x90
_mpt_write_config_page:                 ## @mpt_write_config_page
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	%edi, %r15d
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	_MPI_IOCSTATUS_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_2:
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_bzero
	movq	%rbx, -40(%rbp)
	movl	(%rbx), %eax
	shll	$2, %eax
	movl	%eax, -48(%rbp)
	movq	_MPTIO_WRITE_CFG_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	movq	%r12, %rdx
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movl	-44(%rbp), %edi
	callq	_IOC_STATUS_SUCCESS
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_9
## %bb.5:
	movl	-44(%rbp), %edi
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:
	movl	%edi, (%r14)
	jmp	LBB0_9
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	callq	_mpt_ioc_status
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_warnx
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MPI_IOCSTATUS_SUCCESS,4,2      ## @MPI_IOCSTATUS_SUCCESS
	.comm	_MPTIO_WRITE_CFG_PAGE,4,2       ## @MPTIO_WRITE_CFG_PAGE
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Writing config page failed: %s"

	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mpt_write_config_page          ; -- Begin function mpt_write_config_page
	.p2align	2
_mpt_write_config_page:                 ; @mpt_write_config_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	cbz	x2, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MPI_IOCSTATUS_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MPI_IOCSTATUS_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_2:
	mov	x0, sp
	mov	w1, #16
	bl	_bzero
	str	x21, [sp, #8]
	ldr	w8, [x21]
	lsl	w8, w8, #2
	str	w8, [sp]
Lloh3:
	adrp	x8, _MPTIO_WRITE_CFG_PAGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MPTIO_WRITE_CFG_PAGE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x20
	bl	_ioctl
	tbnz	x0, #63, LBB0_5
; %bb.3:
	ldr	w0, [sp, #4]
	bl	_IOC_STATUS_SUCCESS
	cbz	w0, LBB0_6
; %bb.4:
	mov	w0, #0
	b	LBB0_10
LBB0_5:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	ldr	w8, [sp, #4]
	cbz	x19, LBB0_8
; %bb.7:
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_10
LBB0_8:
	mov	x0, x8
	bl	_mpt_ioc_status
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MPI_IOCSTATUS_SUCCESS,4,2      ; @MPI_IOCSTATUS_SUCCESS
	.comm	_MPTIO_WRITE_CFG_PAGE,4,2       ; @MPTIO_WRITE_CFG_PAGE
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Writing config page failed: %s"

	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
