	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmz_get_zoned_device
_dmz_get_zoned_device:                  ## @dmz_get_zoned_device
	.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	%rsi, %rbx
	movq	%rdi, %r13
	movq	32(%rdi), %r15
	movl	24(%rdi), %edi
	callq	_dm_table_get_mode
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	movq	%r15, %rcx
	callq	_dm_get_device
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r13)
	movq	$0, (%r15)
	jmp	LBB0_12
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	(%r15), %rax
	movq	(%rax), %rdi
	movq	%rdi, 8(%r14)
	movl	56(%r14), %esi
	callq	_bdevname
	movq	8(%r14), %rdi
	callq	_bdev_zoned_model
	movq	_BLK_ZONED_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:
	leaq	L_.str.1(%rip), %rcx
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	movq	8(%r14), %rdi
	callq	_bdev_get_queue
	movq	%rax, %r12
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_i_size_read
	movl	%eax, %ebx
	movq	_SECTOR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movl	%ebx, (%r14)
	movq	%r12, %rdi
	callq	_blk_queue_zone_sectors
	leaq	L_.str.2(%rip), %rcx
	cmpq	$0, 16(%r13)
	jne	LBB0_6
## %bb.9:
	movl	8(%r13), %edx
	cmpl	(%r14), %edx
	je	LBB0_11
## %bb.10:
	negl	%eax
	andl	%eax, %ebx
	cmpl	%ebx, %edx
	je	LBB0_11
LBB0_6:
	movq	%rcx, (%r13)
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	(%r15), %rsi
	movq	%r13, %rdi
	callq	_dm_put_device
	movq	%r14, %rdi
	callq	_kfree
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r12, %rdi
	callq	_blk_queue_zone_sectors
	movq	%rax, 40(%r14)
	movq	%rax, %rdi
	callq	_ilog2
	movq	%rax, 48(%r14)
	movq	40(%r14), %rdi
	callq	_dmz_sect2blk
	movq	%rax, 24(%r14)
	movq	%rax, %rdi
	callq	_ilog2
	movq	%rax, 32(%r14)
	movq	8(%r14), %rdi
	callq	_blkdev_nr_zones
	movl	%eax, 16(%r14)
	movq	%r14, 8(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Get target device failed"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BLK_ZONED_NONE,8,3             ## @BLK_ZONED_NONE
L_.str.1:                               ## @.str.1
	.asciz	"Not a zoned block device"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SECTOR_SHIFT,4,2               ## @SECTOR_SHIFT
L_.str.2:                               ## @.str.2
	.asciz	"Partial mapping not supported"

	.no_dead_strip	_dmz_get_zoned_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmz_get_zoned_device
_dmz_get_zoned_device:                  ; @dmz_get_zoned_device
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #32]
	ldr	w0, [x0, #24]
	bl	_dm_table_get_mode
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	_dm_get_device
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x21]
	str	xzr, [x19]
	b	LBB0_12
LBB0_2:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x19]
	ldr	x0, [x8]
	str	x0, [x20, #8]
	ldr	w1, [x20, #56]
	bl	_bdevname
	ldr	x0, [x20, #8]
	bl	_bdev_zoned_model
Lloh5:
	adrp	x8, _BLK_ZONED_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BLK_ZONED_NONE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.4:
Lloh8:
	adrp	x8, l_.str.1@PAGE
Lloh9:
	add	x8, x8, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:
	ldr	x0, [x20, #8]
	bl	_bdev_get_queue
	mov	x22, x0
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_i_size_read
Lloh12:
	adrp	x8, _SECTOR_SHIFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SECTOR_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	asr	w23, w0, w8
	str	w23, [x20]
	mov	x0, x22
	bl	_blk_queue_zone_sectors
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_9
; %bb.7:
	neg	w8, w0
	and	w8, w23, w8
	ldr	w9, [x21, #8]
	ldr	w10, [x20]
	cmp	w9, w10
	ccmp	w9, w8, #4, ne
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x22
	bl	_blk_queue_zone_sectors
	str	x0, [x20, #40]
	bl	_ilog2
	str	x0, [x20, #48]
	ldr	x0, [x20, #40]
	bl	_dmz_sect2blk
	str	x0, [x20, #24]
	bl	_ilog2
	str	x0, [x20, #32]
	ldr	x0, [x20, #8]
	bl	_blkdev_nr_zones
	mov	w22, #0
	str	w0, [x20, #16]
	str	x20, [x19, #8]
	b	LBB0_12
LBB0_9:
Lloh15:
	adrp	x8, l_.str.2@PAGE
Lloh16:
	add	x8, x8, l_.str.2@PAGEOFF
LBB0_10:
	str	x8, [x21]
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w22, w8
	ldr	x1, [x19]
	mov	x0, x21
	bl	_dm_put_device
	mov	x0, x20
	bl	_kfree
LBB0_12:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Get target device failed"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BLK_ZONED_NONE,8,3             ; @BLK_ZONED_NONE
l_.str.1:                               ; @.str.1
	.asciz	"Not a zoned block device"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SECTOR_SHIFT,4,2               ; @SECTOR_SHIFT
l_.str.2:                               ; @.str.2
	.asciz	"Partial mapping not supported"

	.no_dead_strip	_dmz_get_zoned_device
.subsections_via_symbols
