#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 Queue {
  int dummy;
};

/* Variables and functions */
int *QUE_back(struct Queue *);
int /*<<< orphan*/ QUE_deleteQueue(struct Queue *);
int QUE_empty(struct Queue *);
int *QUE_front(struct Queue *);
struct Queue *QUE_newQueue();
int /*<<< orphan*/ QUE_pop(struct Queue *);
int /*<<< orphan*/ QUE_push(struct Queue *, int **);
int QUE_size(struct Queue *);
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int main(void) {
  struct Queue *myQueue = QUE_newQueue();
  int *myInt = (int *)malloc(sizeof(int));
  *myInt = 42;
  QUE_push(myQueue, &myInt);
  int *testPtr = QUE_front(myQueue);
  int *anotherPtr = QUE_back(myQueue);
  int testSize = QUE_size(myQueue);
  int anotherSize = QUE_empty(myQueue);
  QUE_pop(myQueue);
  testSize = QUE_size(myQueue);
  anotherSize = QUE_empty(myQueue);
  QUE_deleteQueue(myQueue);
  free(myInt);
  testPtr = NULL;
  anotherPtr = NULL;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <QUE_newQueue@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4,%edi
call   1080 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x2a,(%rax)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <QUE_push@plt>
mov    -0x10(%rbp),%rdi
call   10c0 <QUE_front@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <QUE_back@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1090 <QUE_size@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
call   10a0 <QUE_empty@plt>
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   10b0 <QUE_pop@plt>
mov    -0x10(%rbp),%rdi
call   1090 <QUE_size@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
call   10a0 <QUE_empty@plt>
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <QUE_deleteQueue@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1050 <QUE_newQueue@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1080 <malloc@plt>
mov    %rax,0x8(%rsp)
movl   $0x2a,(%rax)
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <QUE_push@plt>
mov    %rbx,%rdi
call   10c0 <QUE_front@plt>
mov    %rbx,%rdi
call   1070 <QUE_back@plt>
mov    %rbx,%rdi
call   1090 <QUE_size@plt>
mov    %rbx,%rdi
call   10a0 <QUE_empty@plt>
mov    %rbx,%rdi
call   10b0 <QUE_pop@plt>
mov    %rbx,%rdi
call   1090 <QUE_size@plt>
mov    %rbx,%rdi
call   10a0 <QUE_empty@plt>
mov    %rbx,%rdi
call   1040 <QUE_deleteQueue@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.Queue = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.Queue*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call %struct.Queue* (...) @QUE_newQueue()
store %struct.Queue* %8, %struct.Queue** %2
%9 = call i64 @malloc(i32 4)
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %3
%11 = load i32*, i32** %3
store i32 42, i32* %11
%12 = load %struct.Queue*, %struct.Queue** %2
%13 = call i32 @QUE_push(%struct.Queue* %12, i32** %3)
%14 = load %struct.Queue*, %struct.Queue** %2
%15 = call i32* @QUE_front(%struct.Queue* %14)
store i32* %15, i32** %4
%16 = load %struct.Queue*, %struct.Queue** %2
%17 = call i32* @QUE_back(%struct.Queue* %16)
store i32* %17, i32** %5
%18 = load %struct.Queue*, %struct.Queue** %2
%19 = call i32 @QUE_size(%struct.Queue* %18)
store i32 %19, i32* %6
%20 = load %struct.Queue*, %struct.Queue** %2
%21 = call i32 @QUE_empty(%struct.Queue* %20)
store i32 %21, i32* %7
%22 = load %struct.Queue*, %struct.Queue** %2
%23 = call i32 @QUE_pop(%struct.Queue* %22)
%24 = load %struct.Queue*, %struct.Queue** %2
%25 = call i32 @QUE_size(%struct.Queue* %24)
store i32 %25, i32* %6
%26 = load %struct.Queue*, %struct.Queue** %2
%27 = call i32 @QUE_empty(%struct.Queue* %26)
store i32 %27, i32* %7
%28 = load %struct.Queue*, %struct.Queue** %2
%29 = call i32 @QUE_deleteQueue(%struct.Queue* %28)
%30 = load i32*, i32** %3
%31 = call i32 @free(i32* %30)
store i32* null, i32** %4
store i32* null, i32** %5
ret i32 0
}

LLVM IR (-O2):
%struct.Queue = type { i32 }
define i32 @main() {
%1 = alloca i32*
%2 = tail call %struct.Queue* (...) @QUE_newQueue()
%3 = bitcast i32** %1 to i8*
%4 = tail call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %1
store i32 42, i32* %5
%6 = call i32 @QUE_push(%struct.Queue* %2, i32** %1)
%7 = call i32* @QUE_front(%struct.Queue* %2)
%8 = call i32* @QUE_back(%struct.Queue* %2)
%9 = call i32 @QUE_size(%struct.Queue* %2)
%10 = call i32 @QUE_empty(%struct.Queue* %2)
%11 = call i32 @QUE_pop(%struct.Queue* %2)
%12 = call i32 @QUE_size(%struct.Queue* %2)
%13 = call i32 @QUE_empty(%struct.Queue* %2)
%14 = call i32 @QUE_deleteQueue(%struct.Queue* %2)
%15 = load i32*, i32** %1
%16 = call i32 @free(i32* %15)
ret i32 0
}