	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atasecurity_erase
_atasecurity_erase:                     ## @atasecurity_erase
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	cmpl	$0, 16(%rbp)
	jne	LBB0_2
## %bb.1:
	movq	_ATA_SECURITY_ERASE_PREPARE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movl	%edx, %r13d
	callq	_atasecurity_notify
	movl	%r13d, %edx
LBB0_2:
	movq	_CAM_DIR_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_AP_PROTO_NON_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MSG_SIMPLE_Q_TAG@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_ATA_SECURITY_ERASE_PREPARE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	subq	$8, %rsp
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%edx, %r13d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	%r14
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	%rax
	pushq	%r10
	callq	_ata_do_cmd
	addq	$80, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_MSG_SIMPLE_Q_TAG@GOTPCREL(%rip), %rbx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	16(%rbp), %r15d
	testl	%r15d, %r15d
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_5
## %bb.4:
	movq	_ATA_SECURITY_ERASE_UNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_atasecurity_notify
LBB0_5:
	movq	_CAM_DIR_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_AP_PROTO_PIO_OUT@GOTPCREL(%rip), %rax
	movq	_AP_FLAG_BYT_BLOK_BLOCKS@GOTPCREL(%rip), %rdx
	movq	_AP_FLAG_TLEN_SECT_CNT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	orl	(%rdx), %r9d
	movl	(%rax), %r8d
	movl	(%rbx), %eax
	movq	_ATA_SECURITY_ERASE_UNIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	subq	$8, %rsp
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	pushq	$0
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	$4
	pushq	%r14
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	%rbx
	pushq	%rax
	callq	_ata_do_cmd
	addq	$80, %rsp
	movl	%eax, %ebx
	orl	%eax, %r15d
	jne	LBB0_7
## %bb.6:
	leaq	L_str(%rip), %rdi
	callq	_puts
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_SECURITY_ERASE_PREPARE,4,2 ## @ATA_SECURITY_ERASE_PREPARE
	.comm	_CAM_DIR_NONE,4,2               ## @CAM_DIR_NONE
	.comm	_AP_PROTO_NON_DATA,4,2          ## @AP_PROTO_NON_DATA
	.comm	_MSG_SIMPLE_Q_TAG,4,2           ## @MSG_SIMPLE_Q_TAG
	.comm	_ATA_SECURITY_ERASE_UNIT,4,2    ## @ATA_SECURITY_ERASE_UNIT
	.comm	_CAM_DIR_OUT,4,2                ## @CAM_DIR_OUT
	.comm	_AP_PROTO_PIO_OUT,4,2           ## @AP_PROTO_PIO_OUT
	.comm	_AP_FLAG_BYT_BLOK_BLOCKS,4,2    ## @AP_FLAG_BYT_BLOK_BLOCKS
	.comm	_AP_FLAG_TLEN_SECT_CNT,4,2      ## @AP_FLAG_TLEN_SECT_CNT
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"\nErase Complete"

	.no_dead_strip	_atasecurity_erase
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atasecurity_erase
_atasecurity_erase:                     ; @atasecurity_erase
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x6
	mov	x22, x5
	mov	x24, x4
	mov	x25, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
Lloh0:
	adrp	x27, _ATA_SECURITY_ERASE_PREPARE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _ATA_SECURITY_ERASE_PREPARE@GOTPAGEOFF]
	cbnz	w6, LBB0_2
; %bb.1:
	ldr	w0, [x27]
	mov	x1, #0
	bl	_atasecurity_notify
LBB0_2:
Lloh2:
	adrp	x8, _CAM_DIR_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CAM_DIR_NONE@GOTPAGEOFF]
Lloh4:
	adrp	x9, _AP_PROTO_NON_DATA@GOTPAGE
Lloh5:
	ldr	x9, [x9, _AP_PROTO_NON_DATA@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
Lloh7:
	ldr	w4, [x9]
Lloh8:
	adrp	x26, _MSG_SIMPLE_Q_TAG@GOTPAGE
Lloh9:
	ldr	x26, [x26, _MSG_SIMPLE_Q_TAG@GOTPAGEOFF]
	ldr	w6, [x26]
	ldr	w7, [x27]
	stp	w25, wzr, [sp, #28]
	str	wzr, [sp, #24]
	str	xzr, [sp, #16]
	str	wzr, [sp, #8]
	str	xzr, [sp]
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	mov	w5, #0
	bl	_ata_do_cmd
	mov	x25, x0
	cbnz	w0, LBB0_7
; %bb.3:
Lloh10:
	adrp	x25, _ATA_SECURITY_ERASE_UNIT@GOTPAGE
Lloh11:
	ldr	x25, [x25, _ATA_SECURITY_ERASE_UNIT@GOTPAGEOFF]
	cbnz	w19, LBB0_5
; %bb.4:
	ldr	w0, [x25]
	mov	x1, x22
	bl	_atasecurity_notify
LBB0_5:
Lloh12:
	adrp	x8, _CAM_DIR_OUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CAM_DIR_OUT@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
Lloh15:
	adrp	x8, _AP_PROTO_PIO_OUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AP_PROTO_PIO_OUT@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
Lloh18:
	adrp	x8, _AP_FLAG_BYT_BLOK_BLOCKS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AP_FLAG_BYT_BLOK_BLOCKS@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _AP_FLAG_TLEN_SECT_CNT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AP_FLAG_TLEN_SECT_CNT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w5, w9, w8
	ldr	w6, [x26]
	ldr	w7, [x25]
	stp	w24, wzr, [sp, #28]
	mov	w8, #4
	str	w8, [sp, #24]
	str	x22, [sp, #16]
	str	wzr, [sp, #8]
	str	xzr, [sp]
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_ata_do_cmd
	mov	x25, x0
	orr	w8, w0, w19
	cbnz	w8, LBB0_7
; %bb.6:
Lloh24:
	adrp	x0, l_str@PAGE
Lloh25:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_7:
	mov	x0, x25
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_SECURITY_ERASE_PREPARE,4,2 ; @ATA_SECURITY_ERASE_PREPARE
	.comm	_CAM_DIR_NONE,4,2               ; @CAM_DIR_NONE
	.comm	_AP_PROTO_NON_DATA,4,2          ; @AP_PROTO_NON_DATA
	.comm	_MSG_SIMPLE_Q_TAG,4,2           ; @MSG_SIMPLE_Q_TAG
	.comm	_ATA_SECURITY_ERASE_UNIT,4,2    ; @ATA_SECURITY_ERASE_UNIT
	.comm	_CAM_DIR_OUT,4,2                ; @CAM_DIR_OUT
	.comm	_AP_PROTO_PIO_OUT,4,2           ; @AP_PROTO_PIO_OUT
	.comm	_AP_FLAG_BYT_BLOK_BLOCKS,4,2    ; @AP_FLAG_BYT_BLOK_BLOCKS
	.comm	_AP_FLAG_TLEN_SECT_CNT,4,2      ; @AP_FLAG_TLEN_SECT_CNT
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"\nErase Complete"

	.no_dead_strip	_atasecurity_erase
.subsections_via_symbols
