	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pdcs_osdep2_write
_pdcs_osdep2_write:                     ## @pdcs_osdep2_write
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	testq	%r12, %r12
	je	LBB0_4
## %bb.5:
	movq	_pdcs_size@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpl	$225, (%rbx)
	setl	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_1:
	movq	_EACCES@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%r12d, %r12d
	subq	(%rax), %r12
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_pdcs_osid@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_OS_ID_LINUX@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_9:
	movslq	(%rbx), %rax
	addq	$-224, %rax
	cmpq	%r12, %rax
	jae	LBB0_10
## %bb.11:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_10:
	xorl	%ebx, %ebx
	leaq	-64(%rbp), %r15
	movq	_PDC_OK@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	leaq	(%r14,%rbx), %rsi
	movq	%r12, %rdx
	subq	%rbx, %rdx
	cmpq	$4, %rdx
	movl	$4, %eax
	cmovaeq	%rax, %rdx
	movq	%r15, %rdi
	callq	_memcpy
	movq	_PDCS_ADDR_OSD2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_pdc_stable_write
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_13 Depth=1
	addl	$4, %ebx
	movzwl	%bx, %ebx
	cmpq	%r12, %rbx
	jb	LBB0_13
	jmp	LBB0_16
LBB0_14:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_EACCES,8,3                     ## @EACCES
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_pdcs_size,4,2                  ## @pdcs_size
	.comm	_ENOSYS,8,3                     ## @ENOSYS
	.comm	_pdcs_osid,8,3                  ## @pdcs_osid
	.comm	_OS_ID_LINUX,8,3                ## @OS_ID_LINUX
	.comm	_EPERM,8,3                      ## @EPERM
	.comm	_EMSGSIZE,8,3                   ## @EMSGSIZE
	.comm	_PDCS_ADDR_OSD2,8,3             ## @PDCS_ADDR_OSD2
	.comm	_PDC_OK,8,3                     ## @PDC_OK
	.comm	_EIO,8,3                        ## @EIO
	.no_dead_strip	_pdcs_osdep2_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pdcs_osdep2_write
_pdcs_osdep2_write:                     ; @pdcs_osdep2_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x20, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_5
; %bb.1:
	cbz	x20, LBB0_6
; %bb.2:
	cbz	x19, LBB0_6
; %bb.3:
Lloh6:
	adrp	x21, _pdcs_size@GOTPAGE
Lloh7:
	ldr	x21, [x21, _pdcs_size@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #225
	cset	w0, lt
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.4:
Lloh8:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh10:
	adrp	x8, _EACCES@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_8:
	ldr	x8, [sp, #24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.9:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
Lloh17:
	adrp	x8, _pdcs_osid@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pdcs_osid@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _OS_ID_LINUX@GOTPAGE
Lloh21:
	ldr	x9, [x9, _OS_ID_LINUX@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_12
; %bb.11:
Lloh23:
	adrp	x8, _EPERM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_7
LBB0_12:
	ldrsw	x8, [x21]
	sub	x8, x8, #224
	cmp	x8, x19
	b.hs	LBB0_14
; %bb.13:
Lloh25:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
	b	LBB0_7
LBB0_14:
	mov	x21, #0
	mov	w22, #4
Lloh27:
	adrp	x23, _PDCS_ADDR_OSD2@GOTPAGE
Lloh28:
	ldr	x23, [x23, _PDCS_ADDR_OSD2@GOTPAGEOFF]
Lloh29:
	adrp	x24, _PDC_OK@GOTPAGE
Lloh30:
	ldr	x24, [x24, _PDC_OK@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x1, x20, x21
	sub	x8, x19, x21
	cmp	x8, #4
	csel	x2, x8, x22, lo
	add	x0, sp, #8
	bl	_memcpy
	ldr	x8, [x23]
	add	x0, x8, x21
	add	x1, sp, #8
	mov	w2, #16
	bl	_pdc_stable_write
	ldr	x8, [x24]
	cmp	x0, x8
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w8, w21, #4
	and	x21, x8, #0xffff
	cmp	x21, x19
	b.lo	LBB0_15
	b	LBB0_8
LBB0_17:
Lloh31:
	adrp	x8, _EIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_EACCES,8,3                     ; @EACCES
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_pdcs_size,4,2                  ; @pdcs_size
	.comm	_ENOSYS,8,3                     ; @ENOSYS
	.comm	_pdcs_osid,8,3                  ; @pdcs_osid
	.comm	_OS_ID_LINUX,8,3                ; @OS_ID_LINUX
	.comm	_EPERM,8,3                      ; @EPERM
	.comm	_EMSGSIZE,8,3                   ; @EMSGSIZE
	.comm	_PDCS_ADDR_OSD2,8,3             ; @PDCS_ADDR_OSD2
	.comm	_PDC_OK,8,3                     ; @PDC_OK
	.comm	_EIO,8,3                        ; @EIO
	.no_dead_strip	_pdcs_osdep2_write
.subsections_via_symbols
