	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_imsg_create                    ## -- Begin function imsg_create
	.p2align	4, 0x90
_imsg_create:                           ## @imsg_create
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	_IMSG_HEADER_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %r8
	movq	%rsi, %rax
	movq	_MAX_IMSGSIZE@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	cmpq	%rsi, %r8
	jle	LBB0_2
## %bb.1:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_6
LBB0_2:
	movq	%rax, -16(%rbp)
	movq	$0, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movl	%ecx, -40(%rbp)
	testl	%ecx, %ecx
	jne	LBB0_4
## %bb.3:
	movl	(%rdi), %eax
	movl	%eax, -40(%rbp)
LBB0_4:
	movq	%r8, %rdi
	callq	_ibuf_dynamic
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rax, %rbx
	leaq	-40(%rbp), %rsi
	movq	%rax, %rdi
	movl	$32, %edx
	callq	_imsg_add
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	$-1, %ecx
	cmovneq	%rbx, %rax
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMSG_HEADER_SIZE,8,3           ## @IMSG_HEADER_SIZE
	.comm	_MAX_IMSGSIZE,8,3               ## @MAX_IMSGSIZE
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_imsg_create                    ; -- Begin function imsg_create
	.p2align	2
_imsg_create:                           ; @imsg_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x9, x1
Lloh0:
	adrp	x8, _IMSG_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMSG_HEADER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _MAX_IMSGSIZE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MAX_IMSGSIZE@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x10]
	add	x8, x8, x4
	cmp	x8, x1
	b.le	LBB0_2
; %bb.1:
	mov	x0, #0
Lloh6:
	adrp	x8, _ERANGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _errno@GOTPAGE
Lloh10:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
	b	LBB0_6
LBB0_2:
	stp	xzr, x9, [sp, #16]
	str	x2, [sp, #8]
	str	w3, [sp]
	cbnz	w3, LBB0_4
; %bb.3:
	ldr	w9, [x0]
	str	w9, [sp]
LBB0_4:
	mov	x0, x8
	bl	_ibuf_dynamic
	cbz	x0, LBB0_6
; %bb.5:
	mov	x19, x0
	mov	x1, sp
	mov	w2, #32
	bl	_imsg_add
	cmn	w0, #1
	csel	x0, xzr, x19, eq
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IMSG_HEADER_SIZE,8,3           ; @IMSG_HEADER_SIZE
	.comm	_MAX_IMSGSIZE,8,3               ; @MAX_IMSGSIZE
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
