	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2o_iop_alloc                  ## -- Begin function i2o_iop_alloc
	.p2align	4, 0x90
_i2o_iop_alloc:                         ## @i2o_iop_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movl	_i2o_iop_alloc.unit(%rip), %edx
	leal	1(%rdx), %eax
	movl	%eax, _i2o_iop_alloc.unit(%rip)
	movl	%edx, (%rbx)
	movq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_sprintf
	movq	8(%rbx), %rcx
	leaq	L_.str.2(%rip), %rdx
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	movl	$32, %esi
	callq	_snprintf
	leaq	52(%rbx), %rdi
	movq	_I2O_INBOUND_MSG_FRAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	4(,%rax,4), %edx
	movq	_I2O_MSG_INPOOL_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rsi
	callq	_i2o_pool_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_kfree
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_osm_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_8
## %bb.2:
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	leaq	48(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	44(%rbx), %rdi
	callq	_spin_lock_init
	leaq	40(%rbx), %rdi
	callq	_mutex_init
	movq	%rbx, %r14
	addq	$32, %r14
	movq	%r14, %rdi
	callq	_device_initialize
	movq	_i2o_iop_release@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rbx)
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_set_name
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rax
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_i2o_iop_alloc.unit,4,2 ## @i2o_iop_alloc.unit
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2o: Insufficient memory to allocate a I2O controller.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"iop%d"

L_.str.2:                               ## @.str.2
	.asciz	"i2o_%s_msg_inpool"

	.comm	_I2O_INBOUND_MSG_FRAME_SIZE,4,2 ## @I2O_INBOUND_MSG_FRAME_SIZE
	.comm	_I2O_MSG_INPOOL_MIN,4,2         ## @I2O_MSG_INPOOL_MIN
	.comm	_i2o_iop_release,4,2            ## @i2o_iop_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2o_iop_alloc                  ; -- Begin function i2o_iop_alloc
	.p2align	2
_i2o_iop_alloc:                         ; @i2o_iop_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	adrp	x8, _i2o_iop_alloc.unit@PAGE
	ldr	w2, [x8, _i2o_iop_alloc.unit@PAGEOFF]
	add	w9, w2, #1
	str	w9, [x8, _i2o_iop_alloc.unit@PAGEOFF]
	str	w2, [x0]
	ldr	x0, [x0, #8]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_sprintf
	ldr	x3, [x19, #8]
Lloh8:
	adrp	x2, l_.str.2@PAGE
Lloh9:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x0, sp, #8
	mov	w1, #32
	bl	_snprintf
	add	x0, x19, #52
Lloh10:
	adrp	x8, _I2O_INBOUND_MSG_FRAME_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _I2O_INBOUND_MSG_FRAME_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	lsl	w8, w8, #2
	add	w2, w8, #4
Lloh13:
	adrp	x8, _I2O_MSG_INPOOL_MIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _I2O_MSG_INPOOL_MIN@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	add	x1, sp, #8
	bl	_i2o_pool_alloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_kfree
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x19, x0
	b	LBB0_6
LBB0_3:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_osm_err
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldur	x9, [x29, #-24]
Lloh24:
	adrp	x10, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x10, [x10, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x10, [x10]
	cmp	x10, x9
	b.ne	LBB0_8
; %bb.4:
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ERR_PTR
LBB0_5:
	add	x0, x19, #48
	bl	_INIT_LIST_HEAD
	add	x0, x19, #44
	bl	_spin_lock_init
	add	x0, x19, #40
	bl	_mutex_init
	add	x20, x19, #32
	mov	x0, x20
	bl	_device_initialize
Lloh27:
	adrp	x8, _i2o_iop_release@GOTPAGE
Lloh28:
	ldr	x8, [x8, _i2o_iop_release@GOTPAGEOFF]
	str	x8, [x19, #32]
	ldr	w2, [x19]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_set_name
LBB0_6:
	ldur	x8, [x29, #-24]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_i2o_iop_alloc.unit,4,2 ; @i2o_iop_alloc.unit
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2o: Insufficient memory to allocate a I2O controller.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"iop%d"

l_.str.2:                               ; @.str.2
	.asciz	"i2o_%s_msg_inpool"

	.comm	_I2O_INBOUND_MSG_FRAME_SIZE,4,2 ; @I2O_INBOUND_MSG_FRAME_SIZE
	.comm	_I2O_MSG_INPOOL_MIN,4,2         ; @I2O_MSG_INPOOL_MIN
	.comm	_i2o_iop_release,4,2            ; @i2o_iop_release
.subsections_via_symbols
