	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btt_map_write
_btt_map_write:                         ## @btt_map_write
	.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	%r9, %r14
	movl	%r8d, %r13d
	movl	%ecx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r12
	movl	%edx, %edi
	callq	_ent_lba
	leal	(%r13,%rbx,2), %ecx
	cmpl	$2, %ecx
	je	LBB0_7
## %bb.1:
	cmpl	$1, %ecx
	je	LBB0_5
## %bb.2:
	testl	%ecx, %ecx
	jne	LBB0_8
## %bb.3:
	movq	_MAP_ENT_NORMAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	jmp	LBB0_4
LBB0_7:
	movq	_MAP_TRIM_SHIFT@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_5:
	movq	_MAP_ERR_SHIFT@GOTPCREL(%rip), %rcx
LBB0_6:
	movb	(%rcx), %cl
	movl	$1, %edi
	shll	%cl, %edi
LBB0_4:
	orl	%eax, %edi
	callq	_cpu_to_le32
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	movq	%r14, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___btt_map_write                ## TAILCALL
LBB0_8:
	movq	%r12, %rdi
	callq	_to_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err_ratelimited
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAP_ENT_NORMAL,4,2             ## @MAP_ENT_NORMAL
	.comm	_MAP_ERR_SHIFT,4,2              ## @MAP_ERR_SHIFT
	.comm	_MAP_TRIM_SHIFT,4,2             ## @MAP_TRIM_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid use of Z and E flags\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_btt_map_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btt_map_write
_btt_map_write:                         ; @btt_map_write
	.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	x19, x5
	mov	x22, x4
	mov	x23, x3
	mov	x21, x1
	mov	x20, x0
	mov	x0, x2
	bl	_ent_lba
	add	w8, w22, w23, lsl #1
	cmp	w8, #2
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #1
	b.eq	LBB0_5
; %bb.2:
	cbnz	w8, LBB0_8
; %bb.3:
Lloh0:
	adrp	x8, _MAP_ENT_NORMAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAP_ENT_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	b	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, _MAP_TRIM_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAP_TRIM_SHIFT@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, _MAP_ERR_SHIFT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAP_ERR_SHIFT@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
LBB0_7:
	orr	w0, w8, w0
	bl	_cpu_to_le32
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	x3, x19
	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
	b	___btt_map_write
LBB0_8:
	mov	x0, x20
	bl	_to_dev
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err_ratelimited
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MAP_ENT_NORMAL,4,2             ; @MAP_ENT_NORMAL
	.comm	_MAP_ERR_SHIFT,4,2              ; @MAP_ERR_SHIFT
	.comm	_MAP_TRIM_SHIFT,4,2             ; @MAP_TRIM_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid use of Z and E flags\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_btt_map_write
.subsections_via_symbols
