	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IOSUHAX_memwrite               ## -- Begin function IOSUHAX_memwrite
	.p2align	4, 0x90
_IOSUHAX_memwrite:                      ## @IOSUHAX_memwrite
	.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
	movq	_iosuhaxHandle@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	testq	%rax, %rax
	js	LBB0_5
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rdx, %r15
	movq	%rdi, %r13
	leaq	4(%rdx), %rsi
	movl	$32, %edi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_memalign
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:
	movq	%rax, %r12
	movq	%r13, (%rax)
	movq	%rax, %rdi
	addq	$8, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_memcpy
	movq	(%r14), %rdi
	movq	_IOCTL_MEM_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_IOS_Ioctl
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_free
	movl	%ebx, %eax
	jmp	LBB0_6
LBB0_2:
	movl	$-1, %eax
	jmp	LBB0_5
LBB0_4:
	movl	$-2, %eax
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_iosuhaxHandle,8,3              ## @iosuhaxHandle
	.comm	_IOCTL_MEM_WRITE,4,2            ## @IOCTL_MEM_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IOSUHAX_memwrite               ; -- Begin function IOSUHAX_memwrite
	.p2align	2
_IOSUHAX_memwrite:                      ; @IOSUHAX_memwrite
	.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	x23, x0
Lloh0:
	adrp	x24, _iosuhaxHandle@GOTPAGE
Lloh1:
	ldr	x24, [x24, _iosuhaxHandle@GOTPAGEOFF]
	ldr	x0, [x24]
	tbnz	x0, #63, LBB0_6
; %bb.1:
	mov	x22, x1
	cbz	x1, LBB0_4
; %bb.2:
	mov	x21, x2
	add	x19, x2, #4
	mov	w0, #32
	mov	x1, x19
	bl	_memalign
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	str	x23, [x0], #8
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	ldr	x0, [x24]
Lloh2:
	adrp	x8, _IOCTL_MEM_WRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IOCTL_MEM_WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x2, x20
	mov	x3, x19
	mov	w4, #0
	mov	w5, #0
	bl	_IOS_Ioctl
	mov	x19, x0
	mov	x0, x20
	bl	_free
	mov	x0, x19
	b	LBB0_7
LBB0_4:
	mov	w0, #-1
	b	LBB0_6
LBB0_5:
	mov	w0, #-2
LBB0_6:
                                        ; kill: def $w0 killed $w0 killed $x0
LBB0_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_iosuhaxHandle,8,3              ; @iosuhaxHandle
	.comm	_IOCTL_MEM_WRITE,4,2            ; @IOCTL_MEM_WRITE
.subsections_via_symbols
