	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function toshiba_haps_add
_toshiba_haps_add:                      ## @toshiba_haps_add
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_toshiba_haps@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_toshiba_haps_available
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r14
	movq	%rbx, 8(%rax)
	movl	$2, (%rax)
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_dev_set_drvdata
	movl	4(%rbx), %edi
	movl	$2, %esi
	callq	_toshiba_haps_protection_level
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	_haps_attr_group@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sysfs_create_group
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%r14, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_toshiba_haps,8,3               ## @toshiba_haps
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Toshiba HDD Active Protection Sensor device\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_haps_attr_group,4,2            ## @haps_attr_group
	.no_dead_strip	_toshiba_haps_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function toshiba_haps_add
_toshiba_haps_add:                      ; @toshiba_haps_add
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x21, _toshiba_haps@GOTPAGE
Lloh1:
	ldr	x21, [x21, _toshiba_haps@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_toshiba_haps_available
	cbz	w0, LBB0_9
; %bb.5:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.6:
	mov	x20, x0
	str	x19, [x0, #8]
	mov	w8, #2
	str	w8, [x0]
	str	x0, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_dev_set_drvdata
	ldr	w0, [x19, #4]
	mov	w1, #2
	bl	_toshiba_haps_protection_level
	cbnz	w0, LBB0_3
; %bb.7:
Lloh9:
	adrp	x1, _haps_attr_group@GOTPAGE
Lloh10:
	ldr	x1, [x1, _haps_attr_group@GOTPAGEOFF]
	mov	x0, x19
	bl	_sysfs_create_group
	cbnz	w0, LBB0_3
; %bb.8:
	str	x20, [x21]
	b	LBB0_3
LBB0_9:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_2
LBB0_10:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_toshiba_haps,8,3               ; @toshiba_haps
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Toshiba HDD Active Protection Sensor device\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_haps_attr_group,4,2            ; @haps_attr_group
	.no_dead_strip	_toshiba_haps_add
.subsections_via_symbols
