#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ do_report(char *, int, int);
int /*<<< orphan*/ erl_init(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ erl_mk_uint(unsigned int);
int /*<<< orphan*/ send_term(int /*<<< orphan*/);
void t_erl_mk_uint(void) {
  unsigned i;
  erl_init(NULL, 0);
  send_term(erl_mk_uint(54321));
  i = 2147483647;
  send_term(erl_mk_uint(i));
  send_term(erl_mk_uint(i + 1));
  send_term(erl_mk_uint(i + 2));
  send_term(erl_mk_uint(i + 3));
  send_term(erl_mk_uint(i + i + 1));
  do_report("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/lib/"
            "erl_interface/test/erl_eterm_SUITE_data/eterm_test.c",
            706, 1);
}


x86 assembly (clang, -O0):
<t_erl_mk_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1060 <erl_init@plt>
mov    $0xd431,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
movl   $0x7fffffff,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
mov    -0x4(%rbp),%edi
add    $0x2,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
mov    -0x4(%rbp),%edi
add    $0x3,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
mov    -0x4(%rbp),%edi
add    -0x4(%rbp),%edi
add    $0x1,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe34(%rip),%rdi
mov    $0x2c2,%esi
mov    $0x1,%edx
call   1030 <do_report@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_erl_mk_uint>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1060 <erl_init@plt>
mov    $0xd431,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
mov    $0x7fffffff,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
mov    $0x80000000,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
mov    $0x80000001,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
mov    $0x80000002,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
mov    $0xffffffff,%edi
call   1040 <erl_mk_uint@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe49(%rip),%rdi
mov    $0x2c2,%esi
mov    $0x1,%edx
pop    %rax
jmp    1030 <do_report@plt>

LLVM IR (-O0):
@.str = [182 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/lib/erl_interface/test/erl_eterm_SUITE_data/eterm_test.c\00"
define void @t_erl_mk_uint() {
%1 = alloca i32
%2 = call i32 @erl_init(i32* null, i32 0)
%3 = call i32 @erl_mk_uint(i32 54321)
%4 = call i32 @send_term(i32 %3)
store i32 2147483647, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @erl_mk_uint(i32 %5)
%7 = call i32 @send_term(i32 %6)
%8 = load i32, i32* %1
%9 = add i32 %8, 1
%10 = call i32 @erl_mk_uint(i32 %9)
%11 = call i32 @send_term(i32 %10)
%12 = load i32, i32* %1
%13 = add i32 %12, 2
%14 = call i32 @erl_mk_uint(i32 %13)
%15 = call i32 @send_term(i32 %14)
%16 = load i32, i32* %1
%17 = add i32 %16, 3
%18 = call i32 @erl_mk_uint(i32 %17)
%19 = call i32 @send_term(i32 %18)
%20 = load i32, i32* %1
%21 = load i32, i32* %1
%22 = add i32 %20, %21
%23 = add i32 %22, 1
%24 = call i32 @erl_mk_uint(i32 %23)
%25 = call i32 @send_term(i32 %24)
%26 = call i32 @do_report(i8* getelementptr inbounds ([182 x i8], [182 x i8]* @.str, i64 0, i64 0), i32 706, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [182 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/lib/erl_interface/test/erl_eterm_SUITE_data/eterm_test.c\00"
define void @t_erl_mk_uint() {
%1 = tail call i32 @erl_init(i32* null, i32 0)
%2 = tail call i32 @erl_mk_uint(i32 54321)
%3 = tail call i32 @send_term(i32 %2)
%4 = tail call i32 @erl_mk_uint(i32 2147483647)
%5 = tail call i32 @send_term(i32 %4)
%6 = tail call i32 @erl_mk_uint(i32 -2147483648)
%7 = tail call i32 @send_term(i32 %6)
%8 = tail call i32 @erl_mk_uint(i32 -2147483647)
%9 = tail call i32 @send_term(i32 %8)
%10 = tail call i32 @erl_mk_uint(i32 -2147483646)
%11 = tail call i32 @send_term(i32 %10)
%12 = tail call i32 @erl_mk_uint(i32 -1)
%13 = tail call i32 @send_term(i32 %12)
%14 = tail call i32 @do_report(i8* getelementptr inbounds ([182 x i8], [182 x i8]* @.str, i64 0, i64 0), i32 706, i32 1)
ret void
}