	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_port_new_ioctl                 ## -- Begin function port_new_ioctl
	.p2align	4, 0x90
_port_new_ioctl:                        ## @port_new_ioctl
	.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
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r13
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %rdi
	xorl	%eax, %eax
	callq	_asprintf
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	-56(%rbp), %rsi
	movq	%r13, %rdi
	callq	_pport_find
	movq	-56(%rbp), %rdx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	movq	%rdx, %rdi
	callq	_free
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_port_new_pp
	movq	%rax, %rbx
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_log_err
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_4:
	movl	4(%r14), %ecx
	leaq	L_.str.2(%rip), %rsi
	leaq	-48(%rbp), %rdi
	xorl	%eax, %eax
	callq	_asprintf
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi
	callq	_free
	testl	%ebx, %ebx
	jg	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_log_err
LBB0_6:
	movq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_port_find
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	-48(%rbp), %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_log_warnx
	movq	-48(%rbp), %rdi
	callq	_free
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movl	$1, %edi
	movl	$40, %esi
	callq	_calloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_log_err
LBB0_10:
	movq	%r13, 32(%rbx)
	movq	-48(%rbp), %rax
	movq	%rax, (%rbx)
	movl	$1, 8(%rbx)
	movl	%r12d, 12(%rbx)
	movl	%r15d, 16(%rbx)
	movq	_p_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	_p_ts@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	%r14, 24(%rbx)
LBB0_11:
	movq	%rbx, %rax
	addq	$24, %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	"ioctl/%d/%d"

L_.str.1:                               ## @.str.1
	.asciz	"asprintf"

L_.str.2:                               ## @.str.2
	.asciz	"%s-%s"

L_.str.3:                               ## @.str.3
	.asciz	"duplicate port \"%s\""

L_.str.4:                               ## @.str.4
	.asciz	"calloc"

	.comm	_p_next,4,2                     ## @p_next
	.comm	_p_ts,4,2                       ## @p_ts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_port_new_ioctl                 ; -- Begin function port_new_ioctl
	.p2align	2
_port_new_ioctl:                        ; @port_new_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	stp	x22, x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #24
	bl	_asprintf
	cmp	w0, #0
	b.le	LBB0_3
; %bb.1:
	ldr	x1, [sp, #24]
	mov	x0, x20
	bl	_pport_find
	mov	x23, x0
	ldr	x0, [sp, #24]
	cbz	x23, LBB0_4
; %bb.2:
	bl	_free
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_port_new_pp
	mov	x23, x0
	b	LBB0_11
LBB0_3:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_log_err
	mov	x23, #0
	b	LBB0_11
LBB0_4:
	ldr	w8, [x19, #4]
	stp	x0, x8, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #16
	bl	_asprintf
	mov	x23, x0
	ldr	x0, [sp, #24]
	bl	_free
	cmp	w23, #0
	b.gt	LBB0_6
; %bb.5:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_log_err
LBB0_6:
	ldr	x1, [sp, #16]
	mov	x0, x20
	bl	_port_find
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x1, [sp, #16]
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_log_warnx
	ldr	x0, [sp, #16]
	bl	_free
	mov	x23, #0
	b	LBB0_11
LBB0_8:
	mov	w24, #1
	mov	w0, #1
	mov	w1, #40
	bl	_calloc
	mov	x23, x0
	cbnz	x0, LBB0_10
; %bb.9:
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_log_err
LBB0_10:
	str	x20, [x23, #32]
	ldr	x8, [sp, #16]
	str	x8, [x23]
	stp	w24, w22, [x23, #8]
	str	w21, [x23, #16]
Lloh12:
	adrp	x8, _p_next@GOTPAGE
Lloh13:
	ldr	x8, [x8, _p_next@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x23
	bl	_TAILQ_INSERT_TAIL
Lloh15:
	adrp	x8, _p_ts@GOTPAGE
Lloh16:
	ldr	x8, [x8, _p_ts@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x23
	bl	_TAILQ_INSERT_TAIL
	str	x19, [x23, #24]
LBB0_11:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioctl/%d/%d"

l_.str.1:                               ; @.str.1
	.asciz	"asprintf"

l_.str.2:                               ; @.str.2
	.asciz	"%s-%s"

l_.str.3:                               ; @.str.3
	.asciz	"duplicate port \"%s\""

l_.str.4:                               ; @.str.4
	.asciz	"calloc"

	.comm	_p_next,4,2                     ; @p_next
	.comm	_p_ts,4,2                       ; @p_ts
.subsections_via_symbols
