	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_pwrite                     ## -- Begin function sys_pwrite
	.p2align	4, 0x90
_sys_pwrite:                            ## @sys_pwrite
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %r13
	movl	%esi, %r15d
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movq	%r13, %rcx
	movl	%r12d, %r8d
	callq	_STRACE
	movl	%ebx, %edi
	callq	_f_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	leal	1(%r13), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movl	%r15d, %edi
	movq	%rax, %rsi
	movq	%r13, %rdx
	callq	_user_read
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_9
LBB0_1:
	movq	__EBADF@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_9
LBB0_3:
	movq	__ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_9
LBB0_6:
	movq	%rbx, %r15
	movq	%r14, %rdi
	callq	_lock
	movq	8(%r14), %rax
	movq	_LSEEK_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	*(%rax)
	testq	%rax, %rax
	js	LBB0_8
## %bb.7:
	movq	8(%r14), %rax
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	*8(%rax)
LBB0_8:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_unlock
	movq	%r15, %rdi
	callq	_free
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pwrite(%d, 0x%x, %d, %d)"

	.comm	__EBADF,8,3                     ## @_EBADF
	.comm	__ENOMEM,8,3                    ## @_ENOMEM
	.comm	__EFAULT,8,3                    ## @_EFAULT
	.comm	_LSEEK_SET,4,2                  ## @LSEEK_SET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_pwrite                     ; -- Begin function sys_pwrite
	.p2align	2
_sys_pwrite:                            ; @sys_pwrite
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x23
	mov	x3, x19
	mov	x4, x22
	bl	_STRACE
	mov	x0, x20
	bl	_f_get
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	add	w0, w19, #1
	bl	_malloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x21, x0
	mov	x0, x23
	mov	x1, x21
	mov	x2, x19
	bl	_user_read
	cbz	x0, LBB0_6
; %bb.3:
Lloh2:
	adrp	x8, __EFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh4:
	ldr	x22, [x8]
	b	LBB0_9
LBB0_4:
Lloh5:
	adrp	x8, __EBADF@GOTPAGE
Lloh6:
	ldr	x8, [x8, __EBADF@GOTPAGEOFF]
Lloh7:
	ldr	x22, [x8]
	b	LBB0_9
LBB0_5:
Lloh8:
	adrp	x8, __ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, __ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	x22, [x8]
	b	LBB0_9
LBB0_6:
	mov	x0, x20
	bl	_lock
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _LSEEK_SET@GOTPAGE
Lloh12:
	ldr	x9, [x9, _LSEEK_SET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x9]
	mov	x0, x20
	mov	x1, x22
	blr	x8
	tbnz	x0, #63, LBB0_8
; %bb.7:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #8]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	blr	x8
LBB0_8:
	mov	x22, x0
	mov	x0, x20
	bl	_unlock
	mov	x0, x21
	bl	_free
LBB0_9:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pwrite(%d, 0x%x, %d, %d)"

	.comm	__EBADF,8,3                     ; @_EBADF
	.comm	__ENOMEM,8,3                    ; @_ENOMEM
	.comm	__EFAULT,8,3                    ; @_EFAULT
	.comm	_LSEEK_SET,4,2                  ; @LSEEK_SET
.subsections_via_symbols
