#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 */
struct account {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ account_deposit(struct account *, int);
int /*<<< orphan*/ account_dispose(struct account *);
int account_get_balance(struct account *);
int /*<<< orphan*/ account_set_balance(struct account *, int);
int /*<<< orphan*/ assert(int);
struct account *create_account();
int main() {
  struct account *myAccount = create_account();
  account_set_balance(myAccount, 5);
  account_deposit(myAccount, 10);
  int b = account_get_balance(myAccount);
  assert(b == 15);
  account_dispose(myAccount);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <create_account@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x5,%esi
call   1060 <account_set_balance@plt>
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1080 <account_deposit@plt>
mov    -0x10(%rbp),%rdi
call   1040 <account_get_balance@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xf,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1070 <account_dispose@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <create_account@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x5,%esi
call   1060 <account_set_balance@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1080 <account_deposit@plt>
mov    %rbx,%rdi
call   1040 <account_get_balance@plt>
xor    %edi,%edi
cmp    $0xf,%eax
sete   %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
call   1070 <account_dispose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.account = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.account*
%3 = alloca i32
store i32 0, i32* %1
%4 = call %struct.account* (...) @create_account()
store %struct.account* %4, %struct.account** %2
%5 = load %struct.account*, %struct.account** %2
%6 = call i32 @account_set_balance(%struct.account* %5, i32 5)
%7 = load %struct.account*, %struct.account** %2
%8 = call i32 @account_deposit(%struct.account* %7, i32 10)
%9 = load %struct.account*, %struct.account** %2
%10 = call i32 @account_get_balance(%struct.account* %9)
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 15
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load %struct.account*, %struct.account** %2
%16 = call i32 @account_dispose(%struct.account* %15)
ret i32 0
}

LLVM IR (-O2):
%struct.account = type { i32 }
define i32 @main() {
%1 = tail call %struct.account* (...) @create_account()
%2 = tail call i32 @account_set_balance(%struct.account* %1, i32 5)
%3 = tail call i32 @account_deposit(%struct.account* %1, i32 10)
%4 = tail call i32 @account_get_balance(%struct.account* %1)
%5 = icmp eq i32 %4, 15
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i32 @account_dispose(%struct.account* %1)
ret i32 0
}