xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
char *malloc(unsigned int);
int /*<<< orphan*/ stderr;
char *xmalloc(int size) {
  char *ret;
  if ((ret = malloc((unsigned)size)))
    return ret;
  fprintf(stderr, "Memory exhausted\n");
  exit(1);
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     115b <xmalloc+0x2b>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xe95(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Memory exhausted\0A\00"
define i8* @xmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8*, i8** %3
ret i8* %8
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Memory exhausted\0A\00"
define noalias i8* @xmalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
ret i8* %2
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
}
void insult(struct battle_char *origin, struct battle_char *target) {}


x86 assembly (clang, -O0):
<insult>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insult>:
ret

LLVM IR (-O0):
%struct.battle_char = type opaque
define void @insult(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
ret void
}

LLVM IR (-O2):
%struct.battle_char = type opaque
define void @insult(%struct.battle_char* nocapture %0, %struct.battle_char* nocapture %1) {
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int64_t cfs_stub_lgetxattr(const char *path, const char *name, void *data,
                           size_t size) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<cfs_stub_lgetxattr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfs_stub_lgetxattr>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @cfs_stub_lgetxattr(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i32, i32* @ENOSYS
store i32 %9, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @cfs_stub_lgetxattr(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3) {
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_ino;
};
typedef int /*<<< orphan*/ ino_t;

/* Variables and functions */
ino_t posix_stat_st_ino(const struct stat *st) { return st->st_ino; }


x86 assembly (clang, -O0):
<posix_stat_st_ino>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_stat_st_ino>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @posix_stat_st_ino(%struct.stat* %0) {
%2 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %2
%3 = load %struct.stat*, %struct.stat** %2
%4 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @posix_stat_st_ino(%struct.stat* nocapture %0) {
%2 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int sweep_dobldobl_real_run(void) {
  int fail, *b;
  double *c;
  int precision = 1;
  fail = _ada_use_c2phc(621, &precision, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_dobldobl_real_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x1c(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x26d,%edi
lea    -0x1c(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_dobldobl_real_run>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x26d,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sweep_dobldobl_real_run() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca double*
%4 = alloca i32
store i32 1, i32* %4
%5 = load i32*, i32** %2
%6 = load double*, double** %3
%7 = call i32 @_ada_use_c2phc(i32 621, i32* %4, i32* %5, double* %6)
store i32 %7, i32* %1
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @sweep_dobldobl_real_run() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = call i32 @_ada_use_c2phc(i32 621, i32* %1, i32* undef, double* undef)
ret i32 %3
}
int Mini_AigLitIsConst0(int Lit) { return Lit == 0; }


x86 assembly (clang, -O0):
<Mini_AigLitIsConst0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mini_AigLitIsConst0>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @Mini_AigLitIsConst0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @Mini_AigLitIsConst0(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Control();
scalar_t__ Initialization(int, char **);
int main(int argc, char **argv) {
  if (Initialization(argc, argv)) {
    Control();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <Initialization@plt>
cmp    $0x0,%rax
je     1153 <main+0x33>
mov    $0x0,%al
call   1030 <Control@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <Initialization@plt>
test   %rax,%rax
je     1132 <main+0x12>
xor    %eax,%eax
call   1030 <Control@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i64 @Initialization(i32 %6, i8** %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @Control()
br label %12
12: ; preds = %10, %2
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @Initialization(i32 %0, i8** %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @Control()
br label %7
7: ; preds = %5, %2
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
void minipack_pack_int8(void *ptr, int8_t value, size_t *sz) {
  *sz = 2;
  *((uint8_t *)ptr) = 0xD0;
  *((int8_t *)(ptr + 1)) = value;
}


x86 assembly (clang, -O0):
<minipack_pack_int8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x2,(%rax)
mov    -0x8(%rbp),%rax
movl   $0xd0,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<minipack_pack_int8>:
movq   $0x2,(%rdx)
movl   $0xd0,(%rdi)
mov    %esi,0x1(%rdi)
ret

LLVM IR (-O0):
define void @minipack_pack_int8(i8* %0, i32 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%7 = load i64*, i64** %6
store i64 2, i64* %7
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32 208, i32* %9
%10 = load i32, i32* %5
%11 = load i8*, i8** %4
%12 = getelementptr i8, i8* %11, i64 1
%13 = bitcast i8* %12 to i32*
store i32 %10, i32* %13
ret void
}

LLVM IR (-O2):
define void @minipack_pack_int8(i8* nocapture writeonly %0, i32 %1, i64* nocapture writeonly %2) {
store i64 2, i64* %2
%4 = bitcast i8* %0 to i32*
store i32 208, i32* %4
%5 = getelementptr i8, i8* %0, i64 1
%6 = bitcast i8* %5 to i32*
store i32 %1, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ linkdata();
int /*<<< orphan*/ poof();
int /*<<< orphan*/ rdata();
void init() {
  rdata();
  linkdata();
  poof();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <rdata@plt>
mov    $0x0,%al
call   1050 <linkdata@plt>
mov    $0x0,%al
call   1030 <poof@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %eax,%eax
call   1040 <rdata@plt>
xor    %eax,%eax
call   1050 <linkdata@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <poof@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 (...) @rdata()
%2 = call i32 (...) @linkdata()
%3 = call i32 (...) @poof()
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 (...) @rdata()
%2 = tail call i32 (...) @linkdata()
%3 = tail call i32 (...) @poof()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ USART_Transmit(unsigned char);
void MIDI_Transmit(unsigned char System, unsigned char Data1,
                   unsigned char Data2) {
  USART_Transmit(System);
  USART_Transmit(Data1);
  USART_Transmit(Data2);
}


x86 assembly (clang, -O0):
<MIDI_Transmit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <USART_Transmit@plt>
movzbl -0x2(%rbp),%edi
call   1030 <USART_Transmit@plt>
movzbl -0x3(%rbp),%edi
call   1030 <USART_Transmit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIDI_Transmit>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <USART_Transmit@plt>
mov    %ebp,%edi
call   1030 <USART_Transmit@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <USART_Transmit@plt>

LLVM IR (-O0):
define void @MIDI_Transmit(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %4
%8 = call i32 @USART_Transmit(i8 zeroext %7)
%9 = load i8, i8* %5
%10 = call i32 @USART_Transmit(i8 zeroext %9)
%11 = load i8, i8* %6
%12 = call i32 @USART_Transmit(i8 zeroext %11)
ret void
}

LLVM IR (-O2):
define void @MIDI_Transmit(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i32 @USART_Transmit(i8 zeroext %0)
%5 = tail call i32 @USART_Transmit(i8 zeroext %1)
%6 = tail call i32 @USART_Transmit(i8 zeroext %2)
ret void
}
int SINT_TO_DINT(short var) {
  int newvar;
  newvar = (int)var;
  return newvar;
}


x86 assembly (clang, -O0):
<SINT_TO_DINT>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SINT_TO_DINT>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @SINT_TO_DINT(i16 signext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = sext i16 %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @SINT_TO_DINT(i16 signext %0) {
%2 = sext i16 %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ pm_error(char *);
void DecodeServer(int const numInputFiles, const char *const decodeFileName,
                  const char *const masterHostName, int const masterPortNum) {
  pm_error("This version of Ppmtompeg cannot run a decode server because "
           "it does not have socket capability.");
}


x86 assembly (clang, -O0):
<DecodeServer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <pm_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DecodeServer>:
lea    0xee9(%rip),%rdi
jmp    1030 <pm_error@plt>

LLVM IR (-O0):
@.str = [97 x i8] c"This version of Ppmtompeg cannot run a decode server because it does not have socket capability.\00"
define void @DecodeServer(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = call i32 @pm_error(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [97 x i8] c"This version of Ppmtompeg cannot run a decode server because it does not have socket capability.\00"
define void @DecodeServer(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
%5 = tail call i32 @pm_error(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct dictEntry {
  int dummy;
};
struct dict {
  int dummy;
};

/* Variables and functions */
struct dictEntry *dictAddRaw(struct dict *, void *);
struct dictEntry *dictFind(struct dict *, void *);
struct dictEntry *dictReplaceRaw(struct dict *d, void *key) {
  struct dictEntry *entry = dictFind(d, key);
  return entry ? entry : dictAddRaw(d, key);
}


x86 assembly (clang, -O0):
<dictReplaceRaw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <dictFind@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <dictReplaceRaw+0x39>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    116a <dictReplaceRaw+0x4a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <dictAddRaw@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dictReplaceRaw>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <dictFind@plt>
test   %rax,%rax
je     113c <dictReplaceRaw+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <dictAddRaw@plt>

LLVM IR (-O0):
%struct.dictEntry = type { i32 }
%struct.dict = type { i32 }
define %struct.dictEntry* @dictReplaceRaw(%struct.dict* %0, i8* %1) {
%3 = alloca %struct.dict*
%4 = alloca i8*
%5 = alloca %struct.dictEntry*
store %struct.dict* %0, %struct.dict** %3
store i8* %1, i8** %4
%6 = load %struct.dict*, %struct.dict** %3
%7 = load i8*, i8** %4
%8 = call %struct.dictEntry* @dictFind(%struct.dict* %6, i8* %7)
store %struct.dictEntry* %8, %struct.dictEntry** %5
%9 = load %struct.dictEntry*, %struct.dictEntry** %5
%10 = icmp ne %struct.dictEntry* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load %struct.dictEntry*, %struct.dictEntry** %5
br label %17
13: ; preds = %2
%14 = load %struct.dict*, %struct.dict** %3
%15 = load i8*, i8** %4
%16 = call %struct.dictEntry* @dictAddRaw(%struct.dict* %14, i8* %15)
br label %17
17: ; preds = %13, %11
%18 = phi %struct.dictEntry* [ %12, %11 ], [ %16, %13 ]
ret %struct.dictEntry* %18
}

LLVM IR (-O2):
%struct.dictEntry = type { i32 }
%struct.dict = type { i32 }
define %struct.dictEntry* @dictReplaceRaw(%struct.dict* %0, i8* %1) {
%3 = tail call %struct.dictEntry* @dictFind(%struct.dict* %0, i8* %1)
%4 = icmp eq %struct.dictEntry* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call %struct.dictEntry* @dictAddRaw(%struct.dict* %0, i8* %1)
br label %7
7: ; preds = %2, %5
%8 = phi %struct.dictEntry* [ %6, %5 ], [ %3, %2 ]
ret %struct.dictEntry* %8
}
void gtk_range_set_increments() {}


x86 assembly (clang, -O0):
<gtk_range_set_increments>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_range_set_increments>:
ret

LLVM IR (-O0):
define void @gtk_range_set_increments() {
ret void
}

LLVM IR (-O2):
define void @gtk_range_set_increments() {
ret void
}
int decrement(int arg) { return arg - 1; }


x86 assembly (clang, -O0):
<decrement>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decrement>:
lea    -0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @decrement(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @decrement(i32 %0) {
%2 = add nsw i32 %0, -1
ret i32 %2
}
int lba_to_msf(int lba) { return 0; }


x86 assembly (clang, -O0):
<lba_to_msf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lba_to_msf>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @lba_to_msf(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @lba_to_msf(i32 %0) {
ret i32 0
}
void __DELETE_java_net_BindException(void *me, void *client_data) {}


x86 assembly (clang, -O0):
<__DELETE_java_net_BindException>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__DELETE_java_net_BindException>:
ret

LLVM IR (-O0):
define void @__DELETE_java_net_BindException(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @__DELETE_java_net_BindException(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LrsCleanup();
vuser_end() {
  LrsCleanup();
  return 0;
}


x86 assembly (clang, -O0):
<vuser_end>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <LrsCleanup@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vuser_end>:
push   %rax
xor    %eax,%eax
call   1030 <LrsCleanup@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @vuser_end() {
%1 = call i32 (...) @LrsCleanup()
ret i32 0
}

LLVM IR (-O2):
define i32 @vuser_end() {
%1 = tail call i32 (...) @LrsCleanup()
ret i32 0
}
unsigned int is_reserved_hash(register const char *str) {
  register const char *x;
}


x86 assembly (clang, -O0):
<is_reserved_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_reserved_hash>:
ret

LLVM IR (-O0):
define i32 @is_reserved_hash(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @is_reserved_hash(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
scalar_t__ test(unsigned char *, int);
int is_n(unsigned char *useq, int n) {
  if (test(useq, n) == 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <test@plt>
cmp    $0x0,%rax
jne    1141 <is_n+0x31>
movl   $0x0,-0x4(%rbp)
jmp    1148 <is_n+0x38>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_n>:
push   %rax
call   1030 <test@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_n(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = load i32, i32* %5
%8 = call i64 @test(i8* %6, i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %12
11: ; preds = %2
store i32 1, i32* %3
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_n(i8* %0, i32 %1) {
%3 = tail call i64 @test(i8* %0, i32 %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(int);
int /*<<< orphan*/ stderr;
void *checked_malloc(int len) {
  void *p = malloc(len);
  if (!p) {
    fprintf(stderr, "\nRan out of memory!\n");
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<checked_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1171 <checked_malloc+0x41>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checked_malloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <checked_malloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"\0ARan out of memory!\0A\00"
define i8* @checked_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"\0ARan out of memory!\0A\00"
define noalias i8* @checked_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Type definitions */
struct shmid_ds {
  int dummy;
};
typedef int cmd;

/* Variables and functions */
int IPC_STAT;
int __syscall(int, int, int, struct shmid_ds *);
int __syscall_ret(int);
int shmctl(int id, int cmd, struct shmid_ds *buf) {
  int r = __syscall(308, id, (((cmd) & ~(IPC_STAT & 0x100)) | 0x100), buf);
  return __syscall_ret(r);
}


x86 assembly (clang, -O0):
<shmctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
and    $0x100,%eax
xor    $0xffffffff,%eax
and    %eax,%edx
or     $0x100,%edx
mov    -0x10(%rbp),%rcx
mov    $0x134,%edi
call   1030 <__syscall@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <__syscall_ret@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shmctl>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
or     $0x100,%edx
mov    $0x134,%edi
call   1030 <__syscall@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <__syscall_ret@plt>

LLVM IR (-O0):
%struct.shmid_ds = type { i32 }
@IPC_STAT = global i32 0
define i32 @shmctl(i32 %0, i32 %1, %struct.shmid_ds* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.shmid_ds*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.shmid_ds* %2, %struct.shmid_ds** %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* @IPC_STAT
%11 = and i32 %10, 256
%12 = xor i32 %11, -1
%13 = and i32 %9, %12
%14 = or i32 %13, 256
%15 = load %struct.shmid_ds*, %struct.shmid_ds** %6
%16 = call i32 @__syscall(i32 308, i32 %8, i32 %14, %struct.shmid_ds* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = call i32 @__syscall_ret(i32 %17)
ret i32 %18
}

LLVM IR (-O2):
%struct.shmid_ds = type { i32 }
@IPC_STAT = global i32 0
define i32 @shmctl(i32 %0, i32 %1, %struct.shmid_ds* %2) {
%4 = or i32 %1, 256
%5 = tail call i32 @__syscall(i32 308, i32 %0, i32 %4, %struct.shmid_ds* %2)
%6 = tail call i32 @__syscall_ret(i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ redecl3();
void use120() { redecl3(); }


x86 assembly (clang, -O0):
<use120>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <redecl3@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<use120>:
xor    %eax,%eax
jmp    1030 <redecl3@plt>

LLVM IR (-O0):
define void @use120() {
%1 = call i32 (...) @redecl3()
ret void
}

LLVM IR (-O2):
define void @use120() {
%1 = tail call i32 (...) @redecl3()
ret void
}
int f_bgt_cr2(float a1) { return !(__builtin_isgreater(100, a1)); }


x86 assembly (clang, -O0):
<f_bgt_cr2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_bgt_cr2>:
movss  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setbe  %al
ret

LLVM IR (-O0):
define i32 @f_bgt_cr2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float 1.000000e+02, %3
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f_bgt_cr2(float %0) {
%2 = fcmp uge float %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
bool is_directory(const char *path) {
  struct stat statbuf;
  if (stat(path, &statbuf) != 0)
    return 0;
  return S_ISDIR(statbuf.st_mode);
}


x86 assembly (clang, -O0):
<is_directory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
je     114f <is_directory+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    115a <is_directory+0x3a>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_directory>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <is_directory+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_directory(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %13
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISDIR(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_directory(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISDIR(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ listnum(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("\nEnter an integer > ");
  scanf("%d", &n);
  listnum(n);
  printf("\nThat's all, have a nice day!\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <listnum@plt>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <listnum@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"\0AEnter an integer > \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [31 x i8] c"\0AThat's all, have a nice day!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @listnum(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0AEnter an integer > \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [30 x i8] c"\0AThat's all, have a nice day!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @listnum(i32 %5)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strnlen(char const *, int);
void test2(const char *s, int i) {
  const char c[123];
  strnlen(s, i);
  strnlen(s, 999);
  strnlen(c, 1);
  strnlen(c, i);
  strnlen(c, 999);
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <strnlen@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3e7,%esi
call   1030 <strnlen@plt>
lea    -0x90(%rbp),%rdi
mov    $0x1,%esi
call   1030 <strnlen@plt>
lea    -0x90(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <strnlen@plt>
lea    -0x90(%rbp),%rdi
mov    $0x3e7,%esi
call   1030 <strnlen@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rbp
push   %rbx
sub    $0x88,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strnlen@plt>
mov    %rbx,%rdi
mov    $0x3e7,%esi
call   1030 <strnlen@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <strnlen@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <strnlen@plt>
mov    %rbx,%rdi
mov    $0x3e7,%esi
call   1030 <strnlen@plt>
add    $0x88,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @test2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [123 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @strnlen(i8* %6, i32 %7)
%9 = load i8*, i8** %3
%10 = call i32 @strnlen(i8* %9, i32 999)
%11 = getelementptr inbounds [123 x i8], [123 x i8]* %5, i64 0, i64 0
%12 = call i32 @strnlen(i8* %11, i32 1)
%13 = getelementptr inbounds [123 x i8], [123 x i8]* %5, i64 0, i64 0
%14 = load i32, i32* %4
%15 = call i32 @strnlen(i8* %13, i32 %14)
%16 = getelementptr inbounds [123 x i8], [123 x i8]* %5, i64 0, i64 0
%17 = call i32 @strnlen(i8* %16, i32 999)
ret void
}

LLVM IR (-O2):
define void @test2(i8* %0, i32 %1) {
%3 = alloca [123 x i8]
%4 = getelementptr inbounds [123 x i8], [123 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @strnlen(i8* %0, i32 %1)
%6 = tail call i32 @strnlen(i8* %0, i32 999)
%7 = call i32 @strnlen(i8* %4, i32 1)
%8 = call i32 @strnlen(i8* %4, i32 %1)
%9 = call i32 @strnlen(i8* %4, i32 999)
ret void
}
/* Variables and functions */
char *get_arg(char const **, int, char const *);
const char *get_arg2(const char **argv, int argc, const char *f1,
                     const char *f2) {
  const char *ret = get_arg(argv, argc, f1);
  if (!ret)
    return ret = get_arg(argv, argc, f2);
  return ret;
}


x86 assembly (clang, -O0):
<get_arg2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <get_arg@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1163 <get_arg2+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x28(%rbp),%rdx
call   1030 <get_arg@plt>
mov    %rax,-0x30(%rbp)
mov    %rax,-0x8(%rbp)
jmp    116b <get_arg2+0x5b>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_arg2>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <get_arg@plt>
test   %rax,%rax
je     112b <get_arg2+0x1b>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <get_arg@plt>

LLVM IR (-O0):
define i8* @get_arg2(i8** %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8** %0, i8*** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
%11 = load i8**, i8*** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = call i8* @get_arg(i8** %11, i32 %12, i8* %13)
store i8* %14, i8** %10
%15 = load i8*, i8** %10
%16 = icmp ne i8* %15, null
br i1 %16, label %22, label %17
17: ; preds = %4
%18 = load i8**, i8*** %6
%19 = load i32, i32* %7
%20 = load i8*, i8** %9
%21 = call i8* @get_arg(i8** %18, i32 %19, i8* %20)
store i8* %21, i8** %10
store i8* %21, i8** %5
br label %24
22: ; preds = %4
%23 = load i8*, i8** %10
store i8* %23, i8** %5
br label %24
24: ; preds = %22, %17
%25 = load i8*, i8** %5
ret i8* %25
}

LLVM IR (-O2):
define i8* @get_arg2(i8** %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i8* @get_arg(i8** %0, i32 %1, i8* %2)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i8* @get_arg(i8** %0, i32 %1, i8* %3)
br label %9
9: ; preds = %4, %7
%10 = phi i8* [ %8, %7 ], [ %5, %4 ]
ret i8* %10
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int extension;
};
typedef TYPE_1__ XExtCodes;

/* Variables and functions */
void set_XExtCodes_extension(void *_p, int _v) {
  ((XExtCodes *)_p)->extension = (int)_v;
}


x86 assembly (clang, -O0):
<set_XExtCodes_extension>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XExtCodes_extension>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XExtCodes_extension(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XExtCodes_extension(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
struct val {
  int dummy;
};

/* Variables and functions */
struct val *peek();
int /*<<< orphan*/ prval(int /*<<< orphan*/, struct val *, int /*<<< orphan*/);
void cmd_print() {
  struct val *v = peek();
  if (!v)
    return;
  prval(0, v, 0);
}


x86 assembly (clang, -O0):
<cmd_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <peek@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <cmd_print+0x23>
jmp    1150 <cmd_print+0x30>
mov    -0x8(%rbp),%rsi
xor    %edx,%edx
mov    %edx,%edi
call   1040 <prval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_print>:
push   %rax
xor    %eax,%eax
call   1030 <peek@plt>
test   %rax,%rax
je     113a <cmd_print+0x1a>
xor    %edi,%edi
mov    %rax,%rsi
xor    %edx,%edx
pop    %rax
jmp    1040 <prval@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.val = type { i32 }
define void @cmd_print() {
%1 = alloca %struct.val*
%2 = call %struct.val* (...) @peek()
store %struct.val* %2, %struct.val** %1
%3 = load %struct.val*, %struct.val** %1
%4 = icmp ne %struct.val* %3, null
br i1 %4, label %6, label %5
5: ; preds = %0
br label %9
6: ; preds = %0
%7 = load %struct.val*, %struct.val** %1
%8 = call i32 @prval(i32 0, %struct.val* %7, i32 0)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.val = type { i32 }
define void @cmd_print() {
%1 = tail call %struct.val* (...) @peek()
%2 = icmp eq %struct.val* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @prval(i32 0, %struct.val* %1, i32 0)
br label %5
5: ; preds = %0, %3
ret void
}
void STO_BTS(s, b, n, w) int *s, b, n;
{ MMS_BTS(s, b, n, n, w); }


x86 assembly (clang, -O0):
<STO_BTS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    $0x0,%al
call   1030 <MMS_BTS@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STO_BTS>:
mov    %ecx,%r8d
mov    %edx,%ecx
xor    %eax,%eax
jmp    1030 <MMS_BTS@plt>

LLVM IR (-O0):
define void @STO_BTS(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @MMS_BTS to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %9, i32 %10, i32 %11, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @STO_BTS(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @MMS_BTS to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %0, i32 %1, i32 %2, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  char buffer[512];
  if (argc > 1) {
    strcpy(buffer, argv[1]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1147 <main+0x37>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     112f <main+0x1f>
sub    $0x208,%rsp
mov    0x8(%rsi),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
add    $0x208,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [512 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @strcpy(i8* %10, i8* %13)
br label %15
15: ; preds = %9, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @strcpy(i8* %4, i8* %8)
br label %10
10: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ oom();
void *realloc(void *, size_t);
void *xrealloc(void *oldp, size_t sz) {
  void *p = realloc(oldp, sz);
  if (!p)
    oom();
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <xrealloc+0x33>
mov    $0x0,%al
call   1030 <oom@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <xrealloc+0x15>
xor    %eax,%eax
call   1030 <oom@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 (...) @oom()
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @oom()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
int test_imm_85uint32_mem(unsigned int *val) {
  return ((*val) & (0x85 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_85uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x85,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_85uint32_mem>:
testb  $0x85,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_85uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 133
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_85uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 133
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ search_replace_character(char *, char, char);
int /*<<< orphan*/ strcpy(char *, char *);
char *easycharts_series_label_convert_comma(char *series_label) {
  static char buffer[128];
  strcpy(buffer, series_label);
  search_replace_character(buffer, ',', '-');
  return buffer;
}


x86 assembly (clang, -O0):
<easycharts_series_label_convert_comma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f09(%rip),%rdi
call   1030 <strcpy@plt>
lea    0x2efd(%rip),%rdi
mov    $0x2c,%esi
mov    $0x2d,%edx
call   1040 <search_replace_character@plt>
lea    0x2ee7(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<easycharts_series_label_convert_comma>:
push   %rbx
mov    %rdi,%rsi
lea    0x2f15(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x2c,%esi
mov    $0x2d,%edx
call   1040 <search_replace_character@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@easycharts_series_label_convert_comma.buffer = internal global [128 x i8] zeroinitializer
define i8* @easycharts_series_label_convert_comma(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @easycharts_series_label_convert_comma.buffer, i64 0, i64 0), i8* %3)
%5 = call i32 @search_replace_character(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @easycharts_series_label_convert_comma.buffer, i64 0, i64 0), i8 signext 44, i8 signext 45)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @easycharts_series_label_convert_comma.buffer, i64 0, i64 0)
}

LLVM IR (-O2):
@easycharts_series_label_convert_comma.buffer = internal global [128 x i8] zeroinitializer
define i8* @easycharts_series_label_convert_comma(i8* %0) {
%2 = tail call i32 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @easycharts_series_label_convert_comma.buffer, i64 0, i64 0), i8* %0)
%3 = tail call i32 @search_replace_character(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @easycharts_series_label_convert_comma.buffer, i64 0, i64 0), i8 signext 44, i8 signext 45)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @easycharts_series_label_convert_comma.buffer, i64 0, i64 0)
}
int compareTags(one, two) const void *const one;
const void *const two;
{
  const char *const line1 = *(const char *const *const)one;
  const char *const line2 = *(const char *const *const)two;
  return strcmp(line1, line2);
}


x86 assembly (clang, -O0):
<compareTags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareTags>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @compareTags(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
%9 = load i8*, i8** %8
store i8* %9, i8** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
store i8* %12, i8** %6
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = call i32 @strcmp(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @compareTags(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
int sgn(int a, int b) {
  int c = (a > b) ? (a - b) : (b - a);
  return c;
}


x86 assembly (clang, -O0):
<sgn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1124 <sgn+0x24>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    112d <sgn+0x2d>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgn>:
mov    %edi,%eax
sub    %esi,%eax
neg    %eax
sub    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @sgn(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
br label %17
13: ; preds = %2
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = sub nsw i32 %14, %15
br label %17
17: ; preds = %13, %9
%18 = phi i32 [ %12, %9 ], [ %16, %13 ]
store i32 %18, i32* %5
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @sgn(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = sub nsw i32 %0, %1
%5 = sub nsw i32 %1, %0
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}