	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zpool_get_history              ## -- Begin function zpool_get_history
	.p2align	4, 0x90
_zpool_get_history:                     ## @zpool_get_history
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_HIS_BUF_LEN_DEF@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movl	$0, -44(%rbp)
	movq	%r13, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	movq	%rax, %r12
	movq	%r13, -56(%rbp)
	leaq	-72(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_get_history
	testl	%eax, %eax
	je	LBB0_2
LBB0_10:
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_free
LBB0_13:
	cmpl	$0, -44(%rbp)
	jle	LBB0_16
## %bb.14:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_nvlist_free
	incq	%rbx
	movslq	-44(%rbp), %rax
	cmpq	%rax, %rbx
	jl	LBB0_15
LBB0_16:
	movq	-64(%rbp), %rdi
	callq	_free
	jmp	LBB0_17
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_17:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %rbx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, -56(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	leaq	-72(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	callq	_get_history
	testl	%eax, %eax
	jne	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	leaq	-88(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	movq	%rbx, %r8
	callq	_zpool_history_unpack
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %rax
	subq	%rax, -72(%rbp)
	cmpq	-56(%rbp), %rax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	%r13, %r13
	movq	%r12, %rdi
	callq	_free
	movq	_HIS_BUF_LEN_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jge	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_malloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_9
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%edi, %edi
	callq	_free
	testl	%r14d, %r14d
	jne	LBB0_13
	jmp	LBB0_12
LBB0_4:
	movq	%r12, %rdi
	callq	_free
LBB0_12:
	movq	_NV_UNIQUE_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_nvlist_alloc
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_verify
	movq	(%rbx), %rdi
	movq	_ZPOOL_HIST_RECORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdx
	movl	-44(%rbp), %ecx
	callq	_nvlist_add_nvlist_array
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_verify
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_HIS_BUF_LEN_DEF,8,3            ## @HIS_BUF_LEN_DEF
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HIS_BUF_LEN_MAX,8,3            ## @HIS_BUF_LEN_MAX
	.comm	_NV_UNIQUE_NAME,4,2             ## @NV_UNIQUE_NAME
	.comm	_ZPOOL_HIST_RECORD,4,2          ## @ZPOOL_HIST_RECORD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zpool_get_history              ; -- Begin function zpool_get_history
	.p2align	2
_zpool_get_history:                     ; @zpool_get_history
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _HIS_BUF_LEN_DEF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HIS_BUF_LEN_DEF@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	stp	xzr, xzr, [sp, #32]
	str	wzr, [sp, #28]
	mov	x0, x21
	bl	_malloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x22, x0
	str	x21, [sp, #16]
	add	x2, sp, #40
	add	x3, sp, #16
	mov	x0, x20
	mov	x1, x22
	bl	_get_history
	cbz	w0, LBB0_9
LBB0_2:
	mov	x23, x0
	mov	x0, x22
	bl	_free
LBB0_3:
	ldr	w8, [sp, #28]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x19, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #32]
	ldr	x0, [x8, x19, lsl #3]
	bl	_nvlist_free
	add	x19, x19, #1
	ldrsw	x8, [sp, #28]
	cmp	x19, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	x0, [sp, #32]
	bl	_free
	b	LBB0_8
LBB0_7:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
LBB0_8:
	mov	x0, x23
	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
	add	sp, sp, #112
	ret
LBB0_9:
Lloh6:
	adrp	x24, _HIS_BUF_LEN_MAX@GOTPAGE
Lloh7:
	ldr	x24, [x24, _HIS_BUF_LEN_MAX@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	str	x21, [sp, #16]
	add	x2, sp, #40
	add	x3, sp, #16
	mov	x0, x20
	mov	x1, x22
	bl	_get_history
	cbnz	w0, LBB0_2
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [sp, #16]
	cbz	x1, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x2, sp, #8
	add	x3, sp, #32
	add	x4, sp, #28
	mov	x0, x22
	bl	_zpool_history_unpack
	cbnz	w0, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [sp, #40]
	sub	x9, x9, x8
	str	x9, [sp, #40]
	ldr	x9, [sp, #16]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	lsl	x21, x21, #1
	mov	x0, x22
	bl	_free
	ldr	x8, [x24]
	cmp	x21, x8
	b.ge	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x21
	bl	_malloc
	mov	x22, x0
	cbnz	x0, LBB0_10
LBB0_16:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w23, [x8]
	mov	x0, #0
	bl	_free
	cbnz	w23, LBB0_3
	b	LBB0_18
LBB0_17:
	mov	x0, x22
	bl	_free
LBB0_18:
Lloh11:
	adrp	x8, _NV_UNIQUE_NAME@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NV_UNIQUE_NAME@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_nvlist_alloc
	cmp	x0, #0
	cset	w0, eq
	bl	_verify
	ldr	x0, [x19]
Lloh14:
	adrp	x8, _ZPOOL_HIST_RECORD@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ZPOOL_HIST_RECORD@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	x2, [sp, #32]
	ldr	w3, [sp, #28]
	bl	_nvlist_add_nvlist_array
	cmp	x0, #0
	cset	w0, eq
	bl	_verify
	mov	w23, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_HIS_BUF_LEN_DEF,8,3            ; @HIS_BUF_LEN_DEF
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HIS_BUF_LEN_MAX,8,3            ; @HIS_BUF_LEN_MAX
	.comm	_NV_UNIQUE_NAME,4,2             ; @NV_UNIQUE_NAME
	.comm	_ZPOOL_HIST_RECORD,4,2          ; @ZPOOL_HIST_RECORD
.subsections_via_symbols
