	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IOSUHAX_FSA_RawWrite           ## -- Begin function IOSUHAX_FSA_RawWrite
	.p2align	4, 0x90
_IOSUHAX_FSA_RawWrite:                  ## @IOSUHAX_FSA_RawWrite
	.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	_iosuhaxHandle@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	js	LBB0_7
## %bb.1:
	movq	%rsi, %r13
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movl	%edx, %r12d
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	imull	%edx, %ebx
	leal	151(%rbx), %r14d
	andl	$-64, %r14d
	movl	$32, %edi
	movl	%r14d, %esi
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_memalign
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
	movl	%r12d, 4(%r15)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r15)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%r15)
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 20(%r15)
	movq	%r15, %rdi
	addq	$256, %rdi                      ## imm = 0x100
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	_iosuhaxHandle@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_IOCTL_FSA_RAW_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %r8
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movl	$4, %r9d
	callq	_IOS_Ioctl
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_free
	testl	%ebx, %ebx
	js	LBB0_7
## %bb.6:
	movl	-60(%rbp), %ebx
	jmp	LBB0_7
LBB0_2:
	movl	$-1, %ebx
	jmp	LBB0_7
LBB0_4:
	movl	$-2, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %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_FSA_RAW_WRITE,4,2        ## @IOCTL_FSA_RAW_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IOSUHAX_FSA_RawWrite           ; -- Begin function IOSUHAX_FSA_RawWrite
	.p2align	2
_IOSUHAX_FSA_RawWrite:                  ; @IOSUHAX_FSA_RawWrite
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x27, x0
Lloh0:
	adrp	x28, _iosuhaxHandle@GOTPAGE
Lloh1:
	ldr	x28, [x28, _iosuhaxHandle@GOTPAGEOFF]
	ldr	x0, [x28]
	tbnz	x0, #63, LBB0_6
; %bb.1:
	mov	x23, x1
	cbz	x1, LBB0_4
; %bb.2:
	mov	x21, x5
	mov	x22, x4
	mov	x24, x3
	mov	x25, x2
	mul	w26, w3, w2
	add	w8, w26, #151
	and	w19, w8, #0xffffffc0
	mov	w0, #32
	mov	x1, x19
	bl	_memalign
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	stp	w27, w25, [x0]
	str	w24, [x0, #8]
	add	x0, x0, #256
	stp	w22, w21, [x20, #16]
	mov	x1, x23
	mov	x2, x26
	bl	_memcpy
	ldr	x0, [x28]
Lloh2:
	adrp	x8, _IOCTL_FSA_RAW_WRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IOCTL_FSA_RAW_WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x4, sp, #12
	mov	x2, x20
	mov	x3, x19
	mov	w5, #4
	bl	_IOS_Ioctl
	mov	x19, x0
	mov	x0, x20
	bl	_free
	ldr	w8, [sp, #12]
	cmp	w19, #0
	csel	w0, w19, w8, lt
	b	LBB0_6
LBB0_4:
	mov	w0, #-1
	b	LBB0_6
LBB0_5:
	mov	w0, #-2
LBB0_6:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_iosuhaxHandle,8,3              ; @iosuhaxHandle
	.comm	_IOCTL_FSA_RAW_WRITE,4,2        ; @IOCTL_FSA_RAW_WRITE
.subsections_via_symbols
