	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kernel_port_update             ## -- Begin function kernel_port_update
	.p2align	4, 0x90
_kernel_port_update:                    ## @kernel_port_update
	.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	_MAX_LUNS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_10
## %bb.1:
	movq	%rdi, %r13
	movq	8(%rsi), %rbx
	movq	8(%rdi), %r15
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movslq	(%r12), %rax
	cmpq	%rax, %r14
	jge	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %eax
	movl	%eax, -48(%rbp)
	movl	%r14d, -64(%rbp)
	movq	(%r15), %rax
	movq	(%rax,%r14,8), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_UINT32_MAX@GOTPCREL(%rip), %rax
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	testq	%rcx, %rcx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_UINT32_MAX@GOTPCREL(%rip), %rcx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ctl_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CTL_LUN_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_log_warn
	jmp	LBB0_9
LBB0_10:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_LUNS,4,2                   ## @MAX_LUNS
	.comm	_UINT32_MAX,8,3                 ## @UINT32_MAX
	.comm	_ctl_fd,4,2                     ## @ctl_fd
	.comm	_CTL_LUN_MAP,4,2                ## @CTL_LUN_MAP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CTL_LUN_MAP ioctl failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kernel_port_update             ; -- Begin function kernel_port_update
	.p2align	2
_kernel_port_update:                    ; @kernel_port_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x21, _MAX_LUNS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_LUNS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x19, x0
	mov	x22, #0
	ldr	x23, [x1, #8]
	ldr	x24, [x0, #8]
Lloh2:
	adrp	x25, _UINT32_MAX@GOTPAGE
Lloh3:
	ldr	x25, [x25, _UINT32_MAX@GOTPAGEOFF]
Lloh4:
	adrp	x26, _ctl_fd@GOTPAGE
Lloh5:
	ldr	x26, [x26, _ctl_fd@GOTPAGEOFF]
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
Lloh8:
	adrp	x27, _CTL_LUN_MAP@GOTPAGE
Lloh9:
	ldr	x27, [x27, _CTL_LUN_MAP@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.ge	LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	str	w8, [sp, #24]
	str	w22, [sp, #8]
	ldr	x8, [x24]
	ldr	x8, [x8, x22, lsl #3]
	cbz	x8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x8]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	x8, [sp, #16]
	ldr	x9, [x23]
	ldr	x9, [x9, x22, lsl #3]
	cbz	x9, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x26]
	ldr	w1, [x27]
	add	x2, sp, #8
	bl	_ioctl
	cbz	w0, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_log_warn
	b	LBB0_2
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_LUNS,4,2                   ; @MAX_LUNS
	.comm	_UINT32_MAX,8,3                 ; @UINT32_MAX
	.comm	_ctl_fd,4,2                     ; @ctl_fd
	.comm	_CTL_LUN_MAP,4,2                ; @CTL_LUN_MAP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CTL_LUN_MAP ioctl failed"

.subsections_via_symbols
