	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwdp_iport_close               ## -- Begin function iwdp_iport_close
	.p2align	4, 0x90
_iwdp_iport_close:                      ## @iwdp_iport_close
	.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, %r12
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rsi), %r14
	movl	(%rax), %r15d
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_ht_get_value
	cltq
	cmpq	%r12, %rax
	je	LBB0_1
## %bb.13:
	movq	8(%rbx), %rax
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	32(%r12), %edi
	callq	_ht_values
	movq	%rax, %r14
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%r14, %r13
	addq	$8, %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rax
	addq	$8, %r13
	testq	%rax, %rax
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	jle	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	*(%rbx)
	jmp	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_free
	movl	32(%r12), %edi
	callq	_ht_clear
	movq	24(%r12), %r14
	testq	%r14, %r14
	je	LBB0_9
## %bb.7:
	movq	%r12, %rdi
	callq	_iwdp_log_disconnect
	movq	$0, 8(%r14)
	movq	$0, 24(%r12)
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	jle	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	*(%rbx)
LBB0_9:
	cmpq	$0, 16(%r12)
	je	LBB0_11
## %bb.10:
	movl	$-1, 8(%r12)
	jmp	LBB0_12
LBB0_11:
	movl	%r15d, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_ht_remove
	movq	%r12, %rdi
	callq	_iwdp_iport_free
LBB0_12:
	movq	_IWDP_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Internal iport mismatch?"

	.comm	_IWDP_SUCCESS,4,2               ## @IWDP_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwdp_iport_close               ; -- Begin function iwdp_iport_close
	.p2align	2
_iwdp_iport_close:                      ; @iwdp_iport_close
	.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, x1
	mov	x22, x0
	ldr	x8, [x0, #16]
	ldr	x20, [x1]
	ldr	w21, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_ht_get_value
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	x8, x19
	b.eq	LBB0_2
; %bb.1:
	ldr	x2, [x22, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	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
	br	x2
LBB0_2:
	ldr	w0, [x19, #32]
	bl	_ht_values
	mov	x23, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_7
; %bb.3:
	add	x24, x23, #8
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x24], #8
	cbz	x8, LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x8]
	cmp	x1, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x22]
	mov	x0, x22
	blr	x8
	b	LBB0_4
LBB0_7:
	mov	x0, x23
	bl	_free
	ldr	w0, [x19, #32]
	bl	_ht_clear
	ldr	x23, [x19, #24]
	cbz	x23, LBB0_10
; %bb.8:
	mov	x0, x19
	bl	_iwdp_log_disconnect
	str	xzr, [x23, #8]
	str	xzr, [x19, #24]
	ldr	x1, [x23]
	cmp	x1, #1
	b.lt	LBB0_10
; %bb.9:
	ldr	x8, [x22]
	mov	x0, x22
	blr	x8
LBB0_10:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_12
; %bb.11:
	mov	w8, #-1
	str	w8, [x19, #8]
	b	LBB0_13
LBB0_12:
	mov	x0, x21
	mov	x1, x20
	bl	_ht_remove
	mov	x0, x19
	bl	_iwdp_iport_free
LBB0_13:
Lloh2:
	adrp	x8, _IWDP_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IWDP_SUCCESS@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Internal iport mismatch?"

	.comm	_IWDP_SUCCESS,4,2               ; @IWDP_SUCCESS
.subsections_via_symbols
