	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_dev_set_dipm
_ata_dev_set_dipm:                      ## @ata_dev_set_dipm
	.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	8(%rdi), %r13
	movq	(%r13), %rbx
	movq	_ATA_FLAG_IPM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_ata_dev_enabled
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_SCR_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	_sata_scr_read
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	addl	$-128, %r15d
	cmpl	$3, %r15d
	ja	LBB0_12
## %bb.5:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r15,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_10:
	movl	$768, %edx                      ## imm = 0x300
	orl	-44(%rbp), %edx
	jmp	LBB0_11
LBB0_2:
	movl	$128, 4(%rbx)
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	$-769, %edx                     ## imm = 0xFCFF
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_sata_scr_write
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movq	_ATA_DFLAG_DIPM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_12
## %bb.8:
	movq	_SETFEATURES_SATA_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SATA_DIPM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_ata_dev_set_feature
	jmp	LBB0_12
LBB0_9:
	movl	$-769, %edx                     ## imm = 0xFCFF
	andl	-44(%rbp), %edx
	orl	$512, %edx                      ## imm = 0x200
LBB0_11:
	movl	%edx, -44(%rbp)
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_sata_scr_write
	testl	%eax, %eax
	jne	LBB0_13
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_6
	.long	L0_0_set_9
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_ATA_FLAG_IPM,4,2               ## @ATA_FLAG_IPM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SCR_CONTROL,4,2                ## @SCR_CONTROL
	.comm	_ATA_DFLAG_DIPM,4,2             ## @ATA_DFLAG_DIPM
	.comm	_SETFEATURES_SATA_ENABLE,4,2    ## @SETFEATURES_SATA_ENABLE
	.comm	_SATA_DIPM,4,2                  ## @SATA_DIPM
	.no_dead_strip	_ata_dev_set_dipm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_dev_set_dipm
_ata_dev_set_dipm:                      ; @ata_dev_set_dipm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x20, [x0, #8]
	ldr	x22, [x20]
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _ATA_FLAG_IPM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_FLAG_IPM@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	bl	_ata_dev_enabled
	cbz	w0, LBB0_6
; %bb.2:
Lloh3:
	adrp	x22, _SCR_CONTROL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SCR_CONTROL@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x20
	bl	_sata_scr_read
	cbnz	w0, LBB0_7
; %bb.3:
	sub	w8, w21, #128
	cmp	w8, #3
	b.hi	LBB0_13
; %bb.4:
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x300
	b	LBB0_12
LBB0_6:
	mov	w8, #128
	str	w8, [x22, #4]
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
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
	add	sp, sp, #64
	ret
LBB0_8:
	ldr	w8, [sp, #12]
	and	w2, w8, #0xfffffcff
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_sata_scr_write
	cbnz	w0, LBB0_7
; %bb.9:
	ldr	w8, [x19]
Lloh10:
	adrp	x9, _ATA_DFLAG_DIPM@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ATA_DFLAG_DIPM@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.10:
Lloh13:
	adrp	x8, _SETFEATURES_SATA_ENABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SETFEATURES_SATA_ENABLE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _SATA_DIPM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SATA_DIPM@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ata_dev_set_feature
	b	LBB0_13
LBB0_11:
	ldr	w8, [sp, #12]
	and	w8, w8, #0xfffffcff
	orr	w2, w8, #0x200
LBB0_12:
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_sata_scr_write
	cbnz	w0, LBB0_7
LBB0_13:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
	.byte	(LBB0_11-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
                                        ; -- End function
	.comm	_ATA_FLAG_IPM,4,2               ; @ATA_FLAG_IPM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SCR_CONTROL,4,2                ; @SCR_CONTROL
	.comm	_ATA_DFLAG_DIPM,4,2             ; @ATA_DFLAG_DIPM
	.comm	_SETFEATURES_SATA_ENABLE,4,2    ; @SETFEATURES_SATA_ENABLE
	.comm	_SATA_DIPM,4,2                  ; @SATA_DIPM
	.no_dead_strip	_ata_dev_set_dipm
.subsections_via_symbols
