	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pismo_add_device
_pismo_add_device:                      ## @pismo_add_device
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	$0, -48(%rbp)
	movslq	8(%rdx), %rax
	cmpq	$-1, %rax
	je	LBB0_1
## %bb.3:
	movq	%r9, %r15
	movq	%r8, %r13
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	%eax, -48(%rbp)
	movq	(%rdx), %rdx
	leaq	-1(%rax,%rdx), %rax
	movq	%rax, -56(%rbp)
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	%rcx, %rdi
	callq	_platform_device_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rax
	movq	%rax, (%rbx)
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_platform_device_add_resources
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_platform_device_add_data
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	callq	_platform_device_add
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_8
LBB0_9:
	movq	%rbx, %rdi
	callq	_platform_device_put
	jmp	LBB0_10
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	(%r14), %rax
	movslq	%r12d, %rcx
	movq	%rbx, (%rax,%rcx,8)
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_pismo_add_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pismo_add_device
_pismo_add_device:                      ; @pismo_add_device
	.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
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
	ldr	w8, [x2, #8]
	cmn	w8, #1
	b.eq	LBB0_6
; %bb.1:
	mov	x21, x5
	mov	x22, x4
	mov	x19, x1
	mov	x20, x0
	sxtw	x9, w8
	str	w8, [sp, #24]
	ldr	x8, [x2]
	add	x8, x9, x8
	sub	x8, x8, #1
	str	x8, [sp, #16]
Lloh0:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	mov	x0, x3
	bl	_platform_device_alloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x23, x0
	ldr	x8, [x20, #8]
	str	x8, [x0]
	add	x1, sp, #8
	mov	w2, #1
	bl	_platform_device_add_resources
	mov	x24, x0
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_platform_device_add_data
	mov	x24, x0
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x23
	bl	_platform_device_add
	mov	x24, x0
	cbz	w0, LBB0_10
LBB0_5:
	mov	x0, x23
	bl	_platform_device_put
	b	LBB0_9
LBB0_6:
Lloh3:
	adrp	x8, _ENXIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_9:
	mov	x0, x24
	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
LBB0_10:
	ldr	x8, [x20]
	str	x23, [x8, w19, sxtw #3]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_pismo_add_device
.subsections_via_symbols
