	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kempld_create_platform_device
_kempld_create_platform_device:         ## @kempld_create_platform_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	movl	$-1, %esi
	callq	_platform_device_alloc
	movq	_kempld_pdev@GOTPCREL(%rip), %r15
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_platform_device_add_data
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movl	(%r15), %edi
	movl	(%r14), %esi
	movl	$1, %edx
	callq	_platform_device_add_resources
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movl	(%r15), %edi
	callq	_platform_device_add
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_6:
	movl	(%r15), %edi
	callq	_platform_device_put
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kempld"

	.comm	_kempld_pdev,4,2                ## @kempld_pdev
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_kempld_create_platform_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kempld_create_platform_device
_kempld_create_platform_device:         ; @kempld_create_platform_device
	.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
	ldr	x19, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #-1
	bl	_platform_device_alloc
Lloh2:
	adrp	x21, _kempld_pdev@GOTPAGE
Lloh3:
	ldr	x21, [x21, _kempld_pdev@GOTPAGEOFF]
	str	w0, [x21]
	cbz	w0, LBB0_5
; %bb.1:
	mov	x1, x19
	mov	w2, #4
	bl	_platform_device_add_data
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x21]
	ldr	w1, [x19]
	mov	w2, #1
	bl	_platform_device_add_resources
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x21]
	bl	_platform_device_add
	mov	x20, x0
	cbz	w0, LBB0_6
LBB0_4:
	ldr	w0, [x21]
	bl	_platform_device_put
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kempld"

	.comm	_kempld_pdev,4,2                ; @kempld_pdev
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_kempld_create_platform_device
.subsections_via_symbols
