// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/builtins_ir.c
// Function: subtilis_builtin_ir_call_str_to_int32
subtilis_exp_t *subtilis_builtin_ir_call_str_to_int32(subtilis_parser_t *p,
						      size_t str_reg,
						      size_t base_reg,
						      subtilis_error_t *err)
{
	subtilis_ir_section_t *fn;
	const subtilis_type_t *ptype[2];

	ptype[0] = &subtilis_type_integer;
	ptype[1] = &subtilis_type_integer;

	fn = prv_add_args(p, "_str_to_int32", 2, ptype, &subtilis_type_integer,
			  err);
	if (err->type != SUBTILIS_ERROR_OK) {
		if (err->type != SUBTILIS_ERROR_ALREADY_DEFINED)
			return NULL;
		subtilis_error_init(err);
	} else {
		prv_builtins_ir_str_to_int32(p, fn, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;
	}

	return subtilis_parser_call_2_arg_fn(
	    p, "_str_to_int32", str_reg, base_reg, SUBTILIS_IR_REG_TYPE_INTEGER,
	    SUBTILIS_IR_REG_TYPE_INTEGER, &subtilis_type_integer, true, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x3c536(%rip), %r14     # 0x6e8c8
leaq 0x70(%rsp), %rcx
movq %r14, (%rcx)
movq %r14, 0x8(%rcx)
leaq 0x3ced4(%rip), %rsi     # 0x6f279
pushq $0x2
popq %rdx
movq %r14, %r8
movq %rbx, %r9
callq 0x314be
movq %rax, %rbp
movl (%rbx), %eax
testl %eax, %eax
je 0x323fd
cmpl $0x20, %eax
jne 0x3280f
movq %rbx, %rdi
callq 0x140a4
subq $0x8, %rsp
leaq 0x3cea1(%rip), %rsi     # 0x6f279
movq %r13, %rdi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbx
pushq $0x1
pushq %r14
callq 0x1deea
addq $0xa8, %rsp
jmp 0x32818
movq %r12, 0x58(%rsp)
movq %r15, 0x60(%rsp)
movq 0x48(%r13), %rax
movq %rax, 0x40(%rsp)
movq %rbp, 0x48(%r13)
movq 0x98(%rbp), %rax
movq %rax, 0x18(%rsp)
movq 0xa8(%rbp), %r12
movq %rbp, %rdi
callq 0x2b774
movq %rax, %r15
movq %rbp, %rdi
callq 0x2b774
movq %rax, 0x38(%rsp)
movq 0x48(%r13), %rdi
pushq $0x1b
popq %rsi
movq %r12, 0x8(%rsp)
movq %r12, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2a9a4
cmpl $0x0, (%rbx)
jne 0x32806
pushq $0x4
popq %rsi
movq %r13, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4acab
cmpl $0x0, (%rbx)
jne 0x32806
pushq $0x35
popq %rsi
movq %rbp, %rdi
movq %rax, %rdx
movq %rax, %r12
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x32806
pushq $0x43
popq %rsi
movq %rbp, %rdi
movq %rax, %rdx
movq %r15, %rcx
movq 0x18(%rsp), %r8
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x32806
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x32806
pushq $0x4
popq %rsi
movq %r13, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4a690
cmpl $0x0, (%rbx)
jne 0x32806
movq %r12, %rcx
movq %rax, %r12
movq 0x48(%r13), %rdi
xorl %esi, %esi
movq %rax, %rdx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x32806
movq %rax, %r15
movq 0x48(%r13), %rdi
pushq $0x9
popq %rsi
pushq $0x5
popq %rdx
pushq $0x30
popq %rcx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x32806
subq $0x8, %rsp
leaq 0x70(%rsp), %r9
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movq %r15, %r8
pushq %rbx
callq 0x310ea
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x32806
movq %rax, %r15
movq %r12, 0x50(%rsp)
movq 0x68(%rsp), %r12
movq 0x48(%r13), %rdi
callq 0x2b774
movq %rax, 0x10(%rsp)
movq 0x48(%r13), %rdi
callq 0x2b774
movq %rax, 0x30(%rsp)
movq 0x48(%r13), %rdi
callq 0x2b774
movq %rax, 0x20(%rsp)
movq 0x48(%r13), %rdi
pushq $0x1d
popq %rsi
movq %r12, 0x28(%rsp)
movq %r12, %rdx
movq 0x50(%rsp), %r12
movq %rbx, %rcx
callq 0x2a981
movq %rax, 0x48(%rsp)
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
pushq $0x1d
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2a981
cmpl $0x0, (%rbx)
jne 0x32806
movq %rax, %r15
movq 0x48(%r13), %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
pushq $0xb
popq %rsi
pushq $0x1
popq %r8
movq %r15, %rdx
movq %r15, %rcx
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
pushq $0x3f
popq %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
pushq $0x43
popq %rsi
movq %rax, %rdx
movq 0x30(%rsp), %rcx
movq 0x18(%rsp), %r8
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
movq 0x30(%rsp), %rsi
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
pushq $0x11
popq %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x32806
movq %rax, %r15
movq 0x48(%r13), %rdi
pushq $0xb
popq %rsi
pushq $0x30
popq %r8
movq %rax, %rdx
movq %rax, %rcx
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
pushq $0x4
popq %rsi
movq %r15, %rdx
movq 0x28(%rsp), %rcx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x32806
movq %rax, %r15
movq 0x48(%r13), %rdi
pushq $0x4
popq %rsi
pushq $0x5
popq %r8
movq 0x28(%rsp), %rcx
movq %rcx, %rdx
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
xorl %esi, %esi
movq 0x8(%rsp), %rcx
movq %rcx, %rdx
movq %r15, %r8
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
pushq $0x43
popq %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %r8
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
pushq $0x28
popq %rsi
movq 0x8(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
pushq $0x25
popq %rsi
movl $0x80000000, %ecx       # imm = 0x80000000
movq %rax, %rdx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x32806
movq 0x48(%r13), %rdi
pushq $0x43
popq %rsi
movq %rax, %rdx
movq 0x38(%rsp), %rcx
movq 0x10(%rsp), %r8
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x32806
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x32806
pushq $0x47
popq %rsi
movq %rbp, %rdi
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
callq 0x2a997
movq %rbp, %rdi
movq 0x38(%rsp), %rsi
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x32806
pushq $0x14
popq %rdi
movq %rbx, %rsi
callq 0x2a369
cmpl $0x0, (%rbx)
je 0x32823
movq 0x40(%rsp), %rax
movq %rax, 0x48(%r13)
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2a5f4
cmpl $0x0, (%rbx)
movq 0x40(%rsp), %rax
movq %rax, 0x48(%r13)
movq 0x60(%rsp), %r15
movq 0x58(%rsp), %r12
jne 0x3280f
jmp 0x323cd