	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_draw_util_surface_init         ## -- Begin function draw_util_surface_init
	.p2align	4, 0x90
_draw_util_surface_init:                ## @draw_util_surface_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	%edx, 24(%rsi)
	testq	%rcx, %rcx
	jne	LBB0_2
## %bb.1:
	movq	_visual_type@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_2:
	movq	%rcx, 16(%rbx)
	movl	%r15d, (%rbx)
	movl	%r14d, 4(%rbx)
	movq	%r12, %rdi
	callq	_xcb_generate_id
	movl	%eax, 28(%rbx)
	movl	24(%rbx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_xcb_create_gc_checked
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_xcb_request_check
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_ELOG
LBB0_4:
	movl	24(%rbx), %esi
	movq	16(%rbx), %rdx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	callq	_cairo_xcb_surface_create
	movl	%eax, 8(%rbx)
	movl	%eax, %edi
	callq	_cairo_create
	movl	%eax, 12(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_visual_type,8,3                ## @visual_type
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not create graphical context. Error code: %d. Please report this bug.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_draw_util_surface_init         ; -- Begin function draw_util_surface_init
	.p2align	2
_draw_util_surface_init:                ; @draw_util_surface_init
	.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
	mov	x20, x5
	mov	x21, x4
	mov	x19, x1
	mov	x22, x0
	str	w2, [x1, #24]
Lloh0:
	adrp	x8, _visual_type@GOTPAGE
Lloh1:
	ldr	x8, [x8, _visual_type@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x3, #0
	csel	x8, x8, x3, eq
	str	x8, [x1, #16]
	stp	w4, w5, [x1]
	bl	_xcb_generate_id
	mov	x1, x0
	str	w0, [x19, #28]
	ldr	w2, [x19, #24]
	mov	x0, x22
	mov	w3, #0
	mov	x4, #0
	bl	_xcb_create_gc_checked
	mov	x1, x0
	mov	x0, x22
	bl	_xcb_request_check
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x0]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ELOG
LBB0_2:
	ldr	w1, [x19, #24]
	ldr	x2, [x19, #16]
	mov	x0, x22
	mov	x3, x21
	mov	x4, x20
	bl	_cairo_xcb_surface_create
	str	w0, [x19, #8]
	bl	_cairo_create
	str	w0, [x19, #12]
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_visual_type,8,3                ; @visual_type
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not create graphical context. Error code: %d. Please report this bug.\n"

.subsections_via_symbols
