#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*/ check_obstack_printf_int();
int /*<<< orphan*/ check_obstack_printf_two_times();
int /*<<< orphan*/ check_obstack_printf_typical();
int /*<<< orphan*/ check_obstack_vprintf(char *, char *, char *, ...);
int /*<<< orphan*/ check_open_obstack_stream();
int main(int argc, char *argv[]) {
  check_obstack_printf_int();
  check_obstack_printf_typical();
  check_obstack_printf_two_times();
  check_obstack_vprintf("one and 2 then 3.4", "%s and %d then %.1f", "one", 2,
                        3.4);
  check_obstack_vprintf("one\ntwo\nthree", "one\n%s", "two\nthree");
  check_open_obstack_stream();
  return 0;
}


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    $0x0,%al
call   1040 <check_obstack_printf_int@plt>
mov    $0x0,%al
call   1070 <check_obstack_printf_typical@plt>
mov    $0x0,%al
call   1060 <check_obstack_printf_two_times@plt>
lea    0xe86(%rip),%rdi
lea    0xe92(%rip),%rsi
lea    0xe9f(%rip),%rdx
mov    $0x2,%ecx
movsd  0xe63(%rip),%xmm0
mov    $0x1,%al
call   1030 <check_obstack_vprintf@plt>
lea    0xe88(%rip),%rdi
lea    0xe8f(%rip),%rsi
lea    0xe7e(%rip),%rdx
mov    $0x0,%al
call   1030 <check_obstack_vprintf@plt>
mov    $0x0,%al
call   1050 <check_open_obstack_stream@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <check_obstack_printf_int@plt>
xor    %eax,%eax
call   1070 <check_obstack_printf_typical@plt>
xor    %eax,%eax
call   1060 <check_obstack_printf_two_times@plt>
lea    0xe9b(%rip),%rdi
lea    0xea7(%rip),%rsi
lea    0xeb4(%rip),%rdx
movsd  0xe7d(%rip),%xmm0
mov    $0x2,%ecx
mov    $0x1,%al
call   1030 <check_obstack_vprintf@plt>
lea    0xe9d(%rip),%rdi
lea    0xea4(%rip),%rsi
lea    0xe93(%rip),%rdx
xor    %eax,%eax
call   1030 <check_obstack_vprintf@plt>
xor    %eax,%eax
call   1050 <check_open_obstack_stream@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"one and 2 then 3.4\00"
@.str.1 = [20 x i8] c"%s and %d then %.1f\00"
@.str.2 = [4 x i8] c"one\00"
@.str.3 = [14 x i8] c"one\0Atwo\0Athree\00"
@.str.4 = [7 x i8] c"one\0A%s\00"
@.str.5 = [10 x i8] c"two\0Athree\00"
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 = call i32 (...) @check_obstack_printf_int()
%7 = call i32 (...) @check_obstack_printf_typical()
%8 = call i32 (...) @check_obstack_printf_two_times()
%9 = call i32 (i8*, i8*, i8*, ...) @check_obstack_vprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 2, double 3.400000e+00)
%10 = call i32 (i8*, i8*, i8*, ...) @check_obstack_vprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 (...) @check_open_obstack_stream()
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"one and 2 then 3.4\00"
@.str.1 = [20 x i8] c"%s and %d then %.1f\00"
@.str.2 = [4 x i8] c"one\00"
@.str.3 = [14 x i8] c"one\0Atwo\0Athree\00"
@.str.4 = [7 x i8] c"one\0A%s\00"
@.str.5 = [10 x i8] c"two\0Athree\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @check_obstack_printf_int()
%4 = tail call i32 (...) @check_obstack_printf_typical()
%5 = tail call i32 (...) @check_obstack_printf_two_times()
%6 = tail call i32 (i8*, i8*, i8*, ...) @check_obstack_vprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 2, double 3.400000e+00)
%7 = tail call i32 (i8*, i8*, i8*, ...) @check_obstack_vprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 (...) @check_open_obstack_stream()
ret i32 0
}