	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bsg_map_hdr
_bsg_map_hdr:                           ## @bsg_map_hdr
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r12
	cmpl	$0, 4(%r12)
	je	LBB0_29
## %bb.1:
	movq	%rcx, %r15
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	16(%rsi), %rsi
	movq	8(%rbx), %rcx
	movl	(%rbx), %edx
	movl	4(%rbx), %r8d
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_bsg_validate_sgv4_hdr
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %edi
	jmp	LBB0_12
LBB0_29:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_blk_get_request
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	movl	%r13d, %r8d
	callq	_blk_fill_sgv4_hdr_rq
	testl	%eax, %eax
	je	LBB0_13
## %bb.6:
	movl	%eax, %r13d
	xorl	%r14d, %r14d
LBB0_7:
	movq	(%r15), %rdi
	cmpq	8(%r15), %rdi
	je	LBB0_9
## %bb.8:
	callq	_kfree
LBB0_9:
	movq	%r15, %rdi
	callq	_blk_put_request
	testq	%r14, %r14
	je	LBB0_11
## %bb.10:
	movl	16(%r14), %edi
	callq	_blk_rq_unmap_user
	movq	%r14, %rdi
	callq	_blk_put_request
LBB0_11:
	movl	%r13d, %edi
	jmp	LBB0_12
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_12:
	callq	_ERR_PTR
	movq	%rax, %r15
LBB0_28:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	-44(%rbp), %eax
	movq	_WRITE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.15:
	cmpl	$0, 4(%rbx)
	je	LBB0_14
## %bb.16:
	movq	_QUEUE_FLAG_BIDI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_17
## %bb.19:
	movq	_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r12, %rdi
	callq	_blk_get_request
	testq	%rax, %rax
	je	LBB0_20
## %bb.21:
	movq	%rax, %r14
	movq	%rax, 48(%r15)
	movl	40(%r15), %eax
	movl	%eax, 40(%r14)
	movq	8(%rbx), %rcx
	movl	4(%rbx), %r8d
	movl	(%r13), %r9d
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_blk_rq_map_user
	movq	%r13, %rcx
	movl	%eax, %r13d
	testl	%eax, %eax
	movq	%rcx, %rax
	jne	LBB0_7
	jmp	LBB0_22
LBB0_14:
	xorl	%r14d, %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rbx), %r8d
	testl	%r8d, %r8d
	je	LBB0_24
## %bb.23:
	addq	$16, %rbx
	jmp	LBB0_26
LBB0_24:
	movl	4(%rbx), %r8d
	testl	%r8d, %r8d
	je	LBB0_27
## %bb.25:
	addq	$8, %rbx
LBB0_26:
	movq	(%rbx), %rcx
	movl	(%rax), %r9d
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_blk_rq_map_user
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_7
LBB0_27:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%r15)
	movq	$0, 24(%r15)
	jmp	LBB0_28
LBB0_17:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_20:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_18:
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"map hdr %llx/%u %llx/%u\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_WRITE,4,2                      ## @WRITE
	.comm	_QUEUE_FLAG_BIDI,4,2            ## @QUEUE_FLAG_BIDI
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_READ,4,2                       ## @READ
	.no_dead_strip	_bsg_map_hdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bsg_map_hdr
_bsg_map_hdr:                           ; @bsg_map_hdr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x21, [x0]
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x20, x3
	mov	x23, x2
	mov	x22, x1
	mov	x24, x0
	mov	x25, x1
	ldr	x1, [x25, #16]!
	mov	x26, x22
	ldr	x3, [x26, #8]!
	ldp	w2, w4, [x22]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x22
	bl	_bsg_validate_sgv4_hdr
	cbnz	w0, LBB0_12
; %bb.2:
	ldr	w1, [sp, #12]
Lloh2:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x27]
	mov	x0, x21
	bl	_blk_get_request
	cbz	x0, LBB0_11
; %bb.3:
	mov	x19, x0
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	mov	x3, x24
	mov	x4, x23
	bl	_blk_fill_sgv4_hdr_rq
	cbz	w0, LBB0_14
; %bb.4:
	mov	x24, x0
	mov	x23, #0
LBB0_5:
	ldp	x0, x8, [x19]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.6:
	bl	_kfree
LBB0_7:
	mov	x0, x19
	bl	_blk_put_request
	cbz	x23, LBB0_9
; %bb.8:
	ldr	w0, [x23, #16]
	bl	_blk_rq_unmap_user
	mov	x0, x23
	bl	_blk_put_request
LBB0_9:
	mov	x0, x24
	b	LBB0_12
LBB0_10:
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ERR_PTR
LBB0_11:
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	bl	_ERR_PTR
	mov	x19, x0
LBB0_13:
	mov	x0, x19
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
	ldr	w8, [sp, #12]
Lloh10:
	adrp	x9, _WRITE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WRITE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.15:
	ldr	w8, [x22, #4]
	cbz	w8, LBB0_23
; %bb.16:
Lloh13:
	adrp	x8, _QUEUE_FLAG_BIDI@GOTPAGE
Lloh14:
	ldr	x8, [x8, _QUEUE_FLAG_BIDI@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cbz	w0, LBB0_26
; %bb.17:
Lloh16:
	adrp	x8, _READ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w2, [x27]
	mov	x0, x21
	bl	_blk_get_request
	mov	x23, x0
	cbz	x0, LBB0_27
; %bb.18:
	str	x23, [x19, #48]
	ldr	w8, [x19, #40]
	str	w8, [x23, #40]
	ldr	x3, [x22, #8]
	ldr	w4, [x22, #4]
	ldr	w5, [x27]
	mov	x0, x21
	mov	x1, x23
	mov	x2, #0
	bl	_blk_rq_map_user
	mov	x24, x0
	cbnz	w0, LBB0_5
	b	LBB0_20
LBB0_19:
	mov	x23, #0
LBB0_20:
	ldr	w4, [x22]
	cbnz	w4, LBB0_24
LBB0_21:
	ldr	w4, [x22, #4]
	cbz	w4, LBB0_25
; %bb.22:
	mov	x25, x26
	b	LBB0_24
LBB0_23:
	mov	x23, #0
	ldr	w4, [x22]
	cbz	w4, LBB0_21
LBB0_24:
	ldr	x3, [x25]
	ldr	w5, [x27]
	mov	x0, x21
	mov	x1, x19
	mov	x2, #0
	bl	_blk_rq_map_user
	mov	x24, x0
	cbnz	w0, LBB0_5
LBB0_25:
	stp	xzr, x20, [x19, #24]
	b	LBB0_13
LBB0_26:
	mov	x23, #0
Lloh19:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_28
LBB0_27:
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_28:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"map hdr %llx/%u %llx/%u\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_WRITE,4,2                      ; @WRITE
	.comm	_QUEUE_FLAG_BIDI,4,2            ; @QUEUE_FLAG_BIDI
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_READ,4,2                       ; @READ
	.no_dead_strip	_bsg_map_hdr
.subsections_via_symbols
