#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ check_io(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ uuencode(int /*<<< orphan*/ *, char *, int /*<<< orphan*/ *,
                            char *, int, char *);
void output_build(FILE *output, char *oname, FILE *build, char *bname) {
  fprintf(output, "---build---\n");
  check_io(output, oname, 0);
  uuencode(output, oname, build, bname, 0444, "build");
  return;
}


x86 assembly (clang, -O0):
<output_build>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1040 <check_io@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x124,%r8d
lea    0xe89(%rip),%r9
call   1050 <uuencode@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_build>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %edx,%edx
call   1030 <check_io@plt>
lea    0xe9c(%rip),%r9
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    $0x124,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <uuencode@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"---build---\0A\00"
@.str.1 = [6 x i8] c"build\00"
define void @output_build(i32* %0, i8* %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i32*, i32** %5
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%11 = load i32*, i32** %5
%12 = load i8*, i8** %6
%13 = call i32 @check_io(i32* %11, i8* %12, i32 0)
%14 = load i32*, i32** %5
%15 = load i8*, i8** %6
%16 = load i32*, i32** %7
%17 = load i8*, i8** %8
%18 = call i32 @uuencode(i32* %14, i8* %15, i32* %16, i8* %17, i32 292, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"---build---\0A\00"
@.str.1 = [6 x i8] c"build\00"
define void @output_build(i32* %0, i8* %1, i32* %2, i8* %3) {
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 12, i64 1, i32* %0)
%6 = tail call i32 @check_io(i32* %0, i8* %1, i32 0)
%7 = tail call i32 @uuencode(i32* %0, i8* %1, i32* %2, i8* %3, i32 292, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}