	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_target_new                     ## -- Begin function target_new
	.p2align	4, 0x90
_target_new:                            ## @target_new
	.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, %r14
	callq	_target_find
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	movq	%r12, %rsi
	callq	_log_warnx
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_3:
	movq	%r12, %rdi
	callq	_valid_iscsi_name
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_log_err
LBB0_7:
	movq	%r12, %rdi
	callq	_checked_strdup
	movq	%rax, %r13
	movq	%rax, 16(%r15)
	movq	%r12, %rdi
	callq	_strlen
	testl	%eax, %eax
	jle	LBB0_10
## %bb.8:
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,4), %edi
	callq	_tolower
	movl	%eax, (%r13,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_9
LBB0_10:
	movq	%r14, 8(%r15)
	movq	%r15, %rdi
	callq	_TAILQ_INIT
	movq	_t_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_TAILQ_INSERT_TAIL
LBB0_11:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"duplicated target \"%s\""

L_.str.1:                               ## @.str.1
	.asciz	"target name \"%s\" is invalid"

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

	.comm	_t_next,4,2                     ## @t_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_target_new                     ; -- Begin function target_new
	.p2align	2
_target_new:                            ; @target_new
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_target_find
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	mov	x1, x21
	bl	_log_warnx
	mov	x20, #0
	b	LBB0_10
LBB0_3:
	mov	x0, x21
	bl	_valid_iscsi_name
	cbz	w0, LBB0_11
; %bb.4:
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	mov	x20, x0
	cbnz	x0, LBB0_6
; %bb.5:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_log_err
LBB0_6:
	mov	x0, x21
	bl	_checked_strdup
	mov	x22, x0
	str	x0, [x20, #16]
	mov	x0, x21
	bl	_strlen
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.7:
	mov	w21, w0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_tolower
	str	w0, [x22], #4
	subs	x21, x21, #1
	b.ne	LBB0_8
LBB0_9:
	str	x19, [x20, #8]
	mov	x0, x20
	bl	_TAILQ_INIT
Lloh4:
	adrp	x8, _t_next@GOTPAGE
Lloh5:
	ldr	x8, [x8, _t_next@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_TAILQ_INSERT_TAIL
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"duplicated target \"%s\""

l_.str.1:                               ; @.str.1
	.asciz	"target name \"%s\" is invalid"

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

	.comm	_t_next,4,2                     ; @t_next
.subsections_via_symbols
