	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mox_kobj_create
_mox_kobj_create:                       ## @mox_kobj_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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	callq	_rwtm_to_kobj
	movq	_mox_kobj_ktype@GOTPCREL(%rip), %rsi
	movl	%eax, %edi
	callq	_kobject_init
	movq	%rbx, %rdi
	callq	_rwtm_to_kobj
	movq	_firmware_kobj@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movl	%eax, %edi
	callq	_kobject_add
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_rwtm_to_kobj
	movl	%eax, %edi
	callq	_kobject_put
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	movq	(%rbx), %rax
	movq	%rbx, (%rax)
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mox_kobj_ktype,4,2             ## @mox_kobj_ktype
	.comm	_firmware_kobj,4,2              ## @firmware_kobj
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"turris-mox-rwtm"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_mox_kobj_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mox_kobj_create
_mox_kobj_create:                       ; @mox_kobj_create
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_rwtm_to_kobj
Lloh3:
	adrp	x1, _mox_kobj_ktype@GOTPAGE
Lloh4:
	ldr	x1, [x1, _mox_kobj_ktype@GOTPAGEOFF]
	bl	_kobject_init
	mov	x0, x19
	bl	_rwtm_to_kobj
Lloh5:
	adrp	x8, _firmware_kobj@GOTPAGE
Lloh6:
	ldr	x8, [x8, _firmware_kobj@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	bl	_kobject_add
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_rwtm_to_kobj
	bl	_kobject_put
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19]
	str	x19, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mox_kobj_ktype,4,2             ; @mox_kobj_ktype
	.comm	_firmware_kobj,4,2              ; @firmware_kobj
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"turris-mox-rwtm"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_mox_kobj_create
.subsections_via_symbols
